<?	ob_start();
	session_start();
		if($_SESSION['lang']=='')
{
	$_SESSION['lang'] = "en";
}	
	include ('languages/lang_index_'.$_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/meta_functions.php");
	include("include/pager.php");
   $db1=new db;
   $db1->open();
  mysql_query("SET NAMES 'utf8'");  $currency_symbol_new=symbol_currency();
   $uid=$_SESSION['uid'];

 

   $jsres=mysql_query("SELECT pid,bid_price FROM t123go_product where start_time <= DATE_ADD(now(), INTERVAL 72 HOUR) and end_time >
	 DATE_SUB(now(), INTERVAL 2 MINUTE) order by end_time desc  limit 4");
	$pids="";
	while($jsrec=mysql_fetch_array($jsres))
	{
	$pids.=$jsrec['pid'].",";
	$_SESSION['new'][$jsrec['pid']]=$jsrec['bid_price'];
	}

	


	$sql_qry="SELECT pid,pname,price,bid_price,thumbnail,bider_id,description,type1,cid FROM t123go_product where start_time <= DATE_ADD(now(), INTERVAL 72 HOUR) and end_time >
	DATE_SUB(now(), INTERVAL 2 MINUTE) order by end_time desc limit 2";
	$homeres=mysql_query($sql_qry);
	
	if($_REQUEST['news_id'] > 0){
	$news_id=$_REQUEST['news_id'];
	$sql="SELECT * FROM t123go_news where blocked='1' and id='$news_id' order by submit_date desc";
	}else
	 $sql="SELECT * FROM t123go_news where blocked='1' order by submit_date desc";
	

$news=mysql_query(dopaging($sql,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_?>
Latest News for High Discount on
<?=meta_title($pids)?>
</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_?>/index.css" rel="stylesheet" type="text/css" />
<link href="<?=_BASEURLCSSNEW_?>/index_sec.css" rel="stylesheet" type="text/css" />
<link href="<?=_BASEURLCSSNEW_?>/news_news.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 class="clb">
    <div id="accountleft2">
   
   
   
   
   
   
   
   
   
   

     
      <?

while($latest=mysql_fetch_array($news))
{
?>

<div class="news_panel_now"><div class="sflwp"><h1><?=$latest['submit_date'];?></h1></div>
<div class="sfrwp">
<h1><?=$latest['title']?></h1>
<div class="normaltextblack"><?=get_product_image_new($latest['image'],140,200);?><?=$latest['description']?></div>


</div>

</div>

      <? }

if(rightpaging()){?>
      <div class="allp10px"><strong><? echo rightpaging(); ?></strong></div>
      <?  }?>
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    </div>
    <div id="accountleft1">
      <div class="buygreen1" >
        <div class="buygreen2">
          <div class="tm10px tac"><img src="<?=_BASEURLMEDIA_?>/closed_soon.gif" alt="advertisement sponsors" /></div>
        </div>
        <div class="buygreen3"> </div>
      </div>
      <div class="allm100pxb">
        <div class="bg">
          <div id="product_detail">
            <?
	$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'")) ;
	 
	  $curr_bid=get_uname($diff[bider_id]);
	  if($curr_bid=='')
	  $curr_bid="No Bidder Yet";
	  else
	  $curr_bid="<span class='normaltextredbold13_profile'>$curr_bid</span>";
	  ?>
            <input type="hidden" name="price_<?=$pid?>" value="<?=$diff[bid_price]?>" />
            <input type="hidden" name="bider_<?=$pid?>" value="<?=$curr_bid?>" />
            <input type="hidden" name="diff_<?=$pid?>" value="<?=$diff[0]?>" />
            <input type="hidden" name="new_<?=$pid?>" value="0" />
            <?
   }
	echo "</form>";
 ?>
          </div>
          <?
 while($myrow=mysql_fetch_array($homeres))
{

?>
          <!--::::::::::::::::::::::::::::::::::::::::-->
          <div id="product_bgh">
            <div class="sol_left">
              <div class="kij"><a href="<?=get_cat_name($myrow['cid']);?>/<?=str_replace(" ","-",trim($myrow['pname']))?>/auction/<?=$myrow['pid']?>" class="product_title">
                <?=image_90($myrow['pid']); ?>
                </a></div>
              <div class="image_show sfl">
                <? 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>
            <div class="sol_right">
              <div class="tm5px"> <a href="<?=get_cat_name($myrow['cid']);?>/<?=str_replace(" ","-",trim($myrow['pname']))?>/auction/<?=$myrow['pid']?>" class="product_title_or">
                <?=substr($myrow['pname'],0,14);?>
                </a>
                <div  id="productprice_<?=$myrow[pid]?>" class="normaltextorangebold19">$ <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 class="tac">
                  <div id="winner_index_page_<?=$myrow['pid']?>" class="normaltextblackbold"></div>
                </div>
                <div class="tac tm5px bm5px">
                  <div  id="button_finished_index_page_<?=$myrow['pid']?>" style="cursor:pointer; padding-top:0px; display:none" >
                    <?  if($uid==''){?>
                    <a href="<?=_BASEURL_?>/login/index.html">
                    <input type="button" name="bid" id="submit1" value="" class="inputsubmitbid" />
                    </a>
                    <? }
				 else {?>
                    <input type="button" name="bid" id="submit1" value="" class="inputsubmitbid" onclick="product_bid('<?=$myrow[pid]?>'); return false;"/>
                    <? }?>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <!--::::::::::::::::::::::::::::::::::::::::-->
          <? }?>
        </div>
      </div>
      <div class="tm10px clb">
        <div class="buygreen1" >
          <div class="buygreen2 tac"><img src="<?=_BASEURLMEDIA_?>/adv_sponsors.gif" alt="advertisement sponsors" /> </div>
          <div class="buygreen3"> </div>
        </div>
        <div class="allm100px">
          <? 
  $page='innerpage';
  $query_num=mysql_query("select bid from zb_banners where `status`='1' and pagename='$page' order by rand() limit 0,3");
 while($brow=mysql_fetch_array($query_num))
  {
  ?>
          <?=banner_home("innerpage","bottom",205,205,$brow['bid']);?>
          <? }?>
        </div>
        <div class="tft1">
          <div class="tft2"></div>
          <div class="tft3"></div>
        </div>
      </div>
    </div>
  </div>
  <? include("footer.php");?>
</div>
</body>
</html>
