{template 'user/head.html'}
<div id="position">
    <a href="javascript:history.back(-1)"><img src="{$base_url}/images/user/skin/undo.gif" style="float:right;" /></a>{lang(nowposition)}：{lang(listcontent)}
</div>

<div class="padding10">
    <img src="{$base_url}/images/user/skin/wj.gif" style="margin-right:10px;" />
</div>

<div class="blank10"></div>

<script type="text/javascript" src="{$base_url}/common/js/list.js"></script>
<script language="javascript" src="{$base_url}/common/js/common.js"></script>


<table border="0" cellspacing="0" cellpadding="4" class="list">
    <thead>
        <tr>
            <th>
                {lang(managecontent)}<?php if(front::get('deletestate')) {?>({lang(backplace)})<?php } ?>
            </th>
			</tr>
    </thead>
</table>

<div class="blank10"></div>

<div>
    <div style="float: left">    
        <form name="searchform" id="searchform"  action="<?php echo uri();?>" method="post">
            {lang(category)}
            <?php echo form::select('search_catid',get('search_catid')?get('search_catid'):0,category::option()); ?>
            {lang(type)}
            <?php echo form::select('search_typeid',get('search_typeid')?get('search_typeid'):0,type::option()); ?>
            {lang(title)}
            <input type="text" name="search_title" id="search_title" value=""/>

            <input type="submit" value="{lang(search)}" name="submit"  onclick="this.form.action='{url::modify('table/'.get('table'))}'" class="button"/>

            <div class="blank10"></div>
            {lang(area)}
            <?php echo form::select('search_province_id',get('search_province_id')?get('search_province_id'):0,area::province_option()); ?>
            <?php echo form::select('search_city_id',get('search_city_id')?get('search_city_id'):0,area::city_option(get('search_city_id'))); ?>
            <?php echo form::select('search_section_id',get('search_section_id')?get('search_section_id'):0,area::section_option(get('search_section_id'))); ?>

            {lang(special)}
            <?php echo form::select('search_spid',get('search_spid')?get('search_spid'):0,special::option()); ?>
        </form>
    </div>

<table border="0" cellspacing="0" cellpadding="4" class="list">
    <thead>
        <tr>
            <td style="text-align:right;">
        <a href="{$site_url}index.php?case=manage&act=add&manage=archive" class="button">{lang(addcontent)}</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="{url::modify("table/".get('table')."/deletestate/1/page/1")}" class="button">{lang(backplace)}</a>
    </td>
			</tr>
    </thead>
</table>
</div>

<div class="blank10"></div>

<!--form name="searchform" id="searchform"  action="<?php echo uri();?>" method="post">
    <table border="0" cellspacing="0" cellpadding="4" class="list">
        <thead>
            <tr>
                <th  colspan="11">
                    内容管理<?php if(front::get('deletestate')) {?>({lang(backplace)})<?php } ?>
                </th></tr>
        </thead>
        <tbody>
            <tr>
                <td colspan="10">
                    <table><tr><td>
                                类别：</td><td>
<?php echo form::select('_catid',get('_catid')?get('_catid'):0,category::option()); ?>
                            </td><td>
                                标题:</td><td>
                                <input type="text" name="_title" id="_title" value=""  />    </td><td>
                                <input type="submit" value="{lang(search)}" name="submit"  onclick="this.form.action='{url::modify('table/'.get('table'))}'" class="button"/>
                            </td></tr>
        </tbody>
    </table></td>
<td width="200">
    <a href="index.php?case=table&act=add&table=archive&admin_dir={get('admin_dir')}" class="button">添加内容</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="{url::modify("table/".get('table')."/deletestate/1/page/1")}" class="button">{lang(backplace)}</a>
</td>
</tr>

</tbody>

</form-->




