?
Path : /home/enviro777/public_html/admin/ |
Current File : /home/enviro777/public_html/admin/banner2.php |
<?php include "include/header.php"; //if($_POST) //{ //for($i=0;$i<count($_POST['orderId']);$i++) // { // $sql = "update banner set catOrder = '".$_POST['orderValue'][$i]."' where sno='".$_POST['orderId'][$i]."'"; // $obj->query($sql); // } //} if($_GET['idst']) { $act =$_GET['act']==0 ? 1 : 0; $obj->query("update banner1 set `Status`='$act' where `sno`='".$_GET['idst']."'"); } if($_GET['idd']) { $obj->query("delete from banner1 where `sno`='".$_GET['idd']."'"); } ?> <!--main page--> <form name="categoty" action="" method="post" > <table cellpadding="4" cellspacing="0" border="0" width="90%" class="normaltext" align="center"> <tr bgcolor="#ccc"><td align="center" colspan="5"><strong>Banner Management</strong></td></tr> <tr><td colspan="5" align="right"><a href="addbanner2.php"><input type="button" value="Add Banner" class="submitbox" name="add"/></a></td></tr> <tr bgcolor="#ccc"><td align="center"><strong>Serial No</strong></td><td align="center"><strong>Image</strong></td><td align="center"><strong>Name</strong></td><td align="center"><strong>Status</strong></td> <td align="center"><strong>Edit</strong></td></tr> <?php $no=1; $sql="SELECT * FROM `banner1` ORDER BY `banner1`.`sno` ASC"; $total=$obj->count_row($sql); $result=$obj->query($sql); while($row=$obj->fetch_query($result)) { if($row->Status==0) $status="Inactive"; else $status="Active"; ?> <tr><td align="center"><?=$no?></td><td align="center"><img src="banner/<?=$row->Image?>" height="50px" width="50px" /></td><td align="center"><?=$row->Image?></td><td align="center"><a href="banner2.php?idst=<?=$row->sno?>&act=<?=$row->Status?>"><?=$status?></a></td> <td align="center"><a href="banner2.php?idd=<?=$row->sno?>"><img src="images/cross.png" alt="Delete"></a></td> <?php $no++; } ?> </tr> </table> </form> <!--end main page--> <?php include "include/footer.php";?>