function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $c_commu_id = $requests['target_c_commu_id'];
     $c_review_id = $requests['c_review_id'];
     // ----------
     //--- 権限チェック
     //コミュニティメンバー
     if (!db_commu_is_c_commu_member($c_commu_id, $u)) {
         handle_kengen_error();
     }
     //---
     if (!$c_review_id) {
         $_REQUEST['target_c_commu_id'] = $c_commu_id;
         openpne_forward('pc', 'page', "c_member_review_add");
         exit;
     }
     $c_member_review = db_review_c_member_review_add_confirm_c_member_review4c_review_id($c_review_id, $u);
     if (!$c_member_review) {
         handle_kengen_error();
     }
     $this->set('c_member_review', $c_member_review);
     $this->set('c_commu', db_commu_c_commu4c_commu_id($c_commu_id));
     $this->set('c_review_id', $c_review_id);
     $this->set('inc_navi', fetch_inc_navi('c', $c_commu_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)
 {
     $u = $GLOBALS['AUTH']->uid();
     $this->set('inc_navi', fetch_inc_navi('h'));
     // --- リクエスト変数
     $input = $requests;
     // ----------
     $title = $input['title'];
     $body = $input['body'];
     if (is_null($input['end_year'])) {
         $input['end_year'] = $input['start_year'];
     }
     if (is_null($input['end_month'])) {
         $input['end_month'] = $input['start_month'];
     }
     if (is_null($input['end_day'])) {
         $input['end_day'] = $input['start_day'];
     }
     // validation
     $errors = array();
     if (!$title) {
         $errors[] = "タイトルを入力してください";
     }
     if (is_null($input['start_hour']) xor is_null($input['start_minute'])) {
         $errors[] = "開始時刻が正しくありません";
     }
     if (is_null($input['end_hour']) xor is_null($input['end_minute'])) {
         $errors[] = "終了時刻が正しくありません";
     }
     $start_date = intval(sprintf("%04d%02d%02d", $input['start_year'], $input['start_month'], $input['start_day']));
     $end_date = intval(sprintf("%04d%02d%02d", $input['end_year'], $input['end_month'], $input['end_day']));
     if ($input['start_hour'] && $input['start_minute']) {
         $start_time = intval(sprintf("%02d%02d", $input['start_hour'], $input['start_minute']));
     } else {
         $start_time = 0;
         // -∞
     }
     if ($input['end_hour'] && $input['end_minute']) {
         $end_time = intval(sprintf("%02d%02d", $input['end_hour'], $input['end_minute']));
     } else {
         $end_time = 2400;
         // +∞
     }
     if ($end_date < $start_date || $end_date == $start_date && $end_time < $start_time) {
         $errors[] = "終了日は開始日より前に設定できません";
     }
     if ($errors) {
         $_REQUEST['msg'] = array_shift($errors);
         $i = 1;
         while ($msg = array_shift($errors)) {
             $_REQUEST["msg{$i}"] = $msg;
             $i++;
         }
         openpne_forward('pc', 'page', "h_schedule_add");
         exit;
     }
     $this->set('input', $input);
     $this->set('is_unused_schedule', util_is_unused_mail('m_pc_schedule_mail'));
     return 'success';
 }
 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();
     // --- リクエスト変数
     $subject = $requests['subject'];
     $body = $requests['body'];
     $public_flag = util_cast_public_flag_diary($requests['public_flag']);
     $category = $requests['category'];
     $is_comment_input = $requests['is_comment_input'];
     // ----------
     $sessid = session_id();
     t_image_clear_tmp($sessid);
     $upfiles = array(1 => $_FILES['upfile_1'], $_FILES['upfile_2'], $_FILES['upfile_3']);
     $tmpfiles = array(1 => '', '', '');
     $filesize = 0;
     foreach ($upfiles as $key => $upfile) {
         if (!empty($upfile) && $upfile['error'] !== UPLOAD_ERR_NO_FILE) {
             if (!($image = t_check_image($upfile))) {
                 $_REQUEST['msg'] = '画像は' . IMAGE_MAX_FILESIZE . 'KB以内のGIF・JPEG・PNGにしてください';
                 openpne_forward('pc', 'page', 'h_diary_add');
                 exit;
             } else {
                 $filesize += $image['size'];
                 $tmpfiles[$key] = t_image_save2tmp($upfile, $sessid, "d_{$key}", $image['format']);
             }
         }
     }
     $category_list = array_unique(preg_split('/\\s+/', $category));
     if (count($category_list) > 5) {
         $_REQUEST['msg'] = 'カテゴリは5つまでしか指定できません';
         openpne_forward('pc', 'page', 'h_diary_add');
         exit;
     }
     foreach ($category_list as $value) {
         if (mb_strwidth($value) > 20) {
             $_REQUEST['msg'] = 'カテゴリはひとつにつき全角10文字(半角20文字)以内で入力してください';
             openpne_forward('pc', 'page', 'h_diary_add');
             exit;
         }
     }
     // 画像アップロード可能サイズチェック
     if ($filesize) {
         $result = util_image_check_add_image_upload($filesize, $u, 'diary');
         if ($result) {
             if ($result == 2) {
                 $result = 3;
             }
             $msg = util_image_get_upload_err_msg($result);
             $_REQUEST['msg'] = $msg;
             openpne_forward('pc', 'page', 'h_diary_add');
             exit;
         }
     }
     $this->set('inc_navi', fetch_inc_navi('h'));
     //プロフィール
     $this->set("member", db_member_c_member4c_member_id($u));
     $form_val = array("subject" => $subject, "body" => $body, "public_flag" => $public_flag, "upfile_1" => $_FILES['upfile_1'], "upfile_2" => $_FILES['upfile_2'], "upfile_3" => $_FILES['upfile_3'], "tmpfile_1" => $tmpfiles[1], "tmpfile_2" => $tmpfiles[2], "tmpfile_3" => $tmpfiles[3], "category" => join(" ", $category_list), "is_comment_input" => $is_comment_input);
     $this->set("form_val", $form_val);
     return 'success';
 }
