<?php
/*
 * 注意：此文件由tpl_engine编译型模板引擎编译生成。
 * 如果您的模板要进行修改，请修改 templates/default/modules/userapp/add_app.html
 * 如果您的模型要进行修改，请修改 models/modules/userapp/add_app.php
 *
 * 修改完成之后需要您进入后台重新编译，才会重新生成。
 * 如果您开启了debug模式运行，那么您可以省去上面这一步，但是debug模式每次都会判断程序是否更新，debug模式只适合开发调试。
 * 如果您正式运行此程序时，请切换到service模式运行！
 * 
 * 如有您有问题请到官方论坛（http://tech.jooyea.com/bbs/）提问，谢谢您的支持。
 */
?><?php
//引入语言包
$pl_langpackage=new pluginslp;
require("api/base_support.php");

//变量区
$id=short_check(get_argg('id'));
$app_rs=api_proxy("plugins_get_pid",$id);

//默认plugins图像地址
$def_image="skin/".$skinUrl."/images/plu_def.jpg";
$def_small_image="skin/".$skinUrl."/images/plu_def_small.gif";
$image_url=$app_rs[0]['image'] ? "plugins/".$app_rs[0]['name']."/".$app_rs[0]['image']:$def_image;
$small_url=$app_rs[0]['image'] ? preg_replace("/(.*)(\.\w+)/","$1_small$2","plugins/".$app_rs[0]['name']."/".$app_rs[0]['image']):$def_small_image;

//取得已经有的应用
$u_apps=get_sess_apps();
if(strstr(",".$u_apps.",",",".$id.",")){
	echo '<script type="text/javascript">location.href="plugins/'.$app_rs[0]['name'].'/'.$app_rs[0]['inurl'].'";</script>';
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/row_menus.css">
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/iframe.css">
<script type='text/javascript'>
	parent.guide("add_apply");
</script>
</head>

<body>
  <div class="main_right_title">
     <span class="main_title_dot12"></span>
     <span class="main_title_txt"><?php echo $pl_langpackage->pl_add_app;?></span>
  </div>
	<div id="tabsB">
		<ul>
	    <li><a href="?app=add_app" class="nowbutl"><span class="nowbutr"><?php echo $pl_langpackage->pl_add;?></span></a></li>
	  </ul>
			<div class="div_but_2" onClick="location.href='?app=mag_app'"><?php echo $pl_langpackage->pl_return_mine;?></div>
	</div>
	<form action='do.php?act=add_app&id=<?php echo $app_rs[0]["id"];?>' method='post'>
		<div class="app_contentbox">
			<div class="top-bg"></div>
			<div class="content">
				<div class="allow">
					<p><img src=<?php echo $small_url;?> /><?php echo $pl_langpackage->pl_add;?><?php echo $app_rs[0]["title"];?></p>
				</div>
				<p class="tips">
					<?php echo $pl_langpackage->pl_add;?><a href="javascript:document.forms[0].submit()" title="<?php echo $app_rs[0]["title"];?>"><?php echo $app_rs[0]["title"];?></a>，<?php echo $pl_langpackage->pl_add_hint;?>
				</p>
				<div class="introduction">
					<img src="<?php echo $image_url;?>">
					<div class="app-title-bar clearfix"><a href="javascript:document.forms[0].submit()" title="<?php echo $app_rs[0]["title"];?>"><?php echo $app_rs[0]["title"];?></a></div>
					<p class="app-info"><?php echo $app_rs[0]["info"];?></p>
				</div>
				<div class="button btn">
					<a href="javascript:document.forms[0].submit()" class="agree" title="<?php echo $pl_langpackage->pl_agree;?>"><?php echo $pl_langpackage->pl_enter_app;?></a> <a href="javascript:history.go(-1)" class="cancel" title="<?php echo $pl_langpackage->pl_cancel;?>"><?php echo $pl_langpackage->pl_cancel;?></a>
				</div>
				<p class="choose"><input id="choose" value="1" checked="checked" name="is_affair" type="checkbox"><label for="choose"><?php echo $pl_langpackage->pl_tell_pals;?></label></p>
			</div>
			<div class="bottom-bg"></div>
		</div>
	</form>
</body>
</html>
