<!--<?php
include_once PrintEot('left');
print <<<EOT
-->
<!--
EOT;
if(empty($action)) {print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
        <li class="current"><a href="javascript:;">模塊管理</a></li>
    </ul>
</div>
<h2 class="h1">搜索條件</h2>
<div class="admin_table mb10">
<form action="$basename" method="post">
    <table cellpadding="0" cellspacing="0" width="100%">
    	<tr class="tr1">
        	<td class="td2">
            	所屬頻道:<select name="alias"  class="select_wa mr10">
				<option value=""></option>
<!--
EOT;
foreach($portalPages as $key=>$val){
$selected = $alias == $key ? 'selected="selected"' : '';
print <<<EOT
-->
			<option value="$key" $selected>$val[name]</option>
<!--
EOT;
}print <<<EOT
-->
				</select>
				ID:<input name="keyword" value="$keyword" type="text" class="input input_wa" />
            	名稱:<input name="title" value="$title" type="text" class="input input_wa" />
                <span class="bt2"><span><button type="submit">提 交</button></span></span>
            </td>
        </tr>
    </table>
</form>
</div>
<h2 class="h1"><span class="mr5 fl">模塊管理</span></h2>
<div class="admin_table mb10">
	<table width="100%">
    	<tr class="tr2">
    		<td>模塊ID</td>
        	<td>模塊名稱</td>
        	<td>所屬頻道</td>
            <td>推薦審核</td>
            <td>狀態</td>
            <td>操作</td>
        </tr>
<!--
EOT;
foreach($modules as $module){
$thisChannel = $portalPages[$module['sign']]['name'];
$ifverify = $module['ifverify'] ? '開啟':'關閉';
$ifstate = ($module['state'] || !$module['sign']) ? '<font color="red">失效</font>':'使用中';
print <<<EOT
-->
        <tr class="tr1">
        	<td class="td2">$module[name]</td>
        	<td class="td2">$module[title]</td>
            <td class="td2">$thisChannel</td>
            <td class="td2">$ifverify</td>
            <td class="td2">$ifstate</td>
            <td class="td2">
<!--
EOT;
if (!$module['state'] && $thisChannel!="") {
print <<<EOT
-->
            	<a href="$basename&action=editconfig&alias=$module[sign]&invokename=$module[name]&page=$page&keyword=$keyword" class="mr10" onclick="">[設置]</a>
            	<a href="$basename&action=edittpl&alias=$module[sign]&invokename=$module[name]&page=$page&keyword=$keyword" class="mr10">[編輯模板]</a>
<!--
EOT;
}print <<<EOT
-->
            	<a href="javascript:;" onclick="parent.PW.Dialog({'id': 'area_pushdata','name': '模塊內容管理','url': '$admin_file?adminjob=mode&admintype=area_pushdata&alias=$module[sign]&invoke=$module[invokename]','max': false});return false;" class="mr10">[內容管理]</a>
<!--
EOT;
if ($module['state'] || $thisChannel=="") {
print <<<EOT
-->
            	<a href="javascript:;" onclick="delModule('$module[name]')" class="mr10">[刪除]</a>
<!--
EOT;
}print <<<EOT
-->
            </td>
        </tr>
<!--
EOT;
}print <<<EOT
-->
    </table>
    <div class="p10 cc">$pages</div>
</div>
<script src="js/pw_ajax.js" type="text/javascript"></script>
<script src="js/global.js" type="text/javascript"></script>
<script>

function delModule(name){
	if (!confirm("刪除模塊，將同時刪除歷史推送數據，是否確認刪除？")){
		return false;
	}
	var url = "$ajax_basename";
	ajax.send(url,'action=del&invokename='+name,ajax.get);
}

</script>
<!--
EOT;
}elseif($action =='edittpl') {print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
        <li><a href="$beginUrl">模塊管理</a></li>
        <li class="current"><a href="javascript:;">編輯模板</a></li>
    </ul>
</div>
<h2 class="h1">$invokename</h2>

<form action="$basename&action=edittpl" method="post" >
<div class="admin_table mb10">
	<table width="100%">
    	<tr class="tr1 vt">
            <td class="td2"><textarea name="tagcode" style="width:98%;height:200px;font-family:'Courier New', Courier, monospace;" >$pieceCode</textarea></td>
        </tr>
    </table>
</div>
	<input type="hidden" name="invokename" value="$invokename">
	<input type="hidden" name="alias" value="$alias">
	<input type="hidden" name="keyword" value="$keyword">
	<input type="hidden" name="page" value="$page">
	<input type="hidden" name="step" value="2">
	<div class="tac mb20">
		<span class="btn"><span><button type="submit" onfocus="blur();">提交</button></span></span>
	</div>
</form>
<style type="text/css">
.typeTable{overflow-x:scroll;}
.typeTable td{padding:5px;border:1px solid #accee5;white-space:nowrap;width:80px;}
.bgA{background:#e2f2fc;color:#333;}
.bgB{background:#fff3dd;color:#514530;}
</style>

<div style="" class="typeTable">
<table style="table-layout:fixed;">
	<tr class="bgA">
		<td></td>
		<td></td>
		<td>標題</td>
		<td>鏈接地址</td>
		<td>圖片地址</td>
		<td>描述</td>
		<td>發帖時間</td>
		<td>版塊名稱</td>
		<td>版塊地址</td>
		<td>作者</td>
		<td>作者ID</td>
		<td>用戶ID</td>
		<td>積分</td>
		<td>帖子數</td>
		<td>主題數</td>
		<td>成員數</td>
		<td>主題分類名稱</td>
		<td>主題分類鏈接</td>
		<td>頭像</td>
		<td>數值</td>
	</tr>
	<tr>
		<td class="bgA">屬性名稱</td>
		<td class="bgA">屬性\變量值</td>
		<td class="bgB">title</td>
		<td class="bgB">url</td>
		<td class="bgB">image</td>
		<td class="bgB">descrip</td>
		<td class="bgB">postdate</td>
		<td class="bgB">forumname</td>
		<td class="bgB">forumurl</td>
		<td class="bgB">author</td>
		<td class="bgB">authorid</td>
		<td class="bgB">uid</td>
		<td class="bgB">credit</td>
		<td class="bgB">pnum</td>
		<td class="bgB">tnum</td>
		<td class="bgB">members</td>
		<td class="bgB">topictypename</td>
		<td class="bgB">topictypeurl</td>
		<td class="bgB">icon</td>
		<td class="bgB">value</td>
	</tr>
	<tr>
		<td class="bgA">帖子排行</td>
		<td class="bgA">subject</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">圖片排行</td>
		<td class="bgA">image</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">標簽排行</td>
		<td class="bgA">tag</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">用戶排行</td>
		<td class="bgA">user</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
	</tr>
	<tr>
		<td class="bgA">日志排行</td>
		<td class="bgA">diary</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">版塊排行</td>
		<td class="bgA">forum</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">群組排行</td>
		<td class="bgA">group</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">群組主題</td>
		<td class="bgA">grouparticle</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td><span class="s3"></span></td>
		<td><span class="s3"></span></td>
		<td><span class="s3"></span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">群組圖片</td>
		<td class="bgA">groupphoto</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">空間圖片</td>
		<td class="bgA">photo</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">友情鏈接</td>
		<td class="bgA">sharelinks</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">公告</td>
		<td class="bgA">announce</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">文章排行</td>
		<td class="bgA">article</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">欄目排行</td>
		<td class="bgA">column</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">新鮮事</td>
		<td class="bgA">weibo</td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
    <tr>
		<td class="bgA">微博排行</td>
		<td class="bgA">weibosort</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">懸賞排行</td>
		<td class="bgA">reward</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3"></span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">分類信息</td>
		<td class="bgA">classify</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3"></span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">活動排行</td>
		<td class="bgA">activity</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">辯論排行</td>
		<td class="bgA">debate</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3"></span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">商品排行</td>
		<td class="bgA">trade</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">團購排行</td>
		<td class="bgA">pcvalue</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">投票排行</td>
		<td class="bgA">polls</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3"></span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td class="bgA">圖酷排行</td>
		<td class="bgA">tucool</td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td><span class="s3">&radic;</span></td>
		<td><span class="s3">&radic;</span></td>
		<td></td>
		<td></td>
	</tr>
</table>
</div>





<div class="legend">
<textarea style="width:690px;height:1100px;padding:5px;overflow:auto;border:0;color:#676767;line-height:1.5;">
a) <list >標簽，一個<list>代表是一個調用模塊︰ 
    1)action︰代表調用的類型。 
    subject:調用帖子     user:調用用戶     forum:調用版塊     tag:調用標簽     image:調用圖片 

    2) num :代表調用的個數，如上面的num=”8”這代表，我調用8條數據 
    3) title :模塊的名稱，注意每個模塊里面title必須是唯一的 

