コード例 #1
0
 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';
 }
コード例 #2
0
 function execute($requests)
 {
     $v = array();
     // 表示位置の数値 10-14 20-44
     $potal_layout_position = array();
     $potal_layout_position[PORTAL_LAYOUT_NOUSE] = "表示しない";
     for ($i = 10; $i <= 14; $i++) {
         $potal_layout_position[$i] = $i;
     }
     for ($i = 20; $i <= 44; $i++) {
         $potal_layout_position[$i] = $i;
     }
     //ヘッダ表示テキスト
     $data = db_portal_config(PORTAL_CONFIG_HEAD_TEXT);
     $v['portal_config']['header_text'] = $data['value'];
     unset($data);
     //ヘッダ表示テキスト形式 設定がない場合はSNS
     $data = db_portal_config(PORTAL_CONFIG_HEAD_TEXT_TYPE);
     if (!isset($data)) {
         $data['value'] = PORTAL_CONFIG_HEAD_TEXT_TYPE_SNS;
     }
     $v['portal_config']['header_text_type'] = $data['value'];
     $v['portal_layout']['position_list'] = $potal_layout_position;
     $v['portal_config']['layout_config'] = $this->get_layout_config();
     $v['portal_free_area_list'] = db_portal_portal_free_area();
     $v['portal_rss_list'] = db_portal_portal_rss();
     $this->set($v);
     return 'success';
 }
コード例 #3
0
ファイル: edit_other.php プロジェクト: KimuraYoichi/PukiWiki
 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', 'その他設定を変更しました');
 }
コード例 #4
0
ファイル: edit_color.php プロジェクト: KimuraYoichi/PukiWiki
 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', '配色設定を変更しました');
 }
コード例 #5
0
 function execute($requests)
 {
     $data = db_portal_config(PORTAL_CONFIG_USE_PORTAL);
     $v = array();
     if (!isset($data)) {
         $v['portal_config']['use_portal'] = 1;
     } else {
         $v['portal_config']['use_portal'] = $data['value'];
     }
     $this->set($v);
     return 'success';
 }
コード例 #6
0
ファイル: edit_layout.php プロジェクト: KimuraYoichi/PukiWiki
 function execute($requests)
 {
     $data = db_portal_config(PORTAL_CONFIG_LAYOUT_TYPE);
     $v = array();
     if (!isset($data)) {
         $v['portal_config']['layout_type'] = 1;
     } else {
         $v['portal_config']['layout_type'] = $data['value'];
     }
     $this->set($v);
     return 'success';
 }
コード例 #7
0
 function execute($requests)
 {
     $data = db_portal_config('USE_PORTAL_KTAI');
     $v = array();
     if (is_null($data)) {
         $v['portal_config']['use_portal'] = 0;
     } else {
         $v['portal_config']['use_portal'] = $data['value'];
     }
     $this->set($v);
     return 'success';
 }
コード例 #8
0
ファイル: edit_layout.php プロジェクト: KimuraYoichi/PukiWiki
 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', 'レイアウト設定を変更しました');
 }
コード例 #9
0
ファイル: edit_color.php プロジェクト: KimuraYoichi/PukiWiki
 function execute($requests)
 {
     $data = db_portal_config(PORTAL_CONFIG_COLOR_TYPE);
     $skin = $this->_search_skin_dir();
     $v = array();
     if (!isset($data)) {
         $v['portal_config']['color_type'] = "default";
     } else {
         $v['portal_config']['color_type'] = $data['value'];
     }
     $v['skin'] = $skin;
     $this->set($v);
     return 'success';
 }
コード例 #10
0
 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', '携帯版ポータル使用設定を変更しました');
 }
コード例 #11
0
 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', 'コンテンツ設定を変更しました');
 }
コード例 #12
0
ファイル: edit_other.php プロジェクト: KimuraYoichi/PukiWiki
 function execute($requests)
 {
     $custom_css = db_portal_config(PORTAL_CONFIG_CUSTOM_CSS);
     $description = db_portal_config(PORTAL_CONFIG_META_DESCRIPTION);
     $keywords = db_portal_config(PORTAL_CONFIG_META_KEYWORDS);
     $v = array();
     if (!isset($custom_css)) {
         $v['portal_config']['custom_css'] = "";
     } else {
         $v['portal_config']['custom_css'] = $custom_css['value'];
     }
     if (!isset($description)) {
         $v['portal_config']['meta_description'] = "";
     } else {
         $v['portal_config']['meta_description'] = $description['value'];
     }
     if (!isset($keywords)) {
         $v['portal_config']['meta_keywords'] = "";
     } else {
         $v['portal_config']['meta_keywords'] = $keywords['value'];
     }
     $this->set($v);
     return 'success';
 }
コード例 #13
0
ファイル: preview.php プロジェクト: KimuraYoichi/PukiWiki
 function _get_portal_config($portal_config_name)
 {
     $data = db_portal_config($portal_config_name);
     if (!isset($data)) {
         return "";
     }
     return $data['value'];
 }