<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--{include file=elements/header.css.html}-->
<!--{include file=elements/header.js.html type=common}-->
<!--{include file=elements/header.js.html type=popbox}-->
</head>
<body>
<div id="outside">
	<!--{include file=frame/top.html}-->
	<div id="mainareaContent">
		<!--{include file=frame/left.html}-->
		<div id="rightContent">
			<div id="topContent">
				<div class="sitmap">
					<span class="r"><!--{include file="elements/uuadvad.html"}--></span>VIP服务&nbsp;&gt;&nbsp;模块超市&nbsp;&gt;&nbsp;最新模块
				</div>
			</div>
			<div class="tabcontent">
				<a href="index.php?r=Plugin.newplugin&menu_id=55" class="nolink">最新模块</a>
				<a href="index.php?r=Plugin.pluginlist&menu_id=55" class="link">已安装模块</a>
				<a href="index.php?r=Plugin.preview&menu_id=55" class="link">模块预告</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent2">
					<table class="tbl_list" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr class="thead">
							<td width="15%">插件名称</td>
							<td width="20%">图片</td>
							<td width="10%">版本</td>
							<td width="30%">插件说明</td>
							<td width="10%">发布时间</td>
							<td width="15%">操作</td>
						</tr>
						<!--{foreach from=$datalist item=data}-->
						<tr onmouseover="chgTrColor(this)" onmouseout="chgTrColor(this)">
							<td><!--{$data.plugin_name}--></td>
							<td><img src="../<!--{$data.preview}-->"/></td>
							<td><!--{$data.plugin_version}--></td>
							<td><!--{$data.description}--></td>
							<td><!--{$data.publish_time}--></td>
							<td><!--{if $data.installed==1}-->已安装<!--{else}--><a href="javascript:installPlugin()">安装</a><!--{/if}--></td>
						</tr>
						<!--{foreachelse}-->
						<tr><td colspan="6">没有对应数据</td></tr>
						<!--{/foreach}-->
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
function installPlugin(){
	popup("installPlugin", "安装插件");
	var str = "<table width=\"100%\"><tr><td height=\"50px\" align=\"center\"><img src=\"images/ajax.gif\"/>正在检测版本......</td></tr></table>";
	setpopupcontent(str);
	$.ajax({
		url: "index.php?r=Plugin.checkver",
		type: "get",
		cache: false,
		success: function(data){
			if (data == 1) {
				str = "<table width=\"100%\"><tr><td height=\"50px\" align=\"center\">该插件已经安装</td></tr></table>";
				setTimeout("setpopupcontent('"+str+"')", 3000);
			} else {
				str = "<table width=\"100%\"><tr><td height=\"50px\" align=\"center\"><img src=\"images/ajax.gif\"/>开始安装......</td></tr></table>";
				setpopupcontent(str);
				$.ajax({
					url: "index.php?r=Plugin.install",
					type: "get",
					cache: false,
					success: function(data){
						if (data == 1) {
							str = "<table width=\"100%\"><tr><td height=\"50px\" align=\"center\">安装完成</td></tr></table>";
							setTimeout("setpopupcontent('"+str+"')", 5000);
						} else {
							str = "<table width=\"100%\"><tr><td height=\"50px\" align=\"center\">安装失败</td></tr></table>";
							setTimeout("setpopupcontent('"+str+"')", 5000);
						}
					}
				});
			}
		}
	});
}
</script>
</html>