$title = "Keller Publishing Buyer's Guide: Product & Company Search" ;
include "include/dbconn.inc" ;
if(!isset($pub))
$pub=$mag_id ;
if(!isset($mag_id))
$mag_id=$pub ;
switch ($mag_id) {
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "10" :
default:
//OK as is
$mag_id=$mag_id ;
break ;
default:
$val=mysql_query("select record_id from publicationlist where name='$mag_id'") ;
$res=mysql_fetch_row($val) ;
$mag_id=$res[0] ;
break ;
}
/* if ($mag_id=="" || $mag_id=="1" || $mag_id=="agri") {
$tmp_mag_id=$mag_id; // used to hold id for when submitting this works around to get the includes in
$mag_id="agri";
if ($lang=="sp")
include "include_top1sp.htm" ;
else
include "include_top1.htm" ;
}
if ($mag_id=="2") {
if ($lang=="sp")
include "include_top2sp.htm" ;
else
include "include_top2.htm" ;
}
if ($mag_id=="3" || $mag_id=="petro") {
$tmp_mag_id=$mag_id;
$mag_id="petro" ;
if ($lang=="sp")
include "include_top3sp.htm" ;
else
include "include_top3.htm" ;
}
if ($mag_id=="4" || $mag_id=="gfs" ){
$tmp_mag_id=$mag_id;
$mag_id="gfs";
if ($lang=="sp")
include "include_top4sp.htm" ;
else
include "include_top4.htm" ;
}
if ($mag_id=="5" || $mag_id=="laa") {
//$mag_id="iic";
if ($lang=="sp")
include "include_top5sp.htm" ;
else
include "include_top5.htm" ;
}
if ($mag_id=="6" || $mag_id=="glscs" ) {
if ($lang=="sp")
include "include_top6sp.htm" ;
else
include "include_top6.htm" ;
}
if ($mag_id=="7" || $mag_id=="iic" ) {
if ($lang=="sp")
include "include_top7sp.htm" ;
else
include ".include_top7.htm" ;
}
if ($mag_id=="8" || $mag_id=="chem" ) {
if ($lang=="sp")
include "include_top8sp.htm" ;
else
include "include_top8.htm" ;
}
if ($mag_id=="9" || $mag_id=="wir" ) {
if ($lang=="sp")
include "include_top9sp.htm" ;
else
include "include_top9.htm" ;
}
*/
//include "keller-nav-head.inc" ;
if($lang=="sp")
include "include_top".$mag_id."sp.htm" ;
else
include "include_top".$mag_id.".htm" ;
// first time, zero all useful values
// This is used to keep track of paging
if(empty($min)){
$min = 1 ;
}
if(empty($max)){
$max = 10 ;
}
if(empty($offset)){
$offset = 0 ;
}
if(!empty($next_x)){
$min += 10 ;
$max += 10 ;
$offset += 10 ;
}
if(!empty($prev_x)){
$min -= 10 ;
$max -= 10 ;
$offset -= 10 ;
}
?>
if ($lang=="sp")
$enter_word="Buscar";
else
$enter_word="Enter";
if ($search1)
{
$search=$search1;
$keywords="";
}
if ($search2)
{
$search=$search2;
$category="all";
}
echo "
" ;
echo "
| " ; /* if ($mag_id=="7") { echo "" ; } if ($mag_id=="5") { echo "" ; } else { */ // $mag="bgcatmag.magazine_id='chem' or bgcatmag.magazine_id='wir'" ; //else $mag="bgcatmag.magazine_id='$mag_id'" ; echo " | ||||||
| ¿Qué productos o servicios le
interesan más? Llene simplemente el formulario \"Manténgame informado\" y le haremos saber inmediatamente por e-mail cuando se agregue un nombre a la guía de compradores de la categoría de los productos/servicios que haya escogido."; else echo " What products/services are most interesting to
you? | Simply fill out our \"Keep Me Posted\" form and you will instantly be notified by e-mail when a buyers' guide listing is added to your pre-selected product/services categories."; } echo "\n" ; echo "\n" ; echo "" ; echo "
echo " | " ; //echo $query_string; //echo " " ; $count=mysql_query("$query_string") ; $query_string = $query_string." LIMIT ".($offset != 0 ? "$offset, 10" : "10" ) ; //echo " QS: $query_string "; $results = mysql_query("$query_string" ) ; //echo $query_string; /* this will give us a count of the "real" search */ //echo $count_string; //$count = mysql_query("$count_string") ; //$countarray = mysql_fetch_array($count) ; // $found = mysql_num_rows($results) ; $total = intval($countarray[0]) ; //echo "Found $total" ; if ($count) $total=mysql_num_rows($count) ; //echo "total = $total" ; if ($lang=="sp") { $search_results="Resultados de la búsqueda"; $result_word="Resultados"; } else { $search_results="Search Results"; $result_word="Results"; } switch($total) { case 0: echo " No Results | $result_word " ;
echo $min." to ". ( $max > $total ? $total : $max) ." of ". $total ;
echo " | $search_results: | " ; */ while($row = mysql_fetch_array($results) ) { if($counter %2 ) { $bgcolor ="#ffffcc" ; /* odd, white color */ } else { $bgcolor = "ffffff" ; /* even, pink color */ } /* if counter */ echo " " ;
if($type == products) {
// $x = mysql_query("SELECT company from bgcompanies where record_id='$row[company_id]'") ;
$x = mysql_query("SELECT companyname from companylist where company_id='$row[company_id]'") ;
$y = mysql_fetch_array($x) ;
echo "" ;
echo "$row[name_eng] | Offered By: $y[company]" ; echo " $row[description] Price: $row[pricing] "; if($lang=="sp") echo "Teléfono:"; else echo "Phone:"; echo " " ; echo "$row[phone] Fax: $row[fax] " ; if($lang=="sp") echo "$row[spanish_profile]" ; else echo "$row[company_profile]" ; if ($row[prod1_url] || $row[prod2_url] || $row[prod3_url] || $row[prod4_url] || $row[prod5_url]) echo " Product reviews" ; echo " |
| " ; /* this is a box for the table */ if( $total > $maxperpage) { echo " |