function execute($requests)
 {
     //<PCKTAI
     if (OPENPNE_AUTH_MODE == 'slavepne' || !(OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC)) {
         client_redirect_login();
     }
     //>
     $sid = $requests['sid'];
     $ktai_address = $requests['ktai_address'];
     $ktai_address = str_replace('"', '', $ktai_address);
     if (!db_member_is_active_sid($sid)) {
         $p = array('msg_code' => 'invalid_url');
         openpne_redirect('pc', 'page_o_tologin', $p);
     }
     //携帯メールアドレスチェック
     if (!db_common_is_mailaddress($ktai_address)) {
         $msg = "メールアドレスを正しく入力してください";
     } elseif (db_member_is_sns_join4mail_address($ktai_address, 0, true)) {
         $msg = "そのメールアドレスは既に登録済みです";
     } elseif (!is_ktai_mail_address($ktai_address)) {
         $msg = "携帯メールアドレスを入力してください";
     }
     if (!empty($msg)) {
         $p = array('msg' => $msg, 'sid' => $sid, 'ktai_address' => $ktai_address);
         openpne_redirect('pc', 'page_o_regist_ktai_address', $p);
     }
     $pre = db_member_c_member_pre4sid($sid);
     //---- inc_ テンプレート用 変数 ----//
     $this->set('inc_page_header', fetch_inc_page_header('regist'));
     $this->set('ktai_address', $ktai_address);
     $this->set('sid', $sid);
     return 'success';
 }
