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-live.php
<? require_once "application_top.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 name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Manage Products</title>
<? require_once "scripts.php";?>
</head>
<body>

	<? $pagename = 'live'; require "header.php";?>
	<div class="container"><!--w3-twothird starts here -->
		<?
			$sqlmp = " * from products where sellerid=? order by pid desc";
			$whereParams[] = $userid;
			//---------------pagination BOF---------------------------------------
			$from_where = $sqlmp; 
			//$whereParams[] = 0; required created above 
			$extra ="&extra=";
			$adjacents = 3;
			$limit = 10; 							//how many items to show per page
			$targetpage = $_SERVER['PHP_SELF']; 	//your file name  (the name of this file)
			require "pagination.php";
		?>
		<h1>My Products (<?=$total_pages;?>)</h1>
		<br/>
		<?if($total_pages){?>
		<div style="overflow-x:auto;" class="w3-card w3-white">
		<table class="listingtable">
		<tr>
		<TH><center>Image</center></TH><TH>Qty</TH><TH>Title & MRP</TH>
		<TH>Status</TH><TH>Enable/Disable</TH><TH>Edit</TH><TH>Delete</TH>
		</tr>
		<?
		foreach($rows as $row){
		?>	
			<tr>
			<td>
			<img src="<?=HTTP_SERVER;?>images/products/<?=($row['pic1'])? $row['pic1']:"default.jpg";?>" style="width:70px;height:70px;"/>
			</td>
			<td>
			<?=($row['qty'])? $row['qty']:"REPOST";?>
			</td>
			<td>
			<?=mb_str_word_count($row['ititle'],1);?>
			<br/>
			<?=currSign($row['currency']);?>.<?=$row['mrp'];?>
			</td>
			<td>
			<? if((!$row['isupdated']) && $row['isactive'] && $row['istatus']&& (date('Y-m-d',strtotime($row['tilldate'])) > CURDATE)){
				?>LIVE<?
			}else{
				?>Offline<?
			}?>
			</td>
			<td style="text-align:center;">
				<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>
			</td>
			<td style="text-align:center;">
			<a href="<?=HTTP_SERVER;?>editproduct.php?pid=<?=encode($row['pid']);?>"><img src="<?=HTTP_SERVER;?>images/icons/edit.png" class="icons"/></a>
			</td>
			<td style="text-align:center;">
			<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')"><img src="<?=HTTP_SERVER;?>images/icons/delete.png" class="icons"/></a>
			</td>
			</tr>
		<?}?>
		</table>
		</div>
		<center><?=$pagination;?></center>
		
		<?}else{ ?>Dear <?=$fullname?>,<br/>You don't have any live products. <a href="<?=HTTP_SERVER;?>product-addnew.php" style="text-decoration:underline;cursor:pointer;">Please click here to upload a new product</a><?}?>

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