Beispiel #6
0
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     if (!OPENPNE_USE_RANKING) {
         openpne_forward('pc', 'page', 'h_err_ranking');
         exit;
     }
     // --- リクエスト変数
     $kind = $requests['kind'];
     // ----------
     $this->set('inc_navi', fetch_inc_navi('h'));
     $this->set('kind', $kind);
     $limit = 10;
     switch ($kind) {
         case "friend":
             $list = pne_cache_call(3600, 'db_ranking_c_friend_ranking', $limit);
             foreach ($list as $key => $value) {
                 $list[$key]['c_member'] = db_member_c_member_with_profile($value['c_member_id']);
             }
             break;
         case "com_member":
             $list = pne_cache_call(3600, 'db_ranking_c_commu_member_ranking', $limit);
             foreach ($list as $key => $value) {
                 $list[$key]['c_commu'] = db_commu_c_commu4c_commu_id($value['c_commu_id']);
             }
             break;
         case "com_comment":
             $list = pne_cache_call(3600, 'db_ranking_c_commu_topic_comment_ranking', $limit);
             foreach ($list as $key => $value) {
                 $list[$key]['c_commu'] = db_commu_c_commu4c_commu_id($value['c_commu_id']);
             }
             break;
         case "ashiato":
         default:
             $list = pne_cache_call(3600, 'db_ranking_c_ashiato_ranking', $limit);
             foreach ($list as $key => $value) {
                 $list[$key]['c_member'] = db_member_c_member_with_profile($value['c_member_id']);
                 if (!$list[$key]['c_member']) {
                     unset($list[$key]);
                 }
             }
             break;
     }
     $rank_list = array();
     if ($list) {
         $rank = 1;
         $current_count = null;
         foreach ($list as $item) {
             if ($item['count'] != $current_count) {
                 $rank = $rank + count($rank_list[$rank]);
                 $current_count = $item['count'];
             }
             $rank_list[$rank][] = $item;
         }
     }
     $this->set("rank_list", $rank_list);
     return 'success';
 }
 function execute($requests)
 {
     if (!OPENPNE_USE_ALBUM) {
         handle_kengen_error();
     }
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $target_c_album_id = $requests['target_c_album_id'];
     $subject = $requests['subject'];
     $description = $requests['description'];
     $public_flag = $requests['public_flag'];
     // ----------
     //--- 権限チェック
     $c_album = db_album_get_c_album4c_album_id($target_c_album_id);
     if ($c_album['c_member_id'] != $u) {
         handle_kengen_error();
     }
     //---
     //写真データ一時ファイル削除
     $sessid = session_id();
     t_image_clear_tmp($sessid);
     $upfiles = array(1 => $_FILES['upfile_1']);
     $tmpfiles = array(1 => '');
     $filesize = 0;
     foreach ($upfiles as $key => $upfile) {
         if ($upfile['error'] !== UPLOAD_ERR_NO_FILE) {
             if (!($image = t_check_image($upfile))) {
                 $_REQUEST['msg'] = '写真は' . IMAGE_MAX_FILESIZE . 'KB以内のGIF・JPEG・PNGにしてください';
                 openpne_forward('pc', 'page', 'h_album_cover_edit');
                 exit;
             } else {
                 $filesize += $image['size'];
                 $tmpfiles[$key] = t_image_save2tmp($upfile, $sessid, "a_{$target_c_album_id}_{$key}", $image['format']);
             }
         }
     }
     // 画像アップロード可能サイズチェック
     if ($filesize) {
         $del_file = array();
         if ($c_album['album_cover_image']) {
             $del_file[] = $c_album['album_cover_image'];
         }
         $result = util_image_check_change_image_upload($filesize, $del_file, $u, 'other');
         if ($result) {
             $sessid = session_id();
             t_image_clear_tmp($sessid);
             $_REQUEST['msg'] = util_image_get_upload_err_msg($result);
             openpne_forward('pc', 'page', 'h_album_cover_edit');
             exit;
         }
     }
     $this->set('inc_navi', fetch_inc_navi("h"));
     $form_val = array("target_c_album_id" => $target_c_album_id, "subject" => $subject, "description" => $description, "public_flag" => $public_flag, "upfile_1" => $_FILES['upfile_1'], "tmpfile_1" => $tmpfiles[1]);
     $this->set("form_val", $form_val);
     return 'success';
 }
 function execute($requests)
 {
     $specify_type = $requests['specify_type'];
     $id_list_string = $requests['c_member_id_list'];
     if (!$id_list_string) {
         $error_msg = 'IDまたはメールアドレスを入力してください';
         $this->handleError($error_msg);
     }
     //改行をスペースに
     $id_list_string = str_replace("\r\n", ' ', $id_list_string);
     $id_list_string = str_replace("\n", ' ', $id_list_string);
     $id_list_string = str_replace("\r", ' ', $id_list_string);
     $id_list_string = str_replace(" ", ' ', $id_list_string);
     $id_list_parsed = explode(' ', $id_list_string);
     $c_member_id_list = array();
     foreach ($id_list_parsed as $each_id) {
         if (!$each_id) {
             continue;
         }
         switch ($specify_type) {
             case 'c_member_id':
                 $each_c_member_id = $each_id;
                 break;
             case 'mail_address':
                 if (!is_ktai_mail_address($each_id)) {
                     $each_c_member_id = db_member_c_member_id4pc_address($each_id);
                 } else {
                     $each_c_member_id = db_member_c_member_id4ktai_address2($each_id);
                 }
                 if (!$each_c_member_id) {
                     $error_msg = '無効なメールアドレスが含まれています: ' . $each_id;
                     $this->handleError($error_msg);
                 }
                 break;
             default:
                 $this->handleError('');
                 break;
         }
         if (!is_numeric($each_c_member_id)) {
             $error_msg = 'IDは整数値で指定してください: ' . $each_c_member_id;
             $this->handleError($error_msg);
         }
         if (!db_member_is_active_c_member_id($each_c_member_id)) {
             $error_msg = '無効なIDが含まれています: ' . $each_c_member_id;
             $this->handleError($error_msg);
         }
         //重複チェック
         if (in_array($each_c_member_id, $c_member_id_list)) {
             continue;
         }
         $c_member_id_list[] = intval($each_c_member_id);
     }
     $_REQUEST['c_member_ids'] = $c_member_id_list;
     openpne_forward(ADMIN_MODULE_NAME, 'page', 'send_messages');
     exit;
 }
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     if (!IS_USER_INVITE) {
         openpne_forward('pc', 'page', 'h_err_invite');
         exit;
     }
     // --- リクエスト変数
     $form_val = $requests;
     // ----------
     if (is_ktai_mail_address($form_val['mail'])) {
         $form_val['mail'] = str_replace('"', '', $form_val['mail']);
     }
     $msg = "";
     if (OPENPNE_USE_CAPTCHA && (empty($_SESSION['captcha_keystring']) || $_SESSION['captcha_keystring'] != $requests['captcha'])) {
         unset($_SESSION['captcha_keystring']);
         $msg = "確認キーワードが誤っています";
     } else {
         unset($_SESSION['captcha_keystring']);
         if (!db_common_is_mailaddress($form_val['mail'])) {
             $msg = "メールアドレスを正しく入力してください";
         } elseif (db_member_is_sns_join4mail_address($form_val['mail'])) {
             $msg = "そのメールアドレスは既に登録済みです";
         } elseif (!db_member_is_limit_domain4mail_address($form_val['mail'])) {
             $msg = "そのメールアドレスは登録できません";
         } else {
             if (is_ktai_mail_address($form_val['mail'])) {
                 //<PCKTAI
                 if (!((OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_KTAI) >> 1)) {
                     $msg = "携帯メールアドレスには招待を送ることができません";
                 }
                 //>
             } else {
                 //<PCKTAI
                 if (!(OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC)) {
                     $msg = "PCメールアドレスには招待を送ることができません";
                 }
                 //>
             }
         }
     }
     if ($msg) {
         $_REQUEST['msg'] = $msg;
         openpne_forward('pc', 'page', "h_invite");
         exit;
     }
     $this->set('inc_navi', fetch_inc_navi("h"));
     $this->set('form_val', $form_val);
     $this->set('SNS_NAME', SNS_NAME);
     $random_string = do_common_create_password();
     $_SESSION['captcha_confirm'] = $random_string;
     $this->set('captcha_confirm', md5($random_string));
     return 'success';
 }
