... and ... print "
\n\n
"; include($topFile); print "
"; include($menuFile); print "
"; //print "
RC-debug start Search 0 ******************************"; //til hit ############################################################################# ## File: printYearMenu.php3, included twice from INT-PUBL-TYPE.php3. ############################################################################# function printYearMenu_S($CalledBy) { ////////////////////// Include('printYearMenu.php3'); ## Function body } ## end-function printYearMenu_S ########################################## ############################################################################# ## Then, PrintTypeMenu to show/select all publication types. ############################################################################# function printTypeMenu_S($firsttime) { include('printTypeMenu.php3'); ## Function body } ## end-function printTypeMenu_S ########################################## function printSearchMenu_S() { include('printSearchMenu.php3'); ## Function body } ## end-function printSearchMenu_S ######################################## ####################################################################### ## ## xxx check()-function ## ############################################################################ function check(){ global $bufferLine, $buffArr, $buffArrLength, $printing, $parameterOrArray, $parameterAndArray, $parameterOrArrayLength, $arrayToBePrinted, $operator; if($operator=="or" || $operator==""){ if(strncmp("
  • ", strtoupper($bufferLine), 4) == 0){ for($m=0;$m<$parameterOrArrayLength;$m++){ $parameter = strtoupper(trim($parameterOrArray[$m])); if(ereg($parameter, strtoupper($bufferLine))){ $buffArrLength = 0; $buffArr[] = ""; $buffArr[$buffArrLength] = $bufferLine; $buffArrLength++; $printing = True; $arrayToBePrinted = True; } else{ $buffArrLength = 0; $buffArr[] = ""; $buffArr[$buffArrLength] = $bufferLine; $buffArrLength++; $printing = True; } } } if((strncmp("
  • ", strtoupper($bufferLine), 5) == 0) && $printing){ $buffArrLength++; $buffArr[] = ""; $buffArr[$buffArrLength] = $bufferLine; if($arrayToBePrinted){ printOut(); } $printing = false; } if($printing && (strncmp("
  • ", strtoupper($bufferLine), 4) != 0)){ $buffArrLength++; $buffArr[$buffArrLength] = $bufferLine; for($m=0;$m<$parameterOrArrayLength;$m++){ $parameter = trim(strtoupper($parameterOrArray[$m])); if( ereg($parameter, strtoupper($bufferLine))){ $arrayToBePrinted = True; } } } } if($operator=="and"){ if(strncmp("
  • ", strtoupper($bufferLine), 4) == 0){ if(!$printing){//unset($buffArr); $buffArrLength = 0; $buffArr[] = ""; $buffArr[$buffArrLength] = $bufferLine; $buffArrLength++; $printing = True; } } else if($printing){ $buffArr[] = ""; $buffArr[$buffArrLength] = $bufferLine; $buffArrLength++; $printing = True; } if((strncmp("
  • ", strtoupper($bufferLine), 5) == 0) && $printing){ $buffArrLength++; $buffArr[] = ""; $buffArr[$buffArrLength] = $bufferLine; for ($ar=0; $ar<20; $ar++) {$parameterAndArray[$ar]=False;}; $printing = false; checkWhole(); } if($printing && (strncmp("
  • ", strtoupper($bufferLine), 4) != 0)){ $buffArrLength++; $buffArr[$buffArrLength] = $bufferLine; } } } ####################################################################### ## ## xxx checkWhole()-function ## ############################################################################ function checkWhole(){ global $parameterAndArray, $parameterOrArrayLength, $buffArr, $buffArrLength, $parameterOrArray, $match; $temp = True; for($x=0;$x<$buffArrLength;$x++){ for($y=0;$y<$parameterOrArrayLength;$y++){ $buff = trim(strtoupper($buffArr[$x])); $par = trim(strtoupper($parameterOrArray[$y])); if(ereg($par, $buff)){ $parameterAndArray[$y]=True; } } } for($z=0;$z<$parameterOrArrayLength;$z++){ if($parameterAndArray[$z] && $temp){ $temp = True; } else{ $temp = False; } } if($temp){ printOut(); } } ####################################################################### ## ## xxx printOut()-function ## ############################################################################ function printOut(){ global $arrayToBePrinted, $buffArr, $buffArrLength, $match; for($k=0;$k<=$buffArrLength;$k++){ echo($buffArr[$k]); $buffArr[$k]=""; $parameterAndArray[$k]=False; } unset($buffArr); $buffArrLength = 0; $arrayToBePrinted = false; ## not false -- RC: 14.1.2015 $match = true; ## not true -- RC: 14.1.2015 } ####################################################################### ## ## xxx printparameterArray()-function ## ############################################################################ function printparameterArray(){ ## 29.12.09 RC: not used!! global $parameterOrArray, $parameterOrArrayLength; echo("
    printer : $parameterarray :
    "); for($s=0;$s<$parameterOrArrayLength;$s++){ echo($parameterOrArray[$s]); } echo("
    length : "); echo($parameterOrArrayLength); } ####################################################################### ## ## xxx fillparameterArray()-function ## ############################################################################ function fillparameterArray($line){ ## 29.12.09: RC: unused?? no global $parameterOrArray, $parameterOrArrayLength, $lastPosition, $j; $parameterOrArrayLength = 0; $parameterOrArray[] = ""; $firstlength = strlen($line); for($j=0;$j<$firstlength;$j++){ $length = strlen($line); $tempstring = substr($line, $j, 1); if(strncmp($tempstring, " ", 1) == 0){ $parameterOrArray[] = ""; $parameterOrArray[$parameterOrArrayLength] = substr($line, $lastPosition, $j-$lastPosition); $parameterOrArrayLength++; $lastPosition = $j; } } $parameterOrArray[$parameterOrArrayLength] = substr($line, $lastPosition, $firstlength-$lastPosition); $parameterOrArrayLength++; } ############################################################################ ## ## string findYear()-function ## ############################################################################ function findYear(){ ## Include_once("IPT-globdefs.php"); global $bufferLine; if ((strlen($bufferLine) >= (4+5+4+3)) && (strncmp(strtoupper($bufferLine), " $file = file_exists("/home/webdomener/www.idi.ntnu.no/htdocs/grupper/su/publ/INT-PUBL.php3"); if (!$file) { print "******** INT-PUBL.php3 file cannot be found!!".$file; }; if (!$file) exit(); $file = fopen("/home/webdomener/www.idi.ntnu.no/htdocs/grupper/su/publ/INT-PUBL.php3", "r"); $parameters = $_GET['parameters']; $op = ""; $op = $_GET['operator']; ## See below $parameterOrArray = array(); $parameterAndArray = array(); $parameterOrArrayLength; $lastPosition = 0; $j = 0; $printing = false; $buffArr = array(); $buffArrLength = 0; $arrayToBePrinted = False; $match = false; $bufferLine = ""; fillParameterArray($parameters); for($g=0;$g<$parameterOrArrayLength;$g++){ $parameterAndArray[] = False; } if (($parameterOrArrayLength <= 1) && ($op == "and")) { Print("
    #parms <= 1 & op == AND : OR assumed!!"); $op = "or"; } $OKSearch = ($parameters != ""); ## Print("
    parameterOrArrayLength = ".$parameterOrArrayLength); ## Print(" OKSearch = ".$OKSearch); if (!$OKSearch) { Print("
    Missing keyword(s) for search: none found!!"); } if ($op == "") {$operator = "or";} ## RC: added else {$operator = $op;} ## RC: added print("
    LOG.OP: \"".$operator."\" - "); print("KEYWORDS: \"".$parameters."\"

    "); while ((!feof($file)) && ($OKSearch)) { $bufferLine = fgets($file, 4096); if(strncmp($bufferLine, "