Exemplo n.º 2
0
 function execute($requests)
 {
     //<PCKTAI
     if (OPENPNE_AUTH_MODE == 'slavepne' || !(OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC)) {
         client_redirect_login();
     }
     //>
     // --- リクエスト変数
     $sid = $requests['sid'];
     $err_msg = $requests['err_msg'];
     // ----------
     if (!db_member_is_active_sid($sid)) {
         $p = array('msg_code' => 'invalid_url');
         openpne_redirect('pc', 'page_o_tologin', $p);
     }
     $pre = db_member_c_member_pre4sid($sid);
     $this->set('err_msg', $err_msg);
     session_name('OpenPNEpcregist');
     @session_start();
     $this->set('profs', $_SESSION['prof']);
     //---- inc_ テンプレート用 変数 ----//
     $this->set('inc_page_header', fetch_inc_page_header('regist'));
     $c_member_pre = db_member_c_member_pre4c_member_pre_session($sid);
     $this->set('sid', $sid);
     $this->set('pc_address', $c_member_pre['pc_address']);
     $public_flags = array('public' => '全員に公開', 'friend' => WORD_MY_FRIEND . 'まで公開', 'private' => '公開しない');
     $this->set('public_flags', $public_flags);
     $this->set('month_list', p_regist_prof_c_profile_month_list4null());
     $this->set('day_list', p_regist_prof_c_profile_day_list4null());
     $this->set('query_list', p_common_c_password_query4null());
     $this->set('c_profile_list', db_member_c_profile_list());
     return 'success';
 }
 function execute($requests)
 {
     //<PCKTAI
     if (OPENPNE_AUTH_MODE == 'slavepne' || !(OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC)) {
         client_redirect_login();
     }
     //>
     // --- リクエスト変数
     $sid = $requests['sid'];
     // ----------
     if (!db_member_is_active_sid($sid)) {
         $p = array('msg_code' => 'invalid_url');
         openpne_redirect('pc', 'page_o_tologin', $p);
     }
     $pre = db_member_c_member_pre4sid($sid);
     $this->set('inc_page_header', fetch_inc_page_header('regist'));
     $this->set('sid', $sid);
     session_name('OpenPNEpcregist');
     @session_start();
     $this->set('prof', $_REQUEST['prof']);
     $this->set('pc_address', $pre['pc_address']);
     $query_list = p_common_c_password_query4null();
     $query_id = $_REQUEST['c_password_query_id'];
     $this->set('password_query_name', $query_list[$query_id]);
     $this->set('profile_list', db_member_c_profile_list4null());
     return 'success';
 }
 function execute($requests)
 {
     //<PCKTAI
     if (OPENPNE_AUTH_MODE == 'slavepne' || !(OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC)) {
         client_redirect_login();
     }
     //>
     $sid = $requests['sid'];
     $ktai_address = $requests['ktai_address'];
     $ktai_address = str_replace('"', '', $ktai_address);
     if (!db_member_is_active_sid($sid)) {
         $p = array('msg_code' => 'invalid_url');
         openpne_redirect('pc', 'page_o_tologin', $p);
     }
     //携帯メールアドレスチェック
     if (!db_common_is_mailaddress($ktai_address)) {
         $msg = "メールアドレスを正しく入力してください";
     } elseif (db_member_is_sns_join4mail_address($ktai_address)) {
         $msg = "そのメールアドレスは既に登録済みです";
     } elseif (!is_ktai_mail_address($ktai_address)) {
         $msg = "携帯メールアドレスを入力してください";
     }
     if (!empty($msg)) {
         $p = array('msg' => $msg, 'sid' => $sid, 'ktai_address' => $ktai_address);
         openpne_redirect('pc', 'page_o_regist_ktai_address', $p);
     }
     $pre = db_member_c_member_pre4sid($sid);
     $ktai_session = create_hash();
     // c_member_pre にデータ挿入
     $c_member_pre_secure = array('ktai_session' => $ktai_session, 'ktai_address' => $ktai_address);
     db_member_update_c_member_pre_secure($pre['c_member_pre_id'], array_merge($pre, $c_member_pre_secure), true);
     do_mail_sns_regist_ktai_id_mail_send_pre($ktai_session, $ktai_address);
     openpne_redirect('pc', 'page_o_regist_ktai_address_end', array('c_member_pre_id' => $pre['c_member_pre_id']));
 }
 function execute($requests)
 {
     //<PCKTAI
     if (OPENPNE_AUTH_MODE == 'slavepne' || !(OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC)) {
         client_redirect_login();
     }
     //>
     $sid = $requests['sid'];
     if (!db_member_is_active_sid($sid)) {
         $p = array('msg_code' => 'invalid_url');
         openpne_redirect('pc', 'page_o_tologin', $p);
     }
     $pre = db_member_c_member_pre4sid($sid);
     //---- inc_ テンプレート用 変数 ----//
     $this->set('inc_page_header', fetch_inc_page_header('regist'));
     $this->set('ktai_address', $requests['ktai_address']);
     $this->set('sid', $sid);
     return 'success';
 }
Exemplo n.º 6
0
 function execute($requests)
 {
     //<PCKTAI
     if (OPENPNE_AUTH_MODE == 'slavepne' || !(OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC)) {
         client_redirect_login();
     }
     //>
     $sid = $requests['sid'];
     if (!db_member_is_active_sid($sid)) {
         $p = array('msg_code' => 'invalid_url');
         openpne_redirect('pc', 'page_o_tologin', $p);
     }
     // メールアドレスが登録できるかどうか
     $pre = db_member_c_member_pre4sid($sid);
     if (!util_is_regist_mail_address($pre['pc_address'])) {
         $p = array('msg_code' => 'invalid_url');
         openpne_redirect('pc', 'page_o_tologin', $p);
     }
     $this->set('inc_page_header', fetch_inc_page_header('public'));
     $this->set('sid', $sid);
     $this->set('c_siteadmin', p_common_c_siteadmin4target_pagename('sns_kiyaku'));
     return 'success';
 }