Beispiel #10
0
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     if (!IS_USER_INVITE) {
         openpne_forward('pc', 'page', 'h_err_invite');
         exit;
     }
     $this->set('inc_navi', fetch_inc_navi('h'));
     $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'];
     // ----------
     list($event, $errors) = p_c_event_add_confirm_event4request(true);
     if ($event['invite_period_year'] . $event['invite_period_month'] . $event['invite_period_day'] != '') {
         $invite_period = $event['invite_period_year'] . "-" . $event['invite_period_month'] . "-" . $event['invite_period_day'];
     } else {
         $invite_period = '';
     }
     //--- 権限チェック
     //イベント管理者 or コミュニティ管理者
     if (!db_commu_is_c_event_admin($c_commu_topic_id, $u) && !db_commu_is_c_commu_admin($event['c_commu_id'], $u)) {
         handle_kengen_error();
     }
     //---
     //エラーチェック
     $err_msg = $errors;
     if (!$event['open_date_month'] || !$event['open_date_day'] || !$event['open_date_year']) {
         $err_msg[] = "開催日時を入力してください";
     } elseif (!t_checkdate($event['open_date_month'], $event['open_date_day'], $event['open_date_year'])) {
         $err_msg[] = "開催日時は存在しません";
     } elseif (mktime(0, 0, 0, $event['open_date_month'], $event['open_date_day'], $event['open_date_year']) < mktime(0, 0, 0)) {
         $err_msg[] = "開催日時は過去に指定できません";
     }
     if ($event['invite_period_month'] . $event['invite_period_day'] . $event['invite_period_year'] != "") {
         if (!$event['invite_period_month'] || !$event['invite_period_day'] || !$event['invite_period_year']) {
             $err_msg[] = "募集期限は存在しません";
         } elseif (!t_checkdate($event['invite_period_month'], $event['invite_period_day'], $event['invite_period_year'])) {
             $err_msg[] = "募集期限は存在しません";
         } elseif (mktime(0, 0, 0, $event['invite_period_month'], $event['invite_period_day'], $event['invite_period_year']) < mktime(0, 0, 0)) {
             $err_msg[] = "募集期限は過去に指定できません";
         } elseif (mktime(0, 0, 0, $event['open_date_month'], $event['open_date_day'], $event['open_date_year']) < mktime(0, 0, 0, $event['invite_period_month'], $event['invite_period_day'], $event['invite_period_year'])) {
             $err_msg[] = "募集期限は開催日時より未来に指定できません";
         }
     }
     if ($err_msg) {
         $_REQUEST = $event;
         $_REQUEST['err_msg'] = $err_msg;
         $_REQUEST['target_c_commu_topic_id'] = $c_commu_topic_id;
         openpne_forward('ktai', 'page', "c_event_edit");
         exit;
     }
     $update_c_commu_topic = array('name' => $event['title'], 'open_date' => $event['open_date_year'] . "-" . $event['open_date_month'] . "-" . $event['open_date_day'], 'open_date_comment' => $event['open_date_comment'], 'open_pref_id' => $event['open_pref_id'], 'open_pref_comment' => $event['open_pref_comment'], 'invite_period' => $invite_period, 'event_flag' => 1, 'capacity' => $event['capacity']);
     db_commu_update_c_commu_topic($c_commu_topic_id, $update_c_commu_topic);
     $update_c_commu_topic_comment = array('body' => $event['detail']);
     db_commu_update_c_commu_topic_comment($c_commu_topic_id, $update_c_commu_topic_comment);
     $p = array('target_c_commu_topic_id' => $c_commu_topic_id);
     openpne_redirect('ktai', 'page_c_bbs', $p);
 }
 function execute($requests)
 {
     if (!OPENPNE_USE_ALBUM) {
         handle_kengen_error();
     }
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $target_c_album_id = $requests['target_c_album_id'];
     $subject = $requests['subject'];
     $description = $requests['description'];
     $public_flag = $requests['public_flag'];
     $tmpfile_1 = $requests['tmpfile_1'];
     // ----------
     //--- 権限チェック
     $c_album = db_album_get_c_album4c_album_id($target_c_album_id);
     if ($c_album['c_member_id'] != $u) {
         handle_kengen_error();
     }
     //---
     //---画像アップロードサイズチェック
     if ($tmpfile_1) {
         $del_file = array();
         $filesize = util_image_get_c_tmp_filesize4filename("a_{$target_c_album_id}_1", $tmpfile_1);
         if ($c_album['album_cover_image']) {
             $del_file[] = $c_album['album_cover_image'];
         }
         $result = util_image_check_change_image_upload($filesize, $del_file, $u, 'other');
         if ($result) {
             $sessid = session_id();
             t_image_clear_tmp($sessid);
             $_REQUEST['msg'] = util_image_get_upload_err_msg($result);
             openpne_forward('pc', 'page', 'h_album_cover_edit');
             exit;
         }
     }
     $filename_1 = '';
     $c_album_cover = $c_album['album_cover_image'];
     if ($tmpfile_1) {
         db_album_image_data_delete($c_album_cover, $u);
         $filename_1 = image_insert_c_image4tmp("a_{$target_c_album_id}_1", $tmpfile_1, $u, 'other');
     }
     $sessid = session_id();
     t_image_clear_tmp($sessid);
     //アルバムデータの変更
     db_album_update_c_album_cover($target_c_album_id, $subject, $description, $filename_1, $public_flag);
     $p = array('target_c_album_id' => $target_c_album_id);
     openpne_redirect('pc', 'page_fh_album', $p);
 }
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $name = $requests['name'];
     $c_commu_category_id = $requests['c_commu_category_id'];
     $info = $requests['info'];
     $is_admit = $requests['is_admit'];
     $is_open = $requests['is_open'];
     $tmpfile = $requests['tmpfile'];
     $err_msg = array();
     if (db_commu_is_commu4c_commu_name($name)) {
         $err_msg[] = 'その' . WORD_COMMUNITY . 'はすでに存在します';
     }
     if (!db_commu_c_commu_category_is_create_commu($c_commu_category_id)) {
         $err_msg[] = '指定されたカテゴリは選択できません';
     }
     // 画像アップロード可能サイズチェック
     if ($tmpfile) {
         $filesize = util_image_get_c_tmp_filesize4filename("c_{$c_commu_id}", $tmpfile);
         $result = util_image_check_add_image_upload($filesize, $u, 'other');
         if ($result) {
             $err_msg[] = util_image_get_upload_err_msg($result);
         }
     }
     if ($err_msg) {
         $_REQUEST['err_msg'] = $err_msg;
         openpne_forward('pc', 'page', "h_com_add");
         exit;
     }
     // ----------
     // コミュニティ作成
     $c_commu_id = db_commu_insert_c_commu($u, $name, $c_commu_category_id, $info, $is_admit, $is_open);
     if ($tmpfile) {
         $filename = image_insert_c_image4tmp("c_{$c_commu_id}", $tmpfile, $u);
         t_image_clear_tmp(session_id());
         // 画像更新
         if ($filename) {
             db_commu_update_c_commu_image_filename($c_commu_id, $filename);
         }
     }
     //作成者をコミュメンバーにする
     db_commu_join_c_commu($c_commu_id, $u);
     $p = array('target_c_commu_id' => $c_commu_id);
     openpne_redirect('pc', 'page_c_home', $p);
 }
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $id = $requests['id'];
     $is_check = $requests['is_check'];
     $writer_name = $requests['writer_name'];
     $sort_order = $requests['sort_order'];
     $writer_id = $requests['writer_id'];
     $memo = $requests['memo'];
     $is_done = $requests['is_done'];
     $due_year = $requests['due_year'];
     $due_month = $requests['due_month'];
     $due_day = $requests['due_day'];
     $priority = $requests['priority'];
     $biz_group_id = $requests['biz_group_id'];
     $public_flag = $requests['public_flag'];
     // ----------
     if (!biz_isPermissionTodo($u, $id)) {
         handle_kengen_error();
     }
     if (empty($memo)) {
         $_REQUEST['msg'] = 'Todoの内容を入力してください';
         openpne_forward('biz', 'page', 'fh_home_edit_biz_todo');
         exit;
     }
     if (!$biz_group_id && $public_flag == 'group') {
         $_REQUEST['msg'] = '「グループまで公開」Todoの場合はグループを指定してください';
         openpne_forward('biz', 'page', 'fh_home_edit_biz_todo');
         exit;
     }
     if ($is_check && $public_flag == 'private') {
         $_REQUEST['msg'] = '公開範囲が「公開しない」のTodoは共有できません';
         openpne_forward('biz', 'page', 'fh_home_edit_biz_todo');
         exit;
     }
     $member_info = db_member_c_member4c_member_id_LIGHT($writer_id);
     $todo_info = biz_getTodo($id);
     $due_datetime = $due_year . '-' . $due_month . '-' . $due_day . ' 00:00:00';
     if (!$todo_info['c_member_id'] && !$is_check) {
         $todo_info['c_member_id'] = $writer_id;
     }
     biz_editTodo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id, $is_done, $due_datetime, $priority, $biz_group_id, $public_flag);
     openpne_redirect('pc', 'page_h_home');
 }