b) <loop><li><a href=”{url}” target=”_blank”>{title,32}</a></li></loop>︰ 
    i) <loop></loop>標簽中間代表的是循環的數據 
    ii) 標簽格式︰ 
        1) 針對于action=”subject”模塊（帖子） 
            a) {url} ︰代表鏈接地址 
            b) {title} ︰代表標題 
                i) {title,32}則代表對于標題截取32個字 
            c) {image} ︰代表圖片 
                i) {image,80,50}代表對圖片進行80*50的縮略 
            d) {forumname} :代表所在版塊的名稱 
            e) {forumurl} :代表所在版塊的鏈接地址 
            f) {descrip} ︰代表帖子的描述 
                i) {descript,60}:代表對于描述截取60個字 
            g) {author} ︰帖子作者 
            h) {authorid} ︰帖子作者的id 
            i) {tagrelate} ︰代表相關主題

        2) 針對于 action=”area” 模塊 （按區域劃分的房產模塊） 
            a) {url} :鏈接 
            b) {title} ︰房產名稱 
            c) {aveprice} ︰價格
            d) {area} ︰區域
            e) {opendate} ︰開盤時間
            
        3) 針對于 action=”price” 模塊 （按價格劃分的房產模塊） 
            a) {url} :鏈接 
            b) {title} ︰房產名稱 
            c) {aveprice} ︰價格
            d) {area} ︰區域
            e) {opendate} ︰開盤時間


    雖然在模板里面可以定義，調用個數，標題的長度或者圖片的截取大小，但是後台還是支持不改動模板而設置這幾種屬性︰ 

    緩存更新時間的設置，是以秒為單位，對于需要實時更新的，建議設置5分鐘以上(300秒)，對于實時性不高的，可以設置一天（86400秒）以上。(PS:sp3開始，設置為零，則代表不更新) 
    
    支持php代碼︰ 對于一些需要用程序做邏輯判斷的模塊，可在模塊里面寫php代碼
