<? 
	require 'include/configurations.php'; // ITECHBIDS Configuration File
	require 'include/datemanu.php';
error_reporting(0);
$temp_query="select * from templates where template='yes'";
	$temp_result=mysql_query($temp_query);
	$temp_row=mysql_fetch_array($temp_result);
$tfold =$temp_row['folder'];
$logo =$temp_row['logo'];
	$username= $_SESSION["adminuser"] ;
	$passpass = $_SESSION["adminpass"] ;
	if(empty($username))
	{
	$url="index.php";
	echo '<meta http-equiv="refresh" content="0;url='.$url.'">';
	echo "<font size=+1 color=#003366>Loading....</font>";
	}

$sql="select * from admin where user_name='$username' and password='$passpass'";
$ress=mysql_query($sql);
$numm=mysql_num_rows($ress);
        if($numm==0)
	{
	$url="index.php";
	echo '<meta http-equiv="refresh" content="0;url='.$url.'">';
	echo "<font size=+1 color=#003366>Loading....</font>";
	}

	$ares=mysql_query("select * from admin where user_name='$username'");
	$arow=mysql_fetch_array($ares);
	$admin=$arow['admin_id'];
	$status=$arow['status'];
$res_head=mysql_query("select * from member_details where user_type='original'");
$tot=mysql_num_rows($res_head);
$live_items_head=mysql_query("select * from auction_details where status='Active'");
$live_rec=mysql_num_rows($live_items_head);
?>
<!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>Admin</title>
<script type="text/javascript" src="../js/preview.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/core.js"></script>
<script type="text/javascript" src="../js/curvycorners.js"></script>
<link href="include/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function sstime_admin(){
$.get("stime_admin.php", {},
 function(data){
$('#stime_admin').html(data);
 });
setTimeout("sstime_admin()",1000);
}
$(document).ready(function(){
    $("#side_menu > div > div.header").each(function (i) {
            $(this).click(function() {
                    $(this).find("img").slice(0,1).toggle();
                    $(this).find("img").slice(1,2).toggle();
                    $(this).parent().find("div.side_box_container").slice(0,1).slideToggle(500);    
          });
    });
});
</script>
<SCRIPT LANGUAGE='javascript'>sstime_admin()</SCRIPT>

</head>
<body topmargin="0" leftmargin="0" rightmargin="0">
<div id="navigation_top">
    <div id="navigation_top_welcome">Welcome admin [ <a href="logout.php">Logout</a> ]</div>
    <div id="stime_admin"></div>
    <div class="clear"></div>
</div>
<div id="header">
    <img src="images/logo.png" alt="Administrator Area" class="title" border="0">
            <div id="search"><strong>Quick Stats</strong><br>
            <div style="padding-top: 5px;">
                Total Users: <?=$tot?> Live Items: <?=$live_rec?>
            </div>
            <div id="quicksearchresults" align="left"></div>
        </div>
    </div>
