?
Path : /home/yogsadhna/public_html/admin/ |
Current File : /home/yogsadhna/public_html/admin/pages.php |
<? include "include/header.php"; if($_GET['id']) { $res=$obj->query("select * from category where `catId`='".$_GET['id']."'"); $rowcat=$obj->fetch_query($res); } if($_GET['idst']) { $status =$_GET['act']==0 ? 1 : 0; $obj->query("update product set `proStatus`='$status' where `productId`='".$_GET['idst']."'"); } if($_GET['idd']) { $obj->query("delete from pages where `productId`='".$_GET['idd']."'"); } if($_GET['page']) $no=$_GET['page']*10-9; else $no=1; ?> <!--main page--> <link href="style.css" rel="stylesheet" type="text/css"> <table width="100%" border="0" cellspacing="2" cellpadding="3"> <tr> <td width="20%" class="border" valign="top"><? include "include/leftmenu.php" ?></td> <td bgcolor="#e6e4ef" id="welcomenote" valign="top"> <table cellpadding="4" cellspacing="0" border="0" width="90%" class="normaltext" align="center"> <tr bgcolor="#FFFFFF"><td align="center" colspan="4"><strong><?=$rowcat->catName?> Management</strong></td></tr> <tr><td colspan="4" align="right"> </td></tr> <tr><td><strong>Serial No</strong></td> <td><strong>Pages</strong></td> <td><strong>Edit</strong></td><td><strong>Delete</strong></td> <? $sql="select * from pages"; $conn=$obj->conn(); $pager = new PS_Pagination($conn, $sql, 10, 5, "param1=valu1¶m2=value2",$rowcat->catId); $pager->setDebug(true); $rs = $pager->paginate(); $num=$obj->count_row($sql); if($num==0) echo "<tr height='60'><td colspan='4' align='center'><strong>No Products</strong></td></tr>"; else { while($row=$obj->fetch_query($rs)) { if($row->proStatus==0) $status="Inactive"; else $status="Active"; ?> <tr><td><?=$no?></td><td><?=$row->Name?></td><td><a href="editpages.php?eid=<?=$row->productId?>">Edit</a></td><td><a href="product.php?id=<?=$rowcat->catId?>&idd=<?=$row->productId?>">Delete</a></td></tr> <? $no++; } } ?> <tr><td colspan="4" align="center" class="content"><p> </p><? echo $pager->renderFirst(); echo $pager->renderPrev(); echo $pager->renderNav('<span>', '</span>'); echo $pager->renderNext(); echo $pager->renderLast(); ?></td></tr> </table> </td> </tr> </table> <!--end main page--> <? include "include/footer.php";?>