<?php /* Smarty version Smarty-3.0.6, created on 2020-03-11 18:43:37
         compiled from "D:/AppServ/www/demo.hucart.com/hucart_cn/templates/./www/red\item.tpl" */ ?>
<?php /*%%SmartyHeaderCode:51865e68c0d9835df2-60844903%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '029d72dc5818f74b94dc6c307381a7127eab2e41' => 
    array (
      0 => 'D:/AppServ/www/demo.hucart.com/hucart_cn/templates/./www/red\\item.tpl',
      1 => 1583897859,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '51865e68c0d9835df2-60844903',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<!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><?php echo $_smarty_tpl->getVariable('webtitle')->value;?>
<?php echo $_smarty_tpl->getVariable('web_config')->value['poweredby'];?>
</title>
<link rel="stylesheet" type="text/css" href="./templates/www/<?php echo $_smarty_tpl->getVariable('web_config')->value['temp']->dir;?>
/css/<?php echo $_smarty_tpl->getVariable('web_config')->value['temp']->style;?>
.css" />
<link rel="stylesheet" type="text/css" href="./templates/www/<?php echo $_smarty_tpl->getVariable('web_config')->value['temp']->dir;?>
/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="./templates/www/<?php echo $_smarty_tpl->getVariable('web_config')->value['temp']->dir;?>
/css/carousel.css" />
<script language="javascript" src="./js/jquery.min.js" ></script>
<script language="javascript" src="./js/common.js"></script>
<script language="javascript" src="./js/gv32menu.js"></script>
<script language="javascript">
function getdetimg(str)
{
	document.getElementById("detproimg").innerHTML = "<a href='"+str+"' target='_blank' ><img src='"+str+"' width='320' border='0' /></a>";
}
function change_num(opation){
	var n = $('#num').val();
	var gid = $('#pro_id').val();
	if(opation === 'up'){
		n++;
		$('#num').val(n);
	}else{
		if(n < 2){
	 		$('#num').val(1);
	 	}else{
	 		n--;
	 		$('#num').val(n);
	 	}
	}
        aert(n+num);
	var num_val = $('#num').val();
	
	$.post("<?php echo $_smarty_tpl->getVariable('base_weburl')->value;?>
/index.php?/item/check_stock/",{upnum:num_val, goodid:gid } ,function(data){
		console.log(data);
  		if (data == 'error') {
  			alert('您好，库存不足');
  			$('#num').val(n-1);
  			return false;
  		}
	});
        aert(n+num);
}
</script>
</head>
<body>
<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_path')->value)."/cover/header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_path')->value)."/cover/web_address.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<div class="maincss">
<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_path')->value)."/cover/pro_left.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php if ($_smarty_tpl->getVariable('getads')->value[1]['relurl']!=''){?>
<div class="mainrightad">
<?php echo $_smarty_tpl->getVariable('getads')->value[1]['relurl'];?>

</div>
<?php }?>
<div class="mainright_art">

 
<div class="list_art" style="line-height:200%;padding:5px;background-color:#FFFFFF;">
<ul class="list_pro_ul">
	<table width="100%" cellpadding="0"  cellspacing="0" >
	<tr align="center" >
	<td >
<table width="660" border="0" cellspacing="0" cellpadding="0" align="left" >
<tr>
    <td colspan="3" align="left" >
	
<table cellpadding="0" cellspacing="0" width="660">
  <tr>
    <td rowspan="8" width="320"><div id="detproimg"  ><a href="<?php echo $_smarty_tpl->getVariable('base_weburl')->value;?>
<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_img'];?>
" target="_blank"><img src=".<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_img'];?>
" width="320" border="0" alt="<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_name'];?>
" /></a></div></td>
    <td><div align="right">商品分类：&nbsp;</div></td>
    <td><a href="./index.php?/item-info_list-<?php echo $_smarty_tpl->getVariable('infodetail')->value['prs_id'];?>
.html" ><?php echo $_smarty_tpl->getVariable('infodetail')->value['prs_name'];?>
</a></td>
  </tr>
  <tr>
    <td><div align="right">条码：&nbsp;</div></td>
    <td><?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_barcode'];?>
<input type="hidden" value="<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_id'];?>
" name="pro_id" id="pro_id"></td>
  </tr>
  <tr>
    <td><div align="right">规格：&nbsp;</div></td>
    <td><?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_spec'];?>
</td>
  </tr>
  <tr>
    <td><div align="right">库存：&nbsp;</div></td>
    <td><?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_num'];?>
(单位:<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_unit'];?>
)</td>
  </tr>
  <tr>
    <td><div align="right">产地：&nbsp;</div></td>
    <td><?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_production'];?>
</td>
  </tr>
 
  <tr>
    <td><div align="right">市场价：&nbsp;</div></td>
    <td> <?php if ($_smarty_tpl->getVariable('infodetail')->value['pro_market_price']>0){?><span style="color:#666666;text-decoration:line-through;">￥<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_market_price'];?>
元 <?php }?></td>
  </tr>
  <tr>
    <td><div align="right">数量（<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_unit'];?>
）：&nbsp;</div></td>
    <td> <div class="input-group" style="width:120px;">
  <span class="input-group-addon"  onClick="change_num('down',1);">-</span>
  <input type="text" class="form-control" name="num" id="num" data-role="none"  value="1" readonly  style="background-color:#FFFFFF;">
  <span class="input-group-addon" onClick="change_num('up',1);">+</span>
</div></td>
  </tr>

  <tr>
    <td><div align="right">销售价：&nbsp;</div></td>
    <td><p  style="color:#CC0000; font-size:16px;">￥<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_sell_price'];?>
元</td>
  </tr>
  
  <tr>
    <td rowspan="2"><div id="divproimg" style="background-color:#EEEEEE;">
      <ul>
        <?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('infoimgArray')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
?>
        <li><a href="#" onclick="getdetimg( '<?php echo $_smarty_tpl->getVariable('base_weburl')->value;?>
<?php echo $_smarty_tpl->tpl_vars['item']->value['big_img'];?>
' )" ><img src=".<?php echo $_smarty_tpl->tpl_vars['item']->value['pro_img'];?>
" data-large="<?php echo $_smarty_tpl->getVariable('base_weburl')->value;?>
<?php echo $_smarty_tpl->tpl_vars['item']->value['big_img'];?>
"  id="detimg<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" width="50" alt="<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_name'];?>
" /></a></li>
	<?php }} ?>
	  </ul>
	  </div></td>
    <td colspan="2" align="center"><button type="button" class="btn btn-primary" ><a href="<?php echo $_smarty_tpl->getVariable('base_weburl')->value;?>
/index.php?load=book&act=info_list&id=<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_id'];?>
" title="在线申请预订购">在线申请预订购</a></button></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
    </tr>
</table>	</td>
  </tr>

  <tr >
    <td colspan="3" align="left" style="line-height:200%; padding:5px;">详细内容：<br /><?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_content'];?>
</td>
  </tr>
  
  <tr >
    <td colspan="3" align="left" >
<div class="divcomment">
<form name="formcom" action="<?php echo $_smarty_tpl->getVariable('base_weburl')->value;?>
/index.php?/comment.html?type=addinfo" method="post" onsubmit="return submitFun(this)">
评论&nbsp;&nbsp;>> <a href="./index.php?/comment-info_list-<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_id'];?>
.html?keyword=item" title="查看对“<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_name'];?>
”">查看对应评论</a>
<input type="hidden" name="com_type" id="com_type" value="item">
<input type="hidden" name="com_value_id" id="com_value_id" value="<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_id'];?>
"> 
<br>
<textarea name="com_content"  id="com_content" style="width:500px;height:80px;" ></textarea>
<br>
<input type="submit" name="submit" id="submit" value="提交" >
</form>
</div></td>
  </tr>
  
</table>	</td>
	</tr>
  <tr align="left" >
    <td colspan="3" align="left" ><table align="left" width="100%" ><tr align="left" ><td align="left" width="120" ><span style="font-weight:bolder">分享到：</span></td><td align="left" ><!-- Baidu Button BEGIN HuCart.COM ADD  -->
    <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
        <a class="bds_qzone">QQ空间</a>
        <a class="bds_tsina">新浪微博</a>
        <a class="bds_tqq">腾讯微博</a>
        <a class="bds_renren">人人网</a>
        <span class="bds_more">更多</span>    </div>
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;mini=1" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
	document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
</script>
<!-- Baidu Button END HuCart.COM ADD --></td></tr></table></td>
  </tr>
  <tr >
	<tr><td>&nbsp;
	</td></tr>
	</table>
</ul>

<?php if ($_smarty_tpl->getVariable('Nextdetail')->value['pro_id']==''){?><?php }else{ ?>
  <div class="list_art"><span style="font-weight:bold;" >下一篇：</span><a href="<?php echo $_smarty_tpl->getVariable('Nextdetail')->value['get_url'];?>
"><?php echo $_smarty_tpl->getVariable('Nextdetail')->value['pro_name'];?>
</a></div>
  <?php }?>
<?php if ($_smarty_tpl->getVariable('Prodetail')->value['pro_id']==''){?><?php }else{ ?>
 <div class="list_art"><span style="font-weight:bold;" >上一篇：</span><a href="<?php echo $_smarty_tpl->getVariable('Prodetail')->value['get_url'];?>
"><?php echo $_smarty_tpl->getVariable('Prodetail')->value['pro_name'];?>
</a></div>
  <?php }?>
</div>

<div class="list_art">
<ul class="list_art_ul" style="width:96%;float:center;">
	<?php if ($_smarty_tpl->getVariable('commentInfo')->value==''){?>
	<li style="color:#FF0000;">暂无评论</li>
	<?php }else{ ?>
	<?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('commentInfo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
?>
	<li style="border-bottom:1px solid #DDDDDD; margin: 0 auto;background-color:#EEEEEE;"><span style="font-weight:bold;"><?php echo $_smarty_tpl->tpl_vars['item']->value['com_nickname'];?>
</span><span> 发表时间：<?php echo date_format($_smarty_tpl->tpl_vars['item']->value['com_addtime'],"%Y- %m- %d");?>
</span><span style="font-size:10px;color:#999999;">在ip:<?php echo $_smarty_tpl->tpl_vars['item']->value['com_ip'];?>
</span></li>
	<li><?php echo $_smarty_tpl->tpl_vars['item']->value['com_content'];?>
</li>
	<?php }} ?>
	<li> >><a href="./index.php?/comment-info_list-<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_id'];?>
.html?keyword=item" title="查看对“<?php echo $_smarty_tpl->getVariable('infodetail')->value['pro_name'];?>
”">查看所有评论</a></li>
	<?php }?>
</ul>
</div>

</div>



<?php if ($_smarty_tpl->getVariable('getads')->value[9]['relurl']!=''){?>
<div class="mainrightad">
<?php echo $_smarty_tpl->getVariable('getads')->value[9]['relurl'];?>

</div>
<?php }?>
</div>

</div>
<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_path')->value)."/cover/footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<script language="javascript">
$('#add_cart').click(function(){
    var proidval = $('#pro_id').val();
    var num = $('#num').val();
    //var att_all_str = '';
    window.location.replace('/index.php?load=order&act=add&pro_id='+proidval+'&num='+num );
})

</script>
</body>
</html>
