"; exit; } if (isset($_GET["total"])) { $istotal=$_GET["total"]; # Y if ($istotal != 'Y') { echo "Invalid Input."; exit; } } else { $istotal=""; # nost sure how t his effects mysql query } $initial=$_GET["initial"]; $initial=""; $check_ion=$_GET["ision"]; if ($check_ion == 'I') { $ision=true; } else if ($check_ion == 'E') { $ision=false; } else { echo "Invalid Input."; exit; } $info["BUN"]="Id=\"".$id."\""; if ($ision){ $info["BUN"]="Id=\"".$id."\""; if ( isset($_GET["total"])){ $type="Total"; $info["beb"]="Id=\"$id\" and isTotal=\"Y\""; $info["Headers"]="Id=\"".$id."\" and isIon=\"I\" and isTotal=\"Y\"";} else{ $type="Differential"; $info["beb"]="Id=\"$id\" and isTotal=\"N\""; $info["Headers"]="Id=\"".$id."\" and isIon=\"I\" and isDiff=\"Y\"";}} else{ $final=$_GET["final"]; $info["excit"]="Id=\"".$id."\" and Initial=\"".$initial."\" and Final=\"".$final."\""; $info["Headers"]="Id=\"".$id."\" and isIon=\"E\"";} $title="Ionization Cross-Section Data"; include "/home/www/htdocs/PhysRefData/Ionization/Inserts/ion_header.php"; $res=mysql_query("select ElSym,StNo,StSym from StHoldings where Id=\"".$id."\""); if (mysql_numrows($res)==0){ #Security fix: echo "Something exciting has happened! How did you get the invalid Id ".$id."?"; echo "Invalid Id."; exit;} $row=mysql_fetch_row($res); $el=$row[0]; $st=$row[1]; $stsym=$row[2]; $res=mysql_query("select ElName from ElHoldings where ElSym=\"".$el."\""); $row=mysql_fetch_row($res); $element=$row[0]; if ($type=="Differential") { echo "
"; echo "
".($st=="0"?"Neutral ":"").$element.($st==0?"":$stsym).""; $query='select MolOrbit,B,U,N,Q,DoubleIon,SpecialCalc,Remarks from BUN where Id="'.$id.'" ORDER BY RowNo'; $result=mysql_query($query); if(mysql_numrows($result)<=0){ echo "

BUN data not currently available for ".$id; echo "

"; } else { $row=mysql_fetch_row($result); ?>

 
Atomic Orbital Constants

'.$row[0].''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; ?>
Orbital B (eV) U (eV) N Q Double
Ion.
Special
Calc.
Remarks
'.$row[1].''.$row[2].''.$row[3].''.$row[4].''.$row[5].''.$row[6].''.$row[7].'
B: Binding Energy
U: Average Kinetic Energy
N: Electron Occupation Number
Q: Dipole Constant
Double Ion.: If yes, include this twice to account for double ionization.
Special Calc.: Use this n in Eq. (1) of Introduction instead of the default n=1.

Differential Cross Section
 
Incident electron energy, T = eV (required)
Ejected electron energy, W = eV (optional)

\n";} else if (mysql_numrows($ref)<1){ report("No reference found with short name $short, skipping."); } else{ #####debug("Reference found with short name $short"); $r=mysql_fetch_row($ref); echo "\n";} } //end code printing BEB ref $line=preg_replace('/(.*)
.*/','$1',$line); $line=preg_replace('/(.*)
.*/','$1',$line); $line=preg_replace('/([0-9]) keV/','$1 keV',$line); $short=rtrim(preg_replace('/.*({[^}]*}).*/','$1',$line)); $ref=mysql_query("select Short,Full from refs where Short='$short'"); $line=preg_replace('/[{}]/',"",$line); if (mysql_numrows($ref)>1){ report("More than one reference with short name $short found, reporting the first."); $r=mysql_fetch_row($ref); echo "\n";} else if (mysql_numrows($ref)<1) report("No reference found with short name $short, skipping."); else{ #####debug("Reference found with short name $short"); $r=mysql_fetch_row($ref); echo "\n";} echo ""; } echo "
Experimental and Theoretical
Results

\/]/','',$initial)."-".preg_replace('/[<>\/]/','',$final);?>&mode=ASCII">

Atomic Orbital Constants for BEB Calculation of the Direct Cross Section
Total Ionization Cross Section
  Incident electron energy, T = eV


