Esempio n. 1
0
function createThreadTradeType($tradeTypeName, $userId)
{
    global $db, $userdb;
    if ($tradeTypeName == "") {
        showThreadTrade('empty');
    }
    $tradeinfo = isset($userdb['tradeinfo']) ? unserialize($userdb['tradeinfo']) : array();
    $tradeType = isset($tradeinfo['tradetype']) ? $tradeinfo['tradetype'] : array();
    $tradeType[] = $tradeTypeName;
    $tradeinfo['tradetype'] = $tradeType;
    $upmeminfo = array();
    $upmeminfo['tradeinfo'] = $tradeinfo ? addslashes(serialize($tradeinfo)) : '';
    updateThreadTrade($upmeminfo, $userId);
    $selectHtml = getThreadTrade($tradeType);
    showThreadTrade($selectHtml, false);
}
Esempio n. 2
0
 if ($db_ifsafecv && $question != '-2') {
     $safecv = '';
     if ($db_ifsafecv) {
         require_once R_P . 'require/checkpass.php';
         $safecv = questcode($question, $_POST['customquest'], $_POST['answer']);
     }
     $upmembers['safecv'] = $safecv;
 }
 $pwSQL = array_merge($upmembers, array('email' => $proemail));
 //update memdata
 if ($upmemdata) {
     $userService->update($winduid, array(), $upmemdata);
 }
 //update meminfo
 if ($upmeminfo) {
     updateThreadTrade($upmeminfo, $winduid);
 }
 unset($upmemdata, $upmeminfo);
 $result = $userService->update($winduid, $pwSQL);
 // defend start
 CloudWind::yunUserDefend('editprofile', $winduid, $windid, $upmemdata['pwdctime'], 0, 101, '', '', '', array('profile' => array_keys($pwSQL)));
 // defend end
 /* platform weibo app */
 $siteBindService = L::loadClass('WeiboSiteBindService', 'sns/weibotoplatform/service');
 /* @var $siteBindService PW_WeiboSiteBindService */
 if ($siteBindService->isOpen() && $upmembers['password']) {
     $weiboLoginService = L::loadClass('WeiboLoginService', 'sns/weibotoplatform/service');
     /* @var $weiboLoginService PW_WeiboLoginService */
     $weiboLoginService->setLoginUserPasswordHasReset($winduid);
     Cookie("winduser", StrCode($winduid . "\t" . PwdCode($upmembers['password']) . "\t" . $upmembers['safecv']));
     Cookie("ck_info", $db_ckpath . "\t" . $db_ckdomain);