echo ""; echo ""; echo ""; echo "
"; echo " "; echo " "; echo " "; echo "";
echo "";
echo " "; // Get the search variable from URL $var1 = @$_GET['q'] ; $var2 = @$_GET['x'] ; $trimmed1 = trim($var1); //trim whitespace from the stored variable $trimmed2 = trim($var2); //trim whitespace from the stored variable $search_term = $trimmed2; // rows to return $limit=1000; //connect to database ($GLOBALS["___mysqli_ston"] = mysqli_connect("localhost", "idealwa3_edbase", "o75T,reV-lBc")) or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); ((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE idealwa3_edbase")) or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); //get the url of the generated page $getip = $_SERVER["REQUEST_URI"]; $var = $getip; // query the database $query = "select File,Display,Section,Chapter,Title,XHTML,Report FROM Manual01 WHERE Publish='Y' AND IL='Y' AND File like '$trimmed1' ORDER BY Sequence"; $numresults=mysqli_query($GLOBALS["___mysqli_ston"], $query); $numrows=mysqli_num_rows($numresults); // If we have no results if ($numrows == 0) { // echo " Apparently file: "" . $trimmed . "" does not exist. "; echo "Please verify the file name and try again. "; } // next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; } // get results $query .= " limit $s,$limit"; $result = mysqli_query($GLOBALS["___mysqli_ston"], $query) or die("Couldn't execute query"); while ( $row = mysqli_fetch_assoc($result) ){ $xhtml = $row['XHTML']; $xhtml = replace_marker($xhtml, 'PRNSEL'); // replace PLUG-PRNSEL, the print selector plugin $xhtml = replace_marker($xhtml, 'ADDCODE1'); // replace PLUG-ADDCODE1, the term dependent add new code plugin $xhtml = replace_marker($xhtml, 'ADDCODEB'); // replace PLUG-ADDCODEB, term dep add new code plugin (replaces CR w ENTER) $xhtml = replace_marker($xhtml, 'MODCODE1'); // replace PLUG-MODCODE1, the modify code1 plugin $xhtml = replace_marker($xhtml, 'MODCODEA'); // replace PLUG-MODCODEA, the modify code1a plugin (replaces CR w ENTER) $xhtml = replace_marker($xhtml, 'MODCODE2'); // replace PLUG-MODCODE2, the modify code2 plugin $xhtml = replace_marker($xhtml, 'MODCODEB'); // replace PLUG-MODCODEB, the modify code2b plugin (replaces CR w ENTER) $xhtml = replace_marker($xhtml, 'MODCODE3'); // replace PLUG-MODCODE3, the modify code3 plugin $xhtml = replace_marker($xhtml, 'MODCODEC'); // replace PLUG-MODCODEC, the modify code3c plugin (replaces CR w ENTER) $xhtml = replace_marker($xhtml, 'MODCODE4'); // replace PLUG-MODCODE4, the modify code4 plugin $xhtml = replace_marker($xhtml, 'MODCODEE'); // replace PLUG-MODCODEE, the modify code5e plugin (replaces CR w ENTER) $xhtml = replace_marker($xhtml, 'BATOPT1'); // replace PLUG-BATOPT1, the term dependent batch options plugin $xhtml = replace_marker($xhtml, 'BATOPT2'); // replace PLUG-BATOPT2, the term independent batch options plugin $xhtml = replace_marker($xhtml, 'BATACC1'); // replace PLUG-BATACC1, the term dependent batch creation plugin $xhtml = replace_marker($xhtml, 'BATACC2'); // replace PLUG-BATACC2, the term independent batch creation plugin $xhtml = replace_marker($xhtml, 'BATACC3'); // replace PLUG-BATACC3, another term independent batch creation plugin $xhtml = replace_marker($xhtml, 'ADDELIN1'); // replace PLUG-ADDELIN1, the add/del line in term dependent batch plugin $xhtml = replace_marker($xhtml, 'ADDELIN2'); // replace PLUG-ADDELIN2, the add/del line in term independent batch plugin $xhtml = replace_marker($xhtml, 'BATOOB1'); // replace PLUG-BATOOB1, the term dependent batch out of bal plugin $xhtml = replace_marker($xhtml, 'ESCMENU'); // replace PLUG-ESCMENU, the escape menu plugin $xhtml = replace_marker($xhtml, 'EMPINQ'); // replace PLUG-EMPINQ, the employee inquiry plugin $xhtml = replace_marker($xhtml, 'GENINOPT'); // replace PLUG-GENINOPT, the general inquiry options plugin $xhtml = replace_marker($xhtml, 'INMTEOPT'); // replace PLUG-INMTEOPT, the inventory maintenance options plugin $xhtml = replace_marker($xhtml, 'PRDINOPT'); // replace PLUG-PRDINOPT, the product inquiry options plugin $xhtml = replace_marker($xhtml, 'LOGINIA'); // replace PLUG-LOGINIA, the idealaccounting login screen plugin $xhtml = replace_marker($xhtml, 'LOGINIL'); // replace PLUG-LOGINIL, the idealaw login screen plugin $xhtml = replace_marker($xhtml, 'LOGINIW'); // replace PLUG-LOGINIW, the idealware login screen plugin $xhtml = replace_marker($xhtml, 'MSYSMENIA'); // replace PLUG-MSYSMENIA, the idealaccounting main system menu plugin $xhtml = replace_marker($xhtml, 'MSYSMENIL'); // replace PLUG-MSYSMENIL, the idealaw main system menu plugin $xhtml = replace_marker($xhtml, 'MSYSMENIW'); // replace PLUG-MSYSMENIW, the idealware main system menu plugin $xhtml = replace_marker($xhtml, 'NOTES'); // replace PLUG-NOTES, the notes plugin $xhtml = replace_marker($xhtml, 'QMENUOPT'); // replace PLUG-QMENUOPT, the quick menu options plugin $xhtml = replace_marker($xhtml, 'SPINCRIT'); // replace PLUG-SPINCRIT, the sale order inquiry criteria plugin $xhtml = replace_marker($xhtml, 'SYSGENIN'); // replace PLUG-SYSGENIN, the system general inquiry plugin $xhtml = replace_marker($xhtml, 'TEXTED'); // replace PLUG-TEXTED, the system text editing special keys plugin $xhtml = preg_replace('/(\b'.$search_term.'\b)/i','$1',$xhtml); $xhtml = preg_replace('/(\b'.$search_term.'\b)/i','$1',$xhtml); $report = $row['Report']; $report = preg_replace('/(\b'.$search_term.'\b)/i','$1',$report); // Print out the contents of the entry echo " You searched for: "; echo $search_term; echo ""; echo " Ideal Online Documentation"; // display header echo "".$row['Display'];
echo " ".$row['Section'];
echo "";
echo $xhtml;
echo $report;
echo " |