<?php

	ob_start();

	session_start();

		if($_SESSION['lang']=='')

{

	$_SESSION['lang'] = "en";

}

	include 'languages/lang_liveauction_'.$_SESSION['lang'].'.php';

	include 'languages/lang_common_'.$_SESSION['lang'].'.php';

 	include("include/db.inc.php");

 	include("include/bit_functions.inc.php");

	include("include/functions.php");

	 include("include/pager.php");

	 include("include/meta_functions.php");

   $db1=new db;

   $db1->open();

  mysql_query("SET NAMES 'utf8'");

   $currency_symbol_new=symbol_currency();

   $uid=$_SESSION['uid'];



   $myres=remainbid1();

   $pids="";



	$jsqury1="SELECT pid,cid,pname,brand,price,bid_price,thumbnail,bider_id,description,type1 FROM t123go_product where

	start_time <= now() and end_time > now() and status='1' order by end_time limit 3 ";

	$jsres1=mysql_query($jsqury1) or die(mysql_error());

 	while($jsrec1=mysql_fetch_array($jsres1))

	{

	$pids.=$jsrec1['pid'].",";

	$_SESSION['new'][$jsrec1['pid']]=$jsrec1['bid_price'];

	}



	//  top live auctions //

	$lat_auction=substr($pids,0,-1);

	//  top live auctions //

	if($lat_auction=='')

	$lat_auction="''";





   $jsquery="SELECT * FROM t123go_product where start_time <= now() and

   end_time > now() and status='1' and pid not in(".$lat_auction.") ";

   $jsres=mysql_query(dopaging($jsquery,10));



	while($jsrec=mysql_fetch_array($jsres))

	{

	$pids.=$jsrec['pid'].",";

	$_SESSION['new'][$jsrec['pid']]=$jsrec['bid_price'];

	}





	$homeres1=mysql_query($jsqury1);



	$homeres=mysql_query(dopaging($jsquery,10));





?>

<!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">

<base href="<?=_BASEURL_?>/" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>

<?=_TITLE_?>

All Live Auctions like Fixed auctions, Penny Auctions, Future Auctions, Closed Auctions and 100% Off Auctions</title>

<meta name="description" content="<?=meta_description($pids)?>" />

<meta name="keywords" content="<?=meta_keyword($pids)?>" />

<META Http-Equiv="Cache-Control" Content="no-cache">

<META Http-Equiv="Pragma" Content="no-cache">

<META Http-Equiv="Expires" Content="0">

<meta name="author" content="Info-Tech Ltd.">

<meta name="publisher" content="Info-Tech Ltd.">

<meta name="copyright" content="Money Auctions | Powered by Money Auctions">

<meta name="page-topic" content="Service">

<meta name="audience" content="all">

<meta http-equiv="content-language" content="us">

<meta name="Language" content="english">

<meta name="robots" content="index,follow">

<meta name="revisit-after" content="3">

<link href="<?=_BASEURLCSSNEW_?>/myaccount.css" rel="stylesheet" type="text/css" />

<link href="<?=_BASEURLCSSNEW_?>/index.css" rel="stylesheet" type="text/css" />

<link href="<?=_BASEURLCSSNEW_?>/index_sec.css" rel="stylesheet" type="text/css" />



<!--[if lte IE 6]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(<?=_BASEURLCSSNEW_?>/ie6.css?0:102290); /* ]]> */</style><![endif]-->

<!--[if gte IE 7]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(<?=_BASEURLCSSNEW_?>/ie7.css?0:99961); /* ]]> */</style><![endif]-->



<script src="<?=_BASEURL_?>/js/home_counter.js" type="text/javascript"></script>

<? include("timer.js.php");?>

</head>

<body onload="home_detail();">

