<?php include mayi_tpl('inc_header'); ?><link rel="stylesheet" type="text/css" href="template/css/new.exchange.css" /><script language="javascript" src="template/javascript.js"></script></head>
<body class="blue"><div class="container">
    <div id="main" class="main section-setting">
        <div class="clearfix main-inner">
            <div class="content">
            <div class="clearfix content-inner">
                <div class="content-main">
                    <div class="content-main-inner">

<div class="pwrap">
    <div class="phead"><div class="phead-inner"><div class="phead-inner">
        <h3 class="ptitle"><span>新闻投稿</span></h3>
        <p class="pextra addwebsite"><a href="index.php?m=tougao&ac=new&type=user"><span>我要投稿</span></a></p>
    </div></div></div>
    <div class="pbody">
<div id="msg_success"></div>
<div id="msg_error"></div>
<div id="msg_alert"></div>
        <form method="post" action="?m=<?=$m?>&tid=<?=$tid?>&page=<?=$page?>">
        <div class="datatablewrap">
            <table class="datatable">
                <thead>
                    <tr>
                        <td width="30">
                            <input class="checkall" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/>
                        </td>
						<td width="40">状态</td>
                        <td width="120">栏目</td>
                        <td>标题</td>
                        <td width="180">发布时间</td>
                        <td width="80">详情</td>
                    </tr>
                </thead>
                <tbody>
                <?php if($rows_num == 0 ){?>
                    <tr>
                        <td colspan="6">
                        <div class="nodata">您尚未投稿</div>
                        </td>
                    </tr>
                <?php } else {
                $i = 1;
                foreach($tougao as $d){
                ?>
                	<tr <?php if($i%2 == 0) echo 'class="row-even"'?>>
                        <td><input class="checkbox" type='checkbox' name='selectedids[]' value='<?=$d[id]?>' id="<?=$d[id]?>'"></td>
						<td>
                        <?=$ifcheck_arr[$d['iscommend']]?>
                        </td>
                        <td>
                        <?=$d['catname']?>
                        </td>
                        <td>
                        <a href="<?=Rewrite('news',array('id'=>$d['id'],'cityid'=>$d['cityid']))?>" target="_blank" title="<?=$d['title']?>"><?=cutstr($d['title'],52)?></a>
                        <?php if($d['imgpath']) echo '<span class="imgnum">图</span>'?>
                        </td>
                        <td>
                        <?=GetTime($d['begintime'])?>
                        </td>
                        <td>
                        <? if(empty($d[iscommend])){?><a href="index.php?m=tougao&ac=edit&id=<?=$d['id']?>&type=user">编辑</a><? }?>
                        </td>
                    </tr>
                <?php 
                	$i++;
                    }
                    unset($i);
                }
                ?>
                </tbody>
            </table>
            <div class="clearfix datacontrol">
                <div class="dataaction">
                	<? if(empty($d[iscommend])){?>
                    <span class="minbtn-wrap"><span class="btn"><input type="submit" value="删除" class="button" name="tougao_submit" onClick="if(!confirm('您确定要删除这些<?=$tougaotype[$tid]['typename']?>吗?一旦删除将不可恢复'))return false;"/></span></span> 
                	<? }?>
                </div>
                <div class="pagination"><?php echo page2(); ?></div>
            </div>
        </div>
		</form>
    </div>
    <div class="pfoot"><p><b>-</b></p></div>
</div>
                    </div>
                </div>
            </div>
        </div>
        </div>
    </div>
	<?php include mayi_tpl('inc_foot');?>
    
</div>
</body>
</html>