<?php session_start();  //Developed by ITechScripts
require 'include/configurations.php'; // ITECHBIDS Configuration File
$cat_id=$_GET['id'];
$mode=$_GET['mode'];
?>
<?php
require 'include/header.php';
?>

<p>&nbsp;</p>
<table width="80%" border="0" cellpadding="5" cellspacing="1" class="ft" align="center">

<?php
if(strlen($_SESSION['adminuser'])==0)
{
	echo '<meta http-equiv="refresh" content="0;url=index.php">';
	exit();
}
$username=$_SESSION['adminuser'];
$date=date('Y-m-d');
$res=mysql_query("select * from member_details where user_type='original'");
$tot=mysql_num_rows($res);
$ares=mysql_query("select * from member_details where status='Active' and verified='yes' and user_type='original'");
$actv=mysql_num_rows($ares);
$sres=mysql_query("select * from member_details where status='suspended' and verified='yes' and user_type='original'");
$sus=mysql_num_rows($sres);
$ures=mysql_query("select * from member_details where verified='no' and user_type='original'");
$unver=mysql_num_rows($ures);
$new_sql=mysql_query("select * from member_details where status='new' and user_type='original'");
$new=mysql_num_rows($new_sql);
$paid_sql=mysql_query("select * from member_details where paid='Yes' and ( original_account=2 or original_account=3 )");
$paid=mysql_num_rows($paid_sql);

$unpaid_sql=mysql_query("select * from member_details where paid='No' and ( original_account=2 or original_account=3 )");
$unpaid=mysql_num_rows($unpaid_sql);

$trusted_sql=mysql_query("select * from member_details where trusted='trusted'");
$trusted=mysql_num_rows($trusted_sql);

$jres=mysql_query("select * from auction_details  where TO_DAYS((bid_starting_date))=TO_DAYS( NOW( ))");
$join=mysql_num_rows($jres);
 
	  $tot_items=mysql_query("select * from auction_details");
$tot_rec=mysql_num_rows($tot_items);
$live_items=mysql_query("select * from auction_details where status='Active'");
$live_rec=mysql_num_rows($live_items);
$exp_items=mysql_query("select * from auction_details where status='Closed'");
$exp_rec=mysql_num_rows($exp_items);
$sup_items=mysql_query("select * from auction_details where status='suspended' ");
$sup_rec=mysql_num_rows($sup_items);
$sql="select * from auction_details where quantity_sold > 0";
$sold_items=mysql_query($sql);
$sold_rec=mysql_num_rows($sold_items);
$newitem_sql="select * from auction_details where status='new'";
$newitem_res=mysql_query($newitem_sql);
$newitem_rec=mysql_num_rows($newitem_res);
$noval="No Users Found";
$norec="No Items Found";
function getDeposit($payid) 
{
	$egold_query="select sum(amount) as amount from deposit where payment_thro=$payid";
	$egold_result=mysql_query($egold_query);
	$egold_row=mysql_fetch_array($egold_result);
	if($egold_row['amount']!='')echo '$ '.$egold_row['amount'];
	else echo '$ 0';
}


?>
<table border="0" align="center" cellpadding="5" cellspacing="2"   width=100%>
<tr>
        <td width="25%" valign="top">
		 <table width="100%"  border="0" cellpadding="5" cellspacing="1" class="ft" align="left">
            <tr class="ct" height="25"> 
              <td colspan="4">Site Information</td>
            </tr>
            <tr > 
              <td><a href="user.php" id="link1">Total Users</a></td>
              <td> 
                <?php if($tot!=0) echo $tot; else echo $noval; ?>
              </td>
            </tr>
            <tr > 
              <td><a href="user.php?mode=actv" id="link1">Active Users</a></td>
              <td> 
                <?php if($actv!=0) echo $actv; else echo $noval; ?>
              </td>
            </tr>
            <tr > 
              <td><a href="user.php?mode=suspend" id="link1"> Suspended Users</a></td>
              <td> 
                <?php if($sus!=0) echo $sus; else echo $noval; ?>
              </td>
            </tr>
            <tr > 
              <td><a href="user.php?mode=unver" id="link1"> Unverified Users</a></td>
              <td> 
                <?php if($unver!=0) echo $unver; else echo $noval; ?>
              </td>
            </tr>
           <!-- <tr > 
              <td><a href="user.php?mode=new" id="link1">New Users</a></td>
              <td> 
                <?php if($new!=0) echo $new; else echo $noval; ?>
              </td>
            </tr> -->
            <tr > 
              <td><a href="user.php?mode=jointoday" id="link1">Users Joined Today</a></td>
              <td> 
                <?php if($today!=0) echo $today; else echo $noval; ?>
              </td>
            </tr>
			  <tr> 
              <td colspan="2" class="ct" height="25">Auction Details</td>
            </tr>
            <tr > 
              <td><!-- <a href="auction.php" id="link1">Total Items Posted</a> --> Total Items Posted</td>
              <td> 
                <?php if($tot_rec!=0) echo $tot_rec; else echo $norec; ?>
              </td>
            </tr>
			 <tr > 
              <td><!-- <a href="auction.php?mode=new&val=today" id="link1">New Items</a> --> New Items</td>
              <td> 
                <?php if($newitem_rec!=0) echo $newitem_rec; else echo $norec; ?>
              </td>
            </tr>
           <!--  <tr > 
              <td><a href="auction.php?mode=sold&val=action" id="link1">Sold Items</a> </td>
              <td> 
                <?php if($sold_rec!=0) echo $sold_rec; else echo $norec; ?>
            </td>
            </tr> -->
            <tr > 
            <td>  <!-- <a href="auction.php?mode=live&val=actv" id="link1">Live Items</a>  -->Live Items </td>
            <td> 
                <?php if($live_rec!=0) echo $live_rec; else echo $norec; ?>
              </td>
            </tr>
			 <tr > 
              <td><!-- <a href="auction.php?mode=sus&val=sold" id="link1">Sold Items</a> --> Sold Items</td>
              <td> 
                <?php if($sup_rec!=0) echo $sup_rec; else echo $norec; ?>
              </td>
            </tr>
            <tr > 
              <td><!-- <a href="auction.php?mode=exp&val=exp" id="link1">Expired Items</a> --> Expired Items</td>
              <td> 
                <?php if($exp_rec!=0) echo $exp_rec; else echo $norec; ?>
              </td>
            </tr>
           
	<!--	<tr > 
              <td><a href="auction.php?mode=paid&val=action" id="link1">Paid Items</a></td>
              <td> 
                <?php if($sup_rec!=0) echo $sup_rec; else echo $norec; ?>
              </td>
            </tr>
		<tr > 
              <td><a href="auction.php?mode=unpaid&val=action" id="link1">Unpaid Items</a></td>
              <td> 
                <?php if($sup_rec!=0) echo $sup_rec; else echo $norec; ?>
              </td>
            </tr> -->
			        </table>

<?
	require 'include/footer.php';
?>
</td>
	</tr>
</table>
</body></html>
<script language="JavaScript">
function condelete()
{
var confrm;
confrm=window.confirm("Are You sure you want to delete this category");
return confrm;
}
function itechitems_11()
{
document.category.action="change_display_order.php";
document.category.submit();
}

</script>