function run() { $winduid = $this->getVar('winduid'); $fid = $this->getVar('fid'); require_once R_P . 'require/functions.php'; initJob($winduid, "doPost", array('fid' => $fid)); }
function addmobileauth($uid, $mobile) { if (!preg_match('/^\\d{11}$/', $mobile)) { $this->result['message'] = '手机号码非法'; return new ApiResponse($this->result); } $userService = L::loadClass('userservice', 'user'); /* @var $userService PW_Userservice */ $uid = intval($uid); $userinfo = $userService->get($uid); if (!S::isArray($userinfo)) { $this->result['message'] = '用户名"' . $username . '"未找到'; return new ApiResponse($this->result); } elseif ($userinfo['authmobile'] && getstatus($userinfo['userstatus'], PW_USERSTATUS_AUTHMOBILE)) { $this->result['message'] = '该用户已完成手机实名认证'; $this->result['authmobile'] = $userinfo['authmobile']; return new ApiResponse($this->result); } $userService->update($userinfo['uid'], array('authmobile' => $mobile)); $userService->setUserStatus($userinfo['uid'], PW_USERSTATUS_AUTHMOBILE, true); //颁发勋章 if ($db_md_ifopen) { $medalService = L::loadClass('medalservice', 'medal'); $medalService->awardMedalByIdentify($userinfo['uid'], 'shimingrenzheng'); } require_once R_P . 'require/functions.php'; initJob($userinfo['uid'], 'doAuthMobile'); $this->result['error'] = 0; return new ApiResponse($this->result); }
function run() { $tid = $this->getVar('tid'); $db_htmifopen = $this->getVar('db_htmifopen'); $winduid = $this->getVar('winduid'); require_once R_P . 'require/functions.php'; $_cacheService = Perf::gatherCache('pw_threads'); $thread = $page > 1 ? $_cacheService->getThreadByThreadId($tid) : $_cacheService->getThreadAndTmsgByThreadId($tid); initJob($winduid, "doReply", array('tid' => $tid, 'user' => $thread['author'])); }
wap_msg('您不能给自己发消息', $basename); } list($bool, $message) = $messageServer->checkReceiver($pwuser); if (!$bool) { wap_msg($message, $basename); } if (isset($_G['messagecontentsize']) && $_G['messagecontentsize'] > 0 && strlen($content) > $_G['messagecontentsize']) { wap_msg('内容超过限定长度' . $_G['messagecontentsize'] . '字节', $basename); } $filterUtil = L::loadClass('filterutil', 'filter'); $content = $filterUtil->convert($content); $title = $filterUtil->convert($title); $messageInfo = array('create_uid' => $winduid, 'create_username' => $windid, 'title' => $title, 'content' => $content); $messageService = L::loadClass("message"); if ($messageId = $messageService->sendMessage($winduid, $pwuser, $messageInfo)) { initJob($winduid, 'doSendMessage', array('user' => $usernames)); wap_sms_msg('发送成功!'); } wap_msg('消息发送失败', $basename); } } elseif ($action == 'all') { //$smsCount = $messageServer->countMessage($userId, $sms_type); //$smsList = $messageServer->getMessages($userId, $sms_type, $page, $wap_perpage); $smsCount = (int) $messageServer->countInBox($userId); $smsList = $messageServer->getInBox($userId, $page, $wap_perpage); //print_r($smsList);exit; !$smsCount && ($emptyListTip = "暂无任何站内信!"); $messageServer->resetStatistics(array($winduid), 'sms_num'); $pages = getPages($page, count($smsList), "{$basename}&a=ms_index&"); } elseif ($action == 'self') { $smsCount = $messageServer->countMessagesBySelf($userId, $sms_type);
$cksign = convert($prosign, $db_windpic, 2); $signstatus = $cksign != $prosign ? 1 : 0; if ($signstatus != getstatus($userdb['userstatus'], 9)) { $ustatus .= ',userstatus=userstatus' . ($signstatus ? '|' : '&~') . '(1<<8)'; } if ($proreceivemail != getstatus($userdb['userstatus'], 8)) { $ustatus .= ',userstatus=userstatus' . ($proreceivemail ? '|' : '&~') . '(1<<7)'; } //update member $pwSQL = array_merge($upmembers, array('email' => $proemail, 'gender' => $progender, 'signature' => $prosign, 'introduce' => $prointroduce, 'oicq' => $prooicq, 'aliww' => $proaliww, 'icq' => $proicq, 'yahoo' => $proyahoo, 'msn' => $promsn, 'site' => $prohomepage, 'location' => $profrom, 'bday' => $probday, 'timedf' => $timedf)); $usericon && ($pwSQL['icon'] = $usericon); $db->update("UPDATE pw_members SET " . pwSqlSingle($pwSQL) . "{$ustatus} WHERE uid=" . pwEscape($winduid)); $_cache = getDatastore(); $_cache->delete('UID_' . $winduid); //job sign initJob($winduid, "doUpdatedata"); refreshto("profile.php?action=modify&info_type={$info_type}", 'operate_success', 2, true); } elseif ($_POST['step'] == '3') { PostCheck(); !$_G['userbinding'] && Showmsg('undefined_action'); InitGP(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) : ''; $db_logintype = 1;
} //$pwSQL = pwSqlSingle(array( // 'uid' => $winduid, // 'friendid' => $friend['uid'], // 'status' => 1, // 'joindate' => $timestamp, // 'descrip' => $checkmsg, // 'ftid' => $friendtype //)); //$db->update("INSERT INTO pw_friends SET $pwSQL"); addSingleFriend(false, $winduid, $friend['uid'], $timestamp, 1, $friendtype, $checkmsg); $msg = array('toUser' => $friend['username'], 'subject' => 'friend_add_title_2', 'content' => 'friend_add_content_2', 'other' => array('uid' => $winduid, 'username' => $windid, 'msg' => stripslashes($checkmsg))); require_once R_P . 'require/msg.php'; pwSendMsg($msg); //job sign initJob($winduid, "doAddFriend", array('user' => $friend['username'])); Showmsg('friend_add_check'); } else { Showmsg('undefined_action'); } } } elseif ($action == 'deletefriend') { PostCheck(); InitGP(array('fuid'), 'GP', 2); $ckuser = $db->get_value("SELECT m.username FROM pw_friends f LEFT JOIN pw_members m ON f.uid=m.uid WHERE f.uid=" . pwEscape($fuid) . " AND f.friendid=" . pwEscape($winduid)); if ($ckuser) { $db->update('DELETE FROM pw_friends WHERE uid=' . pwEscape($fuid) . " AND friendid=" . pwEscape($winduid)); $db->update("UPDATE pw_memberdata SET f_num=f_num-1 WHERE uid=" . pwEscape($fuid) . " WHERE f_num>0"); $ckuser2 = $db->get_value("SELECT friendid FROM pw_friends WHERE uid=" . pwEscape($winduid) . " AND friendid=" . pwEscape($fuid)); if ($ckfuid2) { $db->update('DELETE FROM pw_friends WHERE uid=' . pwEscape($winduid) . " AND friendid=" . pwEscape($fuid));
} elseif ($friendcheck == 1) { Showmsg('friend_add_check'); } if (getOneFriend($u)) { Showmsg('mode_o_is_friend'); } $pwSQL = array(); $pwSQL[] = array($winduid, $u, $timestamp, 0); $pwSQL[] = array($u, $winduid, $timestamp, 0); $db->update("REPLACE INTO pw_friends(uid,friendid,joindate,status) VALUES " . S::sqlMulti($pwSQL, false)); $userService->updatesByIncrement(array($winduid, $u), array(), array('f_num' => 1)); $myurl = $db_bbsurl . "/" . $baseUrl . "q=user&u=" . $winduid; M::sendNotice(array($toUserInfo['username']), array('title' => getLangInfo('writemsg', 'o_friend_success_title', array('username' => $windid)), 'content' => getLangInfo('writemsg', 'o_friend_success_cotent', array('uid' => $winduid, 'username' => $windid, 'myurl' => $myurl)))); //job sign $friendUserName = $toUserInfo['username']; initJob($winduid, "doAddFriend", array('user' => $friendUserName)); echo "success|"; ajax_footer(); } else { Showmsg('mode_o_not_uid'); } } elseif ($a == 'showcommlist') { S::gp(array('type', 'id'), 'P'); $id = (int) $id; if (!$id) { Showmsg('undefined_action'); } if (!checkCommType($type)) { Showmsg('undefined_action'); } require_once R_P . 'require/showimg.php';
if ($db_ifftp) { //PwUpload::movetoftp($normalFile, $normalDir . "{$winduid}.$ext"); PwUpload::movetoftp($middleFile, $middleDir . $filename); $s_ifthumb && PwUpload::movetoftp($smallFile, $smallDir . $filename); } pwFtpClose($GLOBALS['ftp']); $user_a = explode('|', $winddb['icon']); $user_a[2] = $img_w; $user_a[3] = $img_h; $usericon = setIcon("{$udir}/{$winduid}.{$ext}", 3, $user_a); $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $userService->update($winduid, array('icon' => $usericon)); //* $db->update("DELETE FROM pw_datastore WHERE skey=". S::sqlEscape("UID_".$winduid). " LIMIT 1"); //job sign initJob($winduid, "doUpdateAvatar"); if ($from != 'reg') { refreshto('profile.php?action=modify&info_type=face', 'upload_icon_success'); } $jobService = L::loadclass('job', 'job'); $jobs = $jobService->getJobByJobName('doUpdateAvatar'); foreach ($jobs as $value) { if (!S::isArray($value)) { continue; } $jobService->jobGainController($winduid, $value['id']); } $verifyhash = GetVerify($winduid); refreshto("{$db_registerfile}?step=finish&option=2&verify={$verifyhash}", 'upload_icon_success'); } else { Showmsg('upload_icon_fail');
if (!$attention) { require_once R_P . 'require/showimg.php'; if ($rg_config['rg_recommendnames']) { $members = $userService->buildUserInfo($rg_config['rg_recommendids']); } $winduidInfo = $userService->getUserInfoByUserId($winduid); $mayKnownUserIds = $userService->getMayKnownUserIds($winduidInfo, 12); $mayKnownUsers = $userService->buildUserInfo($mayKnownUserIds); $skipUrl = "{$db_registerfile}?step=finish&option=4&verify={$verifyhash}"; } else { S::gp(array('uids')); $attentionService = L::loadClass('attention', 'friend'); foreach ($uids as $uid) { $attentionService->addFollow($winduid, $uid); } initJob($winduid, 'doAddFriend'); $jobService = L::loadclass('job', 'job'); $jobs = $jobService->getJobByJobName('doAddFriend'); foreach ($jobs as $value) { if (isset($value['isuserguide']) && !$value['isuserguide']) { continue; } $job['id'] = $value['id']; } $jobService->jobGainController($winduid, $job['id']); ObHeader("{$db_registerfile}?step=finish&option=4&verify={$verifyhash}"); } } elseif ($option == '4') { //精彩推荐 $rg_recommendcontent = pwHtmlspecialchars_decode($rg_config['rg_recommendcontent']); //可能感兴趣的内容~最新图酷帖->最新帖
/*实名认证获取验证码*/ S::gp('mobile', 'type', 'P'); $authService = L::loadClass('Authentication', 'user'); if (empty($_POST['step'])) { $status = $authService->getverify('profile', $mobile, $winduid, false, 'bind'); echo $status; } elseif ($_POST['step'] == '2') { S::gp(array('authverify')); if (empty($authverify)) { echo '7'; ajax_footer(); } $status = $authService->checkverify($mobile, $winduid, $authverify); if ($status && $authService->syncuser($mobile, $winduid, $authverify, $winduid, $windid, 'modify')) { $authService->setCurrentInfo('profile'); $userService = L::loadClass('userservice', 'user'); /* @var $register PW_Register */ $userService->update($winduid, array('authmobile' => $mobile)); $userService->setUserStatus($winduid, PW_USERSTATUS_AUTHMOBILE, true); //颁发勋章 if ($db_md_ifopen) { $medalService = L::loadClass('medalservice', 'medal'); $medalService->awardMedalByIdentify($winduid, 'shimingrenzheng'); } initJob($winduid, 'doAuthMobile'); echo 0; } else { echo 5; } } ajax_footer();
$postTopic->insertData($tid, $fid); } if ($postCate) { //团购活动插入数据 $postCate->insertData($tid, $fid); } $j_p = ''; if (empty($j_p) || $pwforum->foruminfo['cms']) { $j_p = "read.php?tid={$tid}"; } if ($postdata->getIfcheck()) { if ($postdata->filter->filter_weight == 3) { $pinfo = 'enter_words'; $banword = implode(',', $postdata->filter->filter_word); } else { $pinfo = 'enter_thread'; } } else { if ($postdata->filter->filter_weight == 2) { $banword = implode(',', $postdata->filter->filter_word); $pinfo = 'post_word_check'; } elseif ($postdata->linkCheckStrategy) { $pinfo = 'post_link_check'; } else { $pinfo = 'post_check'; } } //job sign initJob($winduid, "doPost", array('fid' => $fid)); refreshto($j_p, $pinfo); }
$postdata->att = new AttUpload($winduid, $flashatt); $postdata->att->check(); $postdata->att->transfer(); PwUpload::upload($postdata->att); } $replypost->execute($postdata); $pid = $replypost->getNewId(); if ($winduid && $tpcarray['special'] == 5) { require_once R_P . 'lib/special/post_5.class.php'; $postdebate = new postSpecial($pwpost); $postdebate->reply($tid, $pid); } //job sign $threads = L::loadClass('Threads'); $thread = $threads->getThreads($tid, !($page > 1)); initJob($winduid, "doReply", array('tid' => $tid, 'user' => $thread['author'])); if ($postdata->getIfcheck()) { if ($postdata->filter->filter_weight == 3) { $pinfo = 'enter_words'; $banword = implode(',', $postdata->filter->filter_word); } else { $pinfo = 'enter_thread'; } $j_p = "read.php?tid={$tid}&page=e&#a"; refreshto($j_p, $pinfo); } else { if ($postdata->filter->filter_weight == 2) { $banword = implode(',', $postdata->filter->filter_word); $pinfo = 'post_word_check'; } elseif ($postdata->linkCheckStrategy) { $pinfo = 'post_link_check';
$mc_sql[] = array($mid, $msg_title, $atc_content); if (isset($msglog[$i])) { $ml_sql[] = array($mid, $winduid, $msglog[$i], $timestamp, 'send'); $ml_sql[] = array($mid, $msglog[$i], $winduid, $timestamp, 'receive'); } $mid++; } if ($mc_sql) { $db->update("REPLACE INTO pw_msgc(mid,title,content) VALUES " . pwSqlMulti($mc_sql)); } if ($ml_sql) { $db->update("REPLACE INTO pw_msglog(mid,uid,withuid,mdate,mtype) VALUES " . pwSqlMulti($ml_sql)); } } //job sign initJob($winduid, "doSendMessage", array('user' => $pwuser)); if ($ifuids) { updateNewpm($ifuids, 'add'); } if ($w_num > 9) { Showmsg('msg_send_limit'); } else { refreshto("message.php?action=receivebox", 'operate_success'); } } } elseif ($action == 'clear') { PostCheck(); $delids = array(); $query = $db->query("SELECT mid FROM pw_msg WHERE type='rebox' AND touid=" . pwEscape($winduid) . " UNION SELECT mid FROM pw_msg WHERE type='sebox' AND fromuid=" . pwEscape($winduid)); while ($rt = $db->fetch_array($query)) { $delids[] = $rt['mid'];