<div id="container">

    <? include("header.php");?>



    <div id="product_detail" style="background-color:#FFFFFF">

      <?

  $parr=explode(",",$pids);

  echo "<form name='frm'>";

      for($y=0; $y < count($parr)-1; $y++)

   {



      $pid=$parr[$y];

	  $diff=mysql_fetch_array(mysql_query("SELECT TIME_TO_SEC( TIMEDIFF( end_time, now( ))),

	  bid_price,bider_id FROM t123go_product where pid='$pid'")) ;



	  ?>

      <input type="hidden" name="price_<?=$pid?>" value="<?=$diff[bid_price]?>" />

      <input type="hidden" name="bider_<?=$pid?>" value="<?=get_uname($diff[bider_id])?>" />

      <input type="hidden" name="diff_<?=$pid?>" value="<?=$diff[0]?>" />

      <input type="hidden" name="new_<?=$pid?>" value="0" />

      <?

   }

	echo "</form>";

 ?>

    </div>

	 <div id="special_bids">

<div class="t2"><span style="padding-left:10px;"><?=_BDNW_ACT_ABTEND_?></span>



          <?

	$i=1;

 while($myrow=mysql_fetch_array($homeres1))

{



?>

<div id="about_n_end">

<div class="imagex"><div class="allp09px"><a href="<?=get_cat_name($myrow['cid']);?>/<?=str_replace(" ","-",trim($myrow['pname']))?>/auction/<?=$myrow['pid']?>" class="product_title">

                    <?=image_130($myrow['pid']); ?>

                    </a></div></div>

<div class="detailx"><div class="detail"> <a href="<?=get_cat_name($myrow['cid']);?>/<?=str_replace(" ","-",trim($myrow['pname']))?>/auction/<?=$myrow['pid']?>" class="product_title_or">

                    <?=substr($myrow['pname'],0,17);?>

                    </a><div class="normaltextlightgrey"><?=substr($myrow['brand'],0,80);?></div></div>

					 <div style="display:none" id="maximumbid_<?=$myrow['pid']?>" class="highestbid"></div>

					<div class="pricex"><div class="allp5px">

                  <div  id="productprice_<?=$myrow[pid]?>" class="normaltextorangebold19">

                    <?=$currency_symbol_new?>

                    <span  id="price_index_page_<?=$myrow['pid']?>">

                    <?

		  echo $myrow['bid_price'];

		?>

                    </span> </div>

                  <div id="productcounter_<?=$myrow[pid]?>" class="normaltextblackbold19">

                    <div id="counter_index_page_<?=$myrow['pid']?>"></div>

                  </div></div></div>

</div>

<div id="winner_index_page_<?=$myrow['pid']?>" class="submitbidout sfl"></div>

<div class="button_bgf">

<div  id="button_finished_index_page_<?=$myrow['pid']?>" style="display:none;">

                <?  if($uid==''){?>

                <a href="<?=_BASEURL_?>/login/index.html">

                <input type="button" name="bid"  value=" " class="inputsubmitbid"/>

                <? } else if($myres<=0){?>

                <input type="button" name="bid" onclick="alert('<?=_UR_NTABL_BDH_?>')" value="  " class="inputsubmitbid"/>

                <?  } else {?>

                <input type="button" name="bid" onclick="product_bid('<?=$myrow[pid]?>'); return false;" value="" style="margin-top:-1px;" class="inputsubmitbid"/>

                <? }?>

                </a> </div></div>

</div>



          <? $i++;}?>







    </div></div>

    <div id="indexframe">

      <div id="show_bar_greenfair">

        <div class="tl">

          <div class="tc1">

            <dt> LIVE AUCTIONS </dt>

          </div>

        </div>

        <div class="tr"></div>

      </div>

    </div>

	<div id="indexframe">

    <div class="boring_nob">

      <?



 if(mysql_num_rows($homeres)){?>

        <?



	   $i=1;

         while($myrow=mysql_fetch_array( $homeres)){  ?>

         <div <? if($i%2==1) {echo 'class="showup"';}else{echo 'class="showupnot"';}?>>

          <table border="0" cellspacing="0" cellpadding="0" width="100%">

            <tr>

              <td align="center" valign="middle" width="115px"><div class="imagex"> <a href="<?=get_cat_name($myrow['cid']);?>/<?=str_replace(" ","-",$myrow['pname']);?>/auction/<?=$myrow['pid']?>/"  >



          <div class="img_bor"><?=image_90($myrow['pid']); ?></div>

                </a> </div></td>

        <td align="center" valign="middle"><div class="text">



              <a href="<?=get_cat_name($myrow['cid']);?>/<?=str_replace(" ","-",$myrow['pname']);?>/auction/<?=$myrow['pid']?>/" class="mainptitleframe" title="read more about <?=$myrow['pname'];?>">

                <?=$myrow['pname'];?>

                </a> <div>

                <div class="normaltextlightgrey"><?=substr($myrow['brand'],0,250);?>...<a href="<?=get_cat_name($myrow['cid']);?>/<?=str_replace(" ","-",$myrow['pname']);?>/auction/<?=$myrow['pid']?>/" class="product_title_or" title="read more about <?=$myrow['pname'];?>">Read More...</a></div>

              </div>

              </div>

              </td>



               <td align="center" valign="top" width="110px">

               

                         <div class="image_show tm5px tac lm15px">

                    <? if($myrow['type1']=='1'){?>

                    <div class="fixed_price1"></div>

        <? }else if($myrow['type1']=='2'){?>

                    <div class="penny_prd1"></div>

        <? }else if($myrow['type1']=='3'){?>

                    <div class="s100_off1"></div>

                <? }?>

                   

              </div>

              <div class="ttc normaltextredbold13_profile tm10px">

              <div id="winner_index_page_<?=$myrow['pid']?>"></div>

            </div></td>

              <td align="center" valign="middle" class="normaltextblackbold13 fsb" width="130px">

			  <div style="display:none" id="maximumbid_<?=$myrow['pid']?>" class="highestbid"></div>

              <div  id="button_finished_index_page_<?=$myrow['pid']?>"  style="display:none; margin-right:5px" >

              <?  if($uid==''){?>

              <a href="<?=_BASEURL_?>/login/index.html">

              <input type="button" name="bid"  value="" class="button" />

              <? } else if($myres<=0){?>

              <input type="button" name="bid" onclick="alert('<?=_UR_NTABL_BDH_?>')" value="   " class="button" />

              <?  } else {?>

              <input type="button" name="bid" onclick="product_bid('<?=$myrow[pid]?>'); return false;" value="   " class="button" />

              <? }?>

              </a> </div>



            <div id="productprice_<?=$myrow[pid]?>" class="normaltextorangebold19c tac"><?=$currency_symbol_new?>  <span id="price_index_page_<?=$myrow['pid']?>">

              <?

		  echo $myrow['bid_price'];

		?>

              </span> </div>

            <div class="normaltextblackbold19c" id="productcounter_<?=$myrow[pid]?>"><span id="counter_index_page_<?=$myrow['pid']?>"></span></div>



           </td>

            </tr>

          </table>

        </div>

        <?

				$i++;

			}	// end of while loop





     }else {



echo "<div class='error_message_show'>We will be having auctions for this particular category for you soon.</div>";



}?>

    </div>

    </div>

    <br /><br />

    <div class="pages">

    <?

    if(rightpaging()){



				?>

        <div class="page"><br>

          <? echo rightpaging(); ?></div>

        <?

			}

			?></div><br/> <br/>

  <? include("footer.php");?>

</div>

</body>

</html>

