Preview: sellerlist.php
Size: 17.42 KB
/home/godevadmin/public_html/admin/sellerlist.php
<?php
session_start();
include("../include/config.php");
include("../include/functions.php");
validate_admin();
?>
<!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>
<title><?php echo SITE_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<script>
function checkall(objForm)
{
len = objForm.elements.length;
var i=0;
for( i=0 ; i<len ; i++){
if (objForm.elements[i].type=='checkbox')
objForm.elements[i].checked=objForm.check_all.checked;
}
}
function del_prompt(frmobj,comb)
{
//alert(comb);
if(comb=='Delete'){
if(confirm ("Are you sure you want to delete record(s)"))
{
frmobj.action = "seller-del.php";
frmobj.what.value="Delete";
frmobj.submit();
}
else{
return false;
}
}
else if(comb=='Deactivate'){
frmobj.action = "seller-del.php";
frmobj.what.value="Deactivate";
frmobj.submit();
}
else if(comb=='Activate'){
frmobj.action = "seller-del.php";
frmobj.what.value="Activate";
frmobj.submit();
}
}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php include("header.php") ?>
<link rel="stylesheet" href="../colorbox/colorbox.css" />
<script src="../colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" href="calender/css/jquery-ui.css">
<script src="calender/js/jquery-ui.js"></script>
<script>
$(function() {
$( "#search_from_date" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat:'yy-mm-dd' ,
yearRange:'2014:<?php echo date('Y'); ?>',
onClose: function( selectedDate ) {
$( "#search_to_date" ).val(selectedDate);
$( "#search_to_date" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#search_to_date" ).datepicker({
changeMonth: true,
changeYear: true,
numberOfMonths: 2,
dateFormat:'yy-mm-dd' ,
yearRange:'2014:<?php echo date('Y'); ?>',
})
$( "#search_from_date" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat:'yy-mm-dd' ,
yearRange:'2014:<?php echo date('Y'); ?>',
onClose: function( selectedDate ) {
$( "#visit_date_to" ).val(selectedDate);
$( "#visit_date_to" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#search_to_date" ).datepicker({
changeMonth: true,
changeYear: true,
numberOfMonths: 2,
dateFormat:'yy-mm-dd' ,
yearRange:'2014:<?php echo date('Y'); ?>',
})
});
</script>
<tr>
<td align="right" class="paddRtLt70" valign="top">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!------------ Search Section ----------------->
<tr>
<td align="left" valign="middle" class="bodr" style="padding-bottom:20px;">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="headingbg bodr text14" style="padding-left:20px;">Search<span style="float:right; padding-right:10px;"></span></td>
</tr>
<tr><td height="10"></td></tr>
<tr>
<td>
<form name="searchForm" method="post" action="sellerlist.php">
<table width="100%" border="0" cellspacing="4" cellpadding="4">
<tr>
<td width="10%" align="right" ><strong>Merchant Name / ID:</strong></td>
<td width="15%"><input type="text" name="sellername_id" value="<?php echo $_REQUEST['sellername_id']; ?>"/></td>
<td width="10%" align="right" ><strong>Email / Mobile:</strong></td>
<td width="15%"><input type="text" name="search_email" value="<?php echo $_REQUEST['search_email']; ?>"/></td>
<td width="10%" align="right" ><strong>Store Name:</strong></td>
<td width="15%"><input type="text" name="store" value="<?php echo $_REQUEST['store']; ?>"/></td>
<td width="7%" rowspan="2"><input type="submit" name="search" value="Search" /></td>
<td width="12%" rowspan="2"><a href="sellerlist.php">View All</a></td>
</tr>
<tr>
<td width="10%" align="right" ><strong>Zip / Area:</strong></td>
<td width="15%"><input type="text" name="zip_area" value="<?php echo $_REQUEST['zip_area']; ?>"/></td>
<td width="10%" align="right" ><strong>PAN:</strong></td>
<td width="15%"><input type="text" name="pan" value="<?php echo $_REQUEST['pan']; ?>"/></td>
<td width="10%" align="right" > </td>
<td width="15%"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="middle" class="bodr" style="padding-bottom:20px;"><table width="100%" border="0" cellspacing="0" cellpadding="3">
</table></td>
</tr>
<tr><td height="10"></td></tr>
<!----- Search End --------->
<tr>
<td align="left" valign="middle" class="headingbg bodr text14">
<em><img src="images/arrow2.gif" width="21" height="21" hspace="10" align="absmiddle" /></em>Admin: View Orders
<!-- <span style="float:right;">
<form name="exportfrm" action="export-sellers.php">
<input type="hidden" name="exportExcel" value="yes" />
<input type="hidden" name="sellername_id" value="<?php echo $_REQUEST['sellername_id'];?>" />
<input type="hidden" name="search_email" value="<?php echo $_REQUEST['search_email'];?>" />
<input type="hidden" name="store" value="<?php echo $_REQUEST['store'];?>" />
<input type="hidden" name="zip_area" value="<?php echo $_REQUEST['zip_area'];?>" />
<input type="hidden" name="pan" value="<?php echo $_REQUEST['pan'];?>" />
<input type="submit" name="export" class="button" value="Export To Excel" />
</form>
</span>--></td>
</tr>
<form name="frm" method="post" action="seller-del.php" enctype="multipart/form-data">
<tr>
<td height="100" align="left" valign="top" bgcolor="#FFFFFF" class="bodr">
<table width="100%" cellpadding="0" cellspacing="0">
<?php if($_SESSION['sess_msg']){ ?>
<tr><td align="center"><font color="#FF0000"><strong><?php echo $_SESSION['sess_msg'];$_SESSION['sess_msg']='';?></strong></font></td></tr>
<?php }?>
<tr>
<td align="left">
<?php
$where='';
if($_REQUEST['sellername_id']!=''){
$name=$_REQUEST['sellername_id'];
$where.=" and (uid='".$name."' or companyname like '%$name%')";
}
if($_REQUEST['store']!=''){
$name=$_REQUEST['store'];
$where.=" and storename like '%$name%'";
}
if($_REQUEST['search_email']!=''){
$name=$_REQUEST['search_email'] ;
$where.=" and (emailid like '%$name%' or mobile like '%$name%')";
}
if($_REQUEST['zip_area']){
$name=$_REQUEST['zip_area'] ;
$where.=" and (ziparea like '%$name%' or zipcode='".$name."') ";
}
if($_REQUEST['pan']!=''){
$name=$_REQUEST['pan'] ;
$where.=" and pan like '%$name%'";
}
$start=0;
if(isset($_GET['start'])) $start=$_GET['start'];
$pagesize=20;
if(isset($_GET['pagesize'])) $pagesize=$_GET['pagesize'];
$order_by='uid';
if(isset($_GET['order_by'])) $order_by=$_GET['order_by'];
$order_by2='desc';
if(isset($_GET['order_by2'])) $order_by2=$_GET['order_by2'];
$sql=$obj->Query("select * from sl_users where 1=1 $where order by $order_by $order_by2 limit $start, $pagesize");
$sql2=$obj->query("select * from sl_users, stores where sl_users.uid=stores.uid order by stores.uid $order_by2",$debug=-1);
$reccnt=$obj->numRows($sql);
if($reccnt==0)
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle"><font face="Arial, Helvetica, sans-serif" color="#FF0000" size="+1">No Record</font></td>
</tr>
</table>
<?php
}
else
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle"><strong><?php echo $reccnt; ?> Records Found.</strong></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="4%" align="left" class="padd5" bgcolor="#f3f4f6"><strong>S No.</strong></td>
<td width="10%" align="left" bgcolor="#f3f4f6" class="padd5"><strong>Merchant Name (id)</strong></td>
<td width="13%" align="left" bgcolor="#f3f4f6" class="padd5"><strong>Merchant Store (reg)</strong></td>
<td width="19%" align="left" bgcolor="#f3f4f6" class="padd5"><strong>Contact Details</strong></td>
<td width="18%" align="left" bgcolor="#f3f4f6" class="padd5"><strong>KYC</strong></td>
<td width="6%" align="left" bgcolor="#f3f4f6" class="padd5"><strong>Status</strong></td>
<td width="8%" align="left" bgcolor="#f3f4f6" class="padd5"><strong>Product</strong></td>
<td width="15%" align="left" bgcolor="#f3f4f6" class="padd5"><strong>Others
</strong></td>
<td width="7%" align="center" bgcolor="#f3f4f6" class="padd5" > <input name="check_all" type="checkbox" id="check_all" onclick="checkall(this.form)" value="check_all" /></td>
</tr>
<?php
$i=0;
while($line=$obj->fetchNextObject($sql))
{
$i++;
if($i%2==0)
{
$bgcolor = "#f3f4f6";
}
else
{
$bgcolor = "";
}
?>
<tr bgcolor="<?php echo $bgcolor;?>">
<td class="padd5"><strong><?php echo $i+$start; ?>.</strong></td>
<td class="padd5">
<?php
echo $line->companyname; echo " ($line->uid)";
?>
</td>
<td class="padd5">
<?php
$uid=$line->uid;
$sql3=$obj->query("select * from stores where uid=$uid order by uid $order_by2",$debug=-1);
$sqlactpro=$obj->query("select * from tbl_product where uid=',$uid,' and status=1");
$sqldeactpro=$obj->query("select * from tbl_product where uid=',$uid,' and status=0");
$numactpro=$obj->numRows($sqlactpro);
$numdeactpro=$obj->numRows($sqldeactpro);
$i=0;
while($line2=$obj->fetchNextObject($sql3))
{
$i++;
?>
<?php echo '<strong>Name:</strong>'.$line2->storename; ?><br />
<?php
}?></td>
<td class="padd5">
<?php
echo '<strong>Name:</strong> ' .stripslashes($line->contactperson)." <br/>".'<strong>Mobile:</strong> '.stripslashes($line->mobile)." <br/>". '<strong>Email: </strong>'.stripslashes($line->emailid)." <br/>".'<strong>City: </strong>'.stripslashes($line->pdcity)." ";
?>
</td>
<td class="padd5">
<?php
echo '<strong>PAN:</strong> '.stripslashes($line->pan)." <br/>".'<strong>DOB:</strong> '.stripslashes($line->dobonpan)." <br/>". '<strong>Vat/CST:</strong> '.stripslashes($line->vatorcst)." <br/>". '<strong>A/c No.: </strong>'.stripslashes($line->accountno)." <br/>". '<strong>A/c type:</strong> '.stripslashes($line->accounttype)." <br/>". '<strong>Bank:</strong> '.stripslashes($line->bank)." ";
?>
</td>
<td class="padd5" align="center">
<?php if($line->status==1){ ?><img src="images/enable.gif" /><?php }else{ ?> <img src="images/disable.gif" /><?php }?>
</td>
<td class="padd5">
<span style="color:green"><?php echo 'Active: '. $numactpro;?></span><br />
<span style="color:red"><?php echo 'Deactive: '.$numdeactpro;?></span>
<br />
Total: <?php echo $numactpro+$numdeactpro;?> </td> <td class="padd5">
<?php echo 'Join Date: '.$line->joindate; ?>
</td>
<td align="center" valign="middle" class="padd5">
<input type="checkbox" name="ids[]" value="<?php echo $line->uid;?>" />
</td>
</tr>
<?php
}
?>
<tr>
<td valign="top" colspan="14" align="right">
</td> </tr>
<tr>
<td valign="top" colspan="14" align="right" class="dark_red" style="padding-right:150px;"> </td>
</tr>
<tr>
<td valign="top" colspan="14" align="right" class="dark_red" style="padding-right:150px;"><?php include("../include/paging.inc.php"); ?>
</td> </tr>
<tr>
<td valign="top" colspan="14" align="right" class="dark_red" style="padding-right:150px;"> </td>
</tr>
<tr><td align="right" style="padding-right:80px;" colspan="14"> <input type="hidden" name="what" value="what" />
<!-- <input type="submit" name="Submit" value="Delete" class="button" onclick="return del_prompt(this.form,this.value)" /> -->
<input type="submit" name="Submit" value="Activate" class="button" onclick="return del_prompt(this.form,this.value)" />
<input type="submit" name="Submit" value="Deactivate" class="button" onclick="return del_prompt(this.form,this.value)" />
<!--<input type="submit" name="Submit" value="Delete" class="button" onclick="return del_prompt(this.form,this.value)" />--></td></tr>
</table><?php }?>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr><td height="100"></td></tr>
<?php include('footer.php'); ?>
</table>
</body>
</html>
Directory Contents
Dirs: 10 × Files: 414