Exemplo n.º 7
0
function do_common_c_member_pre4sid($sid)
{
    return db_member_c_member_pre4sid($sid);
}
Exemplo n.º 8
0
 function execute($requests)
 {
     //<PCKTAI
     if (OPENPNE_AUTH_MODE == 'slavepne' || !(OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC)) {
         client_redirect_login();
     }
     //>
     $sid = $requests['sid'];
     if (!db_member_is_active_sid($sid)) {
         $p = array('msg_code' => 'invalid_url');
         openpne_redirect('pc', 'page_o_tologin', $p);
     }
     $pre = db_member_c_member_pre4sid($sid);
     $mode = $requests['mode'];
     $errors = array();
     $validator = new OpenPNE_Validator();
     if ($mode == 'register') {
         session_name('OpenPNEpcregist');
         @session_start();
         $validator->addRequests($_SESSION['prof']);
         $requests['password2'] = $_SESSION['prof']['password'];
     } else {
         $validator->addRequests($_REQUEST);
     }
     $validator->addRules($this->_getValidateRules());
     if (!$validator->validate()) {
         $errors = $validator->getErrors();
     }
     $prof = $validator->getParams();
     if ($prof['password'] !== $requests['password2']) {
         $errors['password2'] = 'パスワードが一致していません';
     }
     //--- c_profile の項目をチェック
     $validator = new OpenPNE_Validator();
     if ($mode == 'register') {
         $validator->addRequests($_SESSION['prof']['profile']);
         $public_flag_list = $_SESSION['prof']['public_flag'];
     } else {
         $validator->addRequests($_REQUEST['profile']);
         $public_flag_list = $_REQUEST['public_flag'];
     }
     $validator->addRules(util_get_validate_rules_profile('regist'));
     if (!$validator->validate()) {
         $errors = array_merge($errors, $validator->getErrors());
     }
     // 値の整合性をチェック(DB)
     $c_member_profile_list = db_member_check_profile($validator->getParams(), $public_flag_list);
     // 必須項目チェック
     $profile_list = db_member_c_profile_list4null();
     foreach ($profile_list as $profile) {
         $value = $c_member_profile_list[$profile['name']]['value'];
         if ($profile['disp_regist'] && $profile['is_required']) {
             if (is_null($value) || $value === '' || $value === array()) {
                 $errors[$profile['name']] = $profile['caption'] . 'を入力してください';
             }
         }
     }
     // 生年月日のチェック
     if (!t_checkdate($prof['birth_month'], $prof['birth_day'], $prof['birth_year'])) {
         $errors[] = '生年月日を正しく入力してください';
     }
     if (t_isFutureDate($prof['birth_day'], $prof['birth_month'], $prof['birth_year'])) {
         $errors[] = '生年月日を未来に設定することはできません';
     }
     if (OPENPNE_AUTH_MODE == 'pneid') {
         // ログインIDの重複チェック
         if (db_member_c_member_id4username($prof['login_id'])) {
             $errors[] = 'このログインIDはすでに登録されています';
         }
     }
     if ($mode != 'input' && $errors) {
         $_REQUEST['err_msg'] = $errors;
         $mode = 'input';
         @session_start();
         $_SESSION['prof'] = $_REQUEST;
         unset($_SESSION['password']);
     }
     switch ($mode) {
         case 'input':
             $prof['profile'] = $c_member_profile_list;
             unset($prof['password']);
             openpne_forward('pc', 'page', 'o_regist_prof');
             exit;
         case 'confirm':
         default:
             $prof['profile'] = $c_member_profile_list;
             session_name('OpenPNEpcregist');
             @session_start();
             $_SESSION['prof'] = $_REQUEST;
             $_REQUEST['prof'] = $prof;
             openpne_forward('pc', 'page', 'o_regist_prof_confirm');
             exit;
         case 'register':
             $pre = db_member_c_member_pre4sid($sid);
             // delete cookie
             setcookie(session_name(), '', time() - 3600, ini_get('session.cookie_path'));
             if (IS_GET_EASY_ACCESS_ID != 3 || $pre['is_disabled_regist_easy_access_id']) {
                 // 管理者へ承認申請
                 if (IS_SNS_ENTRY_CONFIRM) {
                     // c_member_pre にデータ挿入
                     $c_member_pre_secure = array('session' => $pre['session'], 'nickname' => $prof['nickname'], 'birth_year' => $prof['birth_year'], 'birth_month' => $prof['birth_month'], 'birth_day' => $prof['birth_day'], 'public_flag_birth_year' => $prof['public_flag_birth_year'], 'public_flag_birth_month_day' => $prof['public_flag_birth_month_day'], 'password' => $prof['password'], 'c_password_query_id' => $prof['c_password_query_id'], 'c_password_query_answer' => $prof['c_password_query_answer'], 'pc_address' => $pre['pc_address'], 'regist_address' => $pre['pc_address'], 'is_sns_entry_confirm' => 1);
                     // c_member_pre_profile にデータ挿入
                     db_member_update_c_member_pre_profile($pre['c_member_pre_id'], $c_member_profile_list);
                     if (OPENPNE_AUTH_MODE == 'pneid') {
                         $c_member_pre_secure['login_id'] = $prof['login_id'];
                     }
                     db_member_update_c_member_pre4c_member_pre_id($pre['c_member_pre_id'], $c_member_pre_secure);
                     openpne_redirect('pc', 'page_o_regist_wait', array('c_member_id' => $u));
                 }
                 // メンバー登録時の携帯個体識別番号取得設定が「PC・携帯登録時に個体識別番号を必須にする」でない場合、メンバー登録処理をおこなう
                 $c_member = $prof;
                 $c_member['c_member_id_invite'] = $pre['c_member_id_invite'];
                 $c_member_secure = array('password' => $prof['password'], 'password_query_answer' => $prof['c_password_query_answer'], 'pc_address' => $pre['pc_address'], 'ktai_address' => '', 'regist_address' => $pre['pc_address']);
                 // メンバー登録
                 $u = util_regist_c_member($c_member, $c_member_secure, $c_member_profile_list);
                 // pre の内容を削除
                 db_member_delete_c_member_pre4sid($sid);
                 // 登録完了メール送信
                 do_regist_prof_do_regist2_mail_send($u);
                 // 登録完了メール(管理者宛)
                 if (SEND_USER_DATA) {
                     do_common_send_mail_regist4admin($u);
                 }
                 openpne_redirect('pc', 'page_o_regist_end', array('c_member_id' => $u));
             } else {
                 // メンバー登録時の携帯個体識別番号取得設定が「PC・携帯登録時に個体識別番号を必須にする」である場合、
                 // ここでのメンバー登録はすべてスキップする。入力した項目は c_member_pre とc_member_pre_profile に
                 // 保持しておき、携帯の登録が完了した場合に、メンバー登録も完了する
                 // c_member_pre_profile にデータ挿入
                 db_member_update_c_member_pre_profile($pre['c_member_pre_id'], $c_member_profile_list);
                 // c_member_pre にデータ挿入
                 $c_member_pre_secure = array('session' => $pre['session'], 'nickname' => $prof['nickname'], 'birth_year' => $prof['birth_year'], 'birth_month' => $prof['birth_month'], 'birth_day' => $prof['birth_day'], 'public_flag_birth_year' => $prof['public_flag_birth_year'], 'public_flag_birth_month_day' => $prof['public_flag_birth_month_day'], 'password' => $prof['password'], 'c_password_query_id' => $prof['c_password_query_id'], 'password_query_answer' => $prof['c_password_query_answer'], 'pc_address' => $pre['pc_address'], 'regist_address' => $pre['pc_address']);
                 if (OPENPNE_AUTH_MODE == 'pneid') {
                     $c_member_pre_secure['login_id'] = $prof['login_id'];
                 }
                 db_member_update_c_member_pre_secure($pre['c_member_pre_id'], $c_member_pre_secure);
                 openpne_redirect('pc', 'page_o_regist_ktai_address', array('sid' => $pre['session']));
             }
     }
 }