<?php /* Smarty version Smarty-3.0.8, created on 2017-07-30 10:52:47
         compiled from "/www/wwwroot/sanweiyuan.cn/tpl/index.html" */ ?>
<?php /*%%SmartyHeaderCode:53864332597d49ff6caf56-94526072%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '70b62e90dad8ad6b7004cdca1c009fc37a2492db' => 
    array (
      0 => '/www/wwwroot/sanweiyuan.cn/tpl/index.html',
      1 => 1501383149,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '53864332597d49ff6caf56-94526072',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<!doctype html>
<html>
<head>
<meta name="keywords" content="<?php echo $_smarty_tpl->getVariable('config')->value['keywords'];?>
" />
<meta name="description" content="<?php echo $_smarty_tpl->getVariable('config')->value['description'];?>
" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title><?php echo $_smarty_tpl->getVariable('config')->value['title'];?>
</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/style.ry.css?v=06">
</head>

<body>
<!--viewport-->
<div class="viewport">
<div class="headbg" style="margin-bottom: 10px;">
	<?php echo $_smarty_tpl->getVariable('config')->value['banner'];?>

	<div class="ry-niuren-list">
		<table>
		  <thead>
		    <tr>
		      <th style="width: 30%">排名</th>
		      <th style="width: 30%">姓名</th>
		      <th style="width: 40%">砍价金额</th>
		    </tr>
		  </thead>
		  <tbody class="ry-tdbody">
		  	<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('user')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
		    <tr>
		      <td><?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
</td>
		      <td><?php echo $_smarty_tpl->tpl_vars['value']->value['nickname'];?>
</td>
		      <td><?php if (empty($_smarty_tpl->tpl_vars['value']->value['kjmoney'])){?>0<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['value']->value['kjmoney'];?>
<?php }?></td>
		    </tr>
		    <?php }} ?>
		  </tbody>
		</table>
	</div>
</div>	
<!--商品列表-->
<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('all')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
?> 
<div class="ry-mall-list">
	<div class="ry-index-list">
		<div class="ry-index-l">
			<img src="<?php echo $_smarty_tpl->tpl_vars['value']->value['pic'];?>
">
		</div>
		<div class="ry-index-r">
			<div class="r1"><?php echo $_smarty_tpl->tpl_vars['value']->value['title'];?>
<span class="ry-have-kanjia"><i>
                  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['value']->value['people'];?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==null){?>
                  0
                  <?php }else{ ?>  
                  <?php echo $_smarty_tpl->tpl_vars['value']->value['people'];?>

                  <?php }?> 
                    </i>人已砍价</span></div>
			<div>
				<h3 class="ry-end-time">距报名结束时间还有：</h3>
			   <div class="ry-content">
					<div id="1" class="settime" endTime="<?php echo $_smarty_tpl->tpl_vars['value']->value['overtime'];?>
"></div>
			   </div>
		  </div>
		  <div class="ry-kanjia-jiage">
		  	<ul>
		  		<li style="width: 100%;">原价：<?php echo $_smarty_tpl->tpl_vars['value']->value['yprice'];?>
元</li><br />
		  		<li style="width: 100%;">厂供底价：<span style="color: red;"><?php echo $_smarty_tpl->tpl_vars['value']->value['minprice'];?>
</span>元</li>
		  		<li style="clear: both;width: 100%;">当前名额：<span style="color:red;font-size:16px;"><?php echo $_smarty_tpl->tpl_vars['value']->value['overnum'];?>
</span>/<?php echo $_smarty_tpl->tpl_vars['value']->value['num'];?>
台</li>
		  	</ul>
		  </div>
			  <?php if ($_smarty_tpl->tpl_vars['value']->value['overnum']!=0){?>
			  <div class="ry-kanjia-btn">
			  	
			  	
			  	 <?php if ($_smarty_tpl->tpl_vars['value']->value['overtime']>=$_smarty_tpl->getVariable('nowtime')->value){?>
			  	 	<?php if ($_smarty_tpl->tpl_vars['value']->value['staue']==1){?>
			  	 	<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'baominga','id'=>$_smarty_tpl->tpl_vars['value']->value['id'],'openid'=>$_smarty_tpl->getVariable('openid')->value,'access_token'=>$_smarty_tpl->getVariable('access_token')->value,'nickname'=>$_smarty_tpl->getVariable('nickname')->value,'headimg'=>$_smarty_tpl->getVariable('headimgurl')->value),$_smarty_tpl);?>
">	<img src="images/ckxq.jpg">	</a>
			  	 	<?php }else{ ?>
                             <?php if ($_smarty_tpl->tpl_vars['value']->value['starttime']<=$_smarty_tpl->getVariable('nowtime')->value){?>
			  		<a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'baominga','id'=>$_smarty_tpl->tpl_vars['value']->value['id'],'openid'=>$_smarty_tpl->getVariable('openid')->value,'access_token'=>$_smarty_tpl->getVariable('access_token')->value,'nickname'=>$_smarty_tpl->getVariable('nickname')->value,'headimg'=>$_smarty_tpl->getVariable('headimgurl')->value),$_smarty_tpl);?>
">	<img src="images/baoming.jpg">	</a>
                        <?php }else{ ?>
                        还没开始
                            <?php }?>
			  		<?php }?>
                    <?php }else{ ?>
                    	<a><img src="images/jieshu.jpg"></a>
			  	<?php }?>	
			  
			  </div>
			  <?php }?>  
		</div>
	</div>
</div>
<?php }} ?>
<!--底部版权信息-->
<?php echo $_smarty_tpl->getVariable('config')->value['footer'];?>

<div class="ry-footer">
	<p><?php echo $_smarty_tpl->getVariable('config')->value['bq'];?>
</p>
</div>

	
	
	
	
</div>
</body>
<script src="js/jquery-1.12.3.min.js" type="text/javascript"></script>
<script language="javascript">
	$(function(){
	updateEndTime();
	
	//价格
	$('.ry-kanjia-jiage li:odd').css('width','55%').css('text-align','left');
	$('.ry-kanjia-jiage li:even').css('width','55%').css('text-align','left');
	
	//表格
	$('.ry-tdbody').find('tr:eq(0)').css('background','#ff8a00');
	
	});
	//倒计时函数
	function updateEndTime()
	{
	var date = new Date();
	var time = date.getTime(); //当前时间距1970年1月1日之间的毫秒数
	$(".settime").each(function(i){
	var endDate =this.getAttribute("endTime"); //结束时间字符串
	//转换为时间日期类型
	var endDate1 = eval('new Date(' + endDate.replace(/\d+(?=-[^-]+$)/, function (a) { return parseInt(a, 10) - 1; }).match(/\d+/g) +')');
	var endTime = endDate1.getTime(); //结束时间毫秒数
	var lag = (endTime - time) / 1000; //当前时间和结束时间之间的秒数
	if(lag > 0)
	{
	var second = Math.floor(lag % 60); 
	var minite = Math.floor((lag / 60) % 60);
	var hour = Math.floor((lag / 3600) % 24);
	var day = Math.floor((lag / 3600) / 24);
	$(this).html("<span>"+day+"</span>"+"天"+"<span>"+hour+"</span>"+"小时"+"<span>"+minite+"</span>"+"分"+"<span>"+second+"</span>"+"秒");
	}
	else{
	$(this).removeClass("settime");
	$(this).html("活动时间结束");
	}
	});
	setTimeout("updateEndTime()",1000);
	}
  </script>

</html>
