<!--<?php
include_once PrintEot('left');
if(!$action){
$addurl = $hid ? "&hid=$hid" : '';print <<<EOT
-->
<div class="admin_info mb10">
    <h3 class="h1"><b>提示信息</b></h3>
    <div class="legend">幫助操作注意事項:<ol><li>標題不能為空，第一級和第二級項目的標題最多為8個字符。</li><li>內容支持html</li><li>最多支持四級項目，刪除某級項目是會將其包含的所有下級項目刪除，請小心操作</li><li>如果二級項目下有子項目，請點擊二級項目鏈接進入查看或編輯</li></ol></div>
</div>
<form action="$basename" method="post">
<input type="hidden" name="action" value="update" />
<h2 class="h1">
<!--
EOT;
if ($nav){print <<<EOT
-->
<span class="fl mr10"><a href="$basename">站點幫助中心</a><span class="linka">$nav</span></span>
<!--
EOT;
} else {print <<<EOT
-->
<span class="fl mr10">站點幫助中心</span>
<!--
EOT;
}
if($lv <= 3){
print <<<EOT
-->
<a class="btn_add fl" href="$basename&action=add$addurl" hidefocus="true"><i>添加幫助項目</i></a>
<!--
EOT;
}
print <<<EOT
-->
</h2>
<div class="admin_table mb10">
    <table width="100%" cellspacing="0" cellpadding="0">
        <tr class="tr2">
            <td width="50%">標題</td>
            <td width="20%">前台顯示順序</td>
            <td width="30%">操 作</td>
        </tr>
<!--
EOT;
foreach($listdb as $value){
$value[ifchild] && $value[title] = "<a href=\"$basename&hid=$value[hid]\" class=\"xia2\" style=\"text-decoration:underline;\">$value[title]</a>";print <<<EOT
-->
    	<tr class="tr1">
        	<td class="td3">$value[add]$value[title]</td>
            <td class="td2"><input class="input input_wc" name="selid[$value[hid]]" value="$value[order]"></td>
            <td class="td2">
<!--
EOT;
if ($value['lv'] < 3){
print <<<EOT
-->
                <a class="mr20" href="$basename&action=add&hup=$value[hid]">[添加子項目]</a>
<!--
EOT;
}
print <<<EOT
-->
            	<a class="mr20" href="$basename&action=edit&hup=$value[hup]&hid=$value[hid]" title="編輯">[編輯]</a>
            	<a href="$basename&action=delete&hid=$value[hid]" title="刪除">[刪除]</a>
           </td>
      	</tr>
<!--
EOT;
}print <<<EOT
-->
    </table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit" onfocus="blur();">提 交</button></span></span>
</div>
</form>
<!--
EOT;
}elseif($action=='delete'){print <<<EOT
-->
<form action="$basename" method="post">
<input type="hidden" name="action" value="delete" />
<input type="hidden" name="hid" value="$hid" />
<input type="hidden" name="step" value="2" />
<div class="admin_info mb10">
    <h3 class="h1">確認刪除</h3>
    <div class="legend">您確定刪除名為“{$dtitle}” 的幫助項目？<br /><font color="#FF0000">請注意: 刪除此項目會同時刪除其所有子項目。</font></div>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit" onfocus="blur();">提 交</button></span></span>
    <span class="bt"><span><button type="button" onclick="window.location = '$basename'">返 回</button></span></span>
</div>
</form>
<!--
EOT;
}elseif($action=='add' || $action=='edit'){print <<<EOT
-->
<form action="$basename" method="post">
<input type="hidden" name="step" value="2" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="hid" value="$hid" />
<h2 class="h1">
<!--
EOT;
if($action=='add'){print <<<EOT
-->
<span class="mr10">添加幫助項目</span>
<!--
EOT;
} else {print <<<EOT
-->
<span class="mr10">編輯幫助項目</span>
<!--
EOT;
}print <<<EOT
-->
<a href="$basename" class="linka">返回上一級<span class="f9">▲</span></a></h2>
<div class="admin_table mb10">
    <table width="100%" cellspacing="0" cellpadding="0">
        <tr class="tr1 vt">
        	<td class="td1">上級項目</td>
        	<td class="td2"><select name="hup" class="select_wa" onchange="whetherDisplay(this);"><option value="0">作為頂級</option>{$helpslt}</select></td>
			<td class="td2"><div class="help_a">選擇項目等級</div></td>
        </tr>
        <tr class="tr1 vt">
        	<td class="td1">前台顯示順序</td>
        	<td class="td2"><input type="text" class="input input_wa" name="vieworder" value="$vieworder" /></td>
			<td class="td2"><div class="help_a"><!-- 前台顯示順序 --></div></td>
        </tr>
        <tr class="tr1 vt">
        	<td class="td1">標題</td>
        	<td class="td2"><input type="text" class="input input_wa" name="title" value="$title" /></td>
			<td class="td2"><div class="help_a"><!-- 標題 --></div></td>
        </tr>
<!--
EOT;
if (empty($hup)) {
$style='style="display:none"';
}
print <<<EOT
-->
        <tr class="tr1 vt" id="url" $style>
            <td class="td1">URL鏈接</td>
            <td class="td2"><input type="text" class="input input_wa" name="url" value="$url" /></td>
        <td class="td2"><div class="help_a">填寫已經完善的幫助鏈接。<font color="#FF0000">注:填寫此處，內容項無須填寫</font></div></td>
		</tr>
        <tr class="tr1 vt" id="content" $style>
            <td class="td1">內容</td>
            <td class="td2"><textarea name="content" class="textarea">$content</textarea></td>
        <td class="td2"><div class="help_a">填寫幫助內容。支持html代碼</div></td>
		</tr>
    </table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit" onfocus="blur();">提 交</button></span></span>
</div>
</form>
<script>
function whetherDisplay(obj) {
	if (obj.value == 0) {
		getObj('url').style.display='none';
		getObj('content').style.display='none';
	} else {
		getObj('url').style.display='';
		getObj('content').style.display='';
	}
}
</script>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->