Location: PHPKode > projects > PACSPulse > pacspulse/pagefunctions.php
<?php
include ("globalvars.php");
 
//Global Functions

function gentop($title,$pagename) {

  $date = date("F d, Y");
  $filename = "./pagetop.html";
  $filename2 = "./pagetop2.php";
  $fp = fopen ($filename, "r");
  $pagetop = fread ($fp, filesize ($filename));
  $pagetop = ereg_replace("<title>title</title>", "<title>$title</title>", $pagetop);
  echo "$pagetop";
  fclose ($fp);
  echo"
  <!-------------------------------Search TD------------------------------------------------>
    <td bgcolor=\"#ffffff\" align=\"center\">
    
    <form action=\"chartgen.php?P=D&Typ=0\" method=\"post\">
    <font size=\"2\" color=\"#000000\">
    <b>AE Title Log</b>
    <select name=\"V\" onChange=\"submit();\">";
      
      global $connection;
      $db = mysql_select_db("pulsetest", $connection) or die ("Couldn't connect to DB Radtracker");
      $sql_command = "SELECT DISTINCT nameMod FROM test ORDER BY nameMod";
      $sql_result = mysql_query($sql_command,$connection) or die (mysql_error());
      
      while ($row = mysql_fetch_array($sql_result)) {
        $name = $row[0];
        echo "<option value='$name'>$name</option>";
      }
echo "
  </select>
  </font>
  </form>
  
  </td>";

$fp = fopen ($filename2, "r");
$pagetop2 = fread ($fp, filesize ($filename2));
$pagetop2 = ereg_replace("mydateis", "$date", $pagetop2);
$pagetop2 = ereg_replace("pageurlname", "$pagename", $pagetop2);

echo "$pagetop2";


}

function genbottom() {

$filename = "./pagebottom.html";
$fp = fopen ($filename, "r");
$pagebottom = fread ($fp, filesize ($filename));
global $connection;
mysql_close($connection);
echo "$pagebottom";
}

?>
Return current item: PACSPulse