function plugins_set_mine($id, $is_del = 0) { $id = intval($id); $is_del = intval($is_del); $val = ''; $uid = get_sess_userid(); global $tablePreStr; $t_users = $tablePreStr . "users"; $t_plugins = $tablePreStr . "plugins"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $u_apps = get_sess_apps(); if ($is_del == 0) { if ($u_apps == '') { $val = $id; } else { $val = $u_apps . "," . $id; } } else { $val = str_replace(",{$id},", "", ",{$u_apps},"); } $sql = " update {$t_users} set use_apps = '{$val}' where user_id = {$uid} "; if ($dbo->exeUpdate($sql)) { set_sess_apps($val); if ($is_del == 0) { $sql = " update {$t_plugins} set use_num=use_num+1 where id={$id} "; } else { $sql = " update {$t_plugins} set use_num=use_num-1 where id={$id} "; } return $dbo->exeUpdate($sql); } else { return 0; } }
function plugins_get_mine() { $u_apps = get_sess_apps(); return plugins_get_pid($u_apps, "getRs"); }
* * 如有您有问题请到官方论坛(http://tech.jooyea.com/bbs/)提问,谢谢您的支持。 */ //引入语言包 $pl_langpackage = new pluginslp(); require "api/base_support.php"; //变量区 $id = intval(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['image'] ? "plugins/" . $app_rs['name'] . "/" . $app_rs['image'] : $def_image; $small_url = $app_rs['image'] ? preg_replace("/([^\\.]+)(\\.\\w+)/", "\$1_small\$2", "plugins/" . $app_rs['name'] . "/" . $app_rs['image']) : $def_small_image; //取得已经有的应用 $u_apps = get_sess_apps(); if (strpos(",,{$u_apps},", ",{$id},")) { echo '<script type="text/javascript">location.href="plugins/' . $app_rs['name'] . '/' . $app_rs['url'] . '";</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> <base href='<?php echo $siteDomain; ?> ' /> <link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;