<!--
<?php
print <<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="MainTable">
  <tr> 
    <td height="100" valign="top" class="Main"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" >
        <tr> 
          <td class="head">版主管理</td>
        </tr>
        <tr> 
          <td class="middle"> 
            <table width="100%" border="0" cellspacing="1" cellpadding="3" style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word'>
              <form name="form1" method="post" action="?f">
                <tr align="center" class="head_in"> 
                  <td width="41%">標 題</td>
                  <td width="13%">欄 目 </td>
                  <td width="13%">日期</td>
                  <td width="12%">署名</td>
                  <td width="11%">狀態</td>
                  <td width="10%">修改/刪除</td>
                </tr>
                <!--
EOT;
foreach($listdb AS $key=>$rs){
print <<<EOT
-->
                <tr class="trA" onmouseover="this.className='trB'" onmouseout="this.className='trA'"> 
                  <td  align="left"> 
                    <input type="checkbox" name="aidDB[]" value="$rs[aid]">
                    {$rs[aid]}、<a href="../bencandy.php?fid=$rs[fid]&id=$rs[aid]" target="_blank" title="$rs[full_title]" style="color:$rs[titlecolor];">$rs[title]</a> 
                  </td>
                  <td align="center">&nbsp;<a href="../list.php?fid=$rs[fid]" target="_blank">$rs[fname]</a></td>
                  <td align="center">$rs[posttime]</td>
                  <td align="center">&nbsp;$rs[username]</td>
                  <td align="center">$rs[state]/$rs[levels]</td>
                  <td align="center"><a href="post.php?job=manage&aid=$rs[aid]">修改</a>/ 
                    <!--
EOT;
if($rs[yz]==2){print <<<EOT
-->
                    <a onclick="return confirm('你確實要從回收站清除本文嗎?不可恢復')" href="?Type=delete&aidDB[]=$rs[aid]&step=2&forcedel=1">清除</a> 
                    <!--
EOT;
}elseif($webdb[ForceDel]){
print <<<EOT
-->
                    <a onclick="return confirm('你確實要刪除本文嗎?不可恢復')" href="?Type=delete&aidDB[]=$rs[aid]&step=2&forcedel=1">刪除</a> 
                    <!--
EOT;
}else{
print <<<EOT
-->
                    <a   href="?Type=delete&aidDB[]=$rs[aid]&step=2">刪除</a> 
                    <!--
EOT;
}
print <<<EOT
-->
                  </td>
                </tr>
                <!--
EOT;
}print <<<EOT
-->
                <tr align="left" bgcolor="#F2F2F2"> 
                  <td colspan="6">請選擇要操作的欄目$choose_fid</td>
                </tr>
                <tr align="center">
                  <td colspan="6"> $showpage</td>
                </tr>
                <tr align="center"> 
                  <td colspan="6">&nbsp; </td>
                </tr>
                <tr align="center"> 
                  <td colspan="6"> 
                    <input type="radio" name="Type" value="delete" onclick="choose('del_tr')">
                    刪除 
                    <input type="radio" name="Type" value="yz" onclick="choose('yz_tr')">
                    審核操作 
                    <input type="radio" name="Type" value="leavels" onClick="choose('levels_tr')">
                    推薦操作 
                    <input type="radio" name="Type" value="move" onclick="choose('fid_tr')">
                    移動操作 
                    <input type="radio" name="Type" value="top" onclick="choose('top_tr')">
                    置頂 
                    <input type="radio" name="Type" value="bottom" onclick="choose('bottom_tr')">
                    沉底 
                    <input type="radio" name="Type" value="front" onClick="choose('ahead_tr')">
                    提前 
                    <input type="radio" name="Type" value="color" onClick="choose('color_tr')">
                    標題加亮 
                    <input type="radio" name="Type" value="return" onClick="choose('')">
                    從回收站取回<br>
                    <br>
                    <table width="100%" border="0" cellspacing="1" cellpadding="3" id="work_more" style="border:1px #ccc dotted;">
                      <tr id="del_tr" align="left"> 
                        <td width="25%">刪除選項</td>
                        <td width="75%"> 
                          <input type="radio" name="forcedel" value="1" checked>
                          徹底刪除 
                          <!--