Beispiel #15
0
 function execute($requests)
 {
     $server =& openid_util_get_server();
     $openid_request = $server->decodeRequest();
     $response = null;
     if (in_array($openid_request->mode, array('checkid_immediate', 'checkid_setup'))) {
         if ($openid_request->immediate) {
             $response = $openid_request->answer(false);
         } else {
             openpne_forward('openid', 'page', 'server_confirm');
             exit;
         }
     } else {
         $response = $server->handleRequest($openid_request);
     }
     $webresponse = $server->encodeResponse($response);
     openid_util_write_response($webresponse);
 }
 function execute($requests)
 {
     $tail = $GLOBALS['KTAI_URL_TAIL'];
     $u = $GLOBALS['KTAI_C_MEMBER_ID'];
     // --- リクエスト変数
     $c_member_id_to = $requests['c_member_id_to'];
     $subject = $requests['subject'];
     $body = $requests['body'];
     $save = $requests['save'];
     // ----------
     //--- 権限チェック
     //自分以外
     if ($c_member_id_to == $u) {
         handle_kengen_error();
     }
     // アクセスブロック
     if (db_member_is_access_block($u, $c_member_id_to)) {
         openpne_redirect('ktai', 'page_h_access_block');
     }
     //---
     if (is_null($subject) || $subject === '') {
         $_REQUEST['target_c_member_id'] = $c_member_id_to;
         $_REQUEST['msg'] = 2;
         openpne_forward('ktai', 'page', 'f_message_send');
         exit;
     }
     if (is_null($body) || $body === '') {
         $_REQUEST['target_c_member_id'] = $c_member_id_to;
         $_REQUEST['msg'] = 1;
         openpne_forward('ktai', 'page', 'f_message_send');
         exit;
     }
     if (is_null($save)) {
         // メッセージ送信
         db_message_send_message($u, $c_member_id_to, $subject, $body);
         $p = array('target_c_member_id' => $c_member_id_to);
         openpne_redirect('ktai', 'page_f_home', $p);
     } else {
         // 下書きメッセージ保存
         db_message_insert_message_to_is_save($c_member_id_to, $u, $subject, $body, '0');
         $p = array('box' => 'savebox');
         openpne_redirect('ktai', 'page_h_message_box', $p);
     }
 }
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $c_commu_topic_id = $requests['target_c_commu_topic_id'];
     // ----------
     //-- 権限チェック
     $err_msg = array();
     $c_topic = db_commu_c_topic4c_commu_topic_id_2($c_commu_topic_id);
     $c_commu_id = $c_topic['c_commu_id'];
     $status = db_common_commu_status($u, $c_commu_id);
     if (!$status['is_commu_member']) {
         handle_kengen_error();
     }
     if (!$c_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) {
         $err_msg[] = 'すでにイベントに参加しています。';
         $_REQUEST['err_msg'] = $err_msg;
         openpne_forward('pc', 'page', 'c_event_detail');
         exit;
     }
     if (!db_commu_is_event_join_capacity($c_commu_topic_id)) {
         $err_msg[] = 'イベントの参加者数制限を超えています';
         $_REQUEST['err_msg'] = $err_msg;
         openpne_forward('pc', 'page', "c_event_detail");
         exit;
     }
     if (!db_commu_is_event_join_date($c_commu_topic_id)) {
         $err_msg[] = 'イベントの募集期限が過ぎています';
         $_REQUEST['err_msg'] = $err_msg;
         openpne_forward('pc', 'page', "c_event_detail");
         exit;
     }
     db_commu_insert_c_event_member($c_commu_topic_id, $u);
     $p = array('target_c_commu_topic_id' => $c_commu_topic_id);
     openpne_redirect('pc', 'page_c_event_detail', $p);
 }
