<?php if(!defined('IN_SDCMS')) exit;?>
<div class="artshow">
	<h1>{$title}</h1>
	<div class="info">
		<span>作者：</span>{sdcms:rs table="sd_admin" where="adminid=$adminid"}{$rs[penname]}{/sdcms:rs}　<span>日期：</span>{date('Y-m-d',$createdate)}　<span>人气：</span>{$hits}
	</div>
	<div class="content">
		{if $viewstate<100}
			<div class="card m-40">
				<div class="card-header"><h5>友情提示</h5></div>
				<div class="card-body">
					<div class="card-text p-15">
					{if $viewstate==1}
						请先<a href="{N('login')}" class="text-red ml mr">登录</a>或<a href="{N('reg')}" class="text-red ml mr">注册</a>
					{/if}
					{if $viewstate==2}
						您的账户权限不足，无法查看！
					{/if}
					{if $viewstate==3}
						本文需要购买后才能继续阅读，价格：<span class="text-red">{$price}</span> 元　 <a href="javascript:;" class="modal-show" data-target="#mymodal-pay">【购买】</a>
					{/if}
					</div>
				</div>
			</div>
		{else}
			{$content}
		{/if}
	</div>
	
	{if $pagenum>1 && $viewstate==100}<div class="page page-center page-mid"><ul>{pagelist($page,$pagenum)}</ul></div>{/if}
	
	<div class="action">
		<div class="text-center"><a class="digs" data-url="{U('other/digs/','id='.$id.'&act=up','',1)}"><i class="ui-icon-like"></i><em>{$upnum}</em></a>赞</div>
		<div class="text-center"><a class="digs" data-url="{U('other/digs/','id='.$id.'&act=down','',1)}"><i class="ui-icon-unlike"></i><em>{$downnum}</em></a>踩</div>
	</div>
	
	{if count($tagslist)>0}
	<div class="tags">
		<i class="ui-icon-tags"></i> 标签：
		{foreach $tagslist as $rs}
			<a href="{$rs['url']}" title="{$rs['name']}" target="_blank" class="btn btn-sm">{$rs['name']}</a>
		{/foreach}
	</div>
	
	<div class="menu menu-blue">
		<div class="menu-name">相关内容</div>
	</div>
	<ul class="list mt-15">
		{sdcms:rs top="10" table="sd_content" where="$like" order="ontop desc,ordnum desc,id desc"}
		<li><a href="{$rs[link]}" title="{$rs[title]}"><i class="ui-icon-square font-14 mr text-blue"></i>{$rs[title]}</a></li>
		{/sdcms:rs}
	</ul>
	
	{/if}
			
</div>

<div class="modal" id="mymodal-pay">
	<div class="modal-header">
		<div class="modal-title">付款方式</div>
		<div class="modal-close rotate">×</div>
	</div>
	<div class="modal-body">
		<form method="post" id="form_buy">
			<ul class="pay" id="orderpay" style="display:block;">
				{if USER_ID>0}<li><div><img src="{WEB_ROOT}api/pay/user/images/pay.png" data-config="user"><i class="ui-icon-check"></i></div></li>{/if}
				{if C('pay_alipay_open')==1}
				<li><div><img src="{WEB_ROOT}api/pay/alipay/images/pay.png" data-config="alipay"><i class="ui-icon-check"></i></div></li>
				{/if}
				{if C('pay_wxpay_open')==1}
				<li><div><img src="{WEB_ROOT}api/pay/wxpay/images/pay.png" data-config="wxpay"><i class="ui-icon-check"></i></div></li>
				{/if}
			</ul>
			<input type="hidden" name="payway" id="payway" value="" data-rule="支付方式:required;">
			<button type="submit" class="btn btn-blue btn-block btn-big mt-30">支付：{$price}元</button>
		</form>
	</div>
</div>