<form name="listform" id="listform"  action="<?php echo uri();?>" method="post">

    <table border="0" cellspacing="0" cellpadding="4" class="list" name="table" id="table">
        <thead>
            <tr>
                <!--<th width="60" align="center">{lang(allselect)}<br /><input onclick="CheckAll(this.form)" type="checkbox" name="chkall" class="checkbox" /> </th>-->
               <!-- <th align="center">{lang(order)}</th>-->
                <th align="center"><!--aid-->{lang(id)}</th>
                <th align="center"><!--catid-->{lang(category)}</th>
                <th align="left"><!--title-->{lang(title)}</th>
                <th align="center"><!--username-->{lang(author)}</th>
                <th align="center"><!--view-->{lang(view)}</th>
                <th align="center"><!--adddate-->{lang(adddate)}</th>
                <th align="center"><!--checked-->{lang(checked)}</th>
          
                <th align="center">{lang(dosomething)}</th>
            </tr>

        </thead>
        <tbody>
            {loop $data $d}
            <tr class="s_out" onmouseover="m_over(this)" onmouseout="m_out(this)">

                <!--<td align="center"><input onclick="c_chang(this)" type="checkbox" value="{$d.$primary_key}" name="select[]" class="checkbox" /> </td>-->
               <!-- <td align="center">{form::input("listorder[$d[$primary_key]]",$d['listorder'],'size=3')}</td>-->

                <td align="center">{cut($d['aid'])}</td>
                <td align="center"><a href="<?php echo url("archive/list/catid/".$d[catid],false);?>" target="_blank">{catname($d['catid'])}</a></td>
                <td align="left">{cut($d['title'])}</td>
                <td align="center">{cut($d['username'])}</td>
                <td align="right">{cut($d['view'])}</td>
                <td align="center">{cut($d['adddate'])}</td>
                <td align="center">{helper::yes($d['checked'])}</td>

                <td align="center">
                    <a href='<?php if($d['linkto'])   echo $d['linkto']; else echo url("archive/show/aid/$d[$primary_key]",false);?>' target="_blank" >{lang(look)}</a>
                    <a href="<?php echo modify("act/edit/manage/archive/id/$d[$primary_key]");?>">{lang(edits)}</a>
                </td>
            </tr>
            {/loop}


        </tbody>
    </table>


    <div class="blank10"></div>

    <input type="hidden" name="batch" value="">
<!--    <input  class="button" type="button" value=" {lang(order)} " name="order" onclick="this.form.action='<?php echo modify('act/batch',true);?>'; this.form.batch.value='listorder'; this.form.submit();"/>

    <?php  if(!front::get('deletestate')) {?>
    <input type="button" value=" {lang(checked)} " name="check" onclick="if(getSelect(this.form)  && confirm('{lang(truecheckedidby)}('+getSelect(this.form)+'){lang(isrecord)}')){ this.form.action='<?php echo modify('act/batch',true);?>';this.form.batch.value='check';this.form.submit();}" class="button" />
        <?php } ?>

    <?php if(!front::get('deletestate')) {?>
    <input type="button" value="{lang(deltobackplace)}" name="delete" onclick="if(getSelect(this.form) && confirm('{lang(truethisidto)}('+getSelect(this.form)+')的记录放到回收站吗?')){this.form.action='<?php echo modify('act/batch',true);?>'; this.form.batch.value='deletestate'; this.form.submit();}" class="button"/>


        <?php } ?>

    <input type="button" value="<?php if(get('table')=='archive') {?>彻底<?php } ?>删除" name="delete" onclick="if(getSelect(this.form) && confirm('确实要删除ID为('+getSelect(this.form)+')的记录吗?')){this.form.action='<?php echo modify('act/batch',true);?>'; this.form.batch.value='delete'; this.form.submit();}" class="button" />

    <?php if(get('table')=='archive') {?>
    <input type="button" value=" 还原 " name="restore" onclick="if(getSelect(this.form) && confirm('确实要把ID为('+getSelect(this.form)+')的已删除记录还原吗?')){this.form.action='<?php echo modify('act/batch',true);?>'; this.form.batch.value='restore'; this.form.submit();}" class="button" />
        <?php } ?>-->

</form>


<div class="page"><?php if(get('table')!='type' && front::get('case')!='field') echo pagination::html($record_count); ?></div>
<div class="blank30"></div> <div class="blank30"></div></div>
{template 'user/foot.html'}