Beispiel #18
0
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     if (!IS_USER_INVITE) {
         openpne_forward('pc', 'page', 'h_err_invite');
         exit;
     }
     $this->set('inc_navi', fetch_inc_navi('h'));
     if (OPENPNE_AUTH_MODE == 'slavepne') {
         $inviting_member = array();
         $k_inviting_member = array();
     } else {
         $inviting_member = db_member_inviting_member4c_member_id($u);
         $k_inviting_member = db_member_inviting_member4c_member_id2($u);
     }
     $this->set('inviting_member', $inviting_member);
     $this->set('k_inviting_member', $k_inviting_member);
     return 'success';
 }
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $keyword = $requests['keyword'];
     $page = $requests['page'];
     $type = $requests['type'];
     $c_commu_id = $requests['c_commu_id'];
     $target_commu = $requests['target_commu'];
     // ----------
     if ($target_commu == 'all') {
         openpne_forward('ktai', 'page', 'h_com_topic_find_all');
         exit;
     }
     //--- 権限チェック
     //掲示板閲覧権限
     if (!db_commu_is_c_commu_view4c_commu_idAc_member_id($c_commu_id, $u)) {
         handle_kengen_error();
     }
     //バグ回避のため全角空白を半角空白に統一
     $keyword = str_replace(" ", " ", $keyword);
     do_common_insert_search_log($u, $keyword);
     $page_size = 20;
     $this->set('page', $page);
     //検索結果
     list($result, $is_prev, $is_next, $total_num, $start_num, $end_num) = db_commu_search_c_commu_topic($keyword, $page_size, $page, $type, $c_commu_id);
     $this->set('c_commu_topic_search_list', $result);
     $this->set('is_prev', $is_prev);
     $this->set('is_next', $is_next);
     $this->set('total_num', $total_num);
     $this->set('start_num', $start_num);
     $this->set('end_num', $end_num);
     $this->set('keyword', $keyword);
     $search_val_list = array('type' => $type);
     $this->set('search_val_list', $search_val_list);
     $this->set('c_commu_id', $c_commu_id);
     if ($c_commu_id) {
         $this->set('c_commu', db_commu_c_commu4c_commu_id($c_commu_id));
     }
     return 'success';
 }