php寫在<!--#  #-->標簽中間

c) 目前支持的參數格式化類型︰
	i)  字符類型︰{title,20}		代表對title這個數據進行20個字節的截取
	ii) 圖片類型︰{image,30,50}		代表對image這個圖片數據進行30×50的圖片縮略
	iiI)時間類型︰{postdate,Y-m-d}	代表對postdate這個數據進行類似于:2010-07-21的時間格式化
</textarea> 
</div>
<!--
EOT;
} elseif ($action=='editconfig') {print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
        <li><a href="$beginUrl">模塊管理</a></li>
        <li class="current"><a href="javascript:;">模塊屬性</a></li>
    </ul>
</div>
<form action="$basename&action=editconfig" method="post">
<h2 class="h1">模塊屬性設置</h2>
<div class="admin_table mb10">
	<table width="100%">
		<tr class="tr1 vt">
        	<td class="td1">模塊id</td>
            <td class="td2">$invokename</td>
        </tr>
       <tr class="tr1 vt">
        	<td class="td1">開啟推薦審核</td>
            <td class="td2">
							<ul class="list_A list_80">
								<li><input type="radio" value="1" name="ifverify" $ifverify_Y />是</li>
								<li><input type="radio" value="0" name="ifverify" $ifverify_N />否</li>
							</ul>
						</td>
        </tr>
        <tr class="tr1 vt">
        	<td class="td1">模塊名稱</td>
            <td class="td2"><input class="input input_wa" type="text" value="$invokedata[title]" name="title" /></td>
        </tr>
		<tr class="tr1 vt">
			<td class="td1">是否允許代碼調用</td>
			<td class="td2">
					<ul class="list_A list_80">
						<li><input type="radio" value="1" name="ifapi" $ifapi_Y />是</li>
						<li><input type="radio" value="0" name="ifapi" $ifapi_N />否</li>
					</ul>
			</td>
		</tr>
		<tr class="tr1 vt">
			<td class="td1">模塊調用代碼</td>
			<td class="td2">&#60;script src="{$db_bbsurl}/mode.php?m=area&q=api&id={$invokedata[id]}"&#62;&#60;/script&#62;</td>
		</tr>
	</table>
	<table width="100%">
<!--
EOT;
foreach($invokepieces as $piece){
if ($piece['ifpushonly']) {
	$check_Y = 'checked';
	$check_N = '';
} else {
	$check_Y = '';
	$check_N = 'checked';
}
print <<<EOT
-->
		<tr><td colspan="2"><h2 class="h1" style="border-top:0;">$piece[title]</h2></td></tr>
		<tr class="tr1 vt">
        	<td class="td1">調用選項︰</td>
            <td class="td2">
            	<table width="100%">
            		<tr class="tr3">
			        	<td>{$piece[p_action][title]} : {$piece[p_action][html]}</td>
			        </tr>
			       <tr>
						<td>
						<div id="piece_{$piece[id]}">
						<table width="100%">
<!--
EOT;
foreach($piece[config] as $key=>$value){
print <<<EOT
-->
							<tr class="tr3">
								<td>$value[title] : $value[html]</td>
							</tr>
<!--
EOT;
}
print <<<EOT
-->
						</table>
						</div>
						</td>
			        </tbody>
            	</table>
            </td>
        </tr>
        <tr class="tr1 vt">
        	<td class="td1">調用個數</td>
            <td class="td2"><input type="text" value="$piece[num]" name="num[$piece[id]]" class="input input_wa"></td>
        </tr>
        <tr class="tr1 vt">
        	<td class="td1">緩存更新時間[秒]</td>
            <td class="td2"><input type="text" value="$piece[cachetime]" name="cachetime[$piece[id]]" class="input input_wa mr5">0表示關閉更新</td>
        </tr>
        <tr class="tr1 vt">
        	<td class="td1">只調用推送數據</td>
            <td class="td2">
					<ul class="list_A list_80">
						<li><input type="radio" value="1" name="ifpushonly[$piece[id]]" $check_Y />是</li>
						<li><input type="radio" value="0" name="ifpushonly[$piece[id]]" $check_N />否</li>
					</ul></td>
        </tr>
<!--
EOT;
foreach($piece[param] as $value){print <<<EOT
-->
			$value
<!--
EOT;
}print <<<EOT
-->
		<tr class="tr1 vt">
			<td class="td1">數據調用代碼</td>
			<td class="td2">{$db_bbsurl}/mode.php?m=area&q=api&type=data&id={$piece[id]}</td>
		</tr>
<!--
EOT;
}print <<<EOT
-->
    </table>
</div>
<input type="hidden" name="pageinvokeid" value="$invokedata[id]">
<input type="hidden" name="invokename" value="$invokename">
<input type="hidden" name="alias" value="$alias">
<input type="hidden" name="keyword" value="$keyword">
<input type="hidden" name="page" value="$page">
<input type="hidden" name="step" value="2">
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
</form>
<script src="js/pw_ajax.js" type="text/javascript"></script>
<script src="js/global.js" type="text/javascript"></script>
<script>

function pieceActionChange(pieceId,sourcetype) {
	pieceId = pieceId-0;
	if (!pieceId) return false;
	var url = "$ajax_basename";
	ajax.send(url,'action=source&id='+pieceId+'&sourcetype='+sourcetype,function() {
			var text = ajax.request.responseText;
			var pieceObj = getObj('piece_'+pieceId);
			if (text!='error') {
				pieceObj.innerHTML = text;
			}
			
		}
	);
}
</script>
<!--
EOT;
}
include_once PrintEot('adminbottom');
?>-->