\n"; ////new code for references table $file=file("/home/www/htdocs/PhysRefData/Ionization/Graphs/GraphInput/".$id."--.legend"); if (!$file) debug ("can't open legend file for ".$Id); $printrefs=0; foreach ($file as $line) { chop ($line); if (!isset($bebstring)) { // gather information about first "beb" col $bebref=preg_replace('/.*({[^}]*}).*/','$1',$line); // get ref code $bebstring=preg_replace('/{[^}]*}/',"",$line); // omit ref code $bebstring=preg_replace('/(.*)
.*/','$1',$bebstring); continue; } if (preg_match($bebref,$line)) { // gather info about other "beb" cols $bebtxt=preg_replace('/{[^}]*}/',"",$line); $bebtxt=preg_replace('/(.*)
.*/','$1',$bebtxt); $bebtxt=preg_replace('/(.*)
.*/','$1',$bebtxt); $bebstring=$bebstring."
".$bebtxt; continue; } if ((!preg_match($bebref,$line)) && (!$printrefs)) { // print "beb" info $printrefs=1; $short=rtrim(preg_replace('/.*({[^}]*}).*/','$1',$bebref)); // $short=preg_replace('/.*({[^}]*}).*/','$1',$bebref); $ref=mysql_query("select Short,Full from refs where Short='$short'"); if (mysql_numrows($ref)>1){ report("More than one reference with short name $short found, reporting the first."); $r=mysql_fetch_row($ref); echo "
".$bebstring."".$r[1]."
".$bebstring."".preg_replace('/^"(.*)"$/','$1',$r[1])."
".$line."".$r[1]."
".$line."".preg_replace('/^"(.*)"$/','$1',$r[1])."
"; ?>


All cross sections are in 10-16 cm2 unless otherwise specified.

"; $query='select Header,ColNo,Kind from Headers where Id="'.$id.'" and isIon="I" and isTotal="'.$istotal.'" order by ColNo'; $result=mysql_query($query); $currcolor='"#EEEEFF"'; $uncertainties=Array(); $col=0; while($row=mysql_fetch_row($result)){ // Print column numbers, e.g I, II if ($row[2]=="Uncertainty"){ $donothing=1; } elseif ($col==0) { echo " "; $currcolor='"#EEFFEE"'; $col++; } else { echo "".$romNum[$col].""; $col++; $currcolor=($currcolor=='"#EEEEFF"'?'"#EEFFEE"':'"#EEEEFF"'); } } $currcolor='"#EEEEFF"'; echo ""; # end row of Roman Numerals echo ""; ## start row of column headings $query='select Header,ColNo,Kind from Headers where Id="'.$id.'" and isIon="I" and isTotal="'.$istotal.'" order by ColNo'; $result=mysql_query($query); while($row=mysql_fetch_row($result)){ if ($row[2]=="Uncertainty"){ $uncertainties[]=$row[1];} else{ if ($row[1]==2) { // suppress display of reference code echo "".preg_replace('/({.*})/',"", $row[0]).""; $bebref=$row[0]; $bebref=preg_replace('/.*{/',"",$bebref); $bebref=preg_replace('/}.*/',"",$bebref); $bebref="{".$bebref."}"; } else if ($row[1]>2 && (ereg ($bebref, $row[0]))) { // suppress reference code if it is the same as BEB Direct ref echo "".preg_replace('/({.*})/',"", $row[0]).""; } else { //$line=preg_replace('/([0-9]) keV/','$1 keV',$line); echo "".preg_replace('/[{}]/',"", preg_replace('/([0-9]) keV/','$1 keV',$row[0])).""; } $currcolor=($currcolor=='"#EEEEFF"'?'"#EEFFEE"':'"#EEEEFF"');}} # ending tr for headers row is actually printed before the next row of # table data starts $row=mysql_fetch_array($res); while($row){ $curr=Array(); $energy=$row["Energy"]; if ($energy==0||$energy==""){ $row=mysql_fetch_array($res); continue;} echo ""; echo ''.$row["Energy"]."\n"; $currcolor='"#EEEEFF"'; while($row && $row["Energy"]==$energy){ $j=$row['ColNo']; $curr[$j]=$row['Result']; $row=mysql_fetch_array($res);} for($i=1;$i<=$j;++$i){ if (!(false===array_search($i+1,$uncertainties))){ continue;} $currcolor=($currcolor=='"#EEEEFF"'?'"#EEFFEE"':'"#EEEEFF"'); if (!isset($curr[$i])) { $curr[$i] = " "; } echo "".$curr[$i]:">")."\n";}} echo "";} echo ""; ?>