Beispiel #20
0
 function execute($requests)
 {
     $module_name = ADMIN_MODULE_NAME;
     $send_type = $requests['send_type'];
     if (empty($requests['c_member_ids'])) {
         admin_client_redirect('list_c_member');
     }
     // 送信者はとりあえず1番で固定
     $c_member_id_from = 1;
     $send_num = 0;
     foreach ($requests['c_member_ids'] as $key => $c_member_id) {
         if ($c_member_id_from == $c_member_id) {
             $c_member_id_list[$key] = null;
             continue;
         }
         switch ($send_type) {
             case "mail":
                 do_admin_send_mail($c_member_id, $requests['subject'], $requests['body']);
                 break;
             case "message":
                 do_admin_send_message($c_member_id_from, $c_member_id, $requests['subject'], $requests['body']);
                 break;
             default:
                 openpne_forward($module_name, 'page', 'send_messages');
                 exit;
                 break;
         }
         $send_num++;
     }
     //送信履歴登録
     db_admin_insert_c_send_messages_history($requests['subject'], $requests['body'], $send_num, $send_type, $requests['c_member_ids']);
     switch ($send_type) {
         case "mail":
             $sended_name = "メール";
             break;
         case "message":
             $sended_name = "メッセージ";
             break;
     }
     admin_client_redirect('top', $sended_name . 'を送信しました');
 }
 function execute($requests)
 {
     $tail = $GLOBALS['KTAI_URL_TAIL'];
     $u = $GLOBALS['KTAI_C_MEMBER_ID'];
     // --- リクエスト変数
     $subject = $requests['subject'];
     $body = $requests['body'];
     $public_flag = util_cast_public_flag_diary($requests['public_flag']);
     $target_c_diary_id = $requests['target_c_diary_id'];
     $is_comment_input = $requests['is_comment_input'];
     // ----------
     if (is_null($subject) || $subject === '') {
         $_REQUEST['msg'] = 2;
         openpne_forward('ktai', 'page', 'h_diary_edit');
         exit;
     }
     if (is_null($body) || $body === '') {
         $_REQUEST['msg'] = 1;
         openpne_forward('ktai', 'page', 'h_diary_edit');
         exit;
     }
     if (!$target_c_diary_id) {
         // 新規作成
         $target_c_diary_id = db_diary_insert_c_diary($u, $subject, $body, $public_flag, $is_comment_input);
         if (OPENPNE_USE_POINT_RANK) {
             //日記を書いた人にポイント付与
             $point = db_action_get_point4c_action_id(4);
             db_point_add_point($u, $point);
         }
     } else {
         // 編集
         $c_diary = db_diary_get_c_diary4id($target_c_diary_id);
         if ($c_diary['c_member_id'] != $u) {
             handle_kengen_error();
         }
         db_diary_update_c_diary($target_c_diary_id, $subject, $body, $public_flag, $is_comment_input);
     }
     $p = array('target_c_member_id' => $u);
     openpne_redirect('ktai', 'page_fh_diary_list', $p);
 }
 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'];
     // ----------
     $upfile_obj = $_FILES['image_filename'];
     //表紙の写真
     if (!empty($upfile_obj) && $upfile_obj['error'] !== UPLOAD_ERR_NO_FILE) {
         if (!($image = t_check_image($upfile_obj))) {
             $err_msg[] = '写真は' . IMAGE_MAX_FILESIZE . 'KB以内のGIF・JPEG・PNGにしてください';
         } else {
             // 画像アップロード可能サイズチェック
             $result = util_image_check_add_image_upload($image['size'], $u, 'other');
             if ($result) {
                 $err_msg[] = util_image_get_upload_err_msg($result);
             }
         }
     }
     if ($err_msg) {
         $_REQUEST['err_msg'] = $err_msg;
         openpne_forward('pc', 'page', "h_album_add");
         exit;
     }
     $this->set('inc_navi', fetch_inc_navi('h'));
     //写真をvar/tmpフォルダにコピー
     $sessid = session_id();
     t_image_clear_tmp($sessid);
     if (file_exists($upfile_obj["tmp_name"])) {
         $tmpfile = t_image_save2tmp($upfile_obj, $sessid, "c");
     }
     $form_val = array("subject" => $subject, "description" => $description, "public_flag" => $public_flag, 'tmpfile' => $tmpfile, 'image_filename' => $upfile_obj['name']);
     $this->set("form_val", $form_val);
     return 'success';
 }
