<!--<?php
include_once PrintEot('left');
if($adminitem == 'commonsmile'){
print <<<EOT
-->
<div class="nav3 mb10">
    <ul class="cc">
		<li><a href="$jobUrl">基本設置</a></li>
		<li><a href="$jobUrl&adminitem=setform">預設帖子格式</a></li>
		<li><a href="$jobUrl&adminitem=pwcode">自定義代碼</a></li>
		<li class="current"><a href="$jobUrl&adminitem=commonsmile">普通表情</a></li>
		<li><a href="$jobUrl&adminitem=specialsmile">特殊表情</a></li>
    </ul>
</div>
<!--
EOT;
if(!$action){print <<<EOT
-->
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend">
		<ul><li>添加表情組:請上傳表情組文件夾至images/post/smile/目錄中</li>
<li>表情名稱:使用該表情時將出現相應的語言描述，必填</li></ul>
	</div>
</div>
<form method="post" action="$basename" name="FORM">
<h2 class="h1">表情管理</h2>
<div class="admin_table mb10">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr class="tr2 td_bgB">
		<td width="30"><span onclick="CheckAll(document.FORM)" class="cp">啟用</span></td>
		<td width="30">順序</td>
		<td width="100">表情組名稱</td>
		<td width="180">圖片路徑</td>
		<td>操 作</td>
	</tr>
<!--
EOT;
if (empty($facedb)) {print <<<EOT
-->
<tr><td class="p10" colspan="4"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{
foreach($facedb as $key=>$face){
$checked = $face[type] == 0 ? 'checked="checked"' : '';
print <<<EOT
-->
	<tr class="tr3">
		<td class="td2"><input name="type[]" value="$face[id]" type="checkbox" $checked /></td>
		<td class="td2"><input value="$face[vieworder]" class="input input_wd" name="vieworder[$face[id]]" type="text" /></td>
		<td class="td2"><input name="name[$face[id]]" class="input input_wa" value="$face[name]" type="text" /></td>
		<td class="td2">$face[path]</td>
		<td class="td2"><a class="mr20" href="$basename&action=smilemanage&id=$face[id]" title="分類表情管理">[分類表情管理]</a><a href="$basename&action=delete&id=$face[id]" onclick="return delSmiles();" title="刪除此表情分類">[刪除此表情分類]</a></td>
	</tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
</div>
<input name="action" type="hidden" value="editsmiles">
<input name="shownum" type="hidden" value="16">
<div class="tac mb10">
	<span class="bt"><span><button type="button" onclick="CheckAll(document.FORM)">全 選</button></span></span>
	<span class="btn"><span><button name="update" type="submit">提 交</button></span></span>
</div>
</form>
<h2 class="h1">添加表情組</h2>
<form method="post" action="$basename">
<div class="admin_table mb10">

<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr class="tr2 td_bgB">
		<td width="30">順序</td>
		<td width="100">表情組名稱</td>
		<td>圖片路徑</td>
	</tr>
	<tr class="tr1">
		<td class="td2"><input class="input input_wd" value="$maxOrder" type="text" name="vieworder" /></td>
		<td class="td2"><input class="input input_wa" type="text" name="name" /></td>
		<td class="td2"><input class="input input_wa" type="text" name="path" /></td>
	</tr>
</table>
</div>
<input name=action type="hidden" value="addface">
<div class="tac mb10">
	<span class="btn"><span><button name="add" type="submit">提 交</button></span></span>
</div>
</form>
<script type="text/javascript">
function delSmiles(){
	var msg=confirm("刪除表情分類也會刪除該分類下的所有表情\\n將會導致前台的所有該分類下的表情圖片無法再顯示，您確認要刪除嗎？");
	return msg;
}
</script>
<!--
EOT;
}elseif($action=='smilemanage'){print <<<EOT
-->
<form action="$basename" method="post"  name="smiledel" id="deleteForm">
<input type="hidden" name="id" value="$id" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="step" value="3" />
<input type="hidden" name="typeid" value="$id" />
<h2 class="h1">
<span class="mr10">表情管理<span class="linka">(已經成功添加的表情)</span></span><a href="$basename" class="linka">返回上一級<span class="f9">▲</span></a>
</h2>
<div class="admin_table mb10">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr class="tr2 td_bgB">
    	<td width="30"><span onclick="CheckAll(document.smiledel)" class="cp">全選</span></td>
		<td width="50">順序</td>
		<td width="50">標簽</td>
		<td width="60">圖片路徑</td>
		<td width="60">圖片預覽</td>
		<td width="165">圖片名稱</td>
		<td width="165">圖片描述</td>
		<td>操 作</td>
	</tr>
<!--
EOT;
if (empty($smiles)) {print <<<EOT
-->
<tr><td class="p10" colspan="7"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{
foreach($smiles as $value){print <<<EOT
-->
	<tr class="tr1">
    	<td class="td2">&nbsp;<input type="checkbox" name="checkSelect[]" value="$value[id]"></td>
		<td class="td2"><input name="vieworder[$value[id]]" class="input input_wd" value="$value[vieworder]"></td>	
		<td class="td2">[s:$value[id]]</td>
		<td class="td2">$path/$value[path]</td>
		<td class="td2"><img src="$value[src]"></td>
		<td class="td2"><input type="text" class="input input_wa" name="name[$value[id]]" value="$value[name]" /></td>
		<td class="td2"><input type="text" class="input input_wa" name="descipt[$value[id]]" value="$value[descipt]" /></td>
		<td class="td2"><a href="$basename&action=delsmile&smileid=$value[id]&typeid=$id" onclick="return delSmile();" title="刪除">[刪除]</a></td>
	</tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
</div>
<div class="tac mb10">
	<span class="bt"><span><button type="button" onclick="CheckAll(document.smiledel)">全 選</button></span></span>
	<span class="btn"><span><button type="submit">編&nbsp;輯</button></span></span>
    <span class="btn"><span><button  type="button" name="deletesubmit" id="delete_submit" onclick="submitForm(document.smiledel,'delsmile');">刪&nbsp;除</button></span></span>
</div>
</form>
<script type="text/javascript">
function delSmile(){
	var msg=confirm("刪除表情請注意:\\n\\n刪除該表情將會導致前台的該表情圖片無法再顯示，您確認要刪除嗎？");
	return msg;
}

function submitForm(aForm, action) {
	aForm.action.value = action;
	aForm.submit();
} 
</script>
<form action="$basename" method="post" name="FORMADD">
<h2 class="h1"><span class="mr20">表情管理</span><span class="linka">(該目錄下尚未被添加的表情)</span></h2>
<div class="admin_table mb10">
<table cellspacing="0" cellpadding="0" width="100%">
	<tr class="tr2 td_bgB">
		<td width="80"><span onclick="CheckAll(document.FORMADD)" class="cp">全選</span></td>
		<td width="100">圖片路徑</td>
		<td>圖片預覽</td>
	</tr>
<!--
EOT;
if (empty($smiles_new)) {print <<<EOT
-->
<tr><td class="p10" colspan="3"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}else{
foreach($smiles_new as $value){print <<<EOT
-->
	<tr class="tr1">
		<td class="td2">&nbsp;<input type="checkbox" name="add[]" value="$value[path]"></td>
		<td class="td2">$path/$value[path]</td>
		<td class="td2"><img src="$value[src]"></td>
	</tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
</div>
<div class="tac mb10">
	<span class="bt"><span><button type="button" onclick="CheckAll(document.FORMADD)">全 選</button></span></span>
	<span class="btn"><span><button type="submit">添 加</button></span></span>
</div>
<input type="hidden" name="id" value="$id">
<input type="hidden" name="action" value="addsmile">
</form>
<!--
EOT;
}
}elseif($adminitem == 'specialsmile'){
print <<<EOT
-->
<div class="nav3 mb10">
    <ul class="cc">
		<li><a href="$jobUrl">基本設置</a></li>
		<li><a href="$jobUrl&adminitem=setform">預設帖子格式</a></li>
		<li><a href="$jobUrl&adminitem=pwcode">自定義代碼</a></li>
		<li><a href="$jobUrl&adminitem=commonsmile">普通表情</a></li>
		<li  class="current"><a href="$jobUrl&adminitem=specialsmile">特殊表情</a></li>
    </ul>
</div>
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend">
		<ul><li>添加特殊表情:請先上傳表情至<b>$imgpath/post/smile/write/</b>目錄中，然後在“特殊表情(該目錄下尚未被添加的表情)”中選中並填寫表情名稱後即可添加</li>
<li>表情名稱:使用該表情時將出現相應的語言描述，必填</li></ul>
	</div>
</div>
<form action="$basename&tab=$tab" method="post" name="FORMDEL" id="deleteForm">
<input type="hidden" name="action" value="edits" />
<input type="hidden" name="step" value="3" />
<h2 class="h1">
<span class="mr10">特殊表情</span><span class="linka">(已經成功添加的表情)</span>
</h2>
<div class="admin_table mb10">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr class="tr2 td_bgB">
  		<td width="30"><span onclick="CheckAll(document.FORMDEL)" class="cp">全選</span></td>
		<td width="50">順序</td>
		<td width="165">表情名稱<span class="s1">*</span></td>
		<td width="60">圖片路徑</td>
		<td width="60">圖片預覽</td>
		<td>操 作</td>
	</tr>
<!--
EOT;
	if (empty($smiles)) {print <<<EOT
-->
<tr><td class="p10" colspan="7"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
	} else {
		foreach ($smiles as $smile) {print <<<EOT
-->
	<tr class="tr1">
   		<td class="td2">&nbsp;<input type="checkbox" name="checkSelect[]" value="$smile[smileid]"></td>
		<td class="td2"><input name="edits[$smile[smileid]][order]" class="input input_wd" value="$smile[vieworder]"></td>
		<td class="td2"><input type="text" class="input input_wa" name="edits[$smile[smileid]][name]" value="$smile[name]" /></td>
		<td class="td2">$smile[path]</td>
		<td class="td2"><img src="$smile[url]"></td>
		<td class="td2"><a href="$basename&tab=$tab&action=delsmile&smileid=$smile[smileid]" onclick="return delSmile();" title="刪除">[刪除]</a></td>
	</tr>
<!--
EOT;
		}
	}print <<<EOT
-->
</table>
</div>
<div class="tac mb10">
	<span class="bt"><span><button type="button" onclick="CheckAll(document.FORMDEL)">全 選</button></span></span>
	<span class="btn"><span><button type="submit">編&nbsp;輯</button></span></span>
     <span class="btn"><span><button  type="button" name="deletesubmit" id="delete_submit" onclick="submitForm(document.FORMDEL,'delsmile');">刪&nbsp;除</button></span></span>
</div>
</form>

<script type="text/javascript">
function delSmile(){
	var msg=confirm("刪除表情請注意:\\n\\n刪除該表情將會導致前台的該表情圖片無法再顯示，您確認要刪除嗎？");
	return msg;
}

function submitForm(aForm, action) {
	aForm.action.value = action;
	aForm.submit();
} 
</script>

<form action="$basename&tab=$tab" method="post" name="FORMADD">
<h2 class="h1"><span class="mr10">特殊表情</span><span class="linka">(該目錄下尚未被添加的表情)</span></h2>
<div class="admin_table mb10">
<table cellspacing="0" cellpadding="0" width="100%">
	<tr class="tr2 td_bgB">
		<td width="30"><span onclick="CheckAll(document.FORMADD)" class="cp">全選</span></td>
		<td width="50">順序</td>
		<td width="100">表情名稱<span class="s1">*</span></td>
		<td width="100">圖片路徑</td>
		<td>圖片預覽</td>
	</tr>
<!--
EOT;
	if (empty($newSmiles)) {print <<<EOT
-->
<tr><td class="p10" colspan="3"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
	} else {
		foreach($newSmiles as $index => $smile) {print <<<EOT
-->
	<tr class="tr1">
		<td class="td2">&nbsp;<input type="checkbox" name="add[$index][path]" value="$smile[path]"></td>
		<td class="td2"><input type="text" name="add[$index][order]" class="input input_wd"></td>
		<td class="td2"><input type="text" name="add[$index][name]"></td>
		<td class="td2">$smile[path]</td>
		<td class="td2"><img src="$smile[url]"></td>
	</tr>
<!--
EOT;
		}
	}print <<<EOT
-->
</table>
</div>
<div class="tac mb10">
	<span class="bt"><span><button type="button" onclick="CheckAll(document.FORMADD)">全 選</button></span></span>
	<span class="btn"><span><button type="submit">添 加</button></span></span>
</div>
<input type="hidden" name="action" value="addsmile">
</form>

<!--
EOT;
}
include_once PrintEot('adminbottom');
?>-->