当前位置: 首页>>代码示例>>PHP>>正文


PHP get_constellation函数代码示例

本文整理汇总了PHP中get_constellation函数的典型用法代码示例。如果您正苦于以下问题:PHP get_constellation函数的具体用法?PHP get_constellation怎么用?PHP get_constellation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_constellation函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showmessage

     $field_key = $field['fieldid'];
     $field_val = $_G['gp_' . $field_key];
     if ($field['formtype'] == 'file' && !empty($_FILES[$field_key]) && $_FILES[$field_key]['error'] == 0) {
         $field_val = true;
     }
     if (!profile_check($field_key, $field_val)) {
         showmessage('profile_required_info_invalid');
     }
     if ($field['needverify']) {
         $verifyarr[$field_key] = $field_val;
     } else {
         $profile[$field_key] = $field_val;
     }
 }
 if (isset($_POST['birthmonth']) && isset($_POST['birthday'])) {
     $profile['constellation'] = get_constellation($_POST['birthmonth'], $_POST['birthday']);
 }
 if (isset($_POST['birthyear'])) {
     $profile['zodiac'] = get_zodiac($_POST['birthyear']);
 }
 if ($_FILES) {
     require_once libfile('class/upload');
     $upload = new discuz_upload();
     foreach ($_FILES as $key => $file) {
         $field_key = 'field_' . $key;
         if (!empty($_G['cache']['fields_register'][$field_key]) && $_G['cache']['fields_register'][$field_key]['formtype'] == 'file') {
             $upload->init($file, 'profile');
             $attach = $upload->attach;
             if (!$upload->error()) {
                 $upload->save();
                 if (!$upload->get_image_info($attach['target'])) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:member_register.php

示例2: unset

             unset($verifyinfo['field'][$key]);
             continue;
         }
         if (empty($verifyarr[$key]) && !isset($verifyarr[$key]) && isset($verifyinfo['field'][$key])) {
             $verifyarr[$key] = !empty($fvalue) && $key != $fvalue ? $fvalue : $space[$key];
         }
     }
 }
 if ($forum) {
     if (!$_G['group']['maxsigsize']) {
         $forum['sightml'] = '';
     }
     DB::update('common_member_field_forum', $forum, array('uid' => $_G['uid']));
 }
 if (isset($_POST['birthmonth']) && ($space['birthmonth'] != $_POST['birthmonth'] || $space['birthday'] != $_POST['birthday'])) {
     $setarr['constellation'] = get_constellation($_POST['birthmonth'], $_POST['birthday']);
 }
 if (isset($_POST['birthyear']) && $space['birthyear'] != $_POST['birthyear']) {
     $setarr['zodiac'] = get_zodiac($_POST['birthyear']);
 }
 if ($setarr) {
     DB::update('common_member_profile', $setarr, array('uid' => $_G['uid']));
 }
 if ($verifyarr) {
     DB::query('DELETE FROM ' . DB::table('common_member_verify_info') . " WHERE uid='{$_G['uid']}' AND verifytype='{$vid}'");
     $setverify = array('uid' => $_G['uid'], 'username' => $_G['username'], 'verifytype' => $vid, 'field' => daddslashes(serialize($verifyarr)), 'dateline' => $_G['timestamp']);
     DB::insert('common_member_verify_info', $setverify);
     $count = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('common_member_verify') . " WHERE uid='{$_G['uid']}'"), 0);
     if (!$count) {
         DB::insert('common_member_verify', array('uid' => $_G['uid']));
     }
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:spacecp_profile.php

示例3: on_register