<div id="navigation_container">
    <ul id="navigation">
        <li class="tab">
            <a title="Home" href="home.php">Home</a>
            <ul>
                <li class="top_border">&nbsp;</li>
  <li><a href="settings.php" style="text-decoration:none" id="link">General Settings</a></li> 
  <li><a href="options.php" style="text-decoration:none" id="link">Site Settings</a></li> 
  <li><a href="settings.php?page=level" style="text-decoration:none" id="link">Referral Settings</a></li>
  <li><a href="bidback.php" style="text-decoration:none" id="link">Bidback Settings</a></li>
  <li><a href="langs.php" style="text-decoration:none" id="link">Languages</a></li> 
  <li><a href="closing.php" style="text-decoration:none" id="link">Closing Time</a></li>
  <li><a href="site_announcement.php" style="text-decoration:none" id="link">Site Announcement</a></li>
  <li><a href="google_adsense.php" style="text-decoration:none" id="link">Google Adsense</a></li>
  <li><a href="terms.php?page=3" style="text-decoration:none" id="link">About Us</a></li> 
  <li><a href="terms.php?page=2" style="text-decoration:none" id="link">Privacy</a></li> 
  <li><a href="terms.php?page=1" style="text-decoration:none" id="link">Terms</a></li> 
  <li><a href="country.php" style="text-decoration:none" id="link">Countries</a></li> 
  <li><a href="search_keys.php" style="text-decoration:none" id="link">Meta Tags</a></li> 
  <li><a href="banners.php" style="text-decoration:none" id="link">Banners</a></li>
  <li><a href="ipblock.php" style="text-decoration:none" id="link">Ip Block</a></li>  
  <li><a href="domainblock.php" style="text-decoration:none" id="link">Domain Block</a></li> 
  <li><a href="statistics.php" style="text-decoration:none" id="link">Site Status</a></li> 
  <li><a href="help.php" style="text-decoration:none" id="link">Help Subjects</a></li> 
            </ul>
        </li>
        <li class="tab">
            <a href="user.php">Users</a>
            <ul>
                <li class="top_border">&nbsp;</li>
  <li><a href="user.php" style="text-decoration:none" id="link">User List</a></li> 
  <li><a href="addbot.php" style="text-decoration:none" id="link">Add Bot User</a></li> 
  <li><a href="addadmin.php" style="text-decoration:none" id="link">Add admin</a></li> 
  <li><a href="adminlist.php" style="text-decoration:none" id="link">Admin List</a></li> 
  <li><a href="user.php?mode=appr" style="text-decoration:none" id="link">Pending Approval</a></li> 
  <li><a href="ch_pass.php" style="text-decoration:none" id="link">Change Password</a></li> 
            </ul>
        </li>
        <li class="tab">
            <a href="settings.php?page=pay">Fees</a>
            <ul>
                <li class="top_border">&nbsp;</li>
  <li><a href="settings.php?page=pay" style="text-decoration:none" id="link">Merchant Setup</a></li> 
  <li><a href="coupon.php" style="text-decoration:none" id="link">Bid Vouchers</a></li> 
  <li><a href="plan.php" style="text-decoration:none" id="link">Fee Settings</a></li>
  <li><a href="dep_itechd.php?page=bid" style="text-decoration:none" id="link">Transactions</a></li> 
            </ul>
        </li>
        <li class="tab">
            <a href="category.php">Category</a>
            <ul>
                <li class="top_border">&nbsp;</li>
  <li><a href="category.php" style="text-decoration:none" id="link">Category</a></li> 
  <li><a href="subcategory.php" style="text-decoration:none" id="link">Subcategory</a></li> 
  <li><a href="help_cat.php" style="text-decoration:none" id="link">Help Categories</a></li> 
            </ul>
        </li>
        <li class="tab">
            <a href="emails.php">Mail</a>
            <ul>
                <li class="top_border">&nbsp;</li>
  <li><a href="emails.php" style="text-decoration:none" id="link">Mail Content</a></li>  
  <li><a href="mail.php" style="text-decoration:none" id="link">Send Mail</a></li> 
  <li><a href="mail.php?page=news" style="text-decoration:none" id="link">Send NewsLetter</a></li> 
            </ul>
        </li>
        <li class="tab">
            <a href="auction.php">Auction</a>
            <ul>
                <li class="top_border">&nbsp;</li>
  <li><a href="auction.php" style="text-decoration:none" id="link">Auction</a></li> 
  <li><a href="selectpostformat.php" style="text-decoration:none" id="link">Add Item</a></li> 
  <li><a href="cleanup.php" style="text-decoration:none" id="link">Delete Items</a></li> 
                    </ul>
                </li>
            </ul>
        </li>
     </ul>
</div></div>
<BR>
<div id="contents_container">
<table align="left" width="980"><tr><td width="240" align="left" valign="top">

<?
if($status=="main"){ 
	require 'include/menu.php';
}

if($status=="sub"){ 
	require 'include/menusub.php';
}

 ?>
</td><TD width="10">&nbsp;</td><td valign="top" align="left" width="730">