File Manger -- Command Execute -- Back Connect -- BypasS Command eXecute(SF-DF) -- BypasS Directory -- Eval -- Data Base -- Server Information
File Name : /home/no2airforceschoo/domains/no2airforceschoolgwl.com/public_html/photodetail.php<?php include("admin/dlogin.php"); $catid=@$_GET['catid']; $str="select * from photocategory where catid=$catid"; $rs=mysqli_query($conn, $str); @$row=mysqli_fetch_array($rs); $catid=@$row['catid']; $catname=@$row['catname']; $destext=@$row['destext']; $desname=@$row['desname']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <head><title><?php print $catname;?> Photogallery No.2 Air Force School</title> <meta charset="UTF-8"> <meta name="description" content="<?php print $catname;?> photogallery No.2 Air Force School"> <meta name="keywords" content="<?php print $catname;?> photogallery No.2 Air Force School"> <link rel="stylesheet" id="style-css" href="images/style.css" type="text/css" media="screen" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script> <link rel="stylesheet" type="text/css" href="js/jquery.lightbox-0.5.css" media="screen" /> <script type="text/javascript"> $(function() { $('a.lightbox').lightBox(); }); </script> </head> <body> <div> <div class="MainBody"> <div class="maindiv"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php include ("header.php"); ?></td> </tr> <tr> <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="maintable" align="center"> <tr> <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="maintablebg"> <tr> <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="70%" valign="top"><table width="100%" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td height="5"></td> </tr> <tr> <td class="welhead"><?php print $catname;?> Photogallery</td> </tr> <tr> <td class="menu_down_line"></td> </tr> <tr><td height="10"></td></tr> <tr> <td class="data"><?php print $destext;?></td> </tr> <tr><td height="10"></td></tr> <tr> <td><?php if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 1; } // if $query = "SELECT count(*) FROM photogallery where catid='$catid' "; $result = mysqli_query($conn, $query); $query_data = mysqli_fetch_row($result); $numrows = $query_data[0]; $rows_per_page = 30; $lastpage = ceil($numrows/$rows_per_page); $pageno = (int)$pageno; if ($pageno > $lastpage) { $pageno = $lastpage; } // if if ($pageno < 1) { $pageno = 1; } // if $limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page; $query = "select * FROM photogallery where catid='$catid' order by photoid Desc $limit"; $result = mysqli_query($conn, $query); $num_result = mysqli_num_rows($result); if($num_result > 0){ while($row = mysqli_fetch_array($result)) { $data[] = $row; } $data = array_chunk($data, 3); echo '<table width=100% border=0 cellspacing=0 cellpadding=5 class=prodetail>'; foreach ($data as $row) { echo'<tr>'; foreach ($row as $column) { $gphotoname = $column['gphotoname']; $gphoto = $column['gphoto']; if (empty($gphoto)) $gphoto = 'photo.jpg'; print '<td width="33%" valign=top class=imgprobor><table width="" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> <table width="100%" border="0" cellpadding="4" cellspacing="1" class="right_box1"> <tr> <td valign="top"><a href="photogallery/'.$gphoto.'" class="lightbox"><img src="photogallery/'.$gphoto.'" width="195" height="160" border="0"></a></td> </tr> <tr> <td valign="top"><a href="photogallery/'.$gphoto.'" class="lightbox">'.$gphotoname.'</a></td> </tr> </table></td> </tr> </table></td>'; } } } else{ ?><span style="font-size:12px; font-family:Arial; font-weight:normal; text-align:center;"><strong>No Photo Upload</strong></span> <?php } echo '</tr>'; echo '</table>'; ?></td> </tr> <tr> <td height="32" align="center" class="next_prev"><?php if ($pageno == 1) { echo " FIRST PREV "; } else { echo " <a href=\"photodetail.php?catid=$catid&pageno=1\">FIRST</a> "; $prevpage = $pageno-1; echo " <a href=\"photodetail.php?catid=$catid&pageno=$prevpage\">PREV</a> "; } // if echo " ( Page $pageno of $lastpage ) "; if ($pageno == $lastpage) { echo " NEXT LAST "; } else { $nextpage = $pageno+1; echo " <a href=\"photodetail.php?catid=$catid&pageno=$nextpage\">NEXT</a> "; echo " <a href=\"photodetail.php?catid=$catid&pageno=$lastpage\">LAST</a> "; } // if ?> </td> </tr> <tr><td height="10"></td></tr> <tr> <td class="data"><?php print $desname;?></td> </tr> <tr><td height="10"></td></tr> </table></td> <td width="30%" align="center" valign="top"><table width="98%" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td><?php include("rightsidebar.php")?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="10" valign="top"></td> </tr> <tr> <td><?php include ("footer.php"); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="10" valign="top"></td> </tr> </table> </div> </div> </body> </html>
Coded by Amin Shokohi (Pejvak)