function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; $tail = $GLOBALS['KTAI_URL_TAIL']; // --- リクエスト変数 $c_commu_id = $requests['c_commu_id']; $c_commu_topic_id = $requests['c_commu_topic_id']; $c_member_ids = $requests['c_member_ids']; $body = $requests['body']; // ---------- $c_topic = db_commu_c_topic4c_commu_topic_id_2($c_commu_topic_id); $c_commu_id = $c_topic['c_commu_id']; //--- 権限チェック // イベント管理者・コミュニティ管理者(副管含む)のみ送信可能 if (!db_commu_is_c_event_admin($c_commu_topic_id, $u) && !db_commu_is_c_commu_admin($c_commu_id, $u)) { handle_kengen_error(); } // 対象者に自分が含まれている if (in_array($u, $c_member_ids)) { handle_kengen_error(); } //--- //メッセージ送信 list($msg_subject, $msg_body) = create_message_event_message($u, $body, $c_commu_topic_id); foreach ($c_member_ids as $key => $value) { db_message_send_message_event_message($u, $value, $msg_subject, $msg_body); } $p = array('target_c_commu_topic_id' => $c_commu_topic_id); openpne_redirect('ktai', 'page_c_event_mail_end', $p); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_commu_id = $requests['target_c_commu_id']; $body = $requests['body']; // ---------- //--- 権限チェック //コミュニティメンバーでない or 参加承認中でない $status = db_common_commu_status($u, $target_c_commu_id); if ($status['is_commu_member'] || $status['is_commu_member_confirm']) { handle_kengen_error(); } //--- $c_member_id_from = $u; db_commu_insert_c_commu_member_confirm($target_c_commu_id, $c_member_id_from, $body); //メッセージ $c_commu = db_commu_c_commu4c_commu_id($target_c_commu_id); list($subject, $body_disp) = create_message_commu_join_request($c_member_id_from, $body, $target_c_commu_id); db_message_send_message_syoudaku($c_member_id_from, $c_commu['c_member_id_admin'], $subject, $body_disp); if ($c_commu['c_member_id_sub_admin']) { db_message_send_message_syoudaku($c_member_id_from, $c_commu['c_member_id_sub_admin'], $subject, $body_disp); } $p = array('target_c_commu_id' => $target_c_commu_id); openpne_redirect('pc', 'page_c_home', $p); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $category_id = $requests['category_id']; $asin = $requests['asin']; $body = $requests['body']; $satisfaction_level = $requests['satisfaction_level']; // ---------- $c_review_comment = db_review_add_write_c_review_comment4asin_c_member_id($asin, $u); if ($c_review_comment) { $p = array('c_review_id' => $c_review_comment['c_review_id']); openpne_redirect('pc', 'page_h_review_list_product', $p); } $product = db_review_write_product4asin($asin); if (!$product) { handle_kengen_error(); } $this->set('inc_navi', fetch_inc_navi('h')); $this->set('category_id', $category_id); $this->set('asin', $asin); $this->set('body', $body); $this->set('satisfaction_level', $satisfaction_level); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); if (!$requests['name']) { $p = array('msg' => '施設名を入力してください'); openpne_redirect('biz', 'page_s_add_shisetsu', $p); } $sessid = session_id(); $filename = ''; if ($_FILES['image_filename']['name']) { $image = biz_saveImage($_FILES['image_filename'], "s_" . $sessid, $u); if (!$image['filename']) { if (!$image['up_size_chk_result']) { $p = array('msg' => '画像は' . IMAGE_MAX_FILESIZE . 'KB以内のGIF・JPEG・PNGにしてください。'); openpne_redirect('biz', 'page_s_add_shisetsu', $p); } else { $msg = util_image_get_upload_err_msg($image['up_size_chk_result']); $p = array('msg' => $msg, 'id' => $id); openpne_redirect('biz', 'page_s_add_shisetsu', $p); } } $filename = $image['filename']; } t_image_clear_tmp(session_id()); biz_addShisetsu($requests['name'], $filename, $requests['info']); $p = array('msg' => '施設を追加しました'); openpne_redirect('biz', 'page_s_list', $p); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $c_commu_topic_id = $requests['target_c_commu_topic_id']; // ---------- $c_topic = db_commu_c_topic4c_commu_topic_id_2($c_commu_topic_id); //--- 権限チェック //イベントの管理者 or コミュニティ管理者 if (!db_commu_is_c_event_admin($c_commu_topic_id, $u) && !db_commu_is_c_commu_admin($c_topic['c_commu_id'], $u)) { handle_kengen_error(); } $c_commu = db_commu_c_commu4c_commu_id2($c_topic['c_commu_id']); if ($c_commu['is_topic'] == 'admin_only' && !db_commu_is_c_commu_admin($c_topic['c_commu_id'], $u)) { handle_kengen_error(); } if ($c_commu['is_topic'] == 'member' && !db_commu_is_c_commu_member($c_topic['c_commu_id'], $u)) { handle_kengen_error(); } //--- db_file_delete_c_file($c_topic['filename']); db_commu_delete_c_commu_topic_comment_file($c_commu_topic_id); $p = array('target_c_commu_topic_id' => $c_commu_topic_id); openpne_redirect('pc', 'page_c_event_edit', $p); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $c_review_comment_id = $requests['c_review_comment_id']; $body = $requests['body']; $satisfaction_level = $requests['satisfaction_level']; // ---------- //--- 権限チェック //レビューコメント作成者 if (!db_review_edit_c_review_comment4c_review_comment_id_c_member_id($c_review_comment_id, $u)) { handle_kengen_error(); } //--- if (is_null($body) || $body === '') { $err_msg[] = "レビューを入力してください"; } if (!$satisfaction_level) { $err_msg[] = "満足度を入力してください"; } if ($err_msg) { $c_review = db_review_edit_c_review4c_review_comment_id($c_review_comment_id); $_REQUEST['asin'] = $c_review['asin']; $_REQUEST['err_msg'] = $err_msg; openpne_forward('pc', 'page', "h_review_edit"); exit; } do_h_review_edit_update_c_review_comment($c_review_comment_id, $body, $satisfaction_level); openpne_redirect('pc', 'page_fh_review_list_member'); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_commu_id = $requests['target_c_commu_id']; $target_c_member_id = $requests['target_c_member_id']; // ---------- //--- 権限チェック //コミュニティ管理者 //targetメンバーが管理者(=自分)でない $status = db_common_commu_status($u, $target_c_commu_id); if (!$status['is_commu_admin']) { handle_kengen_error(); } if ($target_c_member_id == $u) { $p = array('target_c_commu_id' => $target_c_commu_id); openpne_redirect('pc', 'page_c_taikai_err_admin', $p); } // 削除対象がコミュニティ管理者 if (db_commu_is_c_commu_admin($target_c_commu_id, $target_c_member_id)) { handle_kengen_error(); } //--- db_commu_delete_c_commu_member($target_c_commu_id, $target_c_member_id); $p = array('target_c_commu_id' => $target_c_commu_id); openpne_redirect('pc', 'page_c_edit_member', $p); }
function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $c_message_id = $requests['c_message_id']; // ---------- $c_message = db_message_c_message4c_message_id($c_message_id); if (!util_is_readable_message($u, $c_message_id)) { handle_kengen_error(); } if ($c_message['c_member_id_to'] == $u) { // 受信メッセージ if (empty($c_message['is_deleted_to'])) { handle_kengen_error(); // メッセージがごみ箱にない場合は権限エラー } db_message_delete_c_message_to_trash($c_message_id); } elseif ($c_message['c_member_id_from'] == $u) { // 送信メッセージ if (empty($c_message['is_deleted_from'])) { handle_kengen_error(); // メッセージがごみ箱にない場合は権限エラー } db_message_delete_c_message_from_trash($c_message_id, $u); } openpne_redirect('ktai', 'page_h_message_box', array('box' => 'trash')); }
function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $c_commu_topic_id = $requests['target_c_commu_topic_id']; // ---------- //--- 権限チェック $c_commu_topic = db_commu_c_commu_topic4c_commu_topic_id($c_commu_topic_id); $c_commu_id = $c_commu_topic['c_commu_id']; $status = db_common_commu_status($u, $c_commu_id); if (!$status['is_commu_member']) { handle_kengen_error(); } if (!$c_commu_topic['event_flag']) { handle_kengen_error(); } if (db_commu_is_writable_c_commu_topic_comment4c_commu_topic_id($c_commu_topic_id)) { handle_kengen_error(); } $is_c_event_member = db_commu_is_c_event_member($c_commu_topic_id, $u); if ($is_c_event_member) { ktai_display_error('すでにイベントに参加しています'); } if (!db_commu_is_event_join_capacity($c_commu_topic_id)) { ktai_display_error('イベントの参加者数制限を超えています'); } if (!db_commu_is_event_join_date($c_commu_topic_id)) { ktai_display_error('イベントの募集期限が過ぎています'); } db_commu_insert_c_event_member($c_commu_topic_id, $u); $p = array('target_c_commu_topic_id' => $c_commu_topic_id); openpne_redirect('ktai', 'page_c_bbs', $p); }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- if (!$target_c_member_id) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } //ターゲット情報 $this->set("target_c_member", db_member_c_member4c_member_id_LIGHT($target_c_member_id)); // 1ページ当たりに表示するフレンドの数 $page_size = 10; //ターゲットの詳細な友達リスト $list = db_friend_friend_list4c_member_id($target_c_member_id, $page_size, $page); $total_num = db_friend_count_friends($target_c_member_id); $this->set("target_friend_list", $list[0]); $this->set("page", $page); $this->set("is_prev", $list[1]); $this->set("is_next", $list[2]); $this->set('total_num', $total_num); $pager = array(); $pager['start'] = $page_size * ($page - 1) + 1; $pager['end'] = $pager['start'] + count($list[0]) - 1; $this->set('pager', $pager); $this->set("INC_NAVI_type", k_p_fh_common_get_type($target_c_member_id, $u)); return 'success'; }
function execute($requests) { //外部認証の場合はリダイレクト check_action4pne_slave(true); // --- リクエスト変数 $session = $requests['session']; $id = $requests['id']; // ---------- // ハッシュ化されたIDを戻す $c_member_id = t_decrypt($id); // 権限チェック if (!db_member_c_member_config4name($c_member_id, 'password_reset_sid')) { handle_kengen_error(); } if (!db_member_c_member_config4name($c_member_id, 'password_reset_sid_time')) { handle_kengen_error(); } $c_member_config = db_member_c_member_config4c_member_id($c_member_id); // 権限チェック if ($c_member_config['password_reset_sid'] != $session) { handle_kengen_error(); } // 有効期限は24時間 $one_day_time = 86400; $limit_password_reset_sid_time = $c_member_config['password_reset_sid_time'] + $one_day_time; // 権限チェック if (time() > $limit_password_reset_sid_time) { $p = array('msg' => 55); openpne_redirect('ktai', 'page_o_login', $p); } $this->set('session', $session); $this->set('id', $id); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- if (is_null($target_c_member_id)) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } // navi 振り分け用 if ($target_c_member_id == $u) { $type = "h"; } else { $type = "f"; } $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); //自分情報 $this->set("member", db_member_c_member4c_member_id($u)); //ターゲット情報 $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id)); if ($target_c_member_id == $u) { $raw_c_friend_comment_list = db_friend_intro_list_with_my_intro4c_member_id($target_c_member_id); } else { $raw_c_friend_comment_list = db_friend_intro_list4c_member_id($target_c_member_id); } $c_friend_comment_list = $raw_c_friend_comment_list; //紹介文達 $this->set("intro_list", $c_friend_comment_list); //---- ページ表示 ----// return 'success'; }
function execute($requests) { //<PCKTAI if (OPENPNE_AUTH_MODE == 'slavepne' || !((OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_KTAI) >> 1)) { openpne_redirect('ktai', 'page_o_login', array('msg' => 42)); } //> // --- リクエスト変数 $ses = $requests['ses']; $aff_id = $requests['aff_id']; // ---------- // セッションが有効かどうか if (!($pre = db_member_c_member_ktai_pre4session($ses))) { // 無効の場合、login へリダイレクト openpne_redirect('ktai', 'page_o_login', array('msg' => 42)); } // メールアドレスが登録できるかどうか if (!util_is_regist_mail_address($pre['ktai_address'])) { openpne_redirect('ktai', 'page_o_login', array('msg' => 42)); } if ($aff_id) { $this->set('aff_id', $aff_id); } // 招待者の情報 $c_member_invite = db_member_c_member_with_profile($pre['c_member_id_invite'], 'friend'); $this->set('last_login', p_f_home_last_login4access_date($c_member_invite['access_date'])); $this->set('friend_count', db_friend_count_friends($c_member_invite['c_member_id'])); $this->set('target_c_member', $c_member_invite); $this->set('ses', $ses); $this->set('SNS_NAME', SNS_NAME); return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; $tail = $GLOBALS['KTAI_URL_TAIL']; // --- リクエスト変数 $c_commu_topic_id = $requests['target_c_commu_topic_id']; $c_member_id = $requests['c_member_id']; $body = $requests['body']; // ---------- $c_topic = db_commu_c_topic4c_commu_topic_id_2($c_commu_topic_id); $c_commu_id = $c_topic['c_commu_id']; //--- 権限チェック // イベント閲覧権限がないと送信できない if (!db_commu_is_c_commu_view4c_commu_idAc_member_id($c_commu_id, $u)) { handle_kengen_error(); } // 自分が送信対象 if ($u == $c_member_id) { handle_kengen_error(); } //--- list($msg_subject, $msg_body) = create_message_event_invite($u, $body, $c_commu_topic_id); db_message_send_message_event_invite($u, $c_member_id, $msg_subject, $msg_body); $p = array('target_c_commu_topic_id' => $c_commu_topic_id); openpne_redirect('ktai', 'page_c_bbs', $p); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); $sessid = session_id(); $member_list = serialize($requests['member_list']); if (!$requests['name']) { $p = array('msg' => 'グループ名を登録してください。', 'name' => $requests['name'], 'info' => $requests['info'], 'memberlist' => $member_list); openpne_redirect('biz', 'page_h_biz_group_add', $p); exit; } $filename = ''; if ($_FILES['image_filename']['name']) { $image = biz_saveImage($_FILES['image_filename'], "g_" . $sessid, $u); if (!$image['filename']) { $filename = $requests['image_filename']; if (!$image['up_size_chk_result']) { $p = array('msg' => '画像は' . IMAGE_MAX_FILESIZE . 'KB以内のGIF・JPEG・PNGにしてください。', 'id' => $id); openpne_redirect('biz', 'page_h_biz_group_add', $p); exit; } else { $msg = util_image_get_upload_err_msg($image['up_size_chk_result']); $p = array('msg' => $msg, 'id' => $id); openpne_redirect('biz', 'page_h_biz_group_add', $p); exit; } } $filename = $image['filename']; } t_image_clear_tmp(session_id()); biz_insertGroup($requests['name'], $u, $requests['info'], $filename, $requests['member_list']); $p = array('target_c_commu_id' => biz_getGroupMax()); openpne_redirect('biz', 'page_g_home', $p); }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; $tail = $GLOBALS['KTAI_URL_TAIL']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $body = $requests['body']; // ---------- //TODO: 空のとき削除でもよいのでは? if (!$body) { $p = array('target_c_member_id' => $target_c_member_id, 'msg' => 33); openpne_redirect('ktai', 'page_f_intro_edit', $p); } //--- 権限チェック //フレンド $status = db_friend_status($u, $target_c_member_id); if (!$status['is_friend']) { handle_kengen_error(); } //--- if (OPENPNE_USE_POINT_RANK) { //紹介文を書いた人にポイント付与 if (!db_friend_intro_body4c_member_id($u, $target_c_member_id)) { $point = db_action_get_point4c_action_id(5); db_point_add_point($u, $point); } } db_friend_update_c_friend_intro($u, $target_c_member_id, $body); // メール送信 do_f_intro_edit_update_c_friend_send_mail($u, $target_c_member_id); $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('ktai', 'page_fh_intro', $p); }
function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $c_commu_category_id = $requests['c_commu_category_id']; $name = $requests['name']; $info = $requests['info']; $is_admit = $requests['is_admit']; $is_open = $requests['is_open']; if (db_commu_is_commu4c_commu_name($name)) { $p = array('msg' => 49); openpne_redirect('ktai', 'page_h_com_add', $p); } if (!db_commu_c_commu_category_is_create_commu($c_commu_category_id)) { $p = array('msg' => 50); openpne_redirect('ktai', 'page_h_com_add', $p); } // ---------- $c_member_id = $u; $c_commu_id = db_commu_insert_c_commu($c_member_id, $name, $c_commu_category_id, $info, $is_admit, $is_open); //作成者をコミュメンバーにする db_commu_join_c_commu($c_commu_id, $c_member_id); $p = array('target_c_commu_id' => $c_commu_id); openpne_redirect('ktai', 'page_c_home', $p); }
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_ENABLE_KTAI) { openpne_redirect('pc', 'page_h_home'); } //> $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $ktai_address = $requests['ktai_address']; // ---------- $ktai_address = str_replace('"', '', $ktai_address); if (!is_ktai_mail_address($ktai_address)) { $msg = "携帯メールアドレスを記入してください"; $p = array('msg' => $msg); openpne_redirect('pc', 'page_h_config_ktai', $p); } // 登録済みメールアドレスかどうかチェックする if (($c_member_id = db_member_c_member_id4ktai_address2($ktai_address)) && $c_member_id != $u) { $msg = "入力されたメールアドレスは既に登録されています"; $p = array('msg' => $msg); openpne_redirect('pc', 'page_h_config_ktai', $p); } db_member_delete_c_member_ktai_pre4ktai_address($ktai_address); db_member_delete_c_ktai_address_pre4ktai_address($ktai_address); $session = create_hash(); db_member_insert_c_ktai_address_pre($u, $session, $ktai_address); do_mail_sns_change_ktai_mail_send($u, $session, $ktai_address); openpne_redirect('pc', 'page_h_config_ktai_end'); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- //is_friend $is_friend = db_friend_is_friend($u, $target_c_member_id); //--- 権限チェック //フレンド if ($target_c_member_id == $u) { handle_kengen_error(); } if (!$is_friend) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_link_request_err_yet', $p); } //--- if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } $this->set('inc_navi', fetch_inc_navi('f', $target_c_member_id)); $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id)); $this->set("intro_body", db_friend_intro_body4c_member_id($u, $target_c_member_id)); $this->set("target_c_member_id", $target_c_member_id); return 'success'; }
function execute($requests) { if (!OPENPNE_USE_ALBUM) { handle_kengen_error(); } $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $subject = $requests['subject']; $description = $requests['description']; $public_flag = $requests['public_flag']; $tmpfile = $requests['tmpfile']; // ---------- // 画像アップロード可能サイズチェック if ($tmpfile) { $filesize = util_image_get_c_tmp_filesize4filename("a_{$c_album_id}_1", $tmpfile); $result = util_image_check_add_image_upload($filesize, $u, 'other'); if ($result) { $_REQUEST['err_msg'] = util_image_get_upload_err_msg($result); openpne_forward('pc', 'page', "h_album_add"); exit; } } $c_member_id = $u; $c_album_id = db_album_insert_c_album($c_member_id, $subject, $description, $public_flag); if ($tmpfile) { $filename = image_insert_c_image4tmp("a_{$c_album_id}_1", $tmpfile, $u, 'other'); $sessid = session_id(); t_image_clear_tmp($sessid); //アルバムの表紙に写真ファイル名を登録 db_album_update_c_album_album_cover_image($c_album_id, $filename); } $p = array('target_c_album_id' => $c_album_id); openpne_redirect('pc', 'page_h_album_image_add', $p); }
function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_album_image_id = $requests['target_c_album_image_id']; $image_description = $requests['description']; // ---------- if (is_null($image_description) || $image_description === '') { $p = array('target_c_album_image_id' => $target_c_album_image_id, 'msg' => 51); openpne_redirect('ktai', 'page_h_album_image_edit', $p); } $target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id); //targetのアルバム写真が存在しない if (!$target_c_album_image) { openpne_redirect('ktai', 'page_h_err_fh_album'); } $target_c_album_id = $target_c_album_image['c_album_id']; $c_album = db_album_get_c_album4c_album_id($target_c_album_id); //targetのアルバムが存在しない if (!$c_album) { openpne_redirect('ktai', 'page_h_err_fh_album'); } if ($c_album['c_member_id'] != $u) { handle_kengen_error(); } //--- $image_filename = $target_c_album_image['image_filename']; $filesize = $target_c_album_image['filesize']; db_album_update_c_album_image($target_c_album_image_id, $image_filename, $image_description, $filesize); $p = array('target_c_album_image_id' => $target_c_album_image_id); openpne_redirect('ktai', 'page_fh_album_image_show', $p); }
function execute($requests) { if (!OPENPNE_USE_ALBUM) { handle_kengen_error(); } $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_album_image_id = $requests['target_c_album_image_id']; // ---------- $target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id); $target_c_album_id = $target_c_album_image['c_album_id']; $album = db_album_get_c_album4c_album_id($target_c_album_id); if ($album['c_member_id'] != $u) { handle_kengen_error(); } // target が指定されていない if (!$target_c_album_image_id) { openpne_redirect('pc', 'page_h_err_fh_album'); } // target の写真が存在しない if (!p_common_is_active_c_album_image_id($target_c_album_image_id)) { openpne_redirect('pc', 'page_h_err_fh_album'); } $this->set('inc_navi', fetch_inc_navi("h")); $this->set('target_c_album_image', $target_c_album_image); $form_val = array("target_c_album_id" => $target_c_album_id, "target_c_album_image_id" => $target_c_album_image_id); $this->set("form_val", $form_val); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- if (is_null($target_c_member_id)) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } // navi 振り分け用 if ($target_c_member_id == $u) { $type = "h"; } else { $type = "f"; } $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id)); $page_size = 50; $this->set("page", $page); list($c_commu_list, $pager) = db_commu_c_commu_list4c_member_id($target_c_member_id, $page, $page_size); $this->set("fh_com_list_user", $c_commu_list); $this->set("pager", $pager); for ($i = 1; $i <= $pager['total_page']; $i++) { $page_list[] = $i; } $this->set("page_list", $page_list); return 'success'; }
function execute($requests) { //<PCKTAI if (!OPENPNE_ENABLE_PC) { openpne_redirect('ktai', 'page_h_home'); } //> $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $pc_address = $requests['pc_address']; // ---------- $errors = array(); if (!db_common_is_mailaddress($pc_address)) { $errors[] = 'メールアドレスを正しく入力してください'; } elseif (is_ktai_mail_address($pc_address)) { $errors[] = '携帯メールアドレスは入力できません'; } elseif (db_member_c_member4pc_address($pc_address)) { $errors[] = '入力したメールアドレスは既に登録されています'; } elseif (!db_member_is_limit_domain4mail_address($pc_address)) { $errors[] = '入力したメールアドレスでは登録できません'; } if ($errors) { ktai_display_error($errors); } db_member_h_config_1($u, $pc_address); openpne_redirect('ktai', 'page_h_pc_send_confirm'); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); $target_c_commu_topic_id = $requests['target_c_commu_topic_id']; //--- 権限チェック //コミュニティ管理者 or トピック作成者 $c_commu_topic = db_commu_c_commu_topic4c_commu_topic_id($target_c_commu_topic_id); $c_commu_id = $c_commu_topic['c_commu_id']; $status = db_common_commu_status($u, $c_commu_id); if (!$status['is_commu_admin'] && $c_commu_topic['c_member_id'] != $u) { handle_kengen_error(); } $c_commu = db_commu_c_commu4c_commu_id2($c_commu_id); if ($c_commu['is_topic'] == 'admin_only' && !db_commu_is_c_commu_admin($c_commu_id, $u)) { handle_kengen_error(); } if ($c_commu['is_topic'] == 'member' && !db_commu_is_c_commu_member($c_commu_id, $u)) { handle_kengen_error(); } //--- db_commu_delete_c_commu_topic($target_c_commu_topic_id); $p = array('target_c_commu_id' => $c_commu_topic['c_commu_id']); if ($c_commu_topic['event_flag']) { openpne_redirect('pc', 'page_c_event_list', $p); } else { openpne_redirect('pc', 'page_c_topic_list', $p); } }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_album_image_id = $requests['target_c_album_image_id']; // ---------- $target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id); //targetのアルバム写真が存在しない if (!$target_c_album_image) { openpne_redirect('ktai', 'page_h_err_fh_album'); } $target_c_album_id = $target_c_album_image['c_album_id']; $c_album = db_album_get_c_album4c_album_id($target_c_album_id); //targetのアルバムが存在しない if (!$c_album) { openpne_redirect('ktai', 'page_h_err_fh_album'); } if ($c_album['c_member_id'] != $u) { handle_kengen_error(); } $this->set('c_album_image', $target_c_album_image); $this->set('album_info', $c_album); //メンバー情報 $c_member = db_member_c_member4c_member_id($u); $this->set('member', $c_member); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $body = $requests['body']; // ---------- //--- 権限チェック //フレンドでない or フレンド承認中でない $status = db_friend_status($u, $target_c_member_id); if ($status['is_friend']) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_link_request_err_already', $p); } elseif ($status['is_friend_confirm']) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_link_request_err_wait', $p); } //アクセスブロック設定 if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } //--- $c_member_id_from = $u; db_friend_insert_c_friend_confirm($c_member_id_from, $target_c_member_id, $body); list($subject, $body_disp) = create_message_friend_link_request($c_member_id_from, $body); db_message_send_message_syoudaku($c_member_id_from, $target_c_member_id, $subject, $body_disp); $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_home', $p); }
function execute($requests) { $use_portal = db_portal_config('USE_PORTAL_KTAI'); if (!$use_portal['value']) { openpne_redirect('ktai'); } $this->set('SNS_NAME', SNS_NAME); $this->set('IS_CLOSED_SNS', IS_CLOSED_SNS); $top = array(); $bottom = array(); $layout_list = db_portal_layout_ktai_order_by_position(); foreach ($layout_list as $layout) { $pos = $layout['position']; $name = $layout['content_name']; $content = $this->get_contents($name); if ($pos == 10 || $pos == 11) { $top[] = $content; } else { if ($pos == 20 || $pos == 21) { $bottom[] = $content; } } } $this->set('top', $top); $this->set('bottom', $bottom); // inc_entry_point $this->set('inc_ktai_entry_point', fetch_inc_entry_point($this->getView(), 'ktai_o_login')); return 'success'; }
function execute($requests) { $password = $requests['password']; $reason = $requests['reason']; $u = $GLOBALS['AUTH']->uid(); if ($u == 1) { openpne_redirect('pc', 'page_h_config'); } //退会理由は必須 if (!$reason) { $msg = "退会理由を入力して下さい"; $p = array('msg' => $msg); openpne_redirect('pc', 'page_h_taikai_confirm', $p); } if (!db_common_authenticate_password($u, $password)) { $msg = "パスワードが間違っています"; $p = array('msg' => $msg); openpne_redirect('pc', 'page_h_taikai_confirm', $p); } //退会完了メール送信 do_common_send_mail_taikai_end_pc($u); if (SEND_USER_DATA) { //退会完了メール送信(管理者宛) do_common_send_mail_taikai4admin($u, $reason); } //退会処理 db_common_delete_c_member($u); //ログアウト $GLOBALS['AUTH']->logout(); $p = array('msg_code' => 'taikai'); openpne_redirect('pc', 'page_o_tologin', $p); }