* * $Id: spacecp_space.php 25510 2011-11-14 02:22:26Z yexinhao $ */ if (!defined('IN_DISCUZ')) { exit('Access Denied'); } if (submitcheck('delappsubmit')) { $setarr = array(); if ($_POST['type'] == 'profilelink') { $setarr = array('allowprofilelink' => 0); } else { $setarr = array('privacy' => 5); } $appid = intval($_POST['appid']); C::t('home_userapp')->update_by_uid_appid($_G['uid'], $appid, $setarr); my_userapp_update($_G['uid'], $appid, $setarr['privacy'], $setarr['allowprofilelink']); showmessage('do_success', dreferer()); } if ($_GET['op'] == 'delete') { $delid = $_GET['type'] == 'profilelink' ? 'profilelink_' . $_GET['appid'] : $_GET['appid']; } $actives = array($ac => ' class="active"'); include_once template("home/spacecp_space"); function my_userapp_update($uId, $appId, $privacy = null, $allowProfileLink = null) { global $my_register_url, $_G; $mySiteId = $_G['setting']['my_siteid']; $mySiteKey = $_G['setting']['my_sitekey']; if (!$_G['setting']['my_app_status']) { $res = array('errCode' => 121, 'errMessage' => 'Manyou Service Disabled', 'result' => ''); return $res;
if(!defined('IN_UCHOME')) { exit('Access Denied'); } if(submitcheck('delappsubmit')) { $setarr = array(); if($_POST['type'] == 'profilelink') { $setarr = array('allowprofilelink' => 0); } else { $setarr = array('privacy' => 5); } $appid = intval($_POST['appid']); updatetable('userapp', $setarr, array('uid' => $_SGLOBAL['supe_uid'], 'appid' => $appid)); my_userapp_update($_SGLOBAL['supe_uid'], $appid, $setarr['privacy'], $setarr['allowprofilelink']); showmessage('do_success', $_POST['refer']); } if($_GET['op'] == 'delete') { $delid = $_GET['type'] == 'profilelink'? 'profilelink_'.$_GET['appid'] : $_GET['appid']; } $actives = array($ac => ' class="active"'); include_once template("cp_space"); /** * 更新Manyou端的UserApp信息 * * @param integer $uId UCHome里的用户id