本文整理汇总了PHP中handle_kengen_error函数的典型用法代码示例。如果您正苦于以下问题:PHP handle_kengen_error函数的具体用法?PHP handle_kengen_error怎么用?PHP handle_kengen_error使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了handle_kengen_error函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
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);
}
示例2: execute
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);
}
示例3: execute
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';
}
示例4: execute
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);
}
示例5: execute
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';
}
示例6: execute
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');
}
示例7: execute
function execute($requests)
{
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
// --- リクエスト変数
$target_c_album_id = $requests['target_c_album_id'];
$subject = $requests['subject'];
$description = $requests['description'];
$public_flag = $requests['public_flag'];
// ----------
if ($target_c_album_id) {
$c_album = db_album_get_c_album4c_album_id($target_c_album_id);
if ($c_album['c_member_id'] != $u) {
handle_kengen_error();
}
// 内容の不備によるリダイレクト時・編集修正時は値を上書き
if ($requests['msg'] || !(is_null($subject) || is_null($description))) {
$c_album['subject'] = $subject;
$c_album['description'] = $description;
$c_album['public_flag'] = $public_flag;
}
} else {
$c_album['subject'] = $subject;
$c_album['description'] = $description;
$c_album['public_flag'] = $public_flag ? $public_flag : "public";
}
$this->set('target_c_album', $c_album);
if (MAIL_ADDRESS_HASHED) {
$mail_address = "a{$u}-" . t_get_user_hash($u) . "@" . MAIL_SERVER_DOMAIN;
} else {
$mail_address = "album" . "@" . MAIL_SERVER_DOMAIN;
}
$mail_address = MAIL_ADDRESS_PREFIX . $mail_address;
$this->set('album_address', $mail_address);
return 'success';
}
示例8: execute
function execute($requests)
{
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
$tail = $GLOBALS['KTAI_URL_TAIL'];
// --- リクエスト変数
$target_c_member_id = $requests['target_c_member_id'];
$value = $requests['value'];
$due_datetime_y = $requests['due_datetime_y'];
$due_datetime_m = $requests['due_datetime_m'];
$due_datetime_d = $requests['due_datetime_d'];
$is_all = $requests['is_all'];
// ----------
if (!biz_isPermissionTodo($u, $id)) {
handle_kengen_error();
}
if (empty($value)) {
$p = array('msg' => 1);
ktai_biz_openpne_redirect('ktai_biz', 'page_fh_biz_todo_add', $p);
}
if ($due_datetime_y && $due_datetime_m && $due_datetime_d) {
$due_datetime = $due_datetime_y . '-' . $due_datetime_m . '-' . $due_datetime_d . ' 00:00:00';
} else {
$due_datetime = '0000-00-00 00:00:00';
}
if (is_null($target_c_member_id)) {
$target_c_member_id = $u;
}
$result = biz_insertTodo($target_c_member_id, $value, $u, 0, $is_all, $due_datetime);
$p = array('target_c_member_id' => $target_c_member_id);
ktai_biz_openpne_redirect('ktai_biz', 'page_fh_biz_todo_list', $p);
}
示例9: execute
function execute($requests)
{
$u = $GLOBALS['AUTH']->uid();
// --- リクエスト変数
$c_review_id = $requests['c_review_id'];
$page = $requests['page'];
// ----------
$page_size = 30;
// c_reviewをAmazonの最新データに更新
db_review_update_old_c_review($c_review_id);
$c_review = db_review_list_product_c_review4c_review_id($c_review_id);
if (!$c_review) {
handle_kengen_error();
}
$this->set('inc_navi', fetch_inc_navi('h'));
$this->set('c_review', $c_review);
list($c_review_list, $is_prev, $is_next, $total_num, $start_num, $end_num) = db_review_list_product_c_review_list4c_review_id($c_review_id, $page, $page_size);
$this->set('c_review_list', $c_review_list);
$this->set("is_prev", $is_prev);
$this->set("is_next", $is_next);
$this->set("page", $page);
$this->set("total_num", $total_num);
$this->set('start_num', $start_num);
$this->set('end_num', $end_num);
return 'success';
}
示例10: execute
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'));
}
示例11: execute
function execute($requests)
{
if (!OPENPNE_USE_ALBUM) {
handle_kengen_error();
}
$v = array();
$pager = array();
$page = $requests['page'];
$target_c_album_id = $requests['target_c_album_id'];
$target_c_album_image_id = $requests['target_c_album_image_id'];
$page_size = 20;
if ($target_c_album_image_id) {
$album_image_list = db_admin_c_album_image_list4c_album_image_id($page, $page_size, $pager, $target_c_album_image_id);
} else {
$album_image_list = db_admin_c_album_image_list($page, $page_size, $pager, $target_c_album_id);
}
$v['pager'] = $pager;
$this->set('album_image_list', $album_image_list);
$this->set('page', $page);
$this->set('prev', $prev);
$this->set('next', $next);
$this->set('target_c_album_id', $target_c_album_id);
$this->set('target_c_album_image_id', $target_c_album_image_id);
$this->set('total_num', $total_num);
for ($i = $page - 10 < 1 ? 1 : $page - 10; $i <= $total_page_num && $i < $page + 10; $i++) {
$page_list[] = $i;
}
$this->set('page_list', $page_list);
$this->set('start_num', ($page - 1) * $page_size + 1);
$this->set('end_num', ($page - 1) * $page_size + count($album_image_list));
$this->set($v);
return 'success';
}
示例12: execute
function execute($requests)
{
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
$tail = $GLOBALS['KTAI_URL_TAIL'];
// --- リクエスト変数
$target_c_message_id = $requests['target_c_message_id'];
$from_h_home = $requests['from_h_home'];
// ----------
// メッセージデータ取得
$c_message = db_message_c_message4c_message_id($target_c_message_id);
//--- 権限チェック
if (!util_is_readable_message($u, $target_c_message_id)) {
handle_kengen_error();
}
//---
// 既読にする
db_message_update_c_message_is_read4c_message_id($target_c_message_id, $u);
// メッセージデータ
//コミュニティおすすめメッセージのURLを置換
list($c_message['body'], $com_url, $friend_url) = k_p_h_message_ktai_url4url($c_message['body'], $tail);
//オリジナルファイル名取得
$c_message['original_filename'] = db_file_original_filename4filename($c_message['filename']);
$this->set("c_message", $c_message);
$this->set("com_url", $com_url);
$this->set("friend_url", $friend_url);
//送信箱
if ($c_message['c_member_id_from'] == $u) {
$box = 'outbox';
}
$this->set("next_c_message_id", db_message_get_c_message_next_id4c_message_id($u, $target_c_message_id, $box));
$this->set("prev_c_message_id", db_message_get_c_message_prev_id4c_message_id($u, $target_c_message_id, $box));
return 'success';
}
示例13: execute
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';
}
示例14: execute
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_topic = db_commu_c_topic4c_commu_topic_id($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 (!db_commu_is_c_topic_admin($c_commu_topic_id, $u) && !db_commu_is_c_commu_admin($c_commu_id, $u)) {
handle_kengen_error();
}
//---
if (MAIL_ADDRESS_HASHED) {
$mail_address = 'ti' . $c_commu_topic_id . '-' . t_get_user_hash($u) . "@" . MAIL_SERVER_DOMAIN;
} else {
$mail_address = 'ti' . $c_commu_topic_id . "@" . MAIL_SERVER_DOMAIN;
}
$mail_address = MAIL_ADDRESS_PREFIX . $mail_address;
$this->set('mail_address', $mail_address);
$this->set('c_topic', $c_topic);
$this->set("c_commu", db_commu_c_commu4c_commu_id2($c_commu_id));
return 'success';
}
示例15: execute
function execute($requests)
{
$u = $GLOBALS['KTAI_C_MEMBER_ID'];
$this->set('tail', $GLOBALS['KTAI_URL_TAIL']);
$target_biz_todo_id = $requests['target_biz_todo_id'];
if (!biz_isPermissionTodo($u, $target_biz_todo_id)) {
handle_kengen_error();
}
$this->set("target_biz_todo_id", $requests['target_biz_todo_id']);
$todo = biz_getTodo($requests['target_biz_todo_id']);
if (!strncmp($todo['due_datetime'], '0000', 4)) {
$todo['due_datetime'] = null;
}
$this->set("todo", $todo);
if (empty($requests['target_c_member_id']) || $requests['target_c_member_id'] == $u) {
//自分
$target_c_member_id = $u;
$this->set('is_h', true);
//判別フラグ
} else {
//他人
$target_c_member_id = $requests['target_c_member_id'];
$this->set('is_f', true);
//判別フラグ
}
$this->set('target_c_member_id', $target_c_member_id);
return 'success';
}