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/product-needapproval.php
<? require_once "application_top.php";
require "protect.php";
	$userid = isset($_SESSION['useridsess'])?$_SESSION['useridsess']:"0";
	$fullname = isset($_SESSION['fullnamesession'])?$_SESSION['fullnamesession']:"0";
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Manage Products</title>
<? require_once "scripts.php";?>
</head>
<body>

	<? $pagename = 'register'; require "include/header.php";?>
	<div class="w3-col m12 w3-container"><!--w3-twothird starts here -->
	<?=$msg;?>
	
<? require "vendor-toplinks.php"; ?>

		<br/>
		<?
			$sqlmp = " * from products where sellerid=? and ( (isupdated = ? or isactive = ?) || (updatedon < ?) ) order by pid desc";
			$whereParams[] = $userid;
			$whereParams[] = 1;
			$whereParams[] = 0;
			$whereParams[] = EXPIRYDAY;
			
			//---------------pagination BOF---------------------------------------
			$from_where = $sqlmp; 
			//$whereParams[] = 0; required created above 
			$extra ="&extra=";
			$adjacents = 3;
			$limit = 24; 							//how many items to show per page
			$targetpage = $_SERVER['PHP_SELF']; 	//your file name  (the name of this file)
			require "pagination.php";
		?>
		<h2>Products pending approval (<?=$total_pages;?>)</h2>
		<?if($total_pages){?>
		<div class="w3-row">
		<?
		foreach($rows as $row){
		?>	
			<div class="w3-col s12 m6 l3 centerContent" style="display:table-cell;padding:5px;">
			<div class="ProductDiv">
			<div>
			<img src="<?=HTTP_SERVER;?>images/products/<?=($row['pic1'])? $row['pic1']:"default.jpg";?>"/>
			</div>
			<div>
			<?=$row['qty'];?> x <?=mb_str_word_count($row['ititle'],1);?><br/>
			
			
			<img src="<?=HTTP_SERVER;?>images/icons/pending.png" title="Pending approval" class="icons"/>&nbsp;&nbsp;
				<a href="<?=HTTP_SERVER;?>handle.php?action=productstatus&id=<?=encode($row['pid']);?>&newstatus=<?=($row['isactive'])? 0 : 1;?>" title="Click to <?=($row['isactive'])? "Deactivate" : "Activate";?> "><img src="<?=HTTP_SERVER;?>/images/icons/<?=($row['isactive'])? "enable" : "disable";?>.png"  class="icons"/></a>&nbsp;&nbsp;
				<a href="<?=HTTP_SERVER;?>editproduct.php?pid=<?=encode($row['pid']);?>" class="icons"><img src="<?=HTTP_SERVER;?>images/icons/edit.png" class="icons"/></a> &nbsp;
				<a href="<?=HTTP_SERVER;?>handle.php?action=deleteproduct&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"/></a>
			</div>
			</div>
			</div>
		<?}?>
		</div>
		<center><?=$pagination;?></center>
		</div>
		<?}else{ ?>Dear <?=$fullname?>,<br/>There are no products pending for approval. <a href="<?=HTTP_SERVER;?>addproduct.php" style="text-decoration:underline;cursor:pointer;">Please click here to upload a new product</a><?}?>

	<br/><br/>
	</div><!--w3-twothird ends here -->
	
	<? include "include/footer.php";?>
</body>
</html>