<?php (!defined('IN_ADMIN') || !defined('IN_MUDDER')) && exit('Access Denied'); ?>
<div id="body">
<div class="space">
    <div class="subtitle">操作提示</div>
    <table class="maintable" border="0" cellspacing="0" cellpadding="0">
    <tr><td>
        <li>新增广告后，同时会在“<a href="admincp.php?action=modoer&file=datacall&op=list">数据调用</a>”里增加相应的调用内容。</li>
        <li>在查看调用代码时，提示调用不存在时，可以点击“编辑”链接，提交更新，便可再次查看调用代码。</li>
        <li>“属性”功能为预留给站长的自定义功能，可结合自身网站需求使用，例如：在不同点评分类显示不同广告。</li>
    </td></tr>
    </table>
</div>
<form method="post" action="admincp.php?action=<?=$action?>&file=<?=$file?>&op=<?=$op?>&">
<input type="hidden" name="ischeck" value="<?=$ischeck?>" />
	<div class="space">
		<div class="subtitle">广告管理</div>
		<table class="maintable" border="0" cellspacing="0" cellpadding="0">
			<tr class="altbg2">
                <th colspan="8">
                    <ul class="subtab">
                    <li<?=!$invalid?' class="current"':''?>><a href="admincp.php?action=<?=$action?>&file=list">有效的</a></li>
                    <li<?=$invalid?' class="current"':''?>><a href="admincp.php?action=<?=$action?>&file=list&invalid=1">已过期</a></li>
                    </ul>
                </th>
            </tr>
            <tr class="altbg1">
				<td width="20">选</td>
                <td width="*">广告名称</td>
				<td width="80">类型</td>
                <td width="180">有效期</td>
				<td width="70">自定义属性</td>
                <td width="60">调用代码</td>
                <td width="50">操作</td>
			</tr>
			<?if($total > 0){
            while($row=$db->fetch_array($query)) {?>
            <tr>
                <td><input type="checkbox" name="adids[]" value="<?=$row['adid']?>" /></td>
                <td><?=$row['subject']?></td>
                <td><?=$adtype_arr[$row['adtype']]?></td>
                <td><?=date('Y-m-d',$row['begintime']).'&nbsp;~&nbsp;'.($row['endtime']=='2000000000'?'长期':date('Y-m-d',$row['endtime']));?></td>
                <td><?=$row['attr']?></td>
                <td><a href="admincp.php?action=modoer&file=datacall&op=code&callid=<?=$row['callid']?>">查看</a></td>
                <td><a href="admincp.php?action=<?=$action?>&file=detail&adid=<?=$row['adid']?>">编辑</a></td>
            </tr>
            <?} $db->free_result($query); ?>
 			<tr>
                <td colspan="8" class="altbg1">
                    <button type="button" class="btn2" onclick="checkbox_checked('adids[]');">全选</button>
                    <input type="radio" name="op" value="delete" id="op_delete" /><label for="op_delete">批量删除</label>
                    <input type="radio" name="op" value="attr" id="op_attr" /><label for="op_attr">批量修改属性&nbsp;<input type="text" name="attr" class="txtbox5" /></label>
                </td>
            </tr>
            <?} else {?>
 			<tr>
                <td colspan="8">暂无信息。</td>
            </tr>
            <?}?>
		</table>
        <?if($multipage){?><div class="multipage"><?=$multipage?></div><?}?>
	<center>
    <?if($total > 0) {?>
    <input type="hidden" name="dosubmit" value="yes" />
    <button type="submit" name="deletesubmit" value="yes" class="btn" /> 提交操作 </button>
    <?}?>
    </center>
	</div>
</form>
</div>