= 97 && $ltr <= 122 || $ltr == 32) { //$hsh = ($hsh*23+floor($hsh / 10000000)+$ltr)%10000000 ; $hsh = $hsh . $hdg[floor($ltr/16)] . $hdg[$ltr%16] ; //} } return $hsh ; } function load_exam_script($scriptFile) { global $config ; $fh = fopen($scriptFile, 'r') or die("Can't open file"); $field_count = 0 ; $answer_table= "" ; $starter_table = "" ; $page_count= 0 ; echo "\n\n
\n" ; while ($line= fgets($fh)) { if (!preg_match("/^#/", $line)) { # ignore comment lines # chop newlines $line = preg_replace("/[\r\n]/", "", $line) ; # replace titles if (preg_match("/^\(t\s*(.*)\s*t\)\s*$/", $line, $matches)) { $page_count++ ; $line = preg_replace("/^\(t\s*(.*)\s*t\)\s*$/", "\n
\n\n" ; echo "
"; echo "\n\n" ; } echo ""; ?>