?
Path : /home/admin/public_html/old/hotel/ |
Current File : /home/admin/public_html/old/hotel/newcatalog.php |
<?php session_start(); include ("config.php"); include ("category.php"); include ("toplink.php"); include("function.php"); @mysql_db_query($dbname,"update ".$fix."user set counter=(counter+1) where userid='1' "); if($_GET["gallery"]=="1") { if (empty($page)) $page=1; $nofollow=1; themehead(_LANG_59." Page:$page"); gallery("gallery","0"); themefoot(); mysql_close($connection); exit; } if(is_numeric($_GET["idp"])) $sql = "select * from ".$fix."catalog where idp='".$_GET["idp"]."' and category NOT IN ('L1','LA') and recom='1'"; elseif(is_numeric($_GET["category"])) $sql = "select * from ".$fix."catalog where category='".$_GET["category"]."' order by idp desc limit 1"; else{ for($i=0; $i<count($categories); $i++) { $data .= "<table width=\"100%\" bgcolor=\"$syscolor2\" cellspacing=1 cellpadding=0><tr><td>\n"; $data .= "<table width=\"100%\" bgcolor=white cellspacing=1 cellpadding=3>\n"; $data .= "<tr><td background=\"$folder/bgbb.gif\" colspan=2>"; $data .= "<font color=\"$color1\"><b>".stripslashes($categories[$i][1])." </b></font></td></tr>\n"; $data .= showallcat2($categories[$i][0],"0",stripslashes($categories[$i][1]))."\n"; $data .= "</table></td></tr></table><br>\n"; } themehead(_LANG_34); echo $data; themefoot(); mysql_close($connection); exit; } $result = @mysql_db_query($dbname,$sql); if(!@mysql_num_rows($result)) { $nofollow = true; themehead("The page cannot be found"); echo "<font color=red>"._LANG_36_3."</font>"; themefoot(); exit; } $array = mysql_fetch_array($result); mysql_db_query($dbname,"update ".$fix."catalog set counter=(counter+1) where idp='$array[0]' "); $query = mysql_db_query($dbname,"select MAX(idp) from ".$fix."catalog where category='$array[1]'"); $new_idp = @mysql_result($query,0); $new = ($new_idp==$array[0]) ? "<img src=\"images/new.gif\">" : ""; $categoryname = searchcat_by($array[1]); if($category) themehead($categoryname); else themehead(stripslashes($array[2])); echo "<table cellspacing=0 cellpadding=2 width=\"100%\"><tr><td valign=top>"; /* if(!ereg("L",$array[1])) echo"<div align=left class=catbox><b>"._LANG_32.": $categoryname</b></div>"; echo "<table cellspacing=0 cellpadding=4><tr>"; if($array[4]) { $imarray = explode("@",$array[4]); $imageall = 0; for($i=0; $i<count($imarray); $i++) { if($imarray[$i]) { $im_data[] = "<table bgcolor=\"$color3\" cellspacing=1 cellpadding=2 width=$thumbwidth height=$thumbwidth><tr><td align=center bgcolor=white>".showthumb_catalog("$folder/thumb_$imarray[$i]")."</td></tr></table>"; $imageall++; } } if($imageall==1) echo "<td valign=top align=center>$im_data[0]<br></td>"; elseif($imageall>1) { $imagealls = "<tr><td align=center><br><table cellspacing=0 cellpadding=4><tr>"; for($i=0; $i<$imageall; $i++) { if($i%3==0) $imagealls .="</tr><tr>"; $imagealls .="<td>$im_data[$i]</td>"; } $imagealls .= "</tr></table></td></tr>"; } } echo "<td valign=top><table cellspacing=0 cellpadding=4> <tr><td><font color=\"$color2\"><b>".stripslashes($array[2])."</b></font> "; if(!ereg("L",$array[1])) echo $new; echo "<br>".datetime($array[5])." <font class=small>Views: $array[7]</font></td></tr> <tr><td valign=top>".stripslashes(str_replace("[emailform]","",$array[3]))."</td></tr>"; echo "$imagealls </table></td></tr></table> </td></tr><tr><td>"; */ if( (ereg("L",$array[1])) && (ereg("\[emailform\]",$array[3])) ) { echo "<br><center><script>Hbox('450','$folder','$syscolor3')</script>"; include "mail.php"; echo "<script>Fbox('$folder')</script></center><br>"; } if(!ereg("L",$array[1])) { //echo "<br><script>Hbox('100%','$folder','$color1')</script>"; if(searchcat_opt($array[1])==1) newshowallcatp($array[1],$array[0],$categoryname); else newshowallcatp($array[1],$array[0],$categoryname); //echo "<script>Fbox('$folder')</script>"; } echo "</td></tr></table>"; themefoot(); mysql_close($connection); ?>