<?php
//    return a suspended session's descriptor file (an xml file ) (todo=33).

require("phpVars.php");

  $aname='';
  foreach ($_GET as $vname=>$oof) {
     $avar=trim(strtoupper($vname)) ;
     if ($avar=='NAME') $aname=trim($oof);
  }

if ($aname=='') {
  print '<h3>Sorry</h3>No NAME= in call to   returnSuspendDesc.php ';
  print '<p><a target="_top" href="/dsurvey/admin.htm">Return to survey admin page</a>';
  exit ;
}


$dafile=$sessions_dir . $aname . '.SUSPEND_XML' ;
$isfile=file_exists($dafile);
if (!$isfile) {
  print "<h3>Sorry</h3>No such suspended-session descriptor file $dafile  (returnSuspendDesc.php) ";
  print '<p><a target="_top" href="/dsurvey/admin.htm">Return to survey admin page</a>';
  exit ;
}

$stuff=file_get_contents($dafile);
header('Content-Type: text/xml; charset=iso-8859-1');
echo $stuff;
exit;


?>

