<?php
require("api/base_support.php");
$id=intval(get_argg('id'));
$is_affair=intval(get_argp('is_affair'));
$app_rs=api_proxy("plugins_get_pid",$id);
$def_small_image="skin/".$skinUrl."/images/plu_def_small.gif";
$small_url=$app_rs[0]['image']?preg_replace("/(.*)(\.\w+)/","$1_small$2","plugins/".$app_rs[0]['name']."/".$app_rs[0]['image']):$def_small_image;
if($id){
	api_proxy("plugins_set_mine",$id);
	if($is_affair==1){
		$content="添加了<a href=\'main.php?app=add_app&id=".$app_rs[0]['id']."\' target=\'_blank\'>".$app_rs[0]['title']."</a>的应用<br><img src=\"".$small_url."\" />{date_time}";
		api_proxy("message_set","affair",$content);
	}
}
action_return(1,'',-1);
?>