<?
ob_start();
session_start();
if($_SESSION['uname']=='' || $_SESSION['pwd']=='')
		{
			header("location:login.php");
		}
 include("../include/db.inc.php");
 include("../include/pager.php"); 
 include("../include/bit_functions.inc.php");
   $db1=new db;
   $db1->open();
    mysql_query("SET NAMES 'utf8'");
  $sql_closed=mysql_num_rows(mysql_query("select * from t123go_product_sold "));
	
   $sql_future=mysql_num_rows(mysql_query("SELECT * FROM t123go_product where  start_time > DATE_ADD(now(), INTERVAL 72 HOUR)  "));
	 $sql_penny=mysql_num_rows(mysql_query("select * from t123go_product where type1='2'  "));
	 $sql_fixed=mysql_num_rows(mysql_query("select * from t123go_product where type1='1' "));
	 $sql_100off=mysql_num_rows(mysql_query("select * from t123go_product where type1='3' "));
	
 $total=$sql_closed + $sql_future + $sql_penny + $sql_fixed + $sql_100off ;
   	
?>
<!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>NEWADMIN</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../css/stylesheet.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../js/common.js"></script>
<style type="text/css">
<!--
.style1 {color: #093A9C}
.style2 {color: #FE6905}
-->
</style>
</head>
<body bgcolor="#ffffff">
<div class="admin_wrapper">
  <div class="logo_show">
    <? include("minorlogout.php");?>
  </div>
  <div style="float:left; width:200px">
    <div class="topg_links_show">
      <? include("left.php");	?>
    </div>
    <div class="top_links_show">
      <? include("belowleft1.php");	?>
    </div>
  </div>
  <div style="float:left; width:800px">
    <div class="maximum">
      <!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::center starts:::::::::::::::::::::::::::::::::::::::::::::::::::::-->
      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" style="border-collapse:collapse; border-color:#404193">
        <tr height="417">
          <!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::left starts:::::::::::::::::::::::::::::::::::::::::::::::::::::-->
          <!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::left ends:::::::::::::::::::::::::::::::::::::::::::::::::::::-->
          <td width="84%" bgcolor="#FFFFFF" valign="top"><table  width="86%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
              <tr>
                <td width="213" valign="top">&nbsp;</td>
                <td width="626" valign="top"><br>
                  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
                    <tr>
                      <td width="33" valign="top"><img src="img/03.gif" width="33" height="23"></td>
                      <td background="img/bg01.gif"><strong>AVAILABILITY CHART </strong></td>
                      <td width="35"><img src="img/04.gif" width="35" height="23"></td>
                    </tr>
                  </table>
                  <table width="100%" height="211" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
                    <tr>
                      <td width="22" height="185" valign="top" background="img/tbl-left04.gif"><img border='0' src="img/tbl-left04.gif" width="22" height="13"></td>
                      <td width="575" align="center" valign="top"><form action="" method="post" enctype="multipart/form-data" name="form1">
                          <table width="95%" border="1" cellspacing="1" cellpadding="1" style="border-collapse:collapse; border-color:#FED267">
                            <br/>
                            <tr bgcolor="#FED267">
                              <td width="20%"align="center"><strong><font color="#FFFFFF">Total Auctions  Available</font></strong></td>
                              <td width="20%"align="center"><strong><font color="#FFFFFF">No.Of Auction</font></strong></td>
                            </tr>
                            <tr onMouseOver="this.style.backgroundColor='#FFECBF'" onMouseOut="this.style.backgroundColor='#ffffff'">
                              <td style="padding-left:15px;"><strong>Closed Auctions</strong></td>
                              <td style="padding-left:15px;"><?=$sql_closed;?></td>
                            </tr>
                            <tr onMouseOver="this.style.backgroundColor='#FFECBF'" onMouseOut="this.style.backgroundColor='#ffffff'">
                              <td style="padding-left:15px;"><strong>Future Auctions</strong></td>
                              <td style="padding-left:15px;"><?=$sql_future;?></td>
                            </tr>
                            <tr onMouseOver="this.style.backgroundColor='#FFECBF'" onMouseOut="this.style.backgroundColor='#ffffff'">
                              <td  style="padding-left:15px;"><strong>Penny Auctions</strong></td>
                              <td style="padding-left:15px;"><?=$sql_penny;?></td>
                            </tr>
                            <tr onMouseOver="this.style.backgroundColor='#FFECBF'" onMouseOut="this.style.backgroundColor='#ffffff'">
                              <td style="padding-left:15px;"><strong>Fixed Price Auctions</strong></td>
                              <td style="padding-left:15px;"><?=$sql_fixed;?></td>
                            </tr>
                            <tr onMouseOver="this.style.backgroundColor='#FFECBF'" onMouseOut="this.style.backgroundColor='#ffffff'">
                              <td style="padding-left:15px;"><strong>100% Off Auctions</strong></td>
                              <td style="padding-left:15px;"><?=$sql_100off;?></td>
                            </tr>
                            <tr onMouseOver="this.style.backgroundColor='#FFECBF'" onMouseOut="this.style.backgroundColor='#ffffff'">
                              <td  style="padding-left:15px;"><strong>Total</strong></td>
                              <td style="padding-left:15px;"><?=$total;?></td>
                            </tr>
                          </table>
                        </form></td>
                      <td width="19" valign="top" background="img/tbl-right04.gif"><img src="img/tbl-right04.gif" width="19" height="9" /></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bodytxt">
              <tr> 
                <td width="33"><img src="img/tbl-bot01.gif" width="33" height="12"></td>
                <td  width="709" align="right" background="img/tbl-bg.gif"></td>
                <td width="33"><img src="img/tbl-right05.gif" width="35" height="12"></td>
              </tr>
            </table>
                  <br/>
                  <br/>
                  <div style=" width:500px; height:20px; margin-bottom:5px;text-align:left; padding-left:5px; margin-left:120px">
				  <strong style="padding-left:160px;">
				    <div style="float:left; width:70px">
                  
					</div><div style="float:left; width:75px">
					<?=round(($sql_closed*100)/$total);?>
                    %</div><div style="float:left; width:75px">
                    <?=round(($sql_future*100)/$total);?>
                    %</div><div style="float:left; width:80px">
                    <?=round(($sql_penny*100)/$total);?>
                    %</div><div style="float:left; width:85px">
                    <?=round(($sql_fixed*100)/$total);?>
                    %</div><div style="float:left; width:80px">
                    <?=round(($sql_100off*100)/$total);?>%
					</div>
					</strong>
					<div style="clear:left"></div>
					</div>
                  <div style="margin-bottom:20px; float:left"><img src="pie.php" /></div>
                  <div style="margin-top:10px; float:right; margin-right:-20px;">
                    <div style="width:15px; height:15px; background-color:#FF00FF;margin-bottom:10px; margin-left:-40px;"><strong style="margin-left:20px;">Total&nbsp;&nbsp;Auction</strong></div>
                    <div style="width:15px; height:15px; background-color:#B04ECC;margin-bottom:10px; margin-left:-40px;"><strong style="margin-left:20px;">Closed&nbsp;&nbsp;Auction</strong></div>
                    <div style="width:15px; height:15px; background-color:#CC0000;margin-bottom:10px; margin-left:-40px;"><strong style="margin-left:20px;">Future&nbsp;&nbsp;Auction</strong></div>
                    <div style="width:15px; height:15px; background-color:#11CCCC;margin-bottom:10px; margin-left:-40px;"><strong style="margin-left:20px;">Penny&nbsp;&nbsp;Auction</strong></div>
                    <div style="width:15px; height:15px; background-color:#0000CC;margin-bottom:10px; margin-left:-40px;"><strong style="margin-left:20px;">Fixed&nbsp;Price&nbsp;Auction</strong></div>
                    <div style="width:15px; height:15px; background-color:#B0CCFF;margin-bottom:10px; margin-left:-40px;"><strong style="margin-left:20px;">100%&nbsp;Off&nbsp;Auction</strong></div>
                  </div></td>
              </tr>
            </table>
        </tr>
      </table>
      <!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::center ends:::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::footer starts:::::::::::::::::::::::::::::::::::::::::::::::::::::-->
    </div>
  </div>
  <div class="bottom_links_show">
    <? include("footer.php");	?>
  </div>
</div>
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::footer ends:::::::::::::::::::::::::::::::::::::::::::::::::::::-->
</body>
</html>
