<!--<?php
include_once PrintEot('m_header');
include_once PrintEot('m_appleft');
print <<<EOT
-->
<div id="content" class="fr">
	<div style="padding:15px 15px 0;">
		<div class="app-title cc">
		<span>应用管理</span>
    	</div>
        <div class="tabB cc">
			<ul>
<!--
EOT;
if ($db_appo && $db_appifopen) {print <<<EOT
-->
				<li id="type_all"><a href="{$basename}q=myapp">应用列表</a></li>
<!--
EOT;
}print <<<EOT
-->
				<li id="type_my"><a href="{$basename}q=myapp&action=my">应用管理</a></li>
			</ul>
    	</div>
    </div>
    <table width="100%">
    <tr class="vt"><td height="400">
<script language="JavaScript">
setCurrent('type_$action','type_all','current');
</script>
<!--
EOT;
if (empty($action)) {print <<<EOT
-->
<div class="p10">
<script type="text/javascript" src="{$db_server_url}/js/global.js"></script>
<script language="JavaScript">
var server = new PwJs.Server("pwapp");
server.start();
</script>
<iframe id="pwapp" name="pwapp" frameborder="0" width="100%" height="400" scrolling="no" src="{$url}"></iframe>
</div>
<!--
EOT;
} elseif ($action == 'my') {print <<<EOT
-->	
	<script language="JavaScript">
function ajaxurl(o) {
	showDialog('confirm','您确定要删除该应用吗？', 0, function() {
		ajax.send(o.href,'',function() {
			if (ajax.request.responseText == 'ok') {
				o.parentNode.parentNode.style.display = 'none';
			} else {
				ajax.guide();
			}
		});
	})
	return false;
}
</script>
<div class="p10">
<form action="{$basename}q=myapp&action=edit&" method="POST">
	<table cellspacing="0" cellpadding="0" width="100%" class="set-table2">
		<tr class="tr3">
			<td>应用属性</td>
			<td>应用名称</td>
<!--
EOT;
if ($db_toolbar == 1) {print <<<EOT
-->
			<td>显示在我的菜单</td>
<!--
EOT;
}print <<<EOT
-->
			<td>隐私</td>
			<td>动态</td>
			<td>操作</td>
		</tr>
<!--
EOT;
$i = 0;
foreach ($basic_app_array as $key => $value) {$i++;
print <<<EOT
-->
		<tr class="tr3">
			<td>
<!--
EOT;
if($i == 1){print <<<EOT
-->
			基础应用
<!--
EOT;
}print <<<EOT
-->
			</td>
			<td>$value[name]</td>
<!--
EOT;
if ($db_toolbar == 1) {print <<<EOT
-->
			<td><input type="checkbox" name="show[$key]" value="1" $value[showchecked]></td>
<!--
EOT;
}print <<<EOT
-->
			<td>
<!--
EOT;
if (in_array($key,$basic_app_with_privacy)) {print <<<EOT
-->
			
				<select name="privacy[$key]">
					<option value="0" ${'privace_'.$key.'_0'} > 任何人可见</option>
					<option value="1" ${'privace_'.$key.'_1'} > 好友可见</option>
					<option value="2" ${'privace_'.$key.'_2'} > 仅自己可见</option>
				</select>
			
			
<!--
EOT;
}print <<<EOT
-->
			</td>
			<td>
<!--
EOT;
if (in_array($key,$basic_app_with_feed)) {print <<<EOT
-->
			<input type="checkbox" name="feed[$key]" value="1" $value[feedchecked]>
<!--
EOT;
}print <<<EOT
-->
			</td>
			<td></td>
		</tr>
<!--
EOT;
} if ($db_appo && $db_appifopen) {print <<<EOT
-->
		<tr class="tr3"><td colspan="6">娱乐应用</td></tr>
<!--
EOT;
foreach ($app_array as $key => $value) {print <<<EOT
-->
		<tr class="tr3">
			<td></td>
			<td><a href="{$basename}q=app&id=$value[appid]">$value[appname]</a></td>
<!--
EOT;
if ($db_toolbar == 1) {print <<<EOT
-->
			<td><input type="checkbox" name="show[$value[appid]]" value="1" $value[showchecked]></td>
<!--
EOT;
}print <<<EOT
-->
			<td></td>
			<td><input type="checkbox" name="feed[$value[appid]]" value="1" $value[allowfeed]></td>
			<td><a href="{$basename}q=myapp&action=del&id=$value[appid]" onclick="return ajaxurl(this);">移除</a></td>
		</tr>
<!--
EOT;
}}print <<<EOT
-->
	<tr class="tr3 tac">
		<td colspan="2">&nbsp;</td><td colspan="4"><span class="button"><span><button type="submit">提 交</button></span></span></td>
	</tr>
	</table>
</form>
</div>
<!--
EOT;
}print <<<EOT
-->
	</td></tr></table>
</div>
<!--
EOT;
?>-->