/** * 资料设置页模板 */ function getProfileTemplateByInfotype($infotype) { global $winduid; $customFields = $this->customerField->getFieldsByCategoryName($infotype); $templateString = ''; if ($customFields) { $this->customerFieldData = L::loadClass('CustomerFieldData', 'user'); require_once uTemplate::PrintEot('customerfield_profile'); $template = new customerFieldProfileTemplate(); foreach ($customFields as $value) { $customFieldValue = $this->customerFieldData->getCustomerData($value, $winduid); if ($value['fieldname'] == 'bday' && $customFieldValue == '0000-00-00') { $customFieldValue = date('Y-m-d', $GLOBALS['winddb']['regdate']); } $templateString .= $template->buildHtml($value, $customFieldValue); } } return "<!--{$templateString}-->"; }
//$db_union[7] && list($customdata,$custominfo) = Getcustom($userdb['customdata']); $customFieldsString = getCustomFieldsAndDefaultValue('basic'); $sexselect[(int) $userdb['gender']] = 'checked'; //$tradeinfo = unserialize($userdb['tradeinfo']); if ($userdb['timedf']) { $temptimedf = str_replace('.', '_', abs($userdb['timedf'])); $userdb['timedf'] < 0 ? ${'zone_0' . $temptimedf} = 'selected' : (${'zone_' . $temptimedf} = 'selected'); } !$rg_timestart && ($rg_timestart = 1960); !$rg_timeend && ($rg_timeend = 2010); //$getbirthday = explode('-',$userdb['bday']); //$yearslect[(int)$getbirthday[0]] = $monthslect[(int)$getbirthday[1]] = $dayslect[(int)$getbirthday[2]] = 'selected'; if ($userdb['signature'] || $userdb['introduce']) { $SCR = 'post'; } require_once uTemplate::PrintEot('info_base'); pwOutPut(); } elseif ($_POST['step'] == '2') { PostCheck(); S::slashes($userdb); $upmembers = $upmemdata = $upmeminfo = array(); //自我简介长度 strlen($_POST['prointroduce']) > 500 && Showmsg('introduce_limit'); //签名难 $_G['signnum'] && strlen($_POST['prosign']) > $_G['signnum'] && Showmsg('sign_limit'); S::gp(array('prohomepage', 'prohonor', 'prointroduce', 'prosign', 'timedf', 'alipay'), 'P'); S::gp(array('newgroupid', 'showsign', 'proreceivemail'), 'P', 2); //strlen($prointroduce)>500 && Showmsg('introduce_limit'); if ($_G['allowhonor']) { $prohonor = trim(substrs($prohonor, 90)); $upmembers['honor'] = $prohonor;
!$space['spacestyle'] && ($space['spacestyle'] = 2); !$space['spacetype'] && ($space['spacetype'] = 0); $sel_basic = $sel_skin = $sel_model = $ifcheck_0 = $ifcheck_1 = $ifcheck_2 = $ifcheck_3 = $ifcheckstyle_2 = $ifcheckstyle_3 = ''; $style_basic = $style_skin = $style_model = 'none'; ${'sel_' . $modeSel} = ' class="current"'; ${'style_' . $modeSel} = ''; ${'ifcheck_' . $space['spacetype']} = ' checked'; ${'spacethemes_' . $space['spacetype']} = 'class="current"'; ${'ifcheckstyle_' . $space['spacestyle']} = ' checked'; ${'spacestyle_' . $space['spacestyle']} = 'class="current"'; $maxuploadsize = ini_get('upload_max_filesize'); //$privacy = $newSpace->getPrivacy(); !$o_uskin && ($o_uskin = array('default85' => 'default85')); $space['namelength'] = strlen($space['name']); $space['desclength'] = strlen($space['descript']); require_once uTemplate::printEot('space_set'); pwOutPut(); } else { S::gp(array('name', 'spaceskin', 'domain', 'descript')); S::gp(array('spacestyle', 'spacetype', 'ifopen', 'privacy', 'shownum'), 'GP', 2); if (strlen(pwHtmlspecialchars_decode($title)) > 80) { Showmsg('space_name_toolong'); } if (strlen(pwHtmlspecialchars_decode($title)) > 255) { Showmsg('space_descript_toolong'); } $modelset = array(); $layout = ""; if (intval($space['spacetype']) == $spacetype) { foreach ($spaceModel as $key => $value) { (!$shownum[$value] || $shownum[$value] < 1) && ($shownum[$value] = 1);
} refreshto("profile.php?action=toolcenter", 'operate_success'); } } elseif ($job == 'use' || $job == 'ajax') { $toolid = (int) S::getGP('toolid'); if (!$toolid) { $tooldb = array(); $query = $db->query("SELECT * FROM pw_usertool u LEFT JOIN pw_tools t ON t.id=u.toolid WHERE u.uid=" . S::sqlEscape($winduid) . "ORDER BY vieworder"); while ($rt = $db->fetch_array($query)) { $rt['descrip'] = substrs($rt['descrip'], 45); $tooldb[] = $rt; } if (!$tooldb) { Showmsg('no_tool'); } require_once uTemplate::PrintEot('profile_toolcenter'); pwOutPut(); } $tooldb = $db->get_one("SELECT u.nums,t.name,t.filename,t.state,t.type,t.conditions FROM pw_usertool u LEFT JOIN pw_tools t ON t.id=u.toolid WHERE u.uid=" . S::sqlEscape($winduid) . "AND u.toolid=" . S::sqlEscape($toolid)); !$db_toolifopen && Showmsg('toolcenter_close'); if (!$tooldb || $tooldb['nums'] <= 0) { Showmsg('nothistool'); } if ($tooldb['type'] == 1) { !$tid && Showmsg('illegal_tid'); $condition = unserialize($tooldb['conditions']); $tpcdb = $db->get_one("SELECT fid,subject,authorid,topped,toolfield FROM pw_threads WHERE tid=" . S::sqlEscape($tid)); if (!$tpcdb) { Showmsg('illegal_tid'); } if ($condition['forum'] && strpos($condition['forum'], ",{$tpcdb['fid']},") === false) {
$ubinding = array(); $ubindingneedupdatepwd = false; $query = $db->query("SELECT u2.uid as uuid, u1.password as oldpassword, m.password, m.uid,m.username,m.groupid,m.memberid,m.regdate,mb.postnum FROM pw_userbinding u1 LEFT JOIN pw_userbinding u2 ON u1.id=u2.id LEFT JOIN pw_members m ON m.uid=u2.uid LEFT JOIN pw_memberdata mb ON m.uid=mb.uid WHERE u1.uid=" . S::sqlEscape($winduid)); while ($rt = $db->fetch_array($query)) { if (empty($rt['uid'])) { $db->update("DELETE FROM pw_userbinding WHERE uid=" . S::sqlEscape($rt['uuid'], false)); } elseif ($rt['uid'] != $winduid) { $rt['groupid'] == '-1' && ($rt['groupid'] = $rt['memberid']); $rt['regdate'] = get_date($rt['regdate']); $ubinding[] = $rt; } else { $ubindingneedupdatepwd = $rt['password'] == $rt['oldpassword'] ? false : true; } unset($rt['password'], $rt['oldpassword']); } require_once uTemplate::PrintEot('info_binding'); pwOutPut(); } else { if ($_POST['step'] == '2' || $_POST['step'] == '3') { PostCheck(); !$_G['userbinding'] && Showmsg('undefined_action'); S::gp(array('username', 'password', 'question', 'customquest', 'answer')); require_once R_P . 'require/checkpass.php'; if (empty($username) || empty($password)) { Showmsg('login_empty'); } if ($username == $windid) { Showmsg('userbinding_same'); } $password = md5($password); $safecv = $db_ifsafecv ? questcode($question, $customquest, $answer) : '';
/* @var $weiboLoginService PW_WeiboLoginService */ $isNotResetPassword = $weiboLoginService->isLoginUserNotResetPassword($winduid); if (!$isNotResetPassword) { Showmsg('你已经创建密码,不需要再次创建'); } PostCheck(); InitGP(array('resetpwd', 'resetpwd_repeat'), 'P'); $isSuccess = weiboResetUserPassword($winduid, $resetpwd, $resetpwd_repeat); if (!$isSuccess) { Showmsg('你已创建密码,或者新旧密码相同'); } refreshto('profile.php?action=weibobind', '创建密码成功!', 2, true); } elseif ($t == 'bindsuccess') { extract(L::style('', $skinco)); $msg_info = '绑定帐号成功(窗口将自动关闭)'; require_once uTemplate::printEot('profile_privacy_bindsuccess'); pwOutPut(); } elseif ($t == 'callback') { $userBindService = L::loadClass('WeiboUserBindService', 'sns/weibotoplatform/service'); /* @var $userBindService PW_WeiboUserBindService */ $params = array_merge($_GET, $_POST); unset($params['action'], $params['t']); $isSuccess = $userBindService->callback($winduid, $params); if (true !== $isSuccess) { Showmsg($isSuccess ? $isSuccess : '绑定失败,请重试'); } ObHeader('profile.php?action=weibobind&t=bindsuccess'); } function ifchecked($out, $var) { $GLOBALS[$out] = $var ? ' checked' : '';
<?php !function_exists('readover') && exit('Forbidden'); S::gp(array('step')); if (empty($step)) { $customFieldsString = getCustomFieldsAndDefaultValue('education'); require_once uTemplate::PrintEot('info_education'); pwOutPut(); } elseif ($step == 2) { //update customerfield data $customfieldService = L::loadClass('CustomerFieldService', 'user'); /* @var $customfieldService PW_CustomerFieldService */ $customfieldService->saveProfileCustomerData('education'); // defend start CloudWind::yunUserDefend('editprofile', $winduid, $windid, $timestamp, 0, 101, '', '', '', array('profile' => 'updateeducation')); // defend end refreshto("profile.php?action=modify&info_type={$info_type}", 'operate_success', 2, true); }
$swfhash = GetVerify($winduid); //$upload_param = rawurlencode($db_bbsurl.'/job.php?action=uploadicon&verify='.$swfhash.'&uid='.$winduid.'&'); $save_param = rawurlencode($db_bbsurl . '/job.php?action=uploadicon&step=2&'); $default_pic = rawurlencode("{$db_picpath}/facebg.jpg"); //$icon_encode_url = 'up='.$upload_param.'&saveFace='.$save_param.'&url='.$default_pic.'&PHPSESSID='.$sid.'&'.'imgsize='.$db_imgsize.'&'; $icon_encode_url = 'saveFace=' . $save_param . '&url=' . $default_pic . '&imgsize=' . $db_imgsize . '&'; } else { $icon_encode_url = ''; } if ($icontype == 2) { $httpurl = $iconurl; } if ($icontype != 1) { $iconfile = ''; } require_once uTemplate::PrintEot('info_face'); pwOutPut(); } else { if ($step == '2') { PostCheck(); S::slashes($userdb); S::gp(array('facetype', 'proicon'), 'P'); require_once R_P . 'require/showimg.php'; $user_a = explode('|', $winddb['icon']); $usericon = ''; if ($facetype == 1) { $usericon = setIcon($proicon, $facetype, $user_a); } elseif ($_G['allowportait'] && $facetype == 2) { $httpurl = S::getGP('httpurl', 'P'); if (strncmp($httpurl[0], 'http://', 7) != 0 || strrpos($httpurl[0], '|') !== false) { refreshto("profile.php?action=modify&info_type={$info_type}&facetype={$facetype}", getLangInfo('msg', 'illegal_customimg'), 2, true);
} elseif ($check_step == 'certificate') { //证件认证 $step = S::getGP('step'); $authService = L::loadClass('Authentication', 'user'); if (empty($step)) { $certificateTypesHtml = $authService->getCertificateTypeHtml(); } elseif ($step == 2) { S::gp(array('certificate')); L::loadClass('certificateupload', 'upload', false); !$certificate['number'] && Showmsg("请输入证件编号"); //删除原有认证 $certificateInfo = $authService->getCertificateInfoByUid($winduid); $certificateInfo && $authService->deleteCertificateById($certificateInfo['id']); $certificateUploadBehavior = new CertificateUpload($winduid); PwUpload::upload($certificateUploadBehavior); $certificateInfo = $authService->getCertificateInfoByUid($winduid); $data = array('type' => $certificate['type'], 'number' => $certificate['number'], 'createtime' => $timestamp, 'state' => 1); if (!S::isArray($certificateInfo) || !$certificateInfo['attach1'] && !$certificateInfo['attach2']) { /* $data['uid'] = $winduid; $authService->addCertificateInfo($data); */ Showmsg("请上传至少一张证件图片再提交"); } else { $authService->updateCertificateInfo($data, $certificateInfo['id']); } refreshto("profile.php?action=auth", '提交成功,请等待管理员审核'); } } require_once uTemplate::PrintEot('profile_auth'); pwOutPut();
/* @var $userBindService PW_WeiboUserBindService */ $userBindList = $userBindService->getBindList($winduid); $isUserBindOne = $userBindService->isBindOne($winduid); } /*个人中心与消息中心的互动*/ //新消息中心消息数目统计 /* $messageServer = L::loadClass('message', 'message'); list($messageNumber,$noticeNumber,$requestNumber,$groupsmsNumber) = $messageServer->getUserStatistics($winduid); $messageNum = $messageNumber+$noticeNumber+$requestNumber+$groupsmsNumber; $messageNumber = $messageNumber ? '('.$messageNumber.')' : ''; $noticeNumber = $noticeNumber ? '('.$noticeNumber.')' : ''; $requestNumber = $requestNumber ? '('.$requestNumber.')' : ''; $groupsmsNumber = $groupsmsNumber ? '('.$groupsmsNumber.')' : ''; */ require_once uTemplate::printEot('user_home'); pwOutPut(); function getMemberInfoFinishPercentage($userId) { $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $data = $userService->get($userId, true, false, true); $needFields = array('introduce', 'oicq', 'aliww', 'signature', 'msn', 'yahoo', 'site', 'location', 'honor', 'bday'); foreach (L::config('customfield', 'customfield') as $field) { $needFields[] = 'field_' . $field['id']; } $total = count($needFields); $finish = 0; foreach ($needFields as $field) { if ('' != $data[$field]) { $finish++;
<?php !function_exists('readover') && exit('Forbidden'); if (!$_POST['step']) { $customFieldsString = getCustomFieldsAndDefaultValue('other'); require_once uTemplate::PrintEot('info_other'); pwOutPut(); } else { if ($_POST['step'] == '2') { PostCheck(); //update customerfield data $customfieldService = L::loadClass('CustomerFieldService', 'user'); /* @var $customfieldService PW_CustomerFieldService */ $customfieldService->saveProfileCustomerData('other'); /*S::slashes($userdb); $upmembers = $upmemdata = $upmeminfo = array(); foreach ($customfield as $value) { $fieldvalue = S::escapeChar($_POST[$value['field']]); if ($value['required'] && ($value['editable'] == 1 || strlen($userdb[$value['field']]) == 0) && !$fieldvalue) { Cookie('pro_modify', 'other', 'F', false); Showmsg('field_empty'); } if (strlen($userdb[$value['field']]) == 0 || ($userdb[$value['field']] != $fieldvalue && $value['editable'] == 1)) { if ($value['maxlen'] && strlen($fieldvalue) > $value['maxlen']) { Showmsg('field_lenlimit'); } $upmeminfo[$value['field']] = $fieldvalue; } } //update meminfo if ($upmeminfo) {
$query = $db->query("SELECT o.*,m.icon as face FROM pw_oboard o LEFT JOIN pw_members m ON o.uid=m.uid WHERE o.touid=" . S::sqlEscape($uid) . " ORDER BY o.id DESC {$limit}"); while ($rt = $db->fetch_array($query)) { $rt['postdate'] = get_date($rt['postdate']); list($rt['face']) = showfacedesign($rt['face'], 1, 'm'); if ($rt['groupid'] == 6 && $db_shield && $groupid != 3) { $rt['title'] = appShield('ban_feed'); } elseif (!$wordsfb->equal($rt['ifwordsfb'])) { $rt['title'] = $wordsfb->convert($rt['title'], array('id' => $rt['id'], 'type' => 'comments', 'code' => $rt['ifwordsfb'])); } if (strpos($rt['title'], '[s:') !== false) { $tpc_author = $rt['username']; $rt['title'] = showface($rt['title']); } if (strpos($rt['title'], '[url') !== false) { $rt['title'] = convert($rt['title'], $db_windpost); } $boardids[] = $rt['id']; $boards[] = $rt; } if (!empty($boardids)) { $commentdb = getCommentDb('board', $boardids); } $friendsService = L::loadClass('Friend', 'friend'); /* @var $friendsService PW_Friend */ $ismyfriend = 1; if ($friendsService->isFriend($winduid, $uid) !== true) { $is_friend = 0; } $isSpace = true; require_once uTemplate::PrintEot('space_board'); pwOutPut();
<?php !function_exists('readover') && exit('Forbidden'); if (!$step) { $ifppt = false; if (!$db_pptifopen || $db_ppttype == 'server') { $ifppt = true; } $ifpublic = $userService->getUserStatus($winduid, PW_USERSTATUS_PUBLICMAIL) ? 'checked' : ''; require_once uTemplate::PrintEot('info_safe'); pwOutPut(); } else { if ($step == '2') { PostCheck(); S::slashes($userdb); $upmembers = $upmemdata = $upmeminfo = array(); if ($ifppt) { //* include_once pwCache::getPath(D_P.'data/bbscache/dbreg.php'); extract(pwCache::getData(D_P . 'data/bbscache/dbreg.php', false)); S::gp(array('propwd', 'proemail', 'question'), 'P'); if ($propwd || $userdb['email'] != $proemail) { if ($_POST['oldpwd']) { if (strlen($userdb['password']) == 16) { $_POST['oldpwd'] = substr(md5($_POST['oldpwd']), 8, 16); //支持 16 位 md5截取密码 } else { $_POST['oldpwd'] = md5($_POST['oldpwd']); } } $userdb['password'] != $_POST['oldpwd'] && Showmsg('pwd_confirm_fail'); if ($propwd) {
$birthdayLink = 'education'; break; case 'other': $birthdayLink = 'other'; break; } $friendsService = L::loadClass('Friend', 'friend'); /* @var $friendsService PW_Friend */ $friendsBirthday = $friendsService->findUserFriendsBirthdayInPage($winduid, 20, 1, 25); } if ($space == 1) { require_once R_P . 'require/credit.php'; list($userdb, $ismyfriend, $friendcheck, $usericon, $usercredit, $totalcredit, $appcount, $p_list) = getAppleftinfo($u); } else { } require_once uTemplate::printEot('friend_index'); pwOutPut(); /** * 数组里随机取几个 * * @param array $dealArray * @param int $num * return array() */ function randArray($dealArray, $num) { if (!is_array($dealArray)) { return ""; } if ($num >= count($dealArray)) { return $dealArray;
foreach ($creditset as $key => $value) { foreach ($value as $k => $v) { $forumright[$k][$key] = (int) $v; } } $per['upload'] = $per['down'] = $per['rp'] = $per['post'] = $per['visit'] = 1; $per['name'] = strip_tags($rt['name']); if ($rt['allowvisit'] && strpos($rt['allowvisit'], ',' . $groupid . ',') === false) { $per['visit'] = 0; } if ($rt['allowpost'] && strpos($rt['allowpost'], ',' . $groupid . ',') === false || !$rt['allowpost'] && $_G['allowpost'] == 0) { $per['post'] = 0; } if ($rt['allowrp'] && strpos($rt['allowrp'], ',' . $groupid . ',') === false || !$rt['allowrp'] && $_G['allowpost'] == 0) { $per['rp'] = 0; } if ($rt['allowdownload'] && strpos($rt['allowdownload'], ',' . $groupid . ',') === false) { $per['down'] = 0; } elseif (!$rt['allowdownload'] && $_G['allowpost'] == 0) { $per['down'] = 0; } if ($rt['allowupload'] && strpos($rt['allowupload'], ',' . $groupid . ',') === false) { $per['upload'] = 0; } elseif (!$rt['allowupload'] && $_G['allowpost'] == 0) { $per['upload'] = 0; } unset($forumset, $rt); } } require_once uTemplate::PrintEot('profile_permission'); pwOutPut();
!function_exists('readover') && exit('Forbidden'); if (!$_POST['step']) { /* modify for authentication */ $isAuthMobile = getstatus($userdb['userstatus'], PW_USERSTATUS_AUTHMOBILE); if ($db_authstate) { if ($isAuthMobile && $userdb['authmobile']) { //将手机号的中间四位隐掉 $authmobile = $userdb['authmobile']; for ($i = 3; $i <= 6; $i++) { $authmobile[$i] = '*'; } } } /* modify for authentication */ $customFieldsString = getCustomFieldsAndDefaultValue('contact'); require_once uTemplate::PrintEot('info_link'); pwOutPut(); } elseif ($_POST['step'] == '2') { PostCheck(); S::slashes($userdb); S::gp(array('prooicq', 'proaliww', 'proicq', 'proyahoo', 'promsn', 'proauthmobile', 'oicq', 'aliww'), 'P'); //联系方式 处理 //$prooicq && !is_numeric($prooicq) && Showmsg('illegal_OICQ'); $proicq && !is_numeric($proicq) && Showmsg('illegal_OICQ'); $oicq && !is_numeric($oicq) && Showmsg('QQ号码只能输入数字'); if ($aliww && strlen($aliww) > 31) { Showmsg('阿里旺旺账号字符不能超过30'); } //update member $pwSQL = array('icq' => $proicq); /* modify for authentication */
<?php !defined('R_P') && exit('Forbidden'); empty($space) && Showmsg('您访问的空间不存在!'); if (!$newSpace->viewRight('index')) { Showmsg('该空间设置隐私,您没有权限查看!'); } $basename = "u.php?a={$a}&uid={$uid}&"; $count = 0; $friendsService = L::loadClass('Friend', 'friend'); /* @var $friendsService PW_Friend */ /* 找出登录者的好友array(0=>uid1,1=>uid2,.......n=>uidn)*/ $uids = array(); $count = (int) $friendsService->countUserFriends($uid); $page > ceil($count / $db_perpage) && ($page = ceil($count / $db_perpage)); $friends = $count ? $friendsService->findUserFriendsInPage($uid, $page, $db_perpage) : array(); foreach ($friends as $key => $friend) { $uids[] = $friend['uid']; } $attentionSerivce = L::loadClass('attention', 'friend'); /* @var $attentionSerivce PW_Attention */ $myAttentionUids = $attentionSerivce->getUidsInFollowListByFriendids($winduid, $uids); foreach ($friends as $key => $friend) { if (!S::inArray($friend['uid'], $myAttentionUids)) { continue; } $friends[$key]['attention'] = true; } $pages = numofpage($count, $page, ceil($count / $db_perpage), "{$basename}"); require_once uTemplate::printEot('space_friend'); pwOutPut();
$tovisitors = $db->get_value("SELECT tovisitors FROM pw_space WHERE uid=" . S::sqlEscape($winduid)); } $tovisitors = unserialize($tovisitors); is_array($tovisitors) || ($tovisitors = array()); if (!isset($tovisitors[$uid]) || $timestamp - $tovisitors[$uid] > 900) { $tovisitors[$uid] = $timestamp; arsort($tovisitors); if (count($tovisitors) > 12) { array_pop($tovisitors); } //$db->update("UPDATE pw_space SET tovisits=tovisits+'1',tovisitors=" . S::sqlEscape(serialize($tovisitors),false) . " WHERE uid=" . S::sqlEscape($winduid)); $db->update(pwQuery::buildClause("UPDATE :pw_table SET tovisits=tovisits+1,tovisitors=:tovisitors WHERE uid=:uid", array('pw_space', serialize($tovisitors), $winduid))); } //猪头回收 $user_icon = explode('|', $space['icon']); if ($user_icon[4] && $space['tooltime'] < $timestamp - 86400) { $space['icon'] = "{$user_icon['0']}|{$user_icon['1']}|{$user_icon['2']}|{$user_icon['3']}|0"; /** $db->update("UPDATE pw_members SET icon=".S::sqlEscape($space['icon'],false)." WHERE uid=".S::sqlEscape($space['uid'])); **/ pwQuery::update('pw_members', 'uid =:uid', array($space['uid']), array('icon' => $space['icon'])); } } $isSpace = true; $spaceTemplate = ""; $spacestyle = $space['spacestyle'] === '2' || $space['spacestyle'] === '3' ? $space['spacestyle'] : 2; $spaceTemplate = 'space_' . $spacestyle . '_index'; //var_dump($spaceTemplate); //require_once(uTemplate::printEot(($space['spacetype'] || !$indexRight) ? 'space_blog_index' : 'space_index')); require_once uTemplate::printEot($spaceTemplate); pwOutPut();
<?php !function_exists('readover') && exit('Forbidden'); S::gp(array('step', 'info_type')); if (!$step) { $memberTagsService = L::loadClass('MemberTagsService', 'user'); $modelList['tags'] = array('num' => 10, 'expire' => 7200); $spaceData = $newSpace->getSpaceData($modelList); $memberTags = $spaceData['tags']; //¸öÈ˱êÇ© $hotTagsNum = $memberTagsService->countHotTagsNum(); $hotTags = $memberTagsService->getTagsByNum(8); require_once uTemplate::PrintEot('info_tags'); pwOutPut(); }
require_once R_P . 'u/lib/space.class.php'; $newSpace = new PwSpace($uid); if (!($space =& $newSpace->getInfo())) { Showmsg('用户不存在!'); } $indexRight = $newSpace->viewRight('index'); $indexValue = $newSpace->getPrivacyByKey('index'); $infoRight = $indexRight == true ? $newSpace->viewRight('info') : false; $infoValue = $indexValue != 2 ? $newSpace->getPrivacyByKey('info') : '2'; //* include_once pwCache::getPath(D_P . 'data/bbscache/level.php'); pwCache::getData(D_P . 'data/bbscache/level.php'); $newSpace->getDetailInfo(); $newSpace->initSet(); $isSpace = true; $customerService = L::loadClass('CustomerFieldService', 'user'); $customerValues = $customerService->getCustomerValues($uid); require_once uTemplate::printEot('user_info'); pwOutPut(); function getOptions($options) { if (!$options) { return array(); } $array = array(); $options = explode("\n", $options); foreach ($options as $key => $option) { list($k, $v) = explode('=', $option); $array[$k] = $v; } return $array; }
$page = (int) $page; if ($date && isset($forumset['sellprice'][$date])) { } else { (!is_numeric($page) || $page < 1) && ($page = 1); $limit = S::sqlLimit(($page - 1) * 10, 10); $rt = $db->get_one("SELECT COUNT(*) AS sum FROM pw_forumsell WHERE uid=" . S::sqlEscape($winduid)); $pages = numofpage($rt['sum'], $page, ceil($rt['sum'] / 10), "profile.php?action=forumsell&fid={$fid}&"); $query = $db->query("SELECT * FROM pw_forumsell WHERE uid=" . S::sqlEscape($winduid) . " ORDER BY overdate DESC {$limit}"); $buydb = array(); while ($rt = $db->fetch_array($query)) { $rt['buydate'] = get_date($rt['buydate']); $rt['overdate'] = get_date($rt['overdate']); $buydb[] = $rt; } } require_once uTemplate::PrintEot('profile_forumsell'); pwOutPut(); } else { PostCheck(); S::gp(array('date', 'buymethod')); $rt = $db->get_one("SELECT MAX(overdate) AS u FROM pw_forumsell WHERE uid=" . S::sqlEscape($winduid) . " AND fid=" . S::sqlEscape($fid)); if ($rt['u'] > $timestamp) { Showmsg('forumsell_already'); } if (!isset($forumset['sellprice'][$date])) { Showmsg('forumsell_date'); } if ($buymethod) { if ($forumset['sellprice'][$date]['rprice'] <= 0) { Showmsg('undefined_action'); }
} } elseif ($action == 'change') { require_once R_P . 'require/credit.php'; $rt = $db->get_one("SELECT db_value FROM pw_config WHERE db_name='jf_A'"); $jf_A = $rt['db_value'] ? unserialize($rt['db_value']) : array(); if (empty($_POST['step'])) { $creditdb = $credit->get($winduid, 'CUSTOM'); $jf = array(); foreach ($jf_A as $key => $value) { if ($value[2]) { list($j_1, $j_2) = explode('_', $key); $jf[$key] = array($credit->cType[$j_1], $credit->cType[$j_2], $value[0], $value[1]); } } !$jf && Showmsg('jfchange_empty'); require_once uTemplate::PrintEot('userpay'); pwOutPut(); } else { PostCheck(); S::gp(array('type', 'change')); if (!$jf_A[$type] || !$jf_A[$type][2]) { Showmsg('bk_credit_type_error'); } $change = (int) $change; if (!is_numeric($change) || $change <= 0) { Showmsg('bk_credit_fillin_error'); } $change % $jf_A[$type][0] != 0 && Showmsg('change_error'); list($sell, $buy) = explode('_', $type); $credit1 = $change; $credit2 = intval($change / $jf_A[$type][0] * $jf_A[$type][1]);
$postlast = $squareService->getLastPostUser(6); require_once PrintEot('m_browse_ajax'); ajax_footer(); break; case 'maxfans': $maxfans = $squareService->getFansDescUser(6); require_once PrintEot('m_browse_ajax'); ajax_footer(); break; case 'thread': $threadList = $squareService->getLastThread(20); require_once PrintEot('m_browse_ajax'); ajax_footer(); break; case 'weibo': $weiboList = $squareService->getWeiboLives(20); require_once PrintEot('m_browse_ajax'); ajax_footer(); break; default: $postlast = $squareService->getLastPostUser(6); $maxfans = $squareService->getFansDescUser(6); $threadList = $squareService->getLastThread(20); break; } $brandlist = $squareService->getFansBrand(10, $clTime); $upgradelist = $squareService->getLastUpgradeUser(10); require_once PrintEot('header'); require_once PrintEot('m_browse'); require_once uTemplate::printEot('footer'); pwOutPut();
list(, $messageNumber, $noticeNumber, $requestNumber, $groupsmsNumber) = $messageServer->countAllByUserId($winduid); $updateUserMessageTip = $updateUserDataMessageTip = array(); $winddb['newpm'] != 0 && $messageNumber + $groupsmsNumber != $winddb['newpm'] && ($updateUserMessageTip['newpm'] = $winddb['newpm'] = $messageNumber + $groupsmsNumber); $winddb['newnotice'] != 0 && $noticeNumber != $winddb['newnotice'] && ($updateUserDataMessageTip['newnotice'] = $winddb['newnotice'] = $noticeNumber); $winddb['newrequest'] != 0 && $requestNumber != $winddb['newrequest'] && ($updateUserDataMessageTip['newrequest'] = $winddb['newrequest'] = $requestNumber); $messageNumber = $messageNumber ? '(' . $messageNumber . ')' : ''; $noticeNumber = $noticeNumber ? '(' . $noticeNumber . ')' : ''; $requestNumber = $requestNumber ? '(' . $requestNumber . ')' : ''; $groupsmsNumber = $groupsmsNumber ? '(' . $groupsmsNumber . ')' : ''; $totalMessage = $max = 0; if ($_G['maxmsg']) { $numbers = $messageServer->statisticUsersNumbers(array($winduid)); $totalMessage = isset($numbers[$winduid]) ? $numbers[$winduid] : 0; $max = (int) $_G['maxmsg']; $percent = round($totalMessage / $max, 4) * 100 >= 100 ? '100' . '%' : round($totalMessage / $max, 4) * 100 . '%'; $percentTip = ',最多可存消息' . $_G['maxmsg'] . '条,' . '空间使用率' . $percent; } /* load u header */ $newSpace = new PwSpace($winduid); if (!($space =& $newSpace->getInfo())) { Showmsg('您访问的空间不存在!'); } if (S::isArray($updateUserMessageTip) || S::isArray($updateUserDataMessageTip)) { $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $userService->update($winduid, $updateUserMessageTip, $updateUserDataMessageTip); } //* include_once pwCache::getPath(D_P . 'data/bbscache/o_config.php'); pwCache::getData(D_P . 'data/bbscache/o_config.php'); require_once uTemplate::printEot('header'); require messageEot('leftmenu');
$basic_app_with_privacy = array('diary', 'photos'); foreach ($all_basic_app as $key => $value) { if (!getIfopenOfApp($value)) { continue; } ${$value . '_isshow'} = in_array($value, $isshowdb) ? 1 : 0; ${$value . '_privacy'} = in_array($value, $basic_app_with_privacy) ? ${$value . '_privacy'} : 0; $name = getLangInfo('other', $value); $showchecked = ${$value . '_isshow'} ? 'checked' : ''; if (in_array($value, $basic_app_with_privacy)) { $privacy = ${$value . '_privacy'}; ${'privace_' . $value . '_' . $privacy} = 'selected'; } $basic_app_array[$value] = array('name' => $name, 'isshow' => ${$value . '_isshow'}, 'privacy' => ${$value . '_privacy'}, 'showchecked' => $showchecked); } require_once uTemplate::printEot('myapp'); pwOutPut(); } elseif ($action == 'del') { define('AJAX', 1); S::gp(array('id')); //$db->update("DELETE FROM pw_userapp WHERE uid=" . S::sqlEscape($winduid) . ' AND appid=' . S::sqlEscape($id)); $appclient = L::loadClass('appclient'); $appclient->deleteUserAppByUidAndAppid($winduid, $id); if ($db->affected_rows()) { if (!$db_appifopen || !$db_siteappkey) { Showmsg('app_close'); } /*** userapp **/ $appclient = L::loadClass('appclient'); $url = $appclient->MoveAppsList($id); /*** userapp **/
Showmsg('specialgroup_exists'); } $rt = $db->get_one("SELECT gid,grouptitle FROM pw_usergroups WHERE gptype='special' AND gid=" . S::sqlEscape($gid)); if (!$rt) { Showmsg('specialgroup_error'); } $query = $db->query("SELECT gid,rkey,rvalue FROM pw_permission WHERE uid='0' AND fid='0' AND gid=" . S::sqlEscape($gid) . " AND rkey IN ('sellinfo','sellprice','rmbprice','selltype','selllimit','allowbuy')"); while ($permi = $db->fetch_array($query)) { $rt['sright'][$permi['rkey']] = $permi['rvalue']; } if (!$rt['sright']['allowbuy']) { Showmsg('special_allowbuy'); } if (empty($_POST['step'])) { $rt['sright']['selltype'] = $credit->cType[$rt['sright']['selltype']]; require_once uTemplate::PrintEot('profile_buy'); pwOutPut(); } else { PostCheck(); S::gp(array('pwpwd'), 'P'); S::gp(array('days', 'buymethod', 'options'), null, 2); if (!is_numeric($days) || $days <= 0) { Showmsg('illegal_nums'); } if ($days < $rt['sright']['selllimit']) { Showmsg('special_selllimit'); } $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $mb = $userService->get($winduid); if ($gid == $groupid || strpos($mb['groups'], ",{$gid},") !== false) {
} else { $joblists = $jobService->getFinishJobs($winduid); $jobs = $jobService->buildLists($joblists, $action, $winduid, $groupid); } $current[2] = "current"; require_once uTemplate::PrintEot('jobcenter'); pwOutPut(); } elseif ($action == "quit") { if ($step == 2) { list($bool, $message) = $jobService->jobQuitController($winduid, $id); ajaxResponse($message, $bool); } $joblists = $jobService->getQuitJobs($winduid); $jobs = $jobService->buildLists($joblists, $action, $winduid, $groupid); $current[3] = "current"; require_once uTemplate::PrintEot('jobcenter'); pwOutPut(); } elseif ($action == "start") { //获取任务开始链接 list($bool, $message, $link) = $jobService->jobStartController($winduid, $id); if (S::getGP('ajax')) { ajax_footer(); } if (!$bool) { refreshto("jobcenter.php?action=applied", $message); } if ($link == "") { refreshto("jobcenter.php?action=applied", "任务开始"); } else { ObHeader($link); }