EOT;
if(!$webdb[ForceDel]){print <<<EOT
-->
                          <input type="radio" name="forcedel" value="0">
                          放進回收站 
                          <!--
EOT;
}print <<<EOT
-->
                        </td>
                      </tr>
                      <tr id="yz_tr" align="left"> 
                        <td width="25%">審核選項</td>
                        <td width="75%"> 
                          <input type="radio" name="T_yz" value="1" checked>
                          通過審核 
                          <input type="radio" name="T_yz" value="0">
                          取消審核 </td>
                      </tr>
                      <tr id="levels_tr" align="left"> 
                        <td width="25%">推薦選項</td>
                        <td width="75%"> 
                          <input type="radio" name="levels" value="1" checked>
                          推薦 
                          <input type="radio" name="levels" value="0">
                          取消推薦 </td>
                      </tr>
                      <tr id="fid_tr" align="left"> 
                        <td width="25%">請選擇移到哪個欄目:</td>
                        <td width="75%">$sort_fid </td>
                      </tr>
                      <tr id="color_tr" align="left"> 
                        <td width="25%">標題顏色:</td>
                        <td width="75%"> 
                          <select  name="Color">
                            <option value='' style='background-color:skyblue;color:black'  selected>標題顏色</option>
                            <option value='black' style='background-color:skyblue;color:black'>黑色</option>
                            <option value='skyblue' style='color:skyblue'>天藍</option>
                            <option value='royalblue' style='color:royalblue'>品藍</option>
                            <option value='blue' style='color:blue'>藍</option>
                            <option value='darkblue' style='color:darkblue'>暗藍</option>
                            <option value='orange' style='color:orange'>橙</option>
                            <option value='orangered' style='color:orangered'>桔紅</option>
                            <option value='crimson' style='color:crimson'>深紅</option>
                            <option value='red' style='color:red'>紅</option>
                            <option value='firebrick' style='color:firebrick'>棕</option>
                            <option value='darkred' style='color:darkred'>暗紅</option>
                            <option value='green' style='color:green'>綠色</option>
                            <option value='limegreen' style='color:limegreen'>灰綠</option>
                            <option value='seagreen' style='color:seagreen'>海綠</option>
                            <option value='deeppink' style='color:deeppink'>粉</option>
                            <option value='tomato' style='color:tomato'>西紅柿色</option>
                            <option value='coral' style='color:coral'>珊瑚色</option>
                            <option value='purple' style='color:purple'>紫色</option>
                            <option value='indigo' style='color:indigo'>靛青</option>
                            <option value='burlywood' style='color:burlywood'>棕木</option>
                            <option value='sandybrown' style='color:sandybrown'>沙褐</option>
                            <option value='sienna' style='color:sienna'>土黃</option>
                            <option value='chocolate' style='color:chocolate'>巧克力色</option>
                            <option value='teal' style='color:teal'>土綠</option>
                            <option value='silver' style='color:silver'>銀</option>
                          </select>
                        </td>
                      </tr>
                      <tr id="top_tr" align="left"> 
                        <td width="25%">置頂日期:</td>
                        <td width="75%"> 
                          <input type="radio" name="toptime" value="86400">
                          一天 
                          <input type="radio" name="toptime" value="604800">
                          一星期 
                          <input type="radio" name="toptime" value="2592000">
                          一月 
                          <input type="radio" name="toptime" value="31536000">
                          一年 </td>
                      </tr>
                      <tr id="ahead_tr" align="left"> 
                        <td width="25%">提前到哪篇文章的前面:</td>
                        <td width="75%"> 
                          <input type="text" name="topid" size="8">
                          輸入文章ID,留空會提到最前</td>
                      </tr>
                      <tr id="bottom_tr" align="left"> 
                        <td width="25%">沉底到哪篇文章的後台:</td>
                        <td width="75%"> 
                          <input type="text" name="bottomid" size="8">
                          輸入文章ID,留空會沉到最底下</td>
                      </tr>
                      <tr id="sub_tr"> 
                        <td width="25%">操作理由: </td>
                        <td width="75%" align="left">
                          <textarea name="reason" cols="50" rows="5">$reason</textarea>
                          (若輸入理由的話,將短消息通知作者) </td>
                      </tr>
                      <tr id="sub_tr">
                        <td width="25%">&nbsp;</td>
                        <td width="75%" align="left"><a href="javascript:" onClick="CheckAll('all')">全選</a>/<a href="javascript:" onClick='CheckAll()'>反選</a> 
                          <input type="button" name="Submit" value=" 提 交 " onclick="postwork()">
                          <input type="hidden" name="step" value="2">
                          <input type="hidden" name="job" value="$job">
                        </td>
                      </tr>
                    </table>
                    <SCRIPT LANGUAGE="JavaScript">
<!--
function postwork(){
	ckid=false;
	cktype=false;
	form=document.form1
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(e.name=='aidDB[]' && e.checked == true){
			ckid=true;
		}
		if(e.name=='Type' && e.checked == true){
			cktype=true;
		}
	}
	if(ckid==false){
		alert('請選擇一條信息');
		return false;
	}
	if(cktype==false){
		alert('請選擇一個操作類型');
		return false;
	}
	form.submit();
}
function CheckAll(va){
	form=document.form1
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(e.name!='aidDB[]')continue;
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}

function choose(trid){
	oo=document.getElementById("work_more").getElementsByTagName("TR");
	for(var i=0;i<oo.length;i++){
		if(oo[i].id!=trid&&oo[i].id!='sub_tr'){
			oo[i].style.display='none';
		}else{
			oo[i].style.display='';
		}
	}
	parent.document.getElementById("main").height=parseInt(parent.document.getElementById("main").height)+40;
}
choose('');
//-->
</SCRIPT>
                  </td>
                </tr>
              </form>
            </table>
          </td>
        </tr><tr><td class="foot"><h3 class="L"></h3><h3 class="R"></h3></td></tr>
      </table>
    </td>
  </tr>
</table>
<!--
EOT;
?>
-->