MOON
Server: Apache
System: Linux ip-208-109-13-31.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els4.x86_64 #1 SMP Sat Aug 31 06:58:57 UTC 2024 x86_64
User: durgeshpandey215 (1013)
PHP: 8.1.29
Disabled: NONE
Upload Files
File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/admin/manage_products.php
<?php
require('../application_top.php');
require('protect-admin.php');
$searchkey = isset($_REQUEST['key'])? $_REQUEST['key'] : "";
	$pagename= "manageprd"; require "header.php";
?>
<form action="<?=$_SERVER['PHP_SELF'];?>" method="post" id="commonform" style="margin-top:9px;">
<div class="form-group fg--search">
  <input type="text" placeholder="search" id="key" name="key" value="<?=$searchkey;?>">
  <button type="submit"><i class="fa fa-search"></i></button>
</div>
</form><br/>
<?
	if($searchkey){
	$db->where('ititle','%'.$searchkey.'%','like');
	$db->orWhere('description','%'.$searchkey.'%','like');
	}
	$db->where('qty',0,'>');
	$db->where('tilldate',CURDATE,'>=');
	$db->orderBy('pid','desc');
	
	//---------------Paginate BOF---------------------------------------
	$paginatetable = 'products'; //table name
	$extra ="key="; //use '&' in between if more than 1 parameter
	$adjacents = 2;
	$limit = 20;		//how many items to show per page
	$db->pageLimit = $limit;
	$targetpage = $_SERVER['PHP_SELF']; //your file name  (the name of this file)
	require "../paginate.php";
	//------------------------------------------------------------------
?>
		<?if($rows){?>
		<div class="w3-responsive w3-card ">
		<table class="w3-table-all">
		<tr class="w3-blue">
		<TH>Full Name</TH><TH>MRP & <br/> Collected</TH>
		<TH>Manage</TH>		
		</tr>
		<?
		foreach($rows as $row){
			?>	
			<tr>
			<td>
			<img src="<?=HTTP_SERVER;?>images/products/<?=($row['pic1'])? $row['pic1']:"default.jpg";?>" style="width:50px;height:50px;border: 2px solid #fff;border-radius:50%;" />
			<?=$row['ititle'];?>
			</td>
			<td>
			<?=currSign($row['currency']);?> <?=$row['mrp'];?> <br/>
			<?=currSign($row['currency']);?> <?=$row['collectedprice'];?>
			</td>
			<td align="center">
				<a href="<?=HTTP_SERVER;?>admin/view.php?&id=<?=encode($row['pid']);?>" title="Click to <?=($row['istatus'])? "Deactivte" : "Activate";?> "><img src="<?=HTTP_SERVER;?>/images/icons/edit.png" class="icons" border="0"/></a>&nbsp;
				<a href="<?=HTTP_SERVER;?>admin/handle.php?action=prdstatus&id=<?=encode($row['pid']);?>&newstatus=<?=($row['istatus'])? 0 : 1;?>" title="Click to <?=($row['istatus'])? "Deactivte" : "Activate";?> "><img src="<?=HTTP_SERVER;?>/images/icons/<?=($row['istatus'])? "istatus-on" : "istatus-off";?>.png" class="icons" border="0"/></a>&nbsp;
				<a href="<?=HTTP_SERVER;?>admin/handle.php?action=prddelete&id=<?=encode($row['pid']);?>&" title="Click to Delete" onclick="return confirm('Are you sure you want to delete')" class="ico del"><img src="<?=HTTP_SERVER;?>images/icons/delete.png" class="icons" border="0"/></a>
			</td>
			</tr>
		<?}?>
		</table>
		</div>
		<center><?=$pagination;?></center>
		
		<?}else{ ?>No products found<?}?>

	<br/><br/>
	
<? require "../footer.php";?>