<{include file="head.tpl"}>
<div class="page secondary">
    <div class="page-header">
            <div class="page-header-content">
                <div class="user-login">
           			     <a href="<{URL_admin_login act="logout"}>">
           			         <div class="name" style="line-height:22px">
           			             <span class="first-name"><{$smarty.session.admin->name}></span>
           			             <span class="last-name">注销</span>
           			         </div>
           			         <div class="avatar">
           			             <{if $smarty.session.admin->avatar eq 2}><img src="/files/system/avatar/0/<{$smarty.session.admin->uid}>_s.jpg" alt="头像载入中..."/><{elseif $smarty.session.admin->avatar eq 0}><img src="images/userhead.gif" alt="头像载入中..."/><{/if}><br/>
           			         </div>
           			     </a>
           			 </div>
           			 <h1>签到设置<small></small></h1>
                <a class="back-button big page-back" href="<{URL_admin_index}>"></a>
            </div>
    </div>
    
    <script type="text/javascript" src="templates/admin/js/modern/dialog.js"></script>
    
    <div class="page-region">
        <div class="page-region-content tiles">
            <ul class="listview fluid"> 
            <{section name=a loop=$dakadata}>
            		<li class="bg-color-orangeDark fg-color-white" style="width:48%;">
										<div class="badge right bottom"><a href="<{URL_admin_daymark act="edit" id=$dakadata[a].id}>"><i class="icon-pencil fg-color-white"></i></a> <a id="DeleteDialog_<{$dakadata[a].id}>"><i class="fg-color-white icon-cancel"></i></a></div>
										<div class="icon">
												<i class=" icon-checkmark"></i>
										</div>
										<div class="data">
												<h4 class="fg-color-white">连续签到 <{$dakadata[a].days}> 天</h4>
												奖励积分 <{$dakadata[a].score}> 分
												<p><{$dakadata[a].words}></p>
										</div>
								</li>
								<script type="text/javascript">
                    $(document).ready(function(){
                        $('#DeleteDialog_<{$dakadata[a].id}>').click(function(e) {
                            $.Dialog({
                                'title'      : '天数删除',
                                'content'    : '亲，您确定要删除该天奖励吗，删除该天后用户签到将得到上一天的奖励设置？',
                                'buttons'    : {
                                    '确定删除'    : {
                                        'action': function(){
                                        		window.location.href='<{URL_admin_daymark act="deletok" id=$dakadata[a].id}>';
                                        }
                                    },
                                    '取消删除'     : {
                                        'action': function(){}
                                    }
                                }
                            });
                        });
                    });
                </script>
            <{sectionelse}>
            		<li class="bg-color-orangeDark fg-color-white" style="width:48%;>
            				<div class="icon">
												<i class="icon-blocked"></i>
										</div>
										<div class="data">
												<h4 class="fg-color-white">还木有设置签到奖励信息！</h4>
										</div>
            		</li>
            <{/section}>
            </ul>
            <p align="right">
								<a class="button command-button default bg-color-red" href="<{URL_admin_daymark act="add"}>"><big>添加新的记录</big></a>
						</p>
        </div>
    </div>
</div>
<{include file="foot.tpl"}>
