<?php !defined('P_W') && exit('Forbidden'); if (isset($_GET['ajax']) && $_GET['ajax'] == 1) { define('AJAX', '1'); } empty($subtype) && ($subtype = 'shield'); $normalUrl = $baseUrl . "?type=shield"; !empty($winduid) && ($userId = $winduid); S::gp(array('action'), 'GP'); $app_array = getUserApplist(); $defaultShield = $messageServer->getDefaultShields($app_array); $shieldHtml = createHTML($app_array); $nav = $action ? array($action => 'class="current"') : array('shield' => 'class="current"'); $noticevoiceStatus = getstatus($winddb['userstatus'], PW_USERSTATUS_NOTICEVPICE); //消息提示音状态 $noticevoiceStatus = $noticevoiceStatus == 1 ? "checked" : ""; if (empty($action)) { if ($_POST['step'] == 2) { PostCheck(); S::gp(array('shieldinfo', 'blacklist', 'blackgroup', 'noticevoice'), 'GP'); //是否开启消息提示音 $userService = L::loadClass("userservice", 'user'); $userService->setUserStatus($winduid, PW_USERSTATUS_NOTICEVPICE, (int) $noticevoice); //屏蔽的黑名单 if ($shieldinfo && $messageServer->getMsKey('shieldinfo')) { $newShield = createShield($shieldinfo); $shieldlist = compareShield($defaultShield, $newShield); $messageServer->setMsConfig(array('shieldinfo' => serialize($shieldlist)), $userId); } //屏蔽的用户组
list($faceimg) = showfacedesign($winddb['icon'], 1); if (empty($action)) { if (!$db_appifopen || !$db_siteappkey) { Showmsg('app_close'); } /*** userapp **/ $appclient = L::loadClass('appclient'); $app_array = $appclient->userApplist($winduid); $url = $appclient->ShowAppsList(); /*** userapp **/ require_once uTemplate::printEot('myapp'); pwOutPut(); } elseif ($action == 'my') { $app_array = $basic_app_array = array(); //userApp if ($db_appifopen && ($app_array = getUserApplist())) { foreach ($app_array as $key => $value) { if (strpos($winddb['appshortcut'], ',' . $value['appid'] . ',') !== false) { $app_array[$key]['showchecked'] = 'checked'; } } } //基础应用列表 $isshowdb = explode(',', $winddb['appshortcut']); $rt = $db->get_one("SELECT photos_privacy,diary_privacy FROM pw_ouserdata WHERE uid=" . S::sqlEscape($winduid)); if (!$rt) { $db->query("INSERT INTO pw_ouserdata SET uid=" . S::sqlEscape($winduid)); $rt = $db->get_one("SELECT photos_privacy,diary_privacy FROM pw_ouserdata WHERE uid=" . S::sqlEscape($winduid)); } @extract($rt); $all_basic_app = array('article', 'weibo', 'diary', 'groups', 'photos');