function execute($requests) { $custom_css = $requests['custom_css']; $meta_description = $requests['meta_description']; $meta_keywords = $requests['meta_keywords']; $tmp1 = db_portal_config(PORTAL_CONFIG_CUSTOM_CSS); if (!isset($tmp1)) { db_portal_insert_portal_config(PORTAL_CONFIG_CUSTOM_CSS, $custom_css); } else { db_portal_update_portal_config(PORTAL_CONFIG_CUSTOM_CSS, $custom_css); } $tmp2 = db_portal_config(PORTAL_CONFIG_META_DESCRIPTION); if (!isset($tmp2)) { db_portal_insert_portal_config(PORTAL_CONFIG_META_DESCRIPTION, $meta_description); } else { db_portal_update_portal_config(PORTAL_CONFIG_META_DESCRIPTION, $meta_description); } $tmp3 = db_portal_config(PORTAL_CONFIG_META_KEYWORDS); if (!isset($tmp3)) { db_portal_insert_portal_config(PORTAL_CONFIG_META_KEYWORDS, $meta_keywords); } else { db_portal_update_portal_config(PORTAL_CONFIG_META_KEYWORDS, $meta_keywords); } portal_client_redirect('edit_other', 'その他設定を変更しました'); }
function execute($requests) { $color_type = $requests['color_type']; $tmp = db_portal_config(PORTAL_CONFIG_COLOR_TYPE); if (!isset($tmp)) { db_portal_insert_portal_config(PORTAL_CONFIG_COLOR_TYPE, $color_type); } else { db_portal_update_portal_config(PORTAL_CONFIG_COLOR_TYPE, $color_type); } portal_client_redirect('edit_color', '配色設定を変更しました'); }
function execute($requests) { $filename = $requests['filename']; $target_area = $requests['target_area']; $tail = '&target_area=' . urlencode($target_area); if (!db_portal_imaage4filename($filename)) { portal_client_redirect('edit_portal_image', '画像を削除できませんでした', $tail); } db_image_data_delete($filename); db_portal_delete_portal_image($filename); portal_client_redirect('edit_portal_image', '画像を削除しました', $tail); }
function execute($requests) { $layout_type = $requests['layout_type']; // // 登録されていない場合のみinsert // $tmp = db_portal_config(PORTAL_CONFIG_LAYOUT_TYPE); if (!isset($tmp)) { db_portal_insert_portal_config(PORTAL_CONFIG_LAYOUT_TYPE, $layout_type); } else { db_portal_update_portal_config(PORTAL_CONFIG_LAYOUT_TYPE, $layout_type); } portal_client_redirect('edit_layout', 'レイアウト設定を変更しました'); }
function execute($requests) { $use_portal = $requests['use_portal']; $tmp = db_portal_config('USE_PORTAL_KTAI'); if (!isset($tmp)) { db_portal_insert_portal_config('USE_PORTAL_KTAI', $use_portal); } else { db_portal_update_portal_config('USE_PORTAL_KTAI', $use_portal); } if ($use_portal) { $this->_replace_c_admin_config('LOGIN_URL_KTAI', openpne_gen_url('portal', 'page_portal_user_top_ktai')); $this->_replace_c_admin_config('DISPLAY_LOGIN', '0'); } else { $this->_replace_c_admin_config('LOGIN_URL_KTAI', ''); } portal_client_redirect('edit_portal_use_ktai', '携帯版ポータル使用設定を変更しました'); }
function execute($requests) { // 選択肢に重複位置がないかどうかチェック if (!$this->validate_position($requests)) { $error_str = '複数のコンテンツを同じ場所(番号)に指定することはできません。'; portal_client_redirect('edit_contents_ktai', null, 'error_msg=' . urlencode($error_str)); } // portal_layout position db_portal_truncate_portal_layout_ktai(); foreach ($this->layout_keys as $key) { $value = $requests[$key]; if ($value != PORTAL_LAYOUT_NOUSE) { db_portal_insert_portal_layout_ktai($key, $value); } } portal_client_redirect('edit_contents_ktai', 'コンテンツ設定を変更しました'); }
function execute($requests) { // // 選択肢に重複位置がないかどうかチェック // if (!$this->validate_position($requests)) { $error_str = '複数のコンテンツを同じ場所(番号)に指定することはできません。'; portal_client_redirect('edit_contents', null, 'error_msg=' . urlencode($error_str)); } // // ヘッダテキストタイプ // unset($tmp); $tmp = db_portal_config(PORTAL_CONFIG_HEAD_TEXT_TYPE); if (!isset($tmp)) { db_portal_insert_portal_config(PORTAL_CONFIG_HEAD_TEXT_TYPE, $requests['header_text_type']); } else { db_portal_update_portal_config(PORTAL_CONFIG_HEAD_TEXT_TYPE, $requests['header_text_type']); } // // ヘッダ表示テキスト portal_configへ // unset($tmp); $tmp = db_portal_config(PORTAL_CONFIG_HEAD_TEXT); if (!isset($tmp)) { db_portal_insert_portal_config(PORTAL_CONFIG_HEAD_TEXT, $requests['header_text']); } else { db_portal_update_portal_config(PORTAL_CONFIG_HEAD_TEXT, $requests['header_text']); } // // portal_layout position // db_portal_truncate_portal_layout(); foreach ($this->layout_keys as $key) { $value = $requests[$key]; $is_image = $requests[$key . '_is_image']; if ($value != PORTAL_LAYOUT_NOUSE) { db_portal_insert_portal_layout($key, $value, $is_image); } } portal_client_redirect('edit_contents', 'コンテンツ設定を変更しました'); }
function execute($requests) { $file = $_FILES['upfile']; $target_area = $requests['target_area']; $tail = 'target_area=' . $target_area; if (empty($file) || $file['error'] === UPLOAD_ERR_NO_FILE) { portal_client_redirect('edit_portal_image', '画像ファイルを指定してください', $tail); } $file_info = t_check_image($file); if (!$file_info) { portal_client_redirect('edit_portal_image', '画像は' . IMAGE_MAX_FILESIZE . 'KB以内のGIF・JPEG・PNGにしてください', $tail); } $filename = sprintf('module_portal_%d.%s', time(), $file_info['format']); db_image_data_delete($filename); db_portal_delete_portal_image($filename); if (!admin_insert_c_image($_FILES['upfile'], $filename)) { portal_client_redirect('edit_portal_image', '画像が登録できませんでした', $tail); } db_portal_insert_portal_image($filename); portal_client_redirect('edit_portal_image', '画像を登録しました', $tail); }
function handleError($errors) { $msg = array_shift($errors); portal_client_redirect('edit_link', $msg); }
function handleError($errors) { $error_str = 'RSSのURLは半角英数で指定してください。'; portal_client_redirect('edit_rss', null, 'error_msg=' . urlencode($error_str)); }
function handleError($errors) { portal_client_redirect('edit_free_area', '入力が正しくありません'); }