//.........这里部分代码省略.........
         }
         if (!$activation) {
             $uid = uc_user_register(addslashes($username), $password, $email, $questionid, $answer, $_G['clientip']);
             if ($uid <= 0) {
                 if ($uid == -1) {
                     showmessage('profile_username_illegal');
                 } elseif ($uid == -2) {
                     showmessage('profile_username_protect');
                 } elseif ($uid == -3) {
                     showmessage('profile_username_duplicate');
                 } elseif ($uid == -4) {
                     showmessage('profile_email_illegal');
                 } elseif ($uid == -5) {
                     showmessage('profile_email_domain_illegal');
                 } elseif ($uid == -6) {
                     showmessage('profile_email_duplicate');
                 } else {
                     showmessage('undefined_action');
                 }
             }
         } else {
             list($uid, $username, $email) = $activation;
         }
         $_G['username'] = $username;
         if (getuserbyuid($uid, 1)) {
             if (!$activation) {
                 uc_user_delete($uid);
             }
             showmessage('profile_uid_duplicate', '', array('uid' => $uid));
         }
         $password = md5(random(10));
         $secques = $questionid > 0 ? random(8) : '';
         if (isset($_POST['birthmonth']) && isset($_POST['birthday'])) {
             $profile['constellation'] = get_constellation($_POST['birthmonth'], $_POST['birthday']);
         }
         if (isset($_POST['birthyear'])) {
             $profile['zodiac'] = get_zodiac($_POST['birthyear']);
         }
         if ($_FILES) {
             $upload = new discuz_upload();
             foreach ($_FILES as $key => $file) {
                 $field_key = 'field_' . $key;
                 if (!empty($_G['cache']['fields_register'][$field_key]) && $_G['cache']['fields_register'][$field_key]['formtype'] == 'file') {
                     $upload->init($file, 'profile');
                     $attach = $upload->attach;
                     if (!$upload->error()) {
                         $upload->save();
                         if (!$upload->get_image_info($attach['target'])) {
                             @unlink($attach['target']);
                             continue;
                         }
                         $attach['attachment'] = dhtmlspecialchars(trim($attach['attachment']));
                         if ($_G['cache']['fields_register'][$field_key]['needverify']) {
                             $verifyarr[$key] = $attach['attachment'];
                         } else {
                             $profile[$key] = $attach['attachment'];
                         }
                     }
                 }
             }
         }
         if ($setregip !== null) {
             if ($setregip == 1) {
                 C::t('common_regip')->update_count_by_ip($_G['clientip']);
             } else {
                 C::t('common_regip')->insert(array('ip' => $_G['clientip'], 'count' => 1, 'dateline' => $_G['timestamp']));
开发者ID:torrent520,项目名称:torrent520.github.io,代码行数:67,代码来源:class_member.php

示例4: on_register


//.........这里部分代码省略.........
         }
         if (!$activation) {
             $uid = uc_user_register($username, $password, $email, $questionid, $answer, $_G['clientip']);
             if ($uid <= 0) {
                 if ($uid == -1) {
                     showmessage('profile_username_illegal');
                 } elseif ($uid == -2) {
                     showmessage('profile_username_protect');
                 } elseif ($uid == -3) {
                     showmessage('profile_username_duplicate');
                 } elseif ($uid == -4) {
                     showmessage('profile_email_illegal');
                 } elseif ($uid == -5) {
                     showmessage('profile_email_domain_illegal');
                 } elseif ($uid == -6) {
                     showmessage('profile_email_duplicate');
                 } else {
                     showmessage('undefined_action');
                 }
             }
         } else {
             list($uid, $username, $email) = $activation;
         }
         $_G['username'] = $username;
         if (DB::result_first("SELECT uid FROM " . DB::table('common_member') . " WHERE uid='{$uid}'")) {
             if (!$activation) {
                 uc_user_delete($uid);
             }
             showmessage('profile_uid_duplicate', '', array('uid' => $uid));
         }
         $password = md5(random(10));
         $secques = $questionid > 0 ? random(8) : '';
         if (isset($_POST['birthmonth']) && isset($_POST['birthday'])) {
             $profile['constellation'] = get_constellation($_POST['birthmonth'], $_POST['birthday']);
         }
         if (isset($_POST['birthyear'])) {
             $profile['zodiac'] = get_zodiac($_POST['birthyear']);
         }
         if ($_FILES) {
             require_once libfile('class/upload');
             $upload = new discuz_upload();
             foreach ($_FILES as $key => $file) {
                 $field_key = 'field_' . $key;
                 if (!empty($_G['cache']['fields_register'][$field_key]) && $_G['cache']['fields_register'][$field_key]['formtype'] == 'file') {
                     $upload->init($file, 'profile');
                     $attach = $upload->attach;
                     if (!$upload->error()) {
                         $upload->save();
                         if (!$upload->get_image_info($attach['target'])) {
                             @unlink($attach['target']);
                             continue;
                         }
                         $attach['attachment'] = dhtmlspecialchars(trim($attach['attachment']));
                         if ($_G['cache']['fields_register'][$field_key]['needverify']) {
                             $verifyarr[$key] = $attach['attachment'];
                         } else {
                             $profile[$key] = $attach['attachment'];
                         }
                     }
                 }
             }
         }
         if ($regipsql) {
             DB::query($regipsql);
         }
         if ($invite && $this->setting['inviteconfig']['invitegroupid']) {
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:67,代码来源:class_member.php

示例5: pick_reg

function pick_reg($info)
{
    $member = $info;
    extract($info);
    global $_G;
    loaducenter();
    require_once libfile('function/misc');
    require_once libfile('function/profile');
    include_once libfile('class/member');
    $activation = array();
    if (!$activation) {
        $usernamelen = dstrlen($username);
        if ($usernamelen < 3) {
            return milu_lang('too_short');
        } elseif ($usernamelen > 15) {
            return milu_lang('too_long');
        }
        $username = addslashes(trim(dstripslashes($username)));
        $email = trim($email);
    }
    if (!$activation) {
        $uid = uc_user_register($username, $password, $email, $questionid, $answer, $_G['clientip']);
        if ($uid <= 0) {
            if ($uid == -1) {
                return milu_lang('bad_word');
            } elseif ($uid == -2) {
                return milu_lang('system_bad_word');
            } elseif ($uid == -3) {
                return milu_lang('reged');
            } elseif ($uid == -4) {
                return milu_lang('wrong_email');
            } elseif ($uid == -5) {
                return milu_lang('bad_email');
            } elseif ($uid == -6) {
                return milu_lang('email_reged');
            } else {
                return milu_lang('unknow_error');
            }
        }
    } else {
        list($uid, $username, $email) = $activation;
    }
    if (DB::result_first("SELECT uid FROM " . DB::table('common_member') . " WHERE uid='{$uid}'")) {
        if (!$activation) {
            uc_user_delete($uid);
        }
        return milu_lang('uid_reged');
    }
    $init_arr = explode(',', $_G['setting']['initcredits']);
    $groupinfo['groupid'] = $_G['setting']['newusergroupid'];
    $password = md5(random(10));
    $secques = $questionid > 0 ? random(8) : '';
    //用户资料
    $profile['constellation'] = get_constellation($birthmonth, $birthday);
    $profile['zodiac'] = get_zodiac($birthyear);
    $profile['gender'] = $gender == milu_lang('baomi') ? 0 : ($gender == milu_lang('man') ? 1 : 0);
    $profile_field_arr = array('birthyear', 'birthmonth', 'birthday', 'birthprovince', 'birthcity', 'birthdist', 'birthcommunity', 'resideprovince', 'residecity', 'residedist', 'residecommunity', 'residesuite', 'site', 'bio', 'interest', 'idcardtype', 'idcard', 'bloodtype', 'height', 'weight', 'qq', 'msn', 'taobao', 'yahoo', 'icq', 'alipay', 'lookingfor', 'position', 'occupation', 'education', 'company', 'graduateschool', 'revenue', 'telephone', 'mobile', 'constellation', 'realname', 'zodiac', 'affectivestatus');
    foreach ($profile_field_arr as $k => $v) {
        $profile[$v] = ${$v};
    }
    $lastactivity = rand($regdate, $regdate + 3600 * 24 * 2);
    if ($regipsql) {
        DB::query($regipsql);
    }
    $credits = 0;
    if (!empty($_G['setting']['creditsformula'])) {
        eval("\$credits = round(" . $_G['setting']['creditsformula'] . ");");
    }
    $userdata = array('uid' => $uid, 'username' => $username, 'password' => $password, 'email' => $email, 'adminid' => 0, 'groupid' => $groupinfo['groupid'], 'regdate' => $regdate, 'credits' => $credits, 'timeoffset' => 9999);
    $status_data = array('uid' => $uid, 'regip' => $regip, 'lastip' => $lastip, 'lastvisit' => $lastvisit, 'lastactivity' => $lastactivity, 'lastpost' => $lastpost, 'lastsendmail' => 0);
    $profile['uid'] = $uid;
    $field_forum['uid'] = $uid;
    $field_forum['sightml'] = $sightmlm;
    $field_home['uid'] = $uid;
    DB::insert('common_member', paddslashes($userdata));
    DB::insert('common_member_status', paddslashes($status_data));
    DB::insert('common_member_profile', paddslashes($profile));
    DB::insert('common_member_field_forum', paddslashes($field_forum));
    DB::insert('common_member_field_home', paddslashes($field_home));
    if ($verifyarr) {
        $setverify = array('uid' => $uid, 'username' => $username, 'verifytype' => '0', 'field' => daddslashes(serialize($verifyarr)), 'dateline' => $lastactivity);
        DB::insert('common_member_verify_info', $setverify);
        DB::insert('common_member_verify', array('uid' => $uid));
    }
    $count_data = array('uid' => $uid, 'oltime' => $oltime ? $oltime : 0, 'extcredits1' => $extcredits1 ? $extcredits1 : $init_arr[1], 'extcredits2' => $extcredits2 ? $extcredits2 : $init_arr[2], 'extcredits3' => $extcredits3 ? $extcredits3 : $init_arr[3], 'extcredits4' => $extcredits4 ? $extcredits4 : $init_arr[4], 'extcredits5' => $extcredits5 ? $extcredits5 : $init_arr[5], 'extcredits6' => $extcredits6 ? $extcredits6 : $init_arr[6], 'extcredits7' => $extcredits7 ? $extcredits7 : $init_arr[7], 'extcredits8' => $extcredits8 ? $extcredits8 : $init_arr[8]);
    DB::insert('common_member_count', paddslashes($count_data));
    DB::insert('common_setting', array('skey' => 'lastmember', 'svalue' => $username), false, true);
    manyoulog('user', $uid, 'add');
    $totalmembers = DB::result_first("SELECT COUNT(*) FROM " . DB::table('common_member'));
    $userstats = array('totalmembers' => $totalmembers, 'newsetuser' => $username);
    checkusergroup($uid);
    //更新用户所在的用户组
    save_syscache('userstats', $userstats);
    $re_arr['uid'] = $uid;
    return $re_arr;
}
开发者ID:edmundwong,项目名称:V604,代码行数:96,代码来源:function.member.php

示例6: on_register


//.........这里部分代码省略.........
             $groupinfo['groupid'] = 8;
         } else {
             $groupinfo['groupid'] = $this->setting['newusergroupid'];
             $addorg = 1;
         }
         $result = uc_user_register(addslashes($username), $password, $email, addslashes($nickname), $questionid, $answer, $_G['clientip'], $addorg);
         if (is_array($result)) {
             $uid = $result['uid'];
             $password = $result['password'];
         } else {
             $uid = $result;
         }
         if ($uid <= 0) {
             if ($uid == -1) {
                 showmessage('profile_nickname_illegal');
             } elseif ($uid == -2) {
                 showmessage('profile_nickname_protect');
             } elseif ($uid == -3) {
                 showmessage('profile_nickname_duplicate');
             } elseif ($uid == -4) {
                 showmessage('profile_email_illegal');
             } elseif ($uid == -5) {
                 showmessage('profile_email_domain_illegal');
             } elseif ($uid == -6) {
                 showmessage('profile_email_duplicate');
             } elseif ($uid == -7) {
                 showmessage('profile_username_illegal');
             } else {
                 showmessage('undefined_action');
             }
         }
         $_G['username'] = $username;
         if (isset($_POST['birthmonth']) && isset($_POST['birthday'])) {
             $profile['constellation'] = get_constellation($_POST['birthmonth'], $_POST['birthday']);
         }
         if (isset($_POST['birthyear'])) {
             $profile['zodiac'] = get_zodiac($_POST['birthyear']);
         }
         if ($_FILES) {
             foreach ($_FILES as $key => $file) {
                 $field_key = 'field_' . $key;
                 if (!empty($_G['cache']['fields_register'][$field_key]) && $_G['cache']['fields_register'][$field_key]['formtype'] == 'file') {
                     if ($attachment = uploadtolocal($file, 'profile', '')) {
                         if (@getimagesize($_G['setting']['attachdir'] . $attachment)) {
                             //判断是否为图片文件
                             @unlink($_G['setting']['attachdir'] . $attachment);
                             continue;
                         }
                         if ($_G['cache']['fields_register'][$field_key]['needverify']) {
                             $verifyarr[$key] = $attachment;
                         } else {
                             $profile[$key] = $attachment;
                         }
                     }
                 }
             }
         }
         $init_arr = array('profile' => $profile, 'emailstatus' => $emailstatus);
         C::t('user')->insert($uid, $_G['clientip'], $groupinfo['groupid'], $init_arr);
         if ($verifyarr) {
             $setverify = array('uid' => $uid, 'username' => $username, 'verifytype' => '0', 'field' => serialize($verifyarr), 'dateline' => TIMESTAMP);
             C::t('user_verify_info')->insert($setverify);
             C::t('user_verify')->insert(array('uid' => $uid));
         }
         require_once libfile('cache/userstats', 'function');
         build_cache_userstats();
开发者ID:druphliu,项目名称:dzzoffice,代码行数:67,代码来源:class_user.php

示例7: _adminUserInfo


//.........这里部分代码省略.........
             } elseif ($key == 'site') {
                 if (!in_array(strtolower(substr($value, 0, 6)), array('http:/', 'https:', 'ftp://', 'rtsp:/', 'mms://')) && !preg_match('/^static\\//', $value) && !preg_match('/^data\\//', $value)) {
                     $value = 'http://' . $value;
                 }
             }
             if ($field['formtype'] == 'file') {
                 if (!empty($_FILES[$key]) && $_FILES[$key]['error'] == 0 || !empty($space[$key]) && empty($_GET['deletefile'][$key])) {
                     $value = '1';
                 } else {
                     $value = '';
                 }
             }
             if (empty($field)) {
                 continue;
             } elseif (profile_check($key, $value, $space)) {
                 $setarr[$key] = dhtmlspecialchars(trim($value));
             } else {
                 if ($key == 'birthprovince') {
                     $key = 'birthcity';
                 } elseif ($key == 'resideprovince' || $key == 'residecommunity' || $key == 'residedist') {
                     $key = 'residecity';
                 } elseif ($key == 'birthyear' || $key == 'birthmonth') {
                     $key = 'birthday';
                 }
                 // profile_showerror($key);
                 $list = $this->makeErrorInfo($res, 'check_date_item');
                 $errcode = $list['errcode'] . $settings[$key]['title'];
                 $this->_exitWithHtmlAlert($errcode);
             }
             if ($field['formtype'] == 'file') {
                 unset($setarr[$key]);
             }
             if ($vid && $verifyconfig['available'] && isset($verifyconfig['field'][$key])) {
                 if (isset($verifyinfo['field'][$key]) && $setarr[$key] !== $space[$key]) {
                     $verifyarr[$key] = $setarr[$key];
                 }
                 unset($setarr[$key]);
             }
             if (isset($setarr[$key]) && $_G['cache']['profilesetting'][$key]['needverify']) {
                 if ($setarr[$key] !== $space[$key]) {
                     $verifyarr[$key] = $setarr[$key];
                 }
                 unset($setarr[$key]);
             }
         }
         if ($vid && !empty($verifyinfo['field']) && is_array($verifyinfo['field'])) {
             foreach ($verifyinfo['field'] as $key => $fvalue) {
                 if (!isset($verifyconfig['field'][$key])) {
                     unset($verifyinfo['field'][$key]);
                     continue;
                 }
                 if (empty($verifyarr[$key]) && !isset($verifyarr[$key]) && isset($verifyinfo['field'][$key])) {
                     $verifyarr[$key] = !empty($fvalue) && $key != $fvalue ? $fvalue : $space[$key];
                 }
             }
         }
         if ($forum) {
             if (!$_G['group']['maxsigsize']) {
                 $forum['sightml'] = '';
             }
             C::t('common_member_field_forum')->update($_G['uid'], $forum);
         }
         if (isset($_POST['birthmonth']) && ($space['birthmonth'] != $_POST['birthmonth'] || $space['birthday'] != $_POST['birthday'])) {
             $setarr['constellation'] = get_constellation($_POST['birthmonth'], $_POST['birthday']);
         }
         if (isset($_POST['birthyear']) && $space['birthyear'] != $_POST['birthyear']) {
             $setarr['zodiac'] = get_zodiac($_POST['birthyear']);
         }
         if ($setarr) {
             C::t('common_member_profile')->update($_G['uid'], $setarr);
         }
         if ($verifyarr) {
             C::t('common_member_verify_info')->delete_by_uid($_G['uid'], $vid);
             $setverify = array('uid' => $_G['uid'], 'username' => $_G['username'], 'verifytype' => $vid, 'field' => serialize($verifyarr), 'dateline' => $_G['timestamp']);
             C::t('common_member_verify_info')->insert($setverify);
             if (!C::t('common_member_verify')->count_by_uid($_G['uid'])) {
                 C::t('common_member_verify')->insert(array('uid' => $_G['uid']));
             }
             if ($_G['setting']['verify'][$vid]['available']) {
                 manage_addnotify('verify_' . $vid, 0, array('langkey' => 'manage_verify_field', 'verifyname' => $_G['setting']['verify'][$vid]['title'], 'doid' => $vid));
             }
         }
         if (isset($_POST['privacy'])) {
             foreach ($_POST['privacy'] as $key => $value) {
                 if (isset($_G['cache']['profilesetting'][$key])) {
                     $space['privacy']['profile'][$key] = intval($value);
                 }
             }
             C::t('common_member_field_home')->update($space['uid'], array('privacy' => serialize($space['privacy'])));
         }
         manyoulog('user', $_G['uid'], 'update');
         include_once libfile('function/feed');
         feed_add('profile', 'feed_profile_update_' . $operation, array('hash_data' => 'profile'));
         countprofileprogress();
         // $message = $vid ? lang('spacecp', 'profile_verify_verifying', array('verify' => $verifyconfig['title'])) : '';
         $list = $this->makeErrorInfo($res, 'update_date_success');
         $this->_exitWithHtmlAlert($list['errcode']);
     }
     $this->getController()->renderPartial('userInfoAdmin', array('formUrl' => WebUtils::createUrl_oldVersion('user/userinfoadminview', array('act' => $act)), 'errorMsg' => $errorMsg, 'action' => $act, '_G' => $_G, 'htmls' => $htmls, 'settings' => $settings));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:101,代码来源:UserInfoAdminViewAction.php


注:本文中的get_constellation函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。