Beispiel #23
0
 function execute($requests)
 {
     //外部認証の場合はリダイレクト
     check_action4pne_slave(false);
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $old_password = $requests['old_password'];
     $new_password = $requests['new_password'];
     $new_password2 = $requests['new_password2'];
     // ----------
     $msg_list = array();
     if (!$new_password) {
         $msg_list[] = "パスワードを入力してください";
     }
     if (!$new_password2) {
         $msg_list[] = "パスワード(確認)を入力してください";
     }
     if ($new_password !== $new_password2) {
         $msg_list[] = "パスワードが一致しません";
     }
     if (!ctype_alnum($new_password) || strlen($new_password) < 6 || strlen($new_password) > 12) {
         $msg_list[] = "パスワードは6~12文字の半角英数で入力してください";
     }
     if (!$msg_list && !db_common_authenticate_password($u, $old_password)) {
         $msg_list[] = "現在のパスワードが違います";
     }
     // error
     if ($msg_list) {
         $_REQUEST['msg'] = array_shift($msg_list);
         openpne_forward('pc', 'page', "h_config");
         exit;
     }
     db_member_update_password($u, $new_password);
     $GLOBALS['AUTH']->logout();
     $p = array('msg_code' => 'change_password');
     openpne_redirect('pc', 'page_o_tologin', $p);
 }
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $category_id = $requests['category_id'];
     $asin = $requests['asin'];
     $body = $requests['body'];
     $satisfaction_level = $requests['satisfaction_level'];
     $err_msg = $requests['err_msg'];
     // ----------
     // c_reviewをAmazonの最新データに更新
     $c_review_id = db_review_c_review_id4asin($asin);
     db_review_update_old_c_review($c_review_id);
     // 登録済みならh_review_editへ飛ばす
     $c_review_comment = db_review_add_write_c_review_comment4asin_c_member_id($asin, $u);
     if ($c_review_comment) {
         $_REQUEST['c_review_id'] = $c_review_comment['c_review_id'];
         $_REQUEST['asin'] = $asin;
         openpne_forward('pc', 'page', "h_review_edit");
         exit;
     }
     $this->set('inc_navi', fetch_inc_navi("h"));
     $satisfaction = array("5" => "★★★★★ 5", "4" => "★★★★ 4", "3" => "★★★ 3", "2" => "★★ 2", "1" => "★ 1");
     $this->set('category_id', $category_id);
     $this->set('asin', $asin);
     $this->set('body', $body);
     $this->set('satisfaction_level', $satisfaction_level);
     $this->set('satisfaction', $satisfaction);
     $this->set('err_msg', $err_msg);
     $product = db_review_write_product4asin($asin);
     if (!$product) {
         handle_kengen_error();
     }
     $this->set('product', $product);
     return 'success';
 }
 function execute($requests)
 {
     $tail = $GLOBALS['KTAI_URL_TAIL'];
     $u = $GLOBALS['KTAI_C_MEMBER_ID'];
     // --- リクエスト変数
     $subject = $requests['subject'];
     $description = $requests['description'];
     $public_flag = util_cast_public_flag_diary($requests['public_flag']);
     $target_c_album_id = $requests['target_c_album_id'];
     // ----------
     if (is_null($subject) || $subject === '') {
         $_REQUEST['msg'] = 2;
         openpne_forward('ktai', 'page', 'h_album_edit');
         exit;
     }
     if (is_null($description) || $description === '') {
         $_REQUEST['msg'] = 51;
         openpne_forward('ktai', 'page', 'h_album_edit');
         exit;
     }
     if (!$target_c_album_id) {
         // 新規作成
         $target_c_album_id = db_album_insert_c_album($u, $subject, $description, $public_flag);
         $p = array('target_c_album_id' => $target_c_album_id);
         openpne_redirect('ktai', 'page_h_album_add_end', $p);
     } else {
         // 編集
         $c_album = db_album_get_c_album4c_album_id($target_c_album_id);
         if ($c_album['c_member_id'] != $u) {
             handle_kengen_error();
         }
         db_album_update_c_album($target_c_album_id, $subject, $description, $public_flag);
         $p = array('target_c_album_id' => $target_c_album_id);
         openpne_redirect('ktai', 'page_fh_album', $p);
     }
 }
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $c_commu_id = $requests['target_c_commu_id'];
     $c_commu_review_id = $requests['target_c_commu_review_id'];
     // ----------
     if (!$c_commu_review_id) {
         $_REQUEST['target_c_commu_id'] = $c_commu_id;
         openpne_forward('pc', 'page', "c_member_review");
         exit;
     }
     //--- 権限チェック
     //管理者 or レビュー登録者
     $c_commu_review = db_review_get_c_commu_review_one4c_commu_review_id($c_commu_review_id);
     if (!db_commu_is_c_commu_admin($c_commu_id, $u) && $c_commu_review['c_member_id'] != $u) {
         handle_kengen_error();
     }
     //---
     $this->set('c_commu_id', $c_commu_id);
     $this->set('c_commu_review_id', $c_commu_review_id);
     $this->set('inc_navi', fetch_inc_navi('c', $c_commu_id));
     return 'success';
 }
 function execute($requests)
 {
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $target_c_diary_id = $requests['target_c_diary_id'];
     $tmpfile_1 = $requests['tmpfile_1'];
     $tmpfile_2 = $requests['tmpfile_2'];
     $tmpfile_3 = $requests['tmpfile_3'];
     $body = $requests['body'];
     // ----------
     if (is_null($body) || $body === '') {
         $p = array('target_c_diary_id' => $target_c_diary_id, 'msg' => "コメントを入力してださい");
         openpne_redirect('pc', 'page_fh_diary', $p);
     }
     //--- 権限チェック
     $c_diary = db_diary_get_c_diary4id($target_c_diary_id);
     $target_c_member_id = $c_diary['c_member_id'];
     $target_c_member = db_member_c_member4c_member_id($target_c_member_id);
     if ($u != $target_c_member_id) {
         // check public_flag
         if (!pne_check_diary_public_flag($target_c_diary_id, $u)) {
             openpne_redirect('pc', 'page_h_err_diary_access');
         }
         //アクセスブロック設定
         if (db_member_is_access_block($u, $target_c_member_id)) {
             openpne_redirect('pc', 'page_h_access_block');
         }
     }
     //日記コメント停止設定
     if (OPENPNE_USE_DIARY_COMMENT && !$c_diary['is_comment_input']) {
         openpne_forward('pc', 'page', 'fh_diary');
         exit;
     }
     if (!db_diary_is_writable_comment4c_diary_id($target_c_diary_id)) {
         $_REQUEST['msg'] = 'コメントが1000番に達したので、この' . WORD_DIARY . 'にはコメントできません';
         openpne_forward('pc', 'page', 'fh_diary');
         exit;
     }
     //---
     //---画像アップロードサイズチェック
     $filesize = 0;
     if ($tmpfile_1) {
         $filesize += util_image_get_c_tmp_filesize4filename("dc_{$c_diary_comment_id}_1", $tmpfile_1);
     }
     if ($tmpfile_2) {
         $filesize += util_image_get_c_tmp_filesize4filename("dc_{$c_diary_comment_id}_2", $tmpfile_2);
     }
     if ($tmpfile_3) {
         $filesize += util_image_get_c_tmp_filesize4filename("dc_{$c_diary_comment_id}_3", $tmpfile_3);
     }
     if ($filesize) {
         $result = util_image_check_add_image_upload($filesize, $u, 'diary');
         if ($result) {
             if ($result == 2) {
                 $result = 3;
             }
             $_REQUEST['msg'] = util_image_get_upload_err_msg($result);
             openpne_forward('pc', 'page', 'fh_diary');
             exit;
         }
     }
     //日記コメント書き込み
     $c_diary_comment_id = db_diary_insert_c_diary_comment($u, $target_c_diary_id, $body);
     $sessid = session_id();
     $filename_1 = image_insert_c_image4tmp("dc_{$c_diary_comment_id}_1", $tmpfile_1, $u);
     $filename_2 = image_insert_c_image4tmp("dc_{$c_diary_comment_id}_2", $tmpfile_2, $u);
     $filename_3 = image_insert_c_image4tmp("dc_{$c_diary_comment_id}_3", $tmpfile_3, $u);
     t_image_clear_tmp($sessid);
     db_diary_insert_c_diary_comment_images($c_diary_comment_id, $filename_1, $filename_2, $filename_3);
     //日記コメント記入履歴更新
     if ($u != $target_c_member_id) {
         db_diary_insert_c_diary_comment_log($u, $target_c_diary_id);
     }
     db_diary_update_c_diary_comment_log($target_c_diary_id);
     //日記コメントが書き込まれたので日記自体を未読扱いにする
     db_diary_update_c_diary_is_checked($target_c_diary_id, 0);
     // お知らせメール送信(携帯へ)
     if ($u != $target_c_member_id) {
         send_diary_comment_info_mail($c_diary_comment_id, $u);
     }
     if (OPENPNE_USE_POINT_RANK) {
         // コメント者と被コメント者が違う場合にポイント加算
         if ($u != $target_c_member_id) {
             //書いた人にポイント付与
             $point = db_action_get_point4c_action_id(3);
             db_point_add_point($u, $point);
             //書かれた人にポイント付与
             $point = db_action_get_point4c_action_id(2);
             db_point_add_point($target_c_member_id, $point);
         }
     }
     $p = array('target_c_diary_id' => $target_c_diary_id, 'comment_count' => db_diary_count_c_diary_comment4c_diary_id($target_c_diary_id));
     openpne_redirect('pc', 'page_fh_diary', $p);
 }
 function handleError($errors)
 {
     $_REQUEST['err_msg'] = $errors;
     openpne_forward('pc', 'page', 'h_review_add_write', $errors);
     exit;
 }
 function execute($requests)
 {
     if (!OPENPNE_USE_ALBUM) {
         handle_kengen_error();
     }
     $u = $GLOBALS['AUTH']->uid();
     // --- リクエスト変数
     $target_c_album_id = $requests['target_c_album_id'];
     $subject = $requests['subject'];
     $image_description1 = $requests['image_description1'];
     $image_description2 = $requests['image_description2'];
     $image_description3 = $requests['image_description3'];
     $image_description4 = $requests['image_description4'];
     $image_description5 = $requests['image_description5'];
     // ----------
     $c_album = db_album_get_c_album4c_album_id($target_c_album_id);
     if ($c_album['c_member_id'] != $u) {
         handle_kengen_error();
     }
     $sessid = session_id();
     t_image_clear_tmp($sessid);
     $upfiles = array(1 => $_FILES['upfile_1'], $_FILES['upfile_2'], $_FILES['upfile_3'], $_FILES['upfile_4'], $_FILES['upfile_5']);
     $tmpfiles = array(1 => '', '', '', '', '');
     $is_set_file = false;
     foreach ($upfiles as $key => $upfile) {
         if ($upfile['name']) {
             $is_set_file = true;
             break;
         }
     }
     if (!$is_set_file) {
         $_REQUEST['msg'] = '写真を指定してください';
         openpne_forward('pc', 'page', 'h_album_image_add');
         exit;
     }
     $filesize_all = 0;
     foreach ($upfiles as $key => $upfile) {
         if ($upfile['error'] !== UPLOAD_ERR_NO_FILE) {
             if (!($image = t_check_image($upfile))) {
                 $_REQUEST['msg'] = '写真は' . IMAGE_MAX_FILESIZE . 'KB以内のGIF・JPEG・PNGにしてください';
                 openpne_forward('pc', 'page', 'h_album_image_add');
                 exit;
             } else {
                 $filesize_all += $image['size'];
                 $tmpfiles[$key] = t_image_save2tmp($upfile, $sessid, "a_{$target_c_album_id}_{$key}", $image['format']);
             }
         }
     }
     // 画像アップロード可能サイズチェック
     $result = util_image_check_add_image_upload($filesize_all, $u, 'album');
     if ($result) {
         if ($result == 2) {
             $result = 3;
         }
         t_image_clear_tmp($sessid);
         $msg = util_image_get_upload_err_msg($result);
         $p = array('msg' => $msg, 'target_c_album_id' => $target_c_album_id);
         openpne_redirect('pc', 'page_h_album_image_add', $p);
     }
     if (!db_album_is_insertable4c_member_id($u, $filesize_all)) {
         t_image_clear_tmp($sessid);
         $msg = 'これ以上写真を投稿することができません。';
         if (!db_album_is_insertable4c_member_id($u)) {
             $msg .= '登録済みの写真を削除してからやり直してください。';
         } else {
             $msg .= '投稿する写真を減らすか、ファイルサイズを変更してやり直してください。';
         }
         $p = array('msg' => $msg, 'target_c_album_id' => $target_c_album_id);
         openpne_redirect('pc', 'page_h_album_image_add', $p);
     }
     $this->set('inc_navi', fetch_inc_navi('h'));
     $form_val = array("target_c_album_id" => $target_c_album_id, "subject" => $subject, "upfile_1" => $_FILES['upfile_1'], "upfile_2" => $_FILES['upfile_2'], "upfile_3" => $_FILES['upfile_3'], "upfile_4" => $_FILES['upfile_4'], "upfile_5" => $_FILES['upfile_5'], "tmpfile_1" => $tmpfiles[1], "tmpfile_2" => $tmpfiles[2], "tmpfile_3" => $tmpfiles[3], "tmpfile_4" => $tmpfiles[4], "tmpfile_5" => $tmpfiles[5]);
     //ファイル写真を指定しているものだけ説明文を設定
     foreach ($tmpfiles as $key => $tmpfile) {
         $name = "image_description{$key}";
         if ($tmpfile) {
             $form_val["{$name}"] = ${$name};
         }
     }
     $this->set("form_val", $form_val);
     return 'success';
 }
<?php

/**
 * Start point of Shibboleth authentication on OpenPNE
 */
chdir('../');
require_once './config.inc.php';
require_once OPENPNE_WEBAPP_DIR . '/init.inc';
openpne_forward('shibboleth', 'do', 'login');