コミットメタ情報
ログメッセージ
変更サマリ
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page06.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page01.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page02.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page03.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/upgrade.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page04.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/finish.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page05.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagemod_confirm.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pageadd_confirm.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagemod_complete.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagemod_entry.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/simplepage_version
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pageadd_entry.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pageview.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagelist.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pageadd_confirm.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pageadd_complete.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagedel_confirm.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pageadd_entry.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/simplepage.ini
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagelist.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagedel_confirm.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagedel_complete.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagemod_confirm.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file/pagemod_entry.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/file
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page06.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/LICENSE
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/upgrade.tpl
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/AUTHORS
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/upgrade_base.inc
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/sql/upgrade_create.sql
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/sql/upgrade_drop.sql
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/sql/upgrade_modify.sql
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/sql/upgrade_data.sql
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/sql
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page01.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page02.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/target.txt
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page03.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page04.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/finish.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0/page05.php
- delete:
tags/upgrade_simplepage-1_2_0_to_simplepage-1_3_0
差分
| | @@ -1,223 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * ページ削除完了画面クラス | 4 | | - * | 5 | | - * ページ削除完了画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - /** | 18 | | - * データベース操作クラス | 19 | | - */ | 20 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 21 | | - | 22 | | - class pagedel_complete extends simplepage_base | 23 | | - { | 24 | | - //------------------------------------------------------// | 25 | | - // クラス変数定義 | 26 | | - //------------------------------------------------------// | 27 | | - /** | 28 | | - * データベース操作クラスインスタンスを保持する変数 | 29 | | - * @access private | 30 | | - * @var object | 31 | | - */ | 32 | | - private $obj_db; | 33 | | - /** | 34 | | - * ユーティリティクラスインスタンスを保持する変数 | 35 | | - * @access private | 36 | | - * @var object | 37 | | - */ | 38 | | - private $obj_conf; | 39 | | - /** | 40 | | - * 取得データを保持する変数 | 41 | | - * @access private | 42 | | - * @var object | 43 | | - */ | 44 | | - private $gotDat; | 45 | | - | 46 | | - //------------------------------------------------------// | 47 | | - // クラスメソッド定義 | 48 | | - //------------------------------------------------------// | 49 | | - /** | 50 | | - * コンストラクタメソッド | 51 | | - * | 52 | | - * コンストラクタメソッド | 53 | | - * | 54 | | - * @param void なし | 55 | | - * @return void なし | 56 | | - */ | 57 | | - public function __construct() | 58 | | - { | 59 | | - } // end of function:__construct() | 60 | | - | 61 | | - /** | 62 | | - * クローンメソッド | 63 | | - * | 64 | | - * クローンメソッド | 65 | | - * | 66 | | - * @param void なし | 67 | | - * @return void なし | 68 | | - */ | 69 | | - public function __clone() | 70 | | - { | 71 | | - } // end of function:__clone() | 72 | | - | 73 | | - /** | 74 | | - * modelメソッド(モデル) | 75 | | - * | 76 | | - * データ取得等のモデルに相当する部分の処理を行う | 77 | | - * | 78 | | - * @param void なし | 79 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 80 | | - */ | 81 | | - public function model() | 82 | | - { | 83 | | - // 必要なインスタンスを生成 | 84 | | - $this->obj_db = new RisolutoDb(); | 85 | | - $this->obj_conf = new RisolutoConf(); | 86 | | - $this->obj_conf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 87 | | - | 88 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 89 | | - // ログイン画面に遷移する | 90 | | - if ( ! $this->obj_util->is_Admin() ) | 91 | | - { | 92 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 93 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 94 | | - return false; | 95 | | - } // end of if | 96 | | - | 97 | | - // 前画面のCageが自分と同じでない or 前画面のActが「pagedel_confirm」でない場合、 | 98 | | - // 入力画面に飛ばす | 99 | | - $tmp_cage_last = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 100 | | - $tmp_cage_current = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 101 | | - | 102 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 103 | | - if ( $tmp_cage_last != $tmp_cage_current or ( $tmp_act != 'pagedel_confirm' ) ) | 104 | | - { | 105 | | - $this->obj_util->redirectTo( 'pagelist', $tmp_cage_current ); | 106 | | - return false; | 107 | | - } // end of if | 108 | | - | 109 | | - | 110 | | - | 111 | | - //------------------------------------------------------------------------ | 112 | | - // セッションから値を取得し、セッションを削除 | 113 | | - //------------------------------------------------------------------------ | 114 | | - $tmp_entered = $this->obj_sess->sessLoad( $this->obj_sess->sessLoad( 'currentcage' ) ); | 115 | | - $this->obj_sess->sessRevoke( $this->obj_sess->sessLoad( 'currentcage' ) ); | 116 | | - | 117 | | - | 118 | | - | 119 | | - //------------------------------------------------------------------------ | 120 | | - // 渡されてきた情報でデータベースを更新する | 121 | | - //------------------------------------------------------------------------ | 122 | | - | 123 | | - // データベースに接続する | 124 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 125 | | - { | 126 | | - // トランザクションを開始 | 127 | | - $this->obj_db->dbBeginTransaction(); | 128 | | - | 129 | | - // SQL文を組み立てる | 130 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 131 | | - $sql =<<<End_Of_SQL | 132 | | - | 133 | | - DELETE FROM $tmp_t_pages | 134 | | - WHERE `page_id` = ? | 135 | | - | 136 | | -End_Of_SQL; | 137 | | - | 138 | | - // パラメタも用意する | 139 | | - $param = array( | 140 | | - $tmp_entered[ 'pageid' ] | 141 | | - ); | 142 | | - | 143 | | - // Insertを実行 | 144 | | - $tmp_delete_result = $this->obj_db->dbExecSQL( $sql, $param ); | 145 | | - if ( PEAR::isError( $tmp_delete_result ) ) | 146 | | - { | 147 | | - // エラーの場合はロールバックしてコネクションを閉じ、例外を投げる | 148 | | - $this->obj_db->dbRollback(); | 149 | | - $this->obj_db->dbDisConnect(); | 150 | | - throw new Exception( 'Delete page info Failure' ); | 151 | | - return false; | 152 | | - } // end of if | 153 | | - | 154 | | - // SQL文を組み立てる | 155 | | - $tmp_cage = '_' . $this->mycage . '_SYSTEM_'; | 156 | | - $sql =<<<End_Of_SQL | 157 | | - | 158 | | - DELETE FROM `risoluto_t_headerinfo` | 159 | | - WHERE `act` = ? | 160 | | - AND `cage` = ? | 161 | | - | 162 | | -End_Of_SQL; | 163 | | - | 164 | | - // パラメタも用意する | 165 | | - $param = array( | 166 | | - $tmp_entered[ 'pageid' ] | 167 | | - , $tmp_cage | 168 | | - ); | 169 | | - | 170 | | - // Insertを実行 | 171 | | - $tmp_delete_result = $this->obj_db->dbExecSQL( $sql, $param ); | 172 | | - if ( PEAR::isError( $tmp_delete_result ) ) | 173 | | - { | 174 | | - // エラーの場合はロールバックしてコネクションを閉じ、例外を投げる | 175 | | - $this->obj_db->dbRollback(); | 176 | | - $this->obj_db->dbDisConnect(); | 177 | | - throw new Exception( 'Delete header info Failure' ); | 178 | | - return false; | 179 | | - } // end of if | 180 | | - | 181 | | - // 正常に実行できた場合はコミットしてコネクションを閉じる | 182 | | - $this->obj_db->dbCommit(); | 183 | | - $this->obj_db->dbDisConnect(); | 184 | | - | 185 | | - } // end of if | 186 | | - // データベースに接続できなかった場合は、例外を投げる | 187 | | - else | 188 | | - { | 189 | | - throw new Exception( 'DB Connection Failure' ); | 190 | | - return false; | 191 | | - } // end of else | 192 | | - | 193 | | - return true; | 194 | | - } // end of function:model() | 195 | | - | 196 | | - /** | 197 | | - * viewメソッド(モデル) | 198 | | - * | 199 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 200 | | - * | 201 | | - * @param void なし | 202 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 203 | | - */ | 204 | | - public function view() | 205 | | - { | 206 | | - // アサイン | 207 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 208 | | - | 209 | | - $this->smarty->assign ( 'menu_cage', $this->obj_adminconf->get( 'COMMON', 'menu_cage' ) ); | 210 | | - $this->smarty->assign ( 'menu_act', $this->obj_adminconf->get( 'COMMON', 'menu_act' ) ); | 211 | | - | 212 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 213 | | - | 214 | | - // 表示 | 215 | | - $this->smarty->display( 'pagedel_complete.tpl' ); | 216 | | - | 217 | | - return true; | 218 | | - | 219 | | - } // end of function:view() | 220 | | - | 221 | | - } // end of class:pagedel_complete | 222 | | - | 223 | | -?> |
| | @@ -1,413 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * ページ情報変更確認画面クラス | 4 | | - * | 5 | | - * ページ情報変更確認画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - | 18 | | - class pagemod_confirm extends simplepage_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラス変数定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * ユーティリティクラスインスタンスを保持する変数 | 25 | | - * @access private | 26 | | - * @var object | 27 | | - */ | 28 | | - private $obj_conf; | 29 | | - /** | 30 | | - * 取得データを保持する変数 | 31 | | - * @access private | 32 | | - * @var object | 33 | | - */ | 34 | | - private $gotDat; | 35 | | - | 36 | | - //------------------------------------------------------// | 37 | | - // クラスメソッド定義 | 38 | | - //------------------------------------------------------// | 39 | | - /** | 40 | | - * コンストラクタメソッド | 41 | | - * | 42 | | - * コンストラクタメソッド | 43 | | - * | 44 | | - * @param void なし | 45 | | - * @return void なし | 46 | | - */ | 47 | | - public function __construct() | 48 | | - { | 49 | | - } // end of function:__construct() | 50 | | - | 51 | | - /** | 52 | | - * クローンメソッド | 53 | | - * | 54 | | - * クローンメソッド | 55 | | - * | 56 | | - * @param void なし | 57 | | - * @return void なし | 58 | | - */ | 59 | | - public function __clone() | 60 | | - { | 61 | | - } // end of function:__clone() | 62 | | - | 63 | | - /** | 64 | | - * modelメソッド(モデル) | 65 | | - * | 66 | | - * データ取得等のモデルに相当する部分の処理を行う | 67 | | - * | 68 | | - * @param void なし | 69 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 70 | | - */ | 71 | | - public function model() | 72 | | - { | 73 | | - // 必要なインスタンスを生成 | 74 | | - $this->obj_conf = new RisolutoConf(); | 75 | | - $this->obj_conf->parse( RISOLUTO_CONF . $this->mycage . '.ini' ); | 76 | | - | 77 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 78 | | - // ログイン画面に遷移する | 79 | | - if ( ! $this->obj_util->is_Admin() ) | 80 | | - { | 81 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 82 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 83 | | - return false; | 84 | | - } // end of if | 85 | | - | 86 | | - // 前画面のCageが自分と同じでない or 前画面のActが「pagemod_entry」でない場合、 | 87 | | - // 入力画面に飛ばす | 88 | | - $tmp_cage_last = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 89 | | - $tmp_cage_current = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 90 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 91 | | - | 92 | | - if ( ( $tmp_cage_last != $tmp_cage_current and $tmp_cage_last != 'admin.site' ) or ( $tmp_act != 'pagemod_entry' and $tmp_act != 'uploadviewer' ) ) | 93 | | - { | 94 | | - $this->obj_util->redirectTo( 'pagelist', $tmp_cage_current ); | 95 | | - return false; | 96 | | - } // end of if | 97 | | - | 98 | | - | 99 | | - | 100 | | - //------------------------------------------------------------------------ | 101 | | - // 前画面の入力値を取得 | 102 | | - //------------------------------------------------------------------------ | 103 | | - // 初期化 | 104 | | - $tmp_entered[ 'message' ] = null; | 105 | | - $tmp_entered[ 'pageid' ] = null; | 106 | | - $tmp_entered[ 'slug' ] = null; | 107 | | - $tmp_entered[ 'body' ] = null; | 108 | | - $tmp_entered[ 'headerinfo' ] = null; | 109 | | - | 110 | | - // ページID | 111 | | - if ( isset( $_POST[ 'pageid' ] ) ) | 112 | | - { | 113 | | - $tmp_entered[ 'pageid' ] = strip_tags( trim( $_POST[ 'pageid' ] ) ); | 114 | | - } // end of if | 115 | | - // 内容 | 116 | | - if ( isset( $_POST[ 'body' ] ) ) | 117 | | - { | 118 | | - $tmp_entered[ 'body' ] = strip_tags( trim( $_POST[ 'body' ] ), $this->obj_conf->get( 'ALLOWTAGS', 'body' ) ); | 119 | | - } // end of if | 120 | | - // スラッグ | 121 | | - if ( isset( $_POST[ 'slug' ] ) ) | 122 | | - { | 123 | | - $tmp_entered[ 'slug' ] = strip_tags( trim( $_POST[ 'slug' ] ) ); | 124 | | - } // end of if | 125 | | - // robot_index | 126 | | - if ( isset( $_POST[ 'robot_index' ] ) ) | 127 | | - { | 128 | | - $tmp_entered[ 'headerinfo' ][ 'robot_index' ] = strip_tags( trim( $_POST[ 'robot_index' ] ) ); | 129 | | - } // end of if | 130 | | - | 131 | | - // robot_follow | 132 | | - if ( isset( $_POST[ 'robot_follow' ] ) ) | 133 | | - { | 134 | | - $tmp_entered[ 'headerinfo' ][ 'robot_follow' ] = strip_tags( trim( $_POST[ 'robot_follow' ] ) ); | 135 | | - } // end of if | 136 | | - | 137 | | - // title | 138 | | - if ( isset( $_POST[ 'title' ] ) ) | 139 | | - { | 140 | | - $tmp_entered[ 'headerinfo' ][ 'title' ] = strip_tags( trim( $_POST[ 'title' ] ) ); | 141 | | - } // end of if | 142 | | - | 143 | | - // description | 144 | | - if ( isset( $_POST[ 'description' ] ) ) | 145 | | - { | 146 | | - $tmp_entered[ 'headerinfo' ][ 'description' ] = strip_tags( trim( $_POST[ 'description' ] ) ); | 147 | | - } // end of if | 148 | | - | 149 | | - // keywords | 150 | | - if ( isset( $_POST[ 'keywords' ] ) ) | 151 | | - { | 152 | | - $tmp_entered[ 'headerinfo' ][ 'keywords' ] = strip_tags( trim( $_POST[ 'keywords' ] ) ); | 153 | | - } // end of if | 154 | | - | 155 | | - // author | 156 | | - if ( isset( $_POST[ 'author' ] ) ) | 157 | | - { | 158 | | - $tmp_entered[ 'headerinfo' ][ 'author' ] = strip_tags( trim( $_POST[ 'author' ] ) ); | 159 | | - } // end of if | 160 | | - | 161 | | - // javascript | 162 | | - if ( isset( $_POST[ 'javascript' ] ) ) | 163 | | - { | 164 | | - $tmp_entered[ 'headerinfo' ][ 'javascript' ] = strip_tags( trim( $_POST[ 'javascript' ] ) ); | 165 | | - } // end of if | 166 | | - | 167 | | - // css | 168 | | - if ( isset( $_POST[ 'css' ] ) ) | 169 | | - { | 170 | | - $tmp_entered[ 'headerinfo' ][ 'css' ] = strip_tags( trim( $_POST[ 'css' ] ) ); | 171 | | - } // end of if | 172 | | - | 173 | | - // favicon | 174 | | - if ( isset( $_POST[ 'favicon' ] ) ) | 175 | | - { | 176 | | - $tmp_entered[ 'headerinfo' ][ 'favicon' ] = strip_tags( trim( $_POST[ 'favicon' ] ) ); | 177 | | - } // end of if | 178 | | - | 179 | | - | 180 | | - | 181 | | - //------------------------------------------------------------------------ | 182 | | - // 入力情報のチェック | 183 | | - //------------------------------------------------------------------------ | 184 | | - // ページID | 185 | | - if ( ! isset( $tmp_entered[ 'pageid' ] ) or !preg_match( '/^[[:digit:]]{1,10}$/', $tmp_entered[ 'pageid' ] ) ) | 186 | | - { | 187 | | - throw new Exception( 'CANNOT HAPPENED!:Strange pageid' ); | 188 | | - return false; | 189 | | - } // end of if | 190 | | - | 191 | | - // 内容(入力値が空) | 192 | | - if ( empty( $tmp_entered[ 'body' ] ) ) | 193 | | - { | 194 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 195 | | - $tmp_entered[ 'message' ] = 'empty_body'; | 196 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 197 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 198 | | - return false; | 199 | | - } // end of if | 200 | | - | 201 | | - // スラッグ(フォーマット不正) | 202 | | - if ( !empty( $tmp_entered[ 'slug' ] ) and !preg_match( '/^[[:alnum:]\.\_\-]{1,255}$/', $tmp_entered[ 'slug' ] ) ) | 203 | | - { | 204 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 205 | | - $tmp_entered[ 'message' ] = 'invalid_slug'; | 206 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 207 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 208 | | - return false; | 209 | | - } // end of if | 210 | | - | 211 | | - // スラッグ(フォーマット不正) | 212 | | - if ( !empty( $tmp_entered[ 'slug' ] ) and preg_match( '/^[[:digit:]]{1,10}$/', $tmp_entered[ 'slug' ] ) ) | 213 | | - { | 214 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 215 | | - $tmp_entered[ 'message' ] = 'onlydigit_slug'; | 216 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 217 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 218 | | - return false; | 219 | | - } // end of if | 220 | | - | 221 | | - // robots(index) | 222 | | - if ( $tmp_entered[ 'headerinfo' ][ 'robot_index' ] != 0 and $tmp_entered[ 'headerinfo' ][ 'robot_index' ] != 1 ) | 223 | | - { | 224 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 225 | | - $tmp_entered[ 'message' ] = 'invalid_robot_index'; | 226 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 227 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 228 | | - return false; | 229 | | - } // end of if | 230 | | - | 231 | | - // robots(follow) | 232 | | - if ( $tmp_entered[ 'headerinfo' ][ 'robot_follow' ] != 0 and $tmp_entered[ 'headerinfo' ][ 'robot_follow' ] != 1 ) | 233 | | - { | 234 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 235 | | - $tmp_entered[ 'message' ] = 'invalid_robot_follow'; | 236 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 237 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 238 | | - return false; | 239 | | - } // end of if | 240 | | - | 241 | | - // title | 242 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'title' ] ) > 10000 ) | 243 | | - { | 244 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 245 | | - $tmp_entered[ 'message' ] = 'invalid_title'; | 246 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 247 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 248 | | - return false; | 249 | | - } // end of if | 250 | | - | 251 | | - // description | 252 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'description' ] ) > 10000 ) | 253 | | - { | 254 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 255 | | - $tmp_entered[ 'message' ] = 'invalid_description'; | 256 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 257 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 258 | | - return false; | 259 | | - } // end of if | 260 | | - | 261 | | - // keywords | 262 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'keywords' ] ) > 10000 ) | 263 | | - { | 264 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 265 | | - $tmp_entered[ 'message' ] = 'invalid_keywords'; | 266 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 267 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 268 | | - return false; | 269 | | - } // end of if | 270 | | - | 271 | | - // author | 272 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'author' ] ) > 10000 ) | 273 | | - { | 274 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 275 | | - $tmp_entered[ 'message' ] = 'invalid_author'; | 276 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 277 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 278 | | - return false; | 279 | | - } // end of if | 280 | | - | 281 | | - // javascript | 282 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'javascript' ] ) > 10000 ) | 283 | | - { | 284 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 285 | | - $tmp_entered[ 'message' ] = 'invalid_javascript'; | 286 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 287 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 288 | | - return false; | 289 | | - } // end of if | 290 | | - | 291 | | - // css | 292 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'css' ] ) > 10000 ) | 293 | | - { | 294 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 295 | | - $tmp_entered[ 'message' ] = 'invalid_css'; | 296 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 297 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 298 | | - return false; | 299 | | - } // end of if | 300 | | - | 301 | | - // favicon | 302 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'favicon' ] ) > 10000 ) | 303 | | - { | 304 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 305 | | - $tmp_entered[ 'message' ] = 'invalid_favicon'; | 306 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 307 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 308 | | - return false; | 309 | | - } // end of if | 310 | | - | 311 | | - //------------------------------------------------------------------------ | 312 | | - // スラッグ重複チェック | 313 | | - //------------------------------------------------------------------------ | 314 | | - if ( isset( $tmp_entered[ 'slug' ] ) and !empty( $tmp_entered[ 'slug' ] ) ) | 315 | | - { | 316 | | - // データベースに接続する | 317 | | - // データベース操作クラスのインスタンスを生成する | 318 | | - $this->obj_db = new RisolutoDb(); | 319 | | - | 320 | | - // DSN情報取得用にrisoluto.iniをパース | 321 | | - $tmp_risolutoconf = new RisolutoConf(); | 322 | | - $tmp_risolutoconf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 323 | | - | 324 | | - // データベースに接続する | 325 | | - if ( $this->obj_db->dbConnect( $tmp_risolutoconf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 326 | | - { | 327 | | - // SQL文を組み立てる | 328 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 329 | | - $sql =<<<End_Of_SQL | 330 | | - | 331 | | - SELECT count( `pages`.`page_slug` ) as cnt | 332 | | - FROM $tmp_t_pages pages | 333 | | - WHERE `pages`.`page_slug` = ? | 334 | | - AND `pages`.`page_id` <> ? | 335 | | - | 336 | | -End_Of_SQL; | 337 | | - | 338 | | - // パラメタも用意する | 339 | | - $param = array( | 340 | | - $tmp_entered[ 'slug' ] | 341 | | - , $tmp_entered[ 'pageid' ] | 342 | | - ); | 343 | | - | 344 | | - // SQLの実行に失敗した場合は、例外を投げる | 345 | | - $tmp_result = $this->obj_db->dbGetRow( $sql, $param ); | 346 | | - if ( PEAR::isError( $tmp_result ) ) | 347 | | - { | 348 | | - // 接続をクローズする | 349 | | - $this->obj_db->dbDisConnect(); | 350 | | - throw new Exception( 'count slug Get Failure' ); | 351 | | - return false; | 352 | | - } // end of if | 353 | | - // 入力された値と、取得した値を使ってデータをインサートする | 354 | | - else | 355 | | - if ( $tmp_result[ 'cnt' ] > 0 ) | 356 | | - { | 357 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 358 | | - $tmp_entered[ 'message' ] = 'slug_conflict'; | 359 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 360 | | - $this->obj_util->redirectTo( 'pagemod_entry', $tmp_cage_current ); | 361 | | - return false; | 362 | | - } // end of elseif | 363 | | - | 364 | | - } // end of if | 365 | | - // データベースに接続できなかった場合は、例外を投げる | 366 | | - else | 367 | | - { | 368 | | - throw new Exception( 'DB Connection Failure' ); | 369 | | - return false; | 370 | | - } // end of else | 371 | | - | 372 | | - } // end of if | 373 | | - | 374 | | - | 375 | | - | 376 | | - //------------------------------------------------------------------------ | 377 | | - // 特に問題がなければ、画面表示用にクラス変数とセッションに値をセットする | 378 | | - //------------------------------------------------------------------------ | 379 | | - $this->gotDat = $tmp_entered; | 380 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 381 | | - | 382 | | - return true; | 383 | | - } // end of function:model() | 384 | | - | 385 | | - /** | 386 | | - * viewメソッド(モデル) | 387 | | - * | 388 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 389 | | - * | 390 | | - * @param void なし | 391 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 392 | | - */ | 393 | | - public function view() | 394 | | - { | 395 | | - // アサイン | 396 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 397 | | - | 398 | | - $this->smarty->assign ( 'entered_body', stripslashes( $this->gotDat[ 'body' ] ) ); | 399 | | - $this->smarty->assign ( 'entered_slug', $this->gotDat[ 'slug' ] ); | 400 | | - $this->smarty->assign ( 'entered_headerinfo', $this->gotDat[ 'headerinfo' ] ); | 401 | | - | 402 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 403 | | - | 404 | | - // 表示 | 405 | | - $this->smarty->display( 'pagemod_confirm.tpl' ); | 406 | | - | 407 | | - return true; | 408 | | - | 409 | | - } // end of function:view() | 410 | | - | 411 | | - } // end of class:pagemod_confirm | 412 | | - | 413 | | -?> |
| | @@ -1,300 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * ページ情報変更情報入力画面クラス | 4 | | - * | 5 | | - * ページ情報変更情報入力画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - /** | 18 | | - * データベース操作クラス | 19 | | - */ | 20 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 21 | | - | 22 | | - class pagemod_entry extends simplepage_base | 23 | | - { | 24 | | - //------------------------------------------------------// | 25 | | - // クラス変数定義 | 26 | | - //------------------------------------------------------// | 27 | | - /** | 28 | | - * データベース操作クラスインスタンスを保持する変数 | 29 | | - * @access private | 30 | | - * @var object | 31 | | - */ | 32 | | - private $obj_db; | 33 | | - /** | 34 | | - * ユーティリティクラスインスタンスを保持する変数 | 35 | | - * @access private | 36 | | - * @var object | 37 | | - */ | 38 | | - private $obj_conf; | 39 | | - /** | 40 | | - * 取得データを保持する変数 | 41 | | - * @access private | 42 | | - * @var object | 43 | | - */ | 44 | | - private $gotDat; | 45 | | - | 46 | | - //------------------------------------------------------// | 47 | | - // クラスメソッド定義 | 48 | | - //------------------------------------------------------// | 49 | | - /** | 50 | | - * コンストラクタメソッド | 51 | | - * | 52 | | - * コンストラクタメソッド | 53 | | - * | 54 | | - * @param void なし | 55 | | - * @return void なし | 56 | | - */ | 57 | | - public function __construct() | 58 | | - { | 59 | | - } // end of function:__construct() | 60 | | - | 61 | | - /** | 62 | | - * クローンメソッド | 63 | | - * | 64 | | - * クローンメソッド | 65 | | - * | 66 | | - * @param void なし | 67 | | - * @return void なし | 68 | | - */ | 69 | | - public function __clone() | 70 | | - { | 71 | | - } // end of function:__clone() | 72 | | - | 73 | | - /** | 74 | | - * modelメソッド(モデル) | 75 | | - * | 76 | | - * データ取得等のモデルに相当する部分の処理を行う | 77 | | - * | 78 | | - * @param void なし | 79 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 80 | | - */ | 81 | | - public function model() | 82 | | - { | 83 | | - // 必要なインスタンスを生成 | 84 | | - $this->obj_db = new RisolutoDb(); | 85 | | - $this->obj_conf = new RisolutoConf(); | 86 | | - $this->obj_conf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 87 | | - | 88 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 89 | | - // ログイン画面に遷移する | 90 | | - if ( ! $this->obj_util->is_Admin() ) | 91 | | - { | 92 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 93 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 94 | | - return false; | 95 | | - } // end of if | 96 | | - | 97 | | - // 前画面のCageが自分と同じでない or 前画面のActが「pagelist」または「pageview」または「pagemod_confirm」でない場合、 | 98 | | - // 入力画面に飛ばす | 99 | | - $tmp_cage_last = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 100 | | - $tmp_cage_current = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 101 | | - | 102 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 103 | | - if ( ( $tmp_cage_last != $tmp_cage_current ) or ( $tmp_act != 'pagelist' and $tmp_act != 'pageview' and $tmp_act != 'pagemod_confirm' ) ) | 104 | | - { | 105 | | - $this->obj_util->redirectTo( 'pagelist', $tmp_cage_current ); | 106 | | - return false; | 107 | | - } // end of if | 108 | | - | 109 | | - | 110 | | - | 111 | | - //------------------------------------------------------------------------ | 112 | | - // CKEditorが存在すれば使用する | 113 | | - //------------------------------------------------------------------------ | 114 | | - clearstatcache(); | 115 | | - $this->gotDat[ 'is_ckeditor' ] = file_exists( RISOLUTO_DOCROOT . '/ckeditor/' ); | 116 | | - | 117 | | - | 118 | | - | 119 | | - //------------------------------------------------------------------------ | 120 | | - // セッション情報の取得 | 121 | | - //------------------------------------------------------------------------ | 122 | | - // 前画面のActが「pagemod_confirm」なら、必要な情報をセッションから取得する | 123 | | - if ( $tmp_act == 'pagemod_confirm' ) | 124 | | - { | 125 | | - // セッションからエラーメッセージと入力値を取得し、削除する | 126 | | - $tmp_entered = $this->obj_sess->sessLoad( $this->obj_sess->sessLoad( 'currentcage' ) ); | 127 | | - $this->obj_sess->sessRevoke( $this->obj_sess->sessLoad( 'currentcage' ) ); | 128 | | - | 129 | | - // 表示に必要な加工を行う | 130 | | - $this->gotDat[ 'errMsg' ] = $tmp_entered; | 131 | | - return true; | 132 | | - } // end of if | 133 | | - | 134 | | - | 135 | | - //------------------------------------------------------------------------ | 136 | | - // 前画面の入力値を取得 | 137 | | - //------------------------------------------------------------------------ | 138 | | - // ページID | 139 | | - if ( isset( $_GET[ 'pageid' ] ) ) | 140 | | - { | 141 | | - $tmp_entered[ 'errMsg' ][ 'pageid' ] = strip_tags( trim( $_GET[ 'pageid' ] ) ); | 142 | | - } // end of if | 143 | | - | 144 | | - | 145 | | - | 146 | | - //------------------------------------------------------------------------ | 147 | | - // 入力情報のチェック | 148 | | - //------------------------------------------------------------------------ | 149 | | - // 渡されてきたページIDが数字でなければ、ユーザ選択画面に遷移する | 150 | | - if ( ! is_numeric( $tmp_entered[ 'errMsg' ][ 'pageid' ] ) ) | 151 | | - { | 152 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 153 | | - $tmp_entered[ 'errMsg' ][ 'message' ] = 'invalid_pageid'; | 154 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 155 | | - $this->obj_util->redirectTo( 'pagelist', $tmp_cage_current ); | 156 | | - return false; | 157 | | - } // end of if | 158 | | - | 159 | | - | 160 | | - | 161 | | - //------------------------------------------------------------------------ | 162 | | - // 情報の取得 | 163 | | - //------------------------------------------------------------------------ | 164 | | - | 165 | | - // データベースに接続する | 166 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 167 | | - { | 168 | | - | 169 | | - // ユーザ情報を取得する | 170 | | - // SQL文を組み立てる | 171 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 172 | | - $sql =<<<End_Of_SQL | 173 | | - | 174 | | - SELECT `pages`.`page_id` -- ページID | 175 | | - , `pages`.`page_body` -- ページ内容 | 176 | | - , `pages`.`page_slug` -- ページスラッグ | 177 | | - FROM $tmp_t_pages pages | 178 | | - WHERE `pages`.`page_id` = ? | 179 | | - | 180 | | -End_Of_SQL; | 181 | | - | 182 | | - // パラメタも用意する | 183 | | - $param = array( | 184 | | - $tmp_entered[ 'errMsg' ][ 'pageid' ] | 185 | | - ); | 186 | | - | 187 | | - // SQLの実行に失敗した場合は、例外を投げる | 188 | | - $tmp_pagedat = $this->obj_db->dbGetRow( $sql, $param ); | 189 | | - if ( PEAR::isError( $tmp_pagedat ) ) | 190 | | - { | 191 | | - // 接続をクローズする | 192 | | - $this->obj_db->dbDisConnect(); | 193 | | - throw new Exception( 'page information get Failure' ); | 194 | | - return false; | 195 | | - } // end of if | 196 | | - // 正常に取得できていれば、クラス変数にセットする | 197 | | - else | 198 | | - { | 199 | | - $this->gotDat[ 'errMsg' ][ 'message' ] = null; | 200 | | - $this->gotDat[ 'errMsg' ][ 'pageid' ] = $tmp_pagedat[ 'page_id' ]; | 201 | | - $this->gotDat[ 'errMsg' ][ 'body' ] = $tmp_pagedat[ 'page_body' ]; | 202 | | - $this->gotDat[ 'errMsg' ][ 'slug' ] = $tmp_pagedat[ 'page_slug' ]; | 203 | | - } // end of else | 204 | | - | 205 | | - | 206 | | - | 207 | | - // SQL文を組み立てる | 208 | | - $tmp_cage = '_' . $this->mycage . '_SYSTEM_'; | 209 | | - $sql =<<<End_Of_SQL | 210 | | - | 211 | | - SELECT `headers`.`header_id` -- header ID | 212 | | - , `headers`.`robot_index` -- robots(index) | 213 | | - , `headers`.`robot_follow` -- robots(follow) | 214 | | - , `headers`.`title` -- title | 215 | | - , `headers`.`description` -- description | 216 | | - , `headers`.`keywords` -- keywords | 217 | | - , `headers`.`author` -- author | 218 | | - , `headers`.`javascript` -- javascript | 219 | | - , `headers`.`css` -- css | 220 | | - , `headers`.`favicon` -- favicon | 221 | | - FROM `risoluto_t_headerinfo` headers | 222 | | - WHERE `headers`.`cage` = ? | 223 | | - AND `headers`.`act` = ? | 224 | | - | 225 | | -End_Of_SQL; | 226 | | - | 227 | | - // パラメタも用意する | 228 | | - $param = array( | 229 | | - $tmp_cage | 230 | | - , $this->gotDat[ 'errMsg' ][ 'pageid' ] | 231 | | - ); | 232 | | - | 233 | | - // SQLの実行に失敗した場合は、例外を投げる | 234 | | - $tmp_result = $this->obj_db->dbGetRow( $sql, $param ); | 235 | | - if ( PEAR::isError( $tmp_result ) ) | 236 | | - { | 237 | | - // 接続をクローズする | 238 | | - $this->obj_db->dbDisConnect(); | 239 | | - throw new Exception( 'default header info Get Failure' ); | 240 | | - return false; | 241 | | - } // end of if | 242 | | - // 入力された値と、取得した値を使ってデータをインサートする | 243 | | - else | 244 | | - { | 245 | | - $this->gotDat[ 'errMsg' ][ 'headerinfo' ] = $tmp_result; | 246 | | - } // end of else | 247 | | - | 248 | | - // 接続をクローズする | 249 | | - $this->obj_db->dbDisConnect(); | 250 | | - | 251 | | - } // end of if | 252 | | - // データベースに接続できなかった場合は、例外を投げる | 253 | | - else | 254 | | - { | 255 | | - throw new Exception( 'DB Connection Failure' ); | 256 | | - return false; | 257 | | - } // end of else | 258 | | - | 259 | | - | 260 | | - | 261 | | - return true; | 262 | | - } // end of function:model() | 263 | | - | 264 | | - /** | 265 | | - * viewメソッド(モデル) | 266 | | - * | 267 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 268 | | - * | 269 | | - * @param void なし | 270 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 271 | | - */ | 272 | | - public function view() | 273 | | - { | 274 | | - // アサイン | 275 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 276 | | - | 277 | | - $this->smarty->assign ( 'menu_cage', $this->obj_adminconf->get( 'COMMON', 'menu_cage' ) ); | 278 | | - $this->smarty->assign ( 'menu_act', $this->obj_adminconf->get( 'COMMON', 'menu_act' ) ); | 279 | | - | 280 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 281 | | - | 282 | | - $this->smarty->assign ( 'is_ckeditor', $this->gotDat[ 'is_ckeditor' ] ); | 283 | | - $this->smarty->assign ( 'base_url', $this->obj_util->getBaseUrl() ); | 284 | | - | 285 | | - $this->smarty->assign ( 'errMsg', $this->gotDat[ 'errMsg' ][ 'message' ] ); | 286 | | - $this->smarty->assign ( 'entered_pageid', $this->gotDat[ 'errMsg' ][ 'pageid' ] ); | 287 | | - $this->smarty->assign ( 'entered_slug', $this->gotDat[ 'errMsg' ][ 'slug' ] ); | 288 | | - $this->smarty->assign ( 'entered_body', $this->gotDat[ 'errMsg' ][ 'body' ] ); | 289 | | - $this->smarty->assign ( 'entered_headerinfo', $this->gotDat[ 'errMsg' ][ 'headerinfo' ] ); | 290 | | - | 291 | | - // 表示 | 292 | | - $this->smarty->display( 'pagemod_entry.tpl' ); | 293 | | - | 294 | | - return true; | 295 | | - | 296 | | - } // end of function:view() | 297 | | - | 298 | | - } // end of class:pageadd_entry | 299 | | - | 300 | | -?> |
| | @@ -1,397 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * 新規ページ追加確認画面クラス | 4 | | - * | 5 | | - * 新規ページ追加確認画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - | 18 | | - class pageadd_confirm extends simplepage_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラス変数定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * ユーティリティクラスインスタンスを保持する変数 | 25 | | - * @access private | 26 | | - * @var object | 27 | | - */ | 28 | | - private $obj_conf; | 29 | | - /** | 30 | | - * 取得データを保持する変数 | 31 | | - * @access private | 32 | | - * @var object | 33 | | - */ | 34 | | - private $gotDat; | 35 | | - | 36 | | - //------------------------------------------------------// | 37 | | - // クラスメソッド定義 | 38 | | - //------------------------------------------------------// | 39 | | - /** | 40 | | - * コンストラクタメソッド | 41 | | - * | 42 | | - * コンストラクタメソッド | 43 | | - * | 44 | | - * @param void なし | 45 | | - * @return void なし | 46 | | - */ | 47 | | - public function __construct() | 48 | | - { | 49 | | - } // end of function:__construct() | 50 | | - | 51 | | - /** | 52 | | - * クローンメソッド | 53 | | - * | 54 | | - * クローンメソッド | 55 | | - * | 56 | | - * @param void なし | 57 | | - * @return void なし | 58 | | - */ | 59 | | - public function __clone() | 60 | | - { | 61 | | - } // end of function:__clone() | 62 | | - | 63 | | - /** | 64 | | - * modelメソッド(モデル) | 65 | | - * | 66 | | - * データ取得等のモデルに相当する部分の処理を行う | 67 | | - * | 68 | | - * @param void なし | 69 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 70 | | - */ | 71 | | - public function model() | 72 | | - { | 73 | | - // 必要なインスタンスを生成 | 74 | | - $this->obj_conf = new RisolutoConf(); | 75 | | - $this->obj_conf->parse( RISOLUTO_CONF . $this->mycage . '.ini' ); | 76 | | - | 77 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 78 | | - // ログイン画面に遷移する | 79 | | - if ( ! $this->obj_util->is_Admin() ) | 80 | | - { | 81 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 82 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 83 | | - return false; | 84 | | - } // end of if | 85 | | - | 86 | | - // 前画面のCageが自分と同じでない or 前画面のActが「pageadd_entry」でない場合、 | 87 | | - // 入力画面に飛ばす | 88 | | - $tmp_cage_last = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 89 | | - $tmp_cage_current = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 90 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 91 | | - | 92 | | - if ( ( $tmp_cage_last != $tmp_cage_current and $tmp_cage_last != $tmp_cage_current ) or ( $tmp_act != 'pageadd_entry' and $tmp_act != 'uploadviewer' ) ) | 93 | | - { | 94 | | - $this->obj_util->redirectTo( 'pagelist', $tmp_cage_current ); | 95 | | - return false; | 96 | | - } // end of if | 97 | | - | 98 | | - | 99 | | - | 100 | | - //------------------------------------------------------------------------ | 101 | | - // 前画面の入力値を取得 | 102 | | - //------------------------------------------------------------------------ | 103 | | - // 初期化 | 104 | | - $tmp_entered[ 'message' ] = null; | 105 | | - $tmp_entered[ 'slug' ] = null; | 106 | | - $tmp_entered[ 'body' ] = null; | 107 | | - | 108 | | - // 内容 | 109 | | - if ( isset( $_POST[ 'body' ] ) ) | 110 | | - { | 111 | | - $tmp_entered[ 'body' ] = strip_tags( trim( $_POST[ 'body' ] ), $this->obj_conf->get( 'ALLOWTAGS', 'body' ) ); | 112 | | - } // end of if | 113 | | - // スラッグ | 114 | | - if ( isset( $_POST[ 'slug' ] ) ) | 115 | | - { | 116 | | - $tmp_entered[ 'slug' ] = strip_tags( trim( $_POST[ 'slug' ] ) ); | 117 | | - } // end of if | 118 | | - // robot_index | 119 | | - if ( isset( $_POST[ 'robot_index' ] ) ) | 120 | | - { | 121 | | - $tmp_entered[ 'headerinfo' ][ 'robot_index' ] = strip_tags( trim( $_POST[ 'robot_index' ] ) ); | 122 | | - } // end of if | 123 | | - | 124 | | - // robot_follow | 125 | | - if ( isset( $_POST[ 'robot_follow' ] ) ) | 126 | | - { | 127 | | - $tmp_entered[ 'headerinfo' ][ 'robot_follow' ] = strip_tags( trim( $_POST[ 'robot_follow' ] ) ); | 128 | | - } // end of if | 129 | | - | 130 | | - // title | 131 | | - if ( isset( $_POST[ 'title' ] ) ) | 132 | | - { | 133 | | - $tmp_entered[ 'headerinfo' ][ 'title' ] = strip_tags( trim( $_POST[ 'title' ] ) ); | 134 | | - } // end of if | 135 | | - | 136 | | - // description | 137 | | - if ( isset( $_POST[ 'description' ] ) ) | 138 | | - { | 139 | | - $tmp_entered[ 'headerinfo' ][ 'description' ] = strip_tags( trim( $_POST[ 'description' ] ) ); | 140 | | - } // end of if | 141 | | - | 142 | | - // keywords | 143 | | - if ( isset( $_POST[ 'keywords' ] ) ) | 144 | | - { | 145 | | - $tmp_entered[ 'headerinfo' ][ 'keywords' ] = strip_tags( trim( $_POST[ 'keywords' ] ) ); | 146 | | - } // end of if | 147 | | - | 148 | | - // author | 149 | | - if ( isset( $_POST[ 'author' ] ) ) | 150 | | - { | 151 | | - $tmp_entered[ 'headerinfo' ][ 'author' ] = strip_tags( trim( $_POST[ 'author' ] ) ); | 152 | | - } // end of if | 153 | | - | 154 | | - // javascript | 155 | | - if ( isset( $_POST[ 'javascript' ] ) ) | 156 | | - { | 157 | | - $tmp_entered[ 'headerinfo' ][ 'javascript' ] = strip_tags( trim( $_POST[ 'javascript' ] ) ); | 158 | | - } // end of if | 159 | | - | 160 | | - // css | 161 | | - if ( isset( $_POST[ 'css' ] ) ) | 162 | | - { | 163 | | - $tmp_entered[ 'headerinfo' ][ 'css' ] = strip_tags( trim( $_POST[ 'css' ] ) ); | 164 | | - } // end of if | 165 | | - | 166 | | - // favicon | 167 | | - if ( isset( $_POST[ 'favicon' ] ) ) | 168 | | - { | 169 | | - $tmp_entered[ 'headerinfo' ][ 'favicon' ] = strip_tags( trim( $_POST[ 'favicon' ] ) ); | 170 | | - } // end of if | 171 | | - | 172 | | - | 173 | | - | 174 | | - //------------------------------------------------------------------------ | 175 | | - // 入力情報のチェック | 176 | | - //------------------------------------------------------------------------ | 177 | | - // 内容(入力値が空) | 178 | | - if ( empty( $tmp_entered[ 'body' ] ) ) | 179 | | - { | 180 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 181 | | - $tmp_entered[ 'message' ] = 'empty_body'; | 182 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 183 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 184 | | - return false; | 185 | | - } // end of if | 186 | | - | 187 | | - // スラッグ(フォーマット不正) | 188 | | - if ( !empty( $tmp_entered[ 'slug' ] ) and !preg_match( '/^[[:alnum:]\.\_\-]{1,255}$/', $tmp_entered[ 'slug' ] ) ) | 189 | | - { | 190 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 191 | | - $tmp_entered[ 'message' ] = 'invalid_slug'; | 192 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 193 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 194 | | - return false; | 195 | | - } // end of if | 196 | | - | 197 | | - // スラッグ(フォーマット不正) | 198 | | - if ( !empty( $tmp_entered[ 'slug' ] ) and preg_match( '/^[[:digit:]]{1,10}$/', $tmp_entered[ 'slug' ] ) ) | 199 | | - { | 200 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 201 | | - $tmp_entered[ 'message' ] = 'onlydigit_slug'; | 202 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 203 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 204 | | - return false; | 205 | | - } // end of if | 206 | | - | 207 | | - // robots(index) | 208 | | - if ( $tmp_entered[ 'headerinfo' ][ 'robot_index' ] != 0 and $tmp_entered[ 'headerinfo' ][ 'robot_index' ] != 1 ) | 209 | | - { | 210 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 211 | | - $tmp_entered[ 'message' ] = 'invalid_robot_index'; | 212 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 213 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 214 | | - return false; | 215 | | - } // end of if | 216 | | - | 217 | | - // robots(follow) | 218 | | - if ( $tmp_entered[ 'headerinfo' ][ 'robot_follow' ] != 0 and $tmp_entered[ 'headerinfo' ][ 'robot_follow' ] != 1 ) | 219 | | - { | 220 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 221 | | - $tmp_entered[ 'message' ] = 'invalid_robot_follow'; | 222 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 223 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 224 | | - return false; | 225 | | - } // end of if | 226 | | - | 227 | | - // title | 228 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'title' ] ) > 10000 ) | 229 | | - { | 230 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 231 | | - $tmp_entered[ 'message' ] = 'invalid_title'; | 232 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 233 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 234 | | - return false; | 235 | | - } // end of if | 236 | | - | 237 | | - // description | 238 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'description' ] ) > 10000 ) | 239 | | - { | 240 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 241 | | - $tmp_entered[ 'message' ] = 'invalid_description'; | 242 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 243 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 244 | | - return false; | 245 | | - } // end of if | 246 | | - | 247 | | - // keywords | 248 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'keywords' ] ) > 10000 ) | 249 | | - { | 250 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 251 | | - $tmp_entered[ 'message' ] = 'invalid_keywords'; | 252 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 253 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 254 | | - return false; | 255 | | - } // end of if | 256 | | - | 257 | | - // author | 258 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'author' ] ) > 10000 ) | 259 | | - { | 260 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 261 | | - $tmp_entered[ 'message' ] = 'invalid_author'; | 262 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 263 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 264 | | - return false; | 265 | | - } // end of if | 266 | | - | 267 | | - // javascript | 268 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'javascript' ] ) > 10000 ) | 269 | | - { | 270 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 271 | | - $tmp_entered[ 'message' ] = 'invalid_javascript'; | 272 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 273 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 274 | | - return false; | 275 | | - } // end of if | 276 | | - | 277 | | - // css | 278 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'css' ] ) > 10000 ) | 279 | | - { | 280 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 281 | | - $tmp_entered[ 'message' ] = 'invalid_css'; | 282 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 283 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 284 | | - return false; | 285 | | - } // end of if | 286 | | - | 287 | | - // favicon | 288 | | - if ( strlen( $tmp_entered[ 'headerinfo' ][ 'favicon' ] ) > 10000 ) | 289 | | - { | 290 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 291 | | - $tmp_entered[ 'message' ] = 'invalid_favicon'; | 292 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'lastact' ), $tmp_entered ); | 293 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 294 | | - return false; | 295 | | - } // end of if | 296 | | - | 297 | | - //------------------------------------------------------------------------ | 298 | | - // スラッグ重複チェック | 299 | | - //------------------------------------------------------------------------ | 300 | | - if ( isset( $tmp_entered[ 'slug' ] ) and !empty( $tmp_entered[ 'slug' ] ) ) | 301 | | - { | 302 | | - // データベースに接続する | 303 | | - // データベース操作クラスのインスタンスを生成する | 304 | | - $this->obj_db = new RisolutoDb(); | 305 | | - | 306 | | - // DSN情報取得用にrisoluto.iniをパース | 307 | | - $tmp_risolutoconf = new RisolutoConf(); | 308 | | - $tmp_risolutoconf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 309 | | - | 310 | | - // データベースに接続する | 311 | | - if ( $this->obj_db->dbConnect( $tmp_risolutoconf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 312 | | - { | 313 | | - // SQL文を組み立てる | 314 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 315 | | - $sql =<<<End_Of_SQL | 316 | | - | 317 | | - SELECT count( `pages`.`page_slug` ) as cnt | 318 | | - FROM $tmp_t_pages pages | 319 | | - WHERE `pages`.`page_slug` = ? | 320 | | - | 321 | | -End_Of_SQL; | 322 | | - | 323 | | - // パラメタも用意する | 324 | | - $param = array( | 325 | | - $tmp_entered[ 'slug' ] | 326 | | - ); | 327 | | - | 328 | | - // SQLの実行に失敗した場合は、例外を投げる | 329 | | - $tmp_result = $this->obj_db->dbGetRow( $sql, $param ); | 330 | | - if ( PEAR::isError( $tmp_result ) ) | 331 | | - { | 332 | | - // 接続をクローズする | 333 | | - $this->obj_db->dbDisConnect(); | 334 | | - throw new Exception( 'count slug Get Failure' ); | 335 | | - return false; | 336 | | - } // end of if | 337 | | - // 入力された値と、取得した値を使ってデータをインサートする | 338 | | - else | 339 | | - if ( $tmp_result[ 'cnt' ] > 0 ) | 340 | | - { | 341 | | - // エラーメッセージ表示用の情報をセッションに入れてから入力画面に遷移する | 342 | | - $tmp_entered[ 'message' ] = 'slug_conflict'; | 343 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 344 | | - $this->obj_util->redirectTo( 'pageadd_entry', $tmp_cage_current ); | 345 | | - return false; | 346 | | - } // end of elseif | 347 | | - | 348 | | - } // end of if | 349 | | - // データベースに接続できなかった場合は、例外を投げる | 350 | | - else | 351 | | - { | 352 | | - throw new Exception( 'DB Connection Failure' ); | 353 | | - return false; | 354 | | - } // end of else | 355 | | - | 356 | | - } // end of if | 357 | | - | 358 | | - | 359 | | - | 360 | | - //------------------------------------------------------------------------ | 361 | | - // 特に問題がなければ、画面表示用にクラス変数とセッションに値をセットする | 362 | | - //------------------------------------------------------------------------ | 363 | | - $this->gotDat = $tmp_entered; | 364 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 365 | | - | 366 | | - return true; | 367 | | - } // end of function:model() | 368 | | - | 369 | | - /** | 370 | | - * viewメソッド(モデル) | 371 | | - * | 372 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 373 | | - * | 374 | | - * @param void なし | 375 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 376 | | - */ | 377 | | - public function view() | 378 | | - { | 379 | | - // アサイン | 380 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 381 | | - | 382 | | - $this->smarty->assign ( 'entered_body', stripslashes( $this->gotDat[ 'body' ] ) ); | 383 | | - $this->smarty->assign ( 'entered_slug', $this->gotDat[ 'slug' ] ); | 384 | | - $this->smarty->assign ( 'entered_headerinfo', $this->gotDat[ 'headerinfo' ] ); | 385 | | - | 386 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 387 | | - | 388 | | - // 表示 | 389 | | - $this->smarty->display( 'pageadd_confirm.tpl' ); | 390 | | - | 391 | | - return true; | 392 | | - | 393 | | - } // end of function:view() | 394 | | - | 395 | | - } // end of class:pageadd_confirm | 396 | | - | 397 | | -?> |
| | @@ -1,255 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * ページ情報変更完了画面クラス | 4 | | - * | 5 | | - * ページ情報変更完了画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - /** | 18 | | - * データベース操作クラス | 19 | | - */ | 20 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 21 | | - | 22 | | - class pagemod_complete extends simplepage_base | 23 | | - { | 24 | | - //------------------------------------------------------// | 25 | | - // クラス変数定義 | 26 | | - //------------------------------------------------------// | 27 | | - /** | 28 | | - * データベース操作クラスインスタンスを保持する変数 | 29 | | - * @access private | 30 | | - * @var object | 31 | | - */ | 32 | | - private $obj_db; | 33 | | - /** | 34 | | - * ユーティリティクラスインスタンスを保持する変数 | 35 | | - * @access private | 36 | | - * @var object | 37 | | - */ | 38 | | - private $obj_conf; | 39 | | - /** | 40 | | - * 取得データを保持する変数 | 41 | | - * @access private | 42 | | - * @var object | 43 | | - */ | 44 | | - private $gotDat; | 45 | | - | 46 | | - //------------------------------------------------------// | 47 | | - // クラスメソッド定義 | 48 | | - //------------------------------------------------------// | 49 | | - /** | 50 | | - * コンストラクタメソッド | 51 | | - * | 52 | | - * コンストラクタメソッド | 53 | | - * | 54 | | - * @param void なし | 55 | | - * @return void なし | 56 | | - */ | 57 | | - public function __construct() | 58 | | - { | 59 | | - } // end of function:__construct() | 60 | | - | 61 | | - /** | 62 | | - * クローンメソッド | 63 | | - * | 64 | | - * クローンメソッド | 65 | | - * | 66 | | - * @param void なし | 67 | | - * @return void なし | 68 | | - */ | 69 | | - public function __clone() | 70 | | - { | 71 | | - } // end of function:__clone() | 72 | | - | 73 | | - /** | 74 | | - * modelメソッド(モデル) | 75 | | - * | 76 | | - * データ取得等のモデルに相当する部分の処理を行う | 77 | | - * | 78 | | - * @param void なし | 79 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 80 | | - */ | 81 | | - public function model() | 82 | | - { | 83 | | - // 必要なインスタンスを生成 | 84 | | - $this->obj_db = new RisolutoDb(); | 85 | | - $this->obj_conf = new RisolutoConf(); | 86 | | - $this->obj_conf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 87 | | - | 88 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 89 | | - // ログイン画面に遷移する | 90 | | - if ( ! $this->obj_util->is_Admin() ) | 91 | | - { | 92 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 93 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 94 | | - return false; | 95 | | - } // end of if | 96 | | - | 97 | | - // 前画面のCageが自分と同じでない or 前画面のActが「pagemod_confirm」でない場合、 | 98 | | - // 入力画面に飛ばす | 99 | | - $tmp_cage_last = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 100 | | - $tmp_cage_current = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 101 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 102 | | - | 103 | | - if ( ( $tmp_cage_last != $tmp_cage_current and $tmp_cage_last != 'admin.site' ) or ( $tmp_act != 'pagemod_confirm' and $tmp_act != 'uploadviewer' ) ) | 104 | | - { | 105 | | - $this->obj_util->redirectTo( 'pagelist', $tmp_cage_current ); | 106 | | - return false; | 107 | | - } // end of if | 108 | | - | 109 | | - | 110 | | - | 111 | | - //------------------------------------------------------------------------ | 112 | | - // セッションから値を取得し、セッションを削除 | 113 | | - //------------------------------------------------------------------------ | 114 | | - $tmp_entered = $this->obj_sess->sessLoad( $this->obj_sess->sessLoad( 'currentcage' ) ); | 115 | | - $this->obj_sess->sessRevoke( $this->obj_sess->sessLoad( 'currentcage' ) ); | 116 | | - | 117 | | - | 118 | | - | 119 | | - //------------------------------------------------------------------------ | 120 | | - // データの更新 | 121 | | - //------------------------------------------------------------------------ | 122 | | - | 123 | | - // データベースに接続する | 124 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 125 | | - { | 126 | | - // トランザクションを開始 | 127 | | - $this->obj_db->dbBeginTransaction(); | 128 | | - | 129 | | - // SQL文を組み立てる | 130 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 131 | | - $sql =<<<End_Of_SQL | 132 | | - | 133 | | - UPDATE $tmp_t_pages | 134 | | - SET `mtime` = now() | 135 | | - , `muser` = ? | 136 | | - , `page_body` = ? | 137 | | - , `page_slug` = ? | 138 | | - WHERE `page_id` = ? | 139 | | - | 140 | | -End_Of_SQL; | 141 | | - | 142 | | - // パラメタも用意する | 143 | | - $tmp_myself = $this->obj_util->answerMyId(); | 144 | | - $param = array( | 145 | | - $tmp_myself | 146 | | - , $tmp_entered[ 'body' ] | 147 | | - , $tmp_entered[ 'slug' ] | 148 | | - , $tmp_entered[ 'pageid' ] | 149 | | - ); | 150 | | - | 151 | | - // Updateを実行 | 152 | | - $tmp_update_result = $this->obj_db->dbExecSQL( $sql, $param ); | 153 | | - if ( PEAR::isError( $tmp_update_result ) ) | 154 | | - { | 155 | | - // エラーの場合はロールバックして接続を閉じ、例外を投げる | 156 | | - $this->obj_db->dbRollback(); | 157 | | - $this->obj_db->dbDisConnect(); | 158 | | - throw new Exception( 'Update Failure:' . $tmp_t_pages ); | 159 | | - return false; | 160 | | - } // end of if | 161 | | - | 162 | | - | 163 | | - | 164 | | - // SQL文を組み立てる | 165 | | - $tmp_cage = '_' . $this->mycage . '_SYSTEM_'; | 166 | | - $sql =<<<End_Of_SQL | 167 | | - | 168 | | - UPDATE `risoluto_t_headerinfo` | 169 | | - SET `mtime` = now() | 170 | | - , `muser` = ? | 171 | | - , `robot_index` = ? | 172 | | - , `robot_follow` = ? | 173 | | - , `title` = ? | 174 | | - , `description` = ? | 175 | | - , `keywords` = ? | 176 | | - , `author` = ? | 177 | | - , `javascript` = ? | 178 | | - , `css` = ? | 179 | | - , `favicon` = ? | 180 | | - WHERE `act` = ? | 181 | | - AND `cage` = ? | 182 | | - | 183 | | -End_Of_SQL; | 184 | | - | 185 | | - // パラメタも用意する | 186 | | - $tmp_myself = $this->obj_util->answerMyId(); | 187 | | - $param = array( | 188 | | - $tmp_myself | 189 | | - , $tmp_entered[ 'headerinfo' ][ 'robot_index' ] | 190 | | - , $tmp_entered[ 'headerinfo' ][ 'robot_follow' ] | 191 | | - , $tmp_entered[ 'headerinfo' ][ 'title' ] | 192 | | - , $tmp_entered[ 'headerinfo' ][ 'description' ] | 193 | | - , $tmp_entered[ 'headerinfo' ][ 'keywords' ] | 194 | | - , $tmp_entered[ 'headerinfo' ][ 'author' ] | 195 | | - , $tmp_entered[ 'headerinfo' ][ 'javascript' ] | 196 | | - , $tmp_entered[ 'headerinfo' ][ 'css' ] | 197 | | - , $tmp_entered[ 'headerinfo' ][ 'favicon' ] | 198 | | - , $tmp_entered[ 'pageid' ] | 199 | | - , $tmp_cage | 200 | | - ); | 201 | | - | 202 | | - // Updateを実行 | 203 | | - $tmp_update_result = $this->obj_db->dbExecSQL( $sql, $param ); | 204 | | - if ( PEAR::isError( $tmp_update_result ) ) | 205 | | - { | 206 | | - // エラーの場合はロールバックして接続を閉じ、例外を投げる | 207 | | - $this->obj_db->dbRollback(); | 208 | | - $this->obj_db->dbDisConnect(); | 209 | | - throw new Exception( 'Update Failure: risoluto_t_headerinfo' ); | 210 | | - return false; | 211 | | - } // end of if | 212 | | - | 213 | | - // 正常に実行できた場合はコミットして接続を閉じる | 214 | | - $this->obj_db->dbCommit(); | 215 | | - $this->obj_db->dbDisConnect(); | 216 | | - | 217 | | - } // end of if | 218 | | - // データベースに接続できなかった場合は、例外を投げる | 219 | | - else | 220 | | - { | 221 | | - throw new Exception( 'DB Connection Failure' ); | 222 | | - return false; | 223 | | - } // end of else | 224 | | - | 225 | | - return true; | 226 | | - } // end of function:model() | 227 | | - | 228 | | - /** | 229 | | - * viewメソッド(モデル) | 230 | | - * | 231 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 232 | | - * | 233 | | - * @param void なし | 234 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 235 | | - */ | 236 | | - public function view() | 237 | | - { | 238 | | - // アサイン | 239 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 240 | | - | 241 | | - $this->smarty->assign ( 'menu_cage', $this->obj_adminconf->get( 'COMMON', 'menu_cage' ) ); | 242 | | - $this->smarty->assign ( 'menu_act', $this->obj_adminconf->get( 'COMMON', 'menu_act' ) ); | 243 | | - | 244 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 245 | | - | 246 | | - // 表示 | 247 | | - $this->smarty->display( 'pagemod_complete.tpl' ); | 248 | | - | 249 | | - return true; | 250 | | - | 251 | | - } // end of function:view() | 252 | | - | 253 | | - } // end of class:pagemod_complete | 254 | | - | 255 | | -?> |
| | @@ -1,211 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * 新規ページ追加画面クラス | 4 | | - * | 5 | | - * 新規ページ追加画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - | 18 | | - class pageadd_entry extends simplepage_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラス変数定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * データベース操作クラスインスタンスを保持する変数 | 25 | | - * @access private | 26 | | - * @var object | 27 | | - */ | 28 | | - private $obj_db; | 29 | | - /** | 30 | | - * ユーティリティクラスインスタンスを保持する変数 | 31 | | - * @access private | 32 | | - * @var object | 33 | | - */ | 34 | | - private $obj_conf; | 35 | | - /** | 36 | | - * 取得データを保持する変数 | 37 | | - * @access private | 38 | | - * @var object | 39 | | - */ | 40 | | - private $gotDat; | 41 | | - | 42 | | - //------------------------------------------------------// | 43 | | - // クラスメソッド定義 | 44 | | - //------------------------------------------------------// | 45 | | - /** | 46 | | - * コンストラクタメソッド | 47 | | - * | 48 | | - * コンストラクタメソッド | 49 | | - * | 50 | | - * @param void なし | 51 | | - * @return void なし | 52 | | - */ | 53 | | - public function __construct() | 54 | | - { | 55 | | - } // end of function:__construct() | 56 | | - | 57 | | - /** | 58 | | - * クローンメソッド | 59 | | - * | 60 | | - * クローンメソッド | 61 | | - * | 62 | | - * @param void なし | 63 | | - * @return void なし | 64 | | - */ | 65 | | - public function __clone() | 66 | | - { | 67 | | - } // end of function:__clone() | 68 | | - | 69 | | - /** | 70 | | - * modelメソッド(モデル) | 71 | | - * | 72 | | - * データ取得等のモデルに相当する部分の処理を行う | 73 | | - * | 74 | | - * @param void なし | 75 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 76 | | - */ | 77 | | - public function model() | 78 | | - { | 79 | | - // 必要なインスタンスを生成 | 80 | | - $this->obj_conf = new RisolutoConf(); | 81 | | - $this->obj_conf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 82 | | - | 83 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 84 | | - // ログイン画面に遷移する | 85 | | - if ( ! $this->obj_util->is_Admin() ) | 86 | | - { | 87 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 88 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 89 | | - return false; | 90 | | - } // end of if | 91 | | - | 92 | | - | 93 | | - | 94 | | - //------------------------------------------------------------------------ | 95 | | - // セッション情報の取得 | 96 | | - //------------------------------------------------------------------------ | 97 | | - | 98 | | - // セッションからエラーメッセージと入力値を取得し、削除する | 99 | | - $this->gotDat[ 'errMsg' ] = $this->obj_sess->sessLoad( $this->obj_sess->sessLoad( 'currentcage' ) ); | 100 | | - $this->obj_sess->sessRevoke( $this->obj_sess->sessLoad( 'currentcage' ) ); | 101 | | - | 102 | | - | 103 | | - | 104 | | - //------------------------------------------------------------------------ | 105 | | - // デフォルトのヘッダ情報を取得 | 106 | | - //------------------------------------------------------------------------ | 107 | | - if ( !isset( $this->gotDat[ 'errMsg' ][ 'headerinfo' ] ) or empty( $this->gotDat[ 'errMsg' ][ 'headerinfo' ] ) ) | 108 | | - { | 109 | | - // データベースに接続する | 110 | | - // データベース操作クラスのインスタンスを生成する | 111 | | - $this->obj_db = new RisolutoDb(); | 112 | | - | 113 | | - // データベースに接続する | 114 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 115 | | - { | 116 | | - // SQL文を組み立てる | 117 | | - $sql =<<<End_Of_SQL | 118 | | - | 119 | | - SELECT `headers`.`header_id` -- header ID | 120 | | - , `headers`.`robot_index` -- robots(index) | 121 | | - , `headers`.`robot_follow` -- robots(follow) | 122 | | - , `headers`.`title` -- title | 123 | | - , `headers`.`description` -- description | 124 | | - , `headers`.`keywords` -- keywords | 125 | | - , `headers`.`author` -- author | 126 | | - , `headers`.`javascript` -- javascript | 127 | | - , `headers`.`css` -- css | 128 | | - , `headers`.`favicon` -- favicon | 129 | | - FROM `risoluto_t_headerinfo` headers | 130 | | - WHERE `headers`.`cage` = ? | 131 | | - AND `headers`.`act` = 'pageview' | 132 | | - | 133 | | -End_Of_SQL; | 134 | | - | 135 | | - // パラメタも用意する | 136 | | - $param = array( | 137 | | - $this->mycage | 138 | | - ); | 139 | | - | 140 | | - // SQLの実行に失敗した場合は、例外を投げる | 141 | | - $tmp_result = $this->obj_db->dbGetRow( $sql, $param ); | 142 | | - if ( PEAR::isError( $tmp_result ) ) | 143 | | - { | 144 | | - // 接続をクローズする | 145 | | - $this->obj_db->dbDisConnect(); | 146 | | - throw new Exception( 'default header info Get Failure' ); | 147 | | - return false; | 148 | | - } // end of if | 149 | | - // 入力された値と、取得した値を使ってデータをインサートする | 150 | | - else | 151 | | - { | 152 | | - $this->gotDat[ 'errMsg' ][ 'headerinfo' ] = $tmp_result; | 153 | | - } // end of else | 154 | | - | 155 | | - } // end of if | 156 | | - // データベースに接続できなかった場合は、例外を投げる | 157 | | - else | 158 | | - { | 159 | | - throw new Exception( 'DB Connection Failure' ); | 160 | | - return false; | 161 | | - } // end of else | 162 | | - | 163 | | - } // end of if | 164 | | - | 165 | | - | 166 | | - | 167 | | - //------------------------------------------------------------------------ | 168 | | - // CKEditorが存在すれば使用する | 169 | | - //------------------------------------------------------------------------ | 170 | | - clearstatcache(); | 171 | | - $this->gotDat[ 'is_ckeditor' ] = file_exists( RISOLUTO_DOCROOT . '/ckeditor/' ); | 172 | | - | 173 | | - return true; | 174 | | - } // end of function:model() | 175 | | - | 176 | | - /** | 177 | | - * viewメソッド(モデル) | 178 | | - * | 179 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 180 | | - * | 181 | | - * @param void なし | 182 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 183 | | - */ | 184 | | - public function view() | 185 | | - { | 186 | | - // アサイン | 187 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 188 | | - | 189 | | - $this->smarty->assign ( 'menu_cage', $this->obj_adminconf->get( 'COMMON', 'menu_cage' ) ); | 190 | | - $this->smarty->assign ( 'menu_act', $this->obj_adminconf->get( 'COMMON', 'menu_act' ) ); | 191 | | - | 192 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 193 | | - | 194 | | - $this->smarty->assign ( 'is_ckeditor', $this->gotDat[ 'is_ckeditor' ] ); | 195 | | - $this->smarty->assign ( 'base_url', $this->obj_util->getBaseUrl() ); | 196 | | - | 197 | | - $this->smarty->assign ( 'errMsg', $this->gotDat[ 'errMsg' ][ 'message' ] ); | 198 | | - $this->smarty->assign ( 'entered_body', $this->gotDat[ 'errMsg' ][ 'body' ] ); | 199 | | - $this->smarty->assign ( 'entered_slug', $this->gotDat[ 'errMsg' ][ 'slug' ] ); | 200 | | - $this->smarty->assign ( 'entered_headerinfo', $this->gotDat[ 'errMsg' ][ 'headerinfo' ] ); | 201 | | - | 202 | | - // 表示 | 203 | | - $this->smarty->display( 'pageadd_entry.tpl' ); | 204 | | - | 205 | | - return true; | 206 | | - | 207 | | - } // end of function:view() | 208 | | - | 209 | | - } // end of class:pageadd_entry | 210 | | - | 211 | | -?> |
| | @@ -1,273 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * ページ情報画面クラス | 4 | | - * | 5 | | - * ページ情報画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - /** | 18 | | - * データベース操作クラス | 19 | | - */ | 20 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 21 | | - | 22 | | - class pageview extends simplepage_base | 23 | | - { | 24 | | - //------------------------------------------------------// | 25 | | - // クラス変数定義 | 26 | | - //------------------------------------------------------// | 27 | | - /** | 28 | | - * データベース操作クラスインスタンスを保持する変数 | 29 | | - * @access private | 30 | | - * @var object | 31 | | - */ | 32 | | - private $obj_db; | 33 | | - /** | 34 | | - * ユーティリティクラスインスタンスを保持する変数 | 35 | | - * @access private | 36 | | - * @var object | 37 | | - */ | 38 | | - private $obj_conf; | 39 | | - /** | 40 | | - * 取得データを保持する変数 | 41 | | - * @access private | 42 | | - * @var object | 43 | | - */ | 44 | | - private $gotDat; | 45 | | - | 46 | | - //------------------------------------------------------// | 47 | | - // クラスメソッド定義 | 48 | | - //------------------------------------------------------// | 49 | | - /** | 50 | | - * コンストラクタメソッド | 51 | | - * | 52 | | - * コンストラクタメソッド | 53 | | - * | 54 | | - * @param void なし | 55 | | - * @return void なし | 56 | | - */ | 57 | | - public function __construct() | 58 | | - { | 59 | | - } // end of function:__construct() | 60 | | - | 61 | | - /** | 62 | | - * クローンメソッド | 63 | | - * | 64 | | - * クローンメソッド | 65 | | - * | 66 | | - * @param void なし | 67 | | - * @return void なし | 68 | | - */ | 69 | | - public function __clone() | 70 | | - { | 71 | | - } // end of function:__clone() | 72 | | - | 73 | | - /** | 74 | | - * modelメソッド(モデル) | 75 | | - * | 76 | | - * データ取得等のモデルに相当する部分の処理を行う | 77 | | - * | 78 | | - * @param void なし | 79 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 80 | | - */ | 81 | | - public function model() | 82 | | - { | 83 | | - // 必要なインスタンスを生成 | 84 | | - $this->obj_db = new RisolutoDb(); | 85 | | - $this->obj_conf = new RisolutoConf(); | 86 | | - $this->obj_conf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 87 | | - | 88 | | - | 89 | | - | 90 | | - //------------------------------------------------------------------------ | 91 | | - // GETでページIDがセットされていたら、取得する | 92 | | - //------------------------------------------------------------------------ | 93 | | - // ページID | 94 | | - if ( isset( $_GET[ 'id' ] ) and !empty( $_GET[ 'id' ] ) ) | 95 | | - { | 96 | | - $tmp_entered[ 'id' ] = strip_tags( trim( $_GET[ 'id' ] ) ); | 97 | | - } // end of if | 98 | | - else | 99 | | - { | 100 | | - $tmp_entered[ 'id' ] = 0; | 101 | | - } // end of else | 102 | | - | 103 | | - | 104 | | - | 105 | | - //------------------------------------------------------------------------ | 106 | | - // 入力情報のチェック | 107 | | - //------------------------------------------------------------------------ | 108 | | - // 渡されてきたページIDが数字1~10桁でなければ、スラッグして取り扱う | 109 | | - if ( ! preg_match( '/^[[:digit:]]{1,10}$/', $tmp_entered[ 'id' ] ) ) | 110 | | - { | 111 | | - $tmp_target = '`pages`.`page_slug`'; | 112 | | - } // end of if | 113 | | - else | 114 | | - { | 115 | | - $tmp_target = '`pages`.`page_id`'; | 116 | | - } // end of else | 117 | | - | 118 | | - | 119 | | - | 120 | | - //------------------------------------------------------------------------ | 121 | | - // DBから情報を取得する | 122 | | - //------------------------------------------------------------------------ | 123 | | - | 124 | | - // データベースに接続する | 125 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 126 | | - { | 127 | | - // SQL文を組み立てる | 128 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 129 | | - $sql =<<<End_Of_SQL | 130 | | - | 131 | | - SELECT `pages`.`page_id` -- ID | 132 | | - , `pages`.`page_body` -- 内容 | 133 | | - , `pages`.`page_slug` -- スラッグ | 134 | | - FROM $tmp_t_pages pages | 135 | | - WHERE $tmp_target = ? | 136 | | - | 137 | | -End_Of_SQL; | 138 | | - | 139 | | - // パラメタも用意する | 140 | | - $param = array( | 141 | | - $tmp_entered[ 'id' ] | 142 | | - ); | 143 | | - | 144 | | - // SQLを実行 | 145 | | - $tmp_result = $this->obj_db->dbGetRow( $sql, $param ); | 146 | | - if ( PEAR::isError( $tmp_result ) ) | 147 | | - { | 148 | | - // エラーの場合は値を取得できなかったものとして扱う | 149 | | - $tmp_result = null; | 150 | | - } // end of if | 151 | | - else | 152 | | - { | 153 | | - // 正常に実行できた場合は取得した値を採用する | 154 | | - $this->gotDat = $tmp_result; | 155 | | - } // end of else | 156 | | - | 157 | | - | 158 | | - | 159 | | - // ヘッダ情報を取得 | 160 | | - // SQL文を組み立てる | 161 | | - $tmp_cage = '_' . $this->mycage . '_SYSTEM_'; | 162 | | - $sql =<<<End_Of_SQL | 163 | | - | 164 | | - SELECT `headers`.`robot_index` -- robots(index) | 165 | | - , `headers`.`robot_follow` -- robots(follow) | 166 | | - , `headers`.`title` -- title | 167 | | - , `headers`.`description` -- description | 168 | | - , `headers`.`keywords` -- keywords | 169 | | - , `headers`.`author` -- author | 170 | | - , `headers`.`javascript` -- JavaScriptファイルパス | 171 | | - , `headers`.`css` -- CSSファイルパス | 172 | | - , `headers`.`favicon` -- Faviconファイルパス | 173 | | - FROM `risoluto_t_headerinfo` headers | 174 | | - WHERE `headers`.`act` = ? | 175 | | - AND `headers`.`cage` = ? | 176 | | - | 177 | | -End_Of_SQL; | 178 | | - | 179 | | - // パラメタも用意する | 180 | | - $param = array( | 181 | | - $this->gotDat[ 'page_id' ] | 182 | | - , $tmp_cage | 183 | | - ); | 184 | | - | 185 | | - // SQLを実行 | 186 | | - $tmp_result = $this->obj_db->dbGetRow( $sql, $param ); | 187 | | - if ( PEAR::isError( $tmp_result ) or empty( $tmp_result ) ) | 188 | | - { | 189 | | - // エラーの場合は標準のヘッダを取得する | 190 | | - $this->gotDat[ 'headerinfo' ] = $this->obj_util->getHeader(); | 191 | | - } // end of if | 192 | | - else | 193 | | - { | 194 | | - | 195 | | - // 正常に実行できた場合は取得した値を採用する | 196 | | - // robots(index) | 197 | | - if( $tmp_result[ 'robot_index' ] == 0 ) | 198 | | - { | 199 | | - $tmp_val[ 'robots' ] = 'noindex,'; | 200 | | - } // end of if | 201 | | - else | 202 | | - { | 203 | | - $tmp_val[ 'robots' ] = 'index,'; | 204 | | - } // end of else | 205 | | - | 206 | | - // robots(follow) | 207 | | - if( $tmp_result[ 'robot_follow' ] == 0 ) | 208 | | - { | 209 | | - $tmp_val[ 'robots' ] .= 'nofollow'; | 210 | | - } // end of if | 211 | | - else | 212 | | - { | 213 | | - $tmp_val[ 'robots' ] .= 'follow'; | 214 | | - } // end of else | 215 | | - | 216 | | - // title | 217 | | - $tmp_val[ 'title' ] = $tmp_result[ 'title' ]; | 218 | | - // description | 219 | | - $tmp_val[ 'description' ] = $tmp_result[ 'description' ]; | 220 | | - // keywords | 221 | | - $tmp_val[ 'keywords' ] = $tmp_result[ 'keywords' ]; | 222 | | - // author | 223 | | - $tmp_val[ 'author' ] = $tmp_result[ 'author' ]; | 224 | | - | 225 | | - // JavaScript | 226 | | - $tmp_val[ 'javascript' ] = explode( ',', $tmp_result[ 'javascript' ] ); | 227 | | - // CSS | 228 | | - $tmp_val[ 'css' ] = explode( ',', $tmp_result[ 'css' ] ); | 229 | | - | 230 | | - // URL情報等を付け加える | 231 | | - $tmp_val[ 'normal_url' ] = $this->obj_util->getBaseUrl(); | 232 | | - $tmp_val[ 'https_url' ] = str_replace( 'http://', 'https://', $tmp_val[ 'normal_url' ] ); | 233 | | - $tmp_val[ 'http_url' ] = str_replace( 'https://', 'http://', $tmp_val[ 'normal_url' ] ); | 234 | | - | 235 | | - $this->gotDat[ 'headerinfo' ] = $tmp_val; | 236 | | - } // end of else | 237 | | - | 238 | | - } // end of if | 239 | | - // データベースに接続できなかった場合は値を取得できなかったものとして扱う | 240 | | - else | 241 | | - { | 242 | | - $this->gotDat = null; | 243 | | - } // end of else | 244 | | - | 245 | | - | 246 | | - | 247 | | - return true; | 248 | | - } // end of function:model() | 249 | | - | 250 | | - /** | 251 | | - * viewメソッド(モデル) | 252 | | - * | 253 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 254 | | - * | 255 | | - * @param void なし | 256 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 257 | | - */ | 258 | | - public function view() | 259 | | - { | 260 | | - | 261 | | - // アサイン | 262 | | - $this->smarty->assign ( 'header', $this->gotDat[ 'headerinfo' ] ); | 263 | | - $this->smarty->assign ( 'body', stripslashes( $this->gotDat[ 'page_body' ] ) ); | 264 | | - | 265 | | - // 表示 | 266 | | - $this->smarty->display( 'pageview.tpl' ); | 267 | | - | 268 | | - return true; | 269 | | - | 270 | | - } // end of function:view() | 271 | | - | 272 | | - } // end of class:pageview | 273 | | -?> |
| | @@ -1,239 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * ページ一覧画面クラス | 4 | | - * | 5 | | - * ページ一覧画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - /** | 18 | | - * データベース操作クラス | 19 | | - */ | 20 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 21 | | - | 22 | | - /** | 23 | | - * ページャクラス | 24 | | - */ | 25 | | - require_once( 'Pager.php' ); | 26 | | - | 27 | | - class pagelist extends simplepage_base | 28 | | - { | 29 | | - //------------------------------------------------------// | 30 | | - // クラス変数定義 | 31 | | - //------------------------------------------------------// | 32 | | - /** | 33 | | - * データベース操作クラスインスタンスを保持する変数 | 34 | | - * @access private | 35 | | - * @var object | 36 | | - */ | 37 | | - private $obj_db; | 38 | | - /** | 39 | | - * ユーティリティクラスインスタンスを保持する変数 | 40 | | - * @access private | 41 | | - * @var object | 42 | | - */ | 43 | | - private $obj_conf; | 44 | | - /** | 45 | | - * 取得データを保持する変数 | 46 | | - * @access private | 47 | | - * @var object | 48 | | - */ | 49 | | - private $gotDat; | 50 | | - | 51 | | - //------------------------------------------------------// | 52 | | - // クラスメソッド定義 | 53 | | - //------------------------------------------------------// | 54 | | - /** | 55 | | - * コンストラクタメソッド | 56 | | - * | 57 | | - * コンストラクタメソッド | 58 | | - * | 59 | | - * @param void なし | 60 | | - * @return void なし | 61 | | - */ | 62 | | - public function __construct() | 63 | | - { | 64 | | - } // end of function:__construct() | 65 | | - | 66 | | - /** | 67 | | - * クローンメソッド | 68 | | - * | 69 | | - * クローンメソッド | 70 | | - * | 71 | | - * @param void なし | 72 | | - * @return void なし | 73 | | - */ | 74 | | - public function __clone() | 75 | | - { | 76 | | - } // end of function:__clone() | 77 | | - | 78 | | - /** | 79 | | - * modelメソッド(モデル) | 80 | | - * | 81 | | - * データ取得等のモデルに相当する部分の処理を行う | 82 | | - * | 83 | | - * @param void なし | 84 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 85 | | - */ | 86 | | - public function model() | 87 | | - { | 88 | | - // 必要なインスタンスを生成 | 89 | | - $this->obj_db = new RisolutoDb(); | 90 | | - $this->obj_conf = new RisolutoConf(); | 91 | | - $this->obj_conf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 92 | | - | 93 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 94 | | - // ログイン画面に遷移する | 95 | | - if ( ! $this->obj_util->is_Admin() ) | 96 | | - { | 97 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 98 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 99 | | - return false; | 100 | | - } // end of if | 101 | | - | 102 | | - | 103 | | - | 104 | | - // セッションを削除 | 105 | | - $this->obj_sess->sessRevoke( $this->obj_sess->sessLoad( 'currentcage' ) ); | 106 | | - | 107 | | - | 108 | | - | 109 | | - //------------------------------------------------------------------------ | 110 | | - // ページ情報の取得 | 111 | | - //------------------------------------------------------------------------ | 112 | | - | 113 | | - // データベースに接続する | 114 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 115 | | - { | 116 | | - // SQL文を組み立てる | 117 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 118 | | - $tmp_cage = '_' . $this->mycage . '_SYSTEM_'; | 119 | | - $sql =<<<End_Of_SQL | 120 | | - | 121 | | - SELECT `pages`.`page_id` -- ページID | 122 | | - , `pages`.`page_slug` -- ページスラッグ | 123 | | - , IFNULL( `header`.`title`, '' ) as page_title -- ページタイトル | 124 | | - FROM $tmp_t_pages pages LEFT JOIN `risoluto_t_headerinfo` header | 125 | | - ON `pages`.`page_id` = `header`.`act` | 126 | | - AND `header`.`cage` = ? | 127 | | - ORDER BY `pages`.`page_id` ASC | 128 | | - | 129 | | -End_Of_SQL; | 130 | | - | 131 | | - // パラメタも用意する | 132 | | - $param = array( | 133 | | - $tmp_cage | 134 | | - ); | 135 | | - | 136 | | - // SQLの実行に失敗した場合は、例外を投げる | 137 | | - $tmp_result = $this->obj_db->dbGetAll( $sql, $param ); | 138 | | - if ( PEAR::isError( $tmp_result ) ) | 139 | | - { | 140 | | - // 接続をクローズする | 141 | | - $this->obj_db->dbDisConnect(); | 142 | | - throw new Exception( 'page list get Failure' ); | 143 | | - return false; | 144 | | - } // end of if | 145 | | - | 146 | | - // 接続に成功している場合は接続をクローズする | 147 | | - $this->obj_db->dbDisConnect(); | 148 | | - } // end of if | 149 | | - // データベースに接続できなかった場合は、例外を投げる | 150 | | - else | 151 | | - { | 152 | | - throw new Exception( 'DB Connection Failure' ); | 153 | | - return false; | 154 | | - } // end of else | 155 | | - | 156 | | - // 取得した情報を表示に適した形に加工する | 157 | | - $tmp_result_cooked = array(); | 158 | | - for( $cnt = 0 ; $cnt < count( $tmp_result ) ; $cnt ++ ) | 159 | | - { | 160 | | - array_push( $tmp_result_cooked, array( | 161 | | - 'page_id' => $tmp_result[ $cnt ][ 'page_id' ] | 162 | | - , 'page_title' => $tmp_result[ $cnt ][ 'page_title' ] | 163 | | - , 'page_slug' => $tmp_result[ $cnt ][ 'page_slug' ] | 164 | | - ) | 165 | | - ); | 166 | | - } // end of for | 167 | | - | 168 | | - | 169 | | - //------------------------------------------------------------------------ | 170 | | - // Pagerのセットアップ | 171 | | - //------------------------------------------------------------------------ | 172 | | - // Pagerオプション値を連想配列にセット | 173 | | - $pager_params = array( | 174 | | - 'itemData' => $tmp_result_cooked | 175 | | - , 'urlVar' => 'p' | 176 | | - , 'mode' => $this->obj_adminconf->get( 'PAGER', 'mode' ) | 177 | | - , 'perPage' => $this->obj_adminconf->get( 'PAGER', 'perPage' ) | 178 | | - , 'delta' => $this->obj_adminconf->get( 'PAGER', 'delta' ) | 179 | | - , 'prevImg' => $this->obj_adminconf->get( 'PAGER', 'prevImg' ) | 180 | | - , 'nextImg' => $this->obj_adminconf->get( 'PAGER', 'nextImg' ) | 181 | | - , 'firstPagePre' => $this->obj_adminconf->get( 'PAGER', 'firstPagePre' ) | 182 | | - , 'firstPageText' => $this->obj_adminconf->get( 'PAGER', 'firstPageText' ) | 183 | | - , 'firstPagePost' => $this->obj_adminconf->get( 'PAGER', 'firstPagePost' ) | 184 | | - , 'lastPagePre' => $this->obj_adminconf->get( 'PAGER', 'lastPagePre' ) | 185 | | - , 'lastPageText' => $this->obj_adminconf->get( 'PAGER', 'lastPageText' ) | 186 | | - , 'lastPagePost' => $this->obj_adminconf->get( 'PAGER', 'firstPagePost' ) | 187 | | - , 'separator' => $this->obj_adminconf->get( 'PAGER', 'separator' ) | 188 | | - , 'spacesBeforeSeparator' => $this->obj_adminconf->get( 'PAGER', 'spacesSepCnt' ) | 189 | | - , 'spacesAfterSeparator' => $this->obj_adminconf->get( 'PAGER', 'spacesSepCnt' ) | 190 | | - , 'clearIfVoid' => ( !is_null( $this->obj_adminconf->get( "PAGER", "clearIfVoid" ) ) ? true : false ) | 191 | | - ); | 192 | | - | 193 | | - // ページャのインスタンスを生成し、必要なデータを生成する | 194 | | - $pager = & Pager::factory( $pager_params ); | 195 | | - $this->gotDat[ 'pager_link' ] = $pager->getLinks(); | 196 | | - | 197 | | - // ページデータについては、一番外にある配列の添え字をゼロスタートへリセットする | 198 | | - $this->gotDat[ 'pager_dat' ] = array(); | 199 | | - foreach( $pager->getPageData() as $key => $val ) | 200 | | - { | 201 | | - array_push( $this->gotDat[ 'pager_dat' ], $val ); | 202 | | - } | 203 | | - | 204 | | - | 205 | | - | 206 | | - return true; | 207 | | - } // end of function:model() | 208 | | - | 209 | | - /** | 210 | | - * viewメソッド(モデル) | 211 | | - * | 212 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 213 | | - * | 214 | | - * @param void なし | 215 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 216 | | - */ | 217 | | - public function view() | 218 | | - { | 219 | | - // アサイン | 220 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 221 | | - | 222 | | - $this->smarty->assign ( 'menu_cage', $this->obj_adminconf->get( 'COMMON', 'menu_cage' ) ); | 223 | | - $this->smarty->assign ( 'menu_act', $this->obj_adminconf->get( 'COMMON', 'menu_act' ) ); | 224 | | - | 225 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 226 | | - | 227 | | - $this->smarty->assign ( 'pagelist', $this->gotDat[ 'pager_dat' ] ); | 228 | | - $this->smarty->assign ( 'pagerlink', $this->gotDat[ 'pager_link' ][ 'all' ] ); | 229 | | - | 230 | | - // 表示 | 231 | | - $this->smarty->display( 'pagelist.tpl' ); | 232 | | - | 233 | | - return true; | 234 | | - | 235 | | - } // end of function:view() | 236 | | - | 237 | | - } // end of class:pagelist | 238 | | - | 239 | | -?> |
| | @@ -1,382 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * 新規ページ追加完了画面クラス | 4 | | - * | 5 | | - * 新規ページ追加完了画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - /** | 18 | | - * データベース操作クラス | 19 | | - */ | 20 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 21 | | - | 22 | | - class pageadd_complete extends simplepage_base | 23 | | - { | 24 | | - //------------------------------------------------------// | 25 | | - // クラス変数定義 | 26 | | - //------------------------------------------------------// | 27 | | - /** | 28 | | - * データベース操作クラスインスタンスを保持する変数 | 29 | | - * @access private | 30 | | - * @var object | 31 | | - */ | 32 | | - private $obj_db; | 33 | | - /** | 34 | | - * ユーティリティクラスインスタンスを保持する変数 | 35 | | - * @access private | 36 | | - * @var object | 37 | | - */ | 38 | | - private $obj_conf; | 39 | | - /** | 40 | | - * 取得データを保持する変数 | 41 | | - * @access private | 42 | | - * @var object | 43 | | - */ | 44 | | - private $gotDat; | 45 | | - | 46 | | - //------------------------------------------------------// | 47 | | - // クラスメソッド定義 | 48 | | - //------------------------------------------------------// | 49 | | - /** | 50 | | - * コンストラクタメソッド | 51 | | - * | 52 | | - * コンストラクタメソッド | 53 | | - * | 54 | | - * @param void なし | 55 | | - * @return void なし | 56 | | - */ | 57 | | - public function __construct() | 58 | | - { | 59 | | - } // end of function:__construct() | 60 | | - | 61 | | - /** | 62 | | - * クローンメソッド | 63 | | - * | 64 | | - * クローンメソッド | 65 | | - * | 66 | | - * @param void なし | 67 | | - * @return void なし | 68 | | - */ | 69 | | - public function __clone() | 70 | | - { | 71 | | - } // end of function:__clone() | 72 | | - | 73 | | - /** | 74 | | - * modelメソッド(モデル) | 75 | | - * | 76 | | - * データ取得等のモデルに相当する部分の処理を行う | 77 | | - * | 78 | | - * @param void なし | 79 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 80 | | - */ | 81 | | - public function model() | 82 | | - { | 83 | | - // 必要なインスタンスを生成 | 84 | | - $this->obj_db = new RisolutoDb(); | 85 | | - $this->obj_conf = new RisolutoConf(); | 86 | | - $this->obj_conf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 87 | | - | 88 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 89 | | - // ログイン画面に遷移する | 90 | | - if ( ! $this->obj_util->is_Admin() ) | 91 | | - { | 92 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 93 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 94 | | - return false; | 95 | | - } // end of if | 96 | | - | 97 | | - // 前画面のCageが自分と同じでない or 前画面のActが「pageadd_confirm」でない場合、 | 98 | | - // 入力画面に飛ばす | 99 | | - $tmp_cage_last = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 100 | | - $tmp_cage_current = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 101 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 102 | | - | 103 | | - if ( ( $tmp_cage_last != $tmp_cage_current and $tmp_cage_last != 'admin.site' ) or ( $tmp_act != 'pageadd_confirm' and $tmp_act != 'uploadviewer' ) ) | 104 | | - { | 105 | | - $this->obj_util->redirectTo( 'pagelist', $tmp_cage_current ); | 106 | | - return false; | 107 | | - } // end of if | 108 | | - | 109 | | - | 110 | | - | 111 | | - //------------------------------------------------------------------------ | 112 | | - // セッションから値を取得し、セッションを削除 | 113 | | - //------------------------------------------------------------------------ | 114 | | - $tmp_entered = $this->obj_sess->sessLoad( $this->obj_sess->sessLoad( 'currentcage' ) ); | 115 | | - $this->obj_sess->sessRevoke( $this->obj_sess->sessLoad( 'currentcage' ) ); | 116 | | - | 117 | | - | 118 | | - | 119 | | - //------------------------------------------------------------------------ | 120 | | - // 現在の最新IDを取得 | 121 | | - //------------------------------------------------------------------------ | 122 | | - | 123 | | - // データベースに接続する | 124 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 125 | | - { | 126 | | - // トランザクションを開始 | 127 | | - $this->obj_db->dbBeginTransaction(); | 128 | | - | 129 | | - // SQL文を組み立てる | 130 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 131 | | - $sql =<<<End_Of_SQL | 132 | | - | 133 | | - SELECT MAX( `pages`.`page_id` ) + 1 as latest_id | 134 | | - FROM $tmp_t_pages pages | 135 | | - FOR UPDATE; | 136 | | - | 137 | | -End_Of_SQL; | 138 | | - | 139 | | - // パラメタも用意する | 140 | | - $param = array( | 141 | | - ); | 142 | | - | 143 | | - // SQLの実行に失敗した場合は、例外を投げる | 144 | | - $tmp_pageid = $this->obj_db->dbGetRow( $sql, $param ); | 145 | | - if ( PEAR::isError( $tmp_pageid ) ) | 146 | | - { | 147 | | - // 接続をクローズする | 148 | | - $this->obj_db->dbDisConnect(); | 149 | | - throw new Exception( 'Latest page_id Get Failure' ); | 150 | | - return false; | 151 | | - } // end of if | 152 | | - // 入力された値と、取得した値を使ってデータをインサートする | 153 | | - else | 154 | | - { | 155 | | - | 156 | | - // 取得したIDが上限値を上回っていた場合、例外を投げる | 157 | | - if ( $tmp_pageid[ 'latest_id' ] > $this->obj_conf->get( 'LIMITS', 'id_upper' ) ) | 158 | | - { | 159 | | - // 接続をクローズする | 160 | | - $this->obj_db->dbDisConnect(); | 161 | | - throw new Exception( 'id was exceeded upper limit' ); | 162 | | - return false; | 163 | | - }// end of if | 164 | | - | 165 | | - // 取得したIDが空なら「0」をセットする | 166 | | - if ( empty( $tmp_pageid[ 'latest_id' ] ) ) | 167 | | - { | 168 | | - $tmp_pageid[ 'latest_id' ] = 0; | 169 | | - } // end of if | 170 | | - | 171 | | - // トランザクションを開始 | 172 | | - $this->obj_db->dbBeginTransaction(); | 173 | | - | 174 | | - // SQL文を組み立てる | 175 | | - $sql =<<<End_Of_SQL | 176 | | - | 177 | | - INSERT INTO $tmp_t_pages | 178 | | - ( | 179 | | - `ctime` | 180 | | - , `cuser` | 181 | | - , `mtime` | 182 | | - , `muser` | 183 | | - , `page_id` | 184 | | - , `page_body` | 185 | | - , `page_slug` | 186 | | - ) VALUES ( | 187 | | - now() | 188 | | - , ? | 189 | | - , now() | 190 | | - , ? | 191 | | - , ? | 192 | | - , ? | 193 | | - , ? | 194 | | - ); | 195 | | - | 196 | | -End_Of_SQL; | 197 | | - | 198 | | - // パラメタも用意する | 199 | | - $tmp_myself = $this->obj_util->answerMyId(); | 200 | | - $param = array( | 201 | | - $tmp_myself | 202 | | - , $tmp_myself | 203 | | - , $tmp_pageid[ 'latest_id' ] | 204 | | - , $tmp_entered[ 'body' ] | 205 | | - , $tmp_entered[ 'slug' ] | 206 | | - ); | 207 | | - | 208 | | - // Insertを実行 | 209 | | - $tmp_insert_result = $this->obj_db->dbExecSQL( $sql, $param ); | 210 | | - if ( PEAR::isError( $tmp_insert_result ) ) | 211 | | - { | 212 | | - // エラーの場合はロールバックして接続を閉じ、例外を投げる | 213 | | - $this->obj_db->dbRollback(); | 214 | | - $this->obj_db->dbDisConnect(); | 215 | | - throw new Exception( 'Insert Failure:' . $tmp_t_pages ); | 216 | | - return false; | 217 | | - } // end of if | 218 | | - } // end of else | 219 | | - | 220 | | - | 221 | | - | 222 | | - // SQL文を組み立てる | 223 | | - $tmp_cage = '_' . $this->mycage . '_SYSTEM_'; | 224 | | - $sql =<<<End_Of_SQL | 225 | | - | 226 | | - SELECT MAX( `headers`.`header_id` ) + 1 as latest_id | 227 | | - FROM `risoluto_t_headerinfo` headers | 228 | | - FOR UPDATE; | 229 | | - | 230 | | -End_Of_SQL; | 231 | | - | 232 | | - // パラメタも用意する | 233 | | - $param = array( | 234 | | - ); | 235 | | - | 236 | | - // SQLの実行に失敗した場合は、例外を投げる | 237 | | - $tmp_headerid = $this->obj_db->dbGetRow( $sql, $param ); | 238 | | - if ( PEAR::isError( $tmp_headerid ) ) | 239 | | - { | 240 | | - // 接続をクローズする | 241 | | - $this->obj_db->dbDisConnect(); | 242 | | - throw new Exception( 'Latest latest_id Get Failure' ); | 243 | | - return false; | 244 | | - } // end of if | 245 | | - // 入力された値と、取得した値を使ってデータをインサートする | 246 | | - else | 247 | | - { | 248 | | - | 249 | | - // 取得したIDが下限値を下回っていた場合(=ユーザ領域データが1つもない)、 | 250 | | - // 下限値をIDとして使用する | 251 | | - if ( $tmp_headerid[ 'latest_id' ] < $this->obj_conf->get( 'LIMITS', 'id_lower' ) ) | 252 | | - { | 253 | | - $tmp_headerid[ 'latest_id' ] = $this->obj_conf->get( 'LIMITS', 'id_lower' ); | 254 | | - }// end of if | 255 | | - // 取得したIDが上限値を上回っていた場合、例外を投げる | 256 | | - if ( $tmp_headerid[ 'latest_id' ] > $this->obj_conf->get( 'LIMITS', 'id_upper' ) ) | 257 | | - { | 258 | | - // 接続をクローズする | 259 | | - $this->obj_db->dbDisConnect(); | 260 | | - throw new Exception( 'id was exceeded upper limit' ); | 261 | | - return false; | 262 | | - }// end of if | 263 | | - | 264 | | - // トランザクションを開始 | 265 | | - $this->obj_db->dbBeginTransaction(); | 266 | | - | 267 | | - // SQL文を組み立てる | 268 | | - $sql =<<<End_Of_SQL | 269 | | - | 270 | | - INSERT INTO `risoluto_t_headerinfo` | 271 | | - ( | 272 | | - `ctime` | 273 | | - , `cuser` | 274 | | - , `mtime` | 275 | | - , `muser` | 276 | | - , `header_id` | 277 | | - , `act` | 278 | | - , `cage` | 279 | | - , `robot_index` | 280 | | - , `robot_follow` | 281 | | - , `title` | 282 | | - , `description` | 283 | | - , `keywords` | 284 | | - , `author` | 285 | | - , `javascript` | 286 | | - , `css` | 287 | | - , `favicon` | 288 | | - ) VALUES ( | 289 | | - now() | 290 | | - , ? | 291 | | - , now() | 292 | | - , ? | 293 | | - , ? | 294 | | - , ? | 295 | | - , ? | 296 | | - , ? | 297 | | - , ? | 298 | | - , ? | 299 | | - , ? | 300 | | - , ? | 301 | | - , ? | 302 | | - , ? | 303 | | - , ? | 304 | | - , ? | 305 | | - ); | 306 | | - | 307 | | -End_Of_SQL; | 308 | | - | 309 | | - // パラメタも用意する | 310 | | - $tmp_myself = $this->obj_util->answerMyId(); | 311 | | - $param = array( | 312 | | - $tmp_myself | 313 | | - , $tmp_myself | 314 | | - , $tmp_headerid[ 'latest_id' ] | 315 | | - , $tmp_pageid [ 'latest_id' ] | 316 | | - , $tmp_cage | 317 | | - , $tmp_entered[ 'headerinfo' ][ 'robot_index' ] | 318 | | - , $tmp_entered[ 'headerinfo' ][ 'robot_follow' ] | 319 | | - , $tmp_entered[ 'headerinfo' ][ 'title' ] | 320 | | - , $tmp_entered[ 'headerinfo' ][ 'description' ] | 321 | | - , $tmp_entered[ 'headerinfo' ][ 'keywords' ] | 322 | | - , $tmp_entered[ 'headerinfo' ][ 'author' ] | 323 | | - , $tmp_entered[ 'headerinfo' ][ 'javascript' ] | 324 | | - , $tmp_entered[ 'headerinfo' ][ 'css' ] | 325 | | - , $tmp_entered[ 'headerinfo' ][ 'favicon' ] | 326 | | - ); | 327 | | - | 328 | | - // Insertを実行 | 329 | | - $tmp_insert_result = $this->obj_db->dbExecSQL( $sql, $param ); | 330 | | - if ( PEAR::isError( $tmp_insert_result ) ) | 331 | | - { | 332 | | - // エラーの場合はロールバックして接続を閉じ、例外を投げる | 333 | | - $this->obj_db->dbRollback(); | 334 | | - $this->obj_db->dbDisConnect(); | 335 | | - throw new Exception( 'Insert Failure: risoluto_t_headerinfo' ); | 336 | | - return false; | 337 | | - } // end of if | 338 | | - } // end of else | 339 | | - | 340 | | - // 正常に実行できた場合はコミットして接続を閉じる | 341 | | - $this->obj_db->dbCommit(); | 342 | | - $this->obj_db->dbDisConnect(); | 343 | | - | 344 | | - } // end of if | 345 | | - // データベースに接続できなかった場合は、例外を投げる | 346 | | - else | 347 | | - { | 348 | | - throw new Exception( 'DB Connection Failure' ); | 349 | | - return false; | 350 | | - } // end of else | 351 | | - | 352 | | - return true; | 353 | | - } // end of function:model() | 354 | | - | 355 | | - /** | 356 | | - * viewメソッド(モデル) | 357 | | - * | 358 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 359 | | - * | 360 | | - * @param void なし | 361 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 362 | | - */ | 363 | | - public function view() | 364 | | - { | 365 | | - // アサイン | 366 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 367 | | - | 368 | | - $this->smarty->assign ( 'menu_cage', $this->obj_adminconf->get( 'COMMON', 'menu_cage' ) ); | 369 | | - $this->smarty->assign ( 'menu_act', $this->obj_adminconf->get( 'COMMON', 'menu_act' ) ); | 370 | | - | 371 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 372 | | - | 373 | | - // 表示 | 374 | | - $this->smarty->display( 'pageadd_complete.tpl' ); | 375 | | - | 376 | | - return true; | 377 | | - | 378 | | - } // end of function:view() | 379 | | - | 380 | | - } // end of class:pageadd_complete | 381 | | - | 382 | | -?> |
| | @@ -1,232 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * ページ削除確認画面クラス | 4 | | - * | 5 | | - * ページ削除確認画面を実現するためのクラス | 6 | | - * | 7 | | - * @package simplepage | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( "simplepage_base.inc" ); | 17 | | - /** | 18 | | - * データベース操作クラス | 19 | | - */ | 20 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 21 | | - | 22 | | - class pagedel_confirm extends simplepage_base | 23 | | - { | 24 | | - //------------------------------------------------------// | 25 | | - // クラス変数定義 | 26 | | - //------------------------------------------------------// | 27 | | - /** | 28 | | - * データベース操作クラスインスタンスを保持する変数 | 29 | | - * @access private | 30 | | - * @var object | 31 | | - */ | 32 | | - private $obj_db; | 33 | | - /** | 34 | | - * ユーティリティクラスインスタンスを保持する変数 | 35 | | - * @access private | 36 | | - * @var object | 37 | | - */ | 38 | | - private $obj_conf; | 39 | | - /** | 40 | | - * 取得データを保持する変数 | 41 | | - * @access private | 42 | | - * @var object | 43 | | - */ | 44 | | - private $gotDat; | 45 | | - | 46 | | - //------------------------------------------------------// | 47 | | - // クラスメソッド定義 | 48 | | - //------------------------------------------------------// | 49 | | - /** | 50 | | - * コンストラクタメソッド | 51 | | - * | 52 | | - * コンストラクタメソッド | 53 | | - * | 54 | | - * @param void なし | 55 | | - * @return void なし | 56 | | - */ | 57 | | - public function __construct() | 58 | | - { | 59 | | - } // end of function:__construct() | 60 | | - | 61 | | - /** | 62 | | - * クローンメソッド | 63 | | - * | 64 | | - * クローンメソッド | 65 | | - * | 66 | | - * @param void なし | 67 | | - * @return void なし | 68 | | - */ | 69 | | - public function __clone() | 70 | | - { | 71 | | - } // end of function:__clone() | 72 | | - | 73 | | - /** | 74 | | - * modelメソッド(モデル) | 75 | | - * | 76 | | - * データ取得等のモデルに相当する部分の処理を行う | 77 | | - * | 78 | | - * @param void なし | 79 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 80 | | - */ | 81 | | - public function model() | 82 | | - { | 83 | | - // 必要なインスタンスを生成 | 84 | | - $this->obj_db = new RisolutoDb(); | 85 | | - $this->obj_conf = new RisolutoConf(); | 86 | | - $this->obj_conf->parse( RISOLUTO_CONF . 'risoluto.ini' ); | 87 | | - | 88 | | - // スーパバイザセッション又はアドミンセッションが存在しない場合は、 | 89 | | - // ログイン画面に遷移する | 90 | | - if ( ! $this->obj_util->is_Admin() ) | 91 | | - { | 92 | | - $this->obj_util->redirectTo( $this->obj_adminconf->get( 'COMMON', 'login_act' ) | 93 | | - , $this->obj_adminconf->get( 'COMMON', 'login_cage' ) ); | 94 | | - return false; | 95 | | - } // end of if | 96 | | - | 97 | | - // 前画面のCageが自分と同じでない or 前画面のActが「pagelist」または「pageview」でない場合、 | 98 | | - // 入力画面に飛ばす | 99 | | - $tmp_cage_last = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 100 | | - $tmp_cage_current = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 101 | | - | 102 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 103 | | - if ( ( $tmp_cage_last != $tmp_cage_current ) or ( $tmp_act != 'pagelist' and $tmp_act != 'pageview' ) ) | 104 | | - { | 105 | | - $this->obj_util->redirectTo( 'pagelist', $tmp_cage_current ); | 106 | | - return false; | 107 | | - } // end of if | 108 | | - | 109 | | - | 110 | | - | 111 | | - //------------------------------------------------------------------------ | 112 | | - // 前画面の入力値を取得 | 113 | | - //------------------------------------------------------------------------ | 114 | | - // 初期化 | 115 | | - $tmp_entered[ 'pageid' ] = null; | 116 | | - | 117 | | - // ページID | 118 | | - if ( isset( $_GET[ 'pageid' ] ) ) | 119 | | - { | 120 | | - $tmp_entered[ 'pageid' ] = strip_tags( trim( $_GET[ 'pageid' ] ) ); | 121 | | - } // end of if | 122 | | - | 123 | | - | 124 | | - | 125 | | - //------------------------------------------------------------------------ | 126 | | - // 入力情報のチェック | 127 | | - //------------------------------------------------------------------------ | 128 | | - // ページID(ユーザIDが不正) | 129 | | - if ( $tmp_entered[ 'pageid' ] == null or ! is_numeric( $tmp_entered[ 'pageid' ] ) ) | 130 | | - { | 131 | | - // エラーの場合、例外を投げる | 132 | | - throw new Exception( 'Invalid pageid' ); | 133 | | - return false; | 134 | | - } // end of if | 135 | | - | 136 | | - | 137 | | - | 138 | | - //------------------------------------------------------------------------ | 139 | | - // 表示の取得 | 140 | | - //------------------------------------------------------------------------ | 141 | | - | 142 | | - // データベースに接続する | 143 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( 'DBS', 'DEFAULT_DSN' ) ) ) | 144 | | - { | 145 | | - // SQL文を組み立てる | 146 | | - $tmp_t_pages = $this->mycage . '_t_pages'; | 147 | | - $tmp_cage = '_' . $this->mycage . '_SYSTEM_'; | 148 | | - $sql =<<<End_Of_SQL | 149 | | - | 150 | | - SELECT IFNULL( `header`.`title`, '' ) as page_title -- タイトル | 151 | | - , `pages`.`page_slug` -- スラッグ | 152 | | - FROM `risoluto_t_headerinfo` header | 153 | | - , $tmp_t_pages pages | 154 | | - WHERE `header`.`act` = ? | 155 | | - AND `header`.`cage` = ? | 156 | | - AND `pages`.`page_id` = `header`.`act` | 157 | | - | 158 | | -End_Of_SQL; | 159 | | - | 160 | | - // パラメタも用意する | 161 | | - $param = array( | 162 | | - $tmp_entered[ 'pageid' ] | 163 | | - , $tmp_cage | 164 | | - ); | 165 | | - | 166 | | - // SQLの実行に失敗した場合は、例外を投げる | 167 | | - $tmp_result = $this->obj_db->dbGetRow( $sql, $param ); | 168 | | - if ( PEAR::isError( $tmp_result ) ) | 169 | | - { | 170 | | - // 接続をクローズする | 171 | | - $this->obj_db->dbDisConnect(); | 172 | | - throw new Exception( 'pagetitle get Failure' ); | 173 | | - return false; | 174 | | - } // end of if | 175 | | - // 成功したなら、変数に取得した値を入れる | 176 | | - else | 177 | | - { | 178 | | - $tmp_entered[ 'id' ] = $tmp_entered[ 'pageid' ]; | 179 | | - $tmp_entered[ 'title' ] = $tmp_result[ 'page_title' ]; | 180 | | - $tmp_entered[ 'slug' ] = $tmp_result[ 'page_slug' ]; | 181 | | - } // end of else | 182 | | - | 183 | | - // 接続に成功している場合は接続をクローズする | 184 | | - $this->obj_db->dbDisConnect(); | 185 | | - } // end of if | 186 | | - // データベースに接続できなかった場合は、例外を投げる | 187 | | - else | 188 | | - { | 189 | | - throw new Exception( 'DB Connection Failure' ); | 190 | | - return false; | 191 | | - } // end of else | 192 | | - | 193 | | - | 194 | | - | 195 | | - //------------------------------------------------------------------------ | 196 | | - // 特に問題がなければ、画面表示用にクラス変数とセッションに値をセットする | 197 | | - //------------------------------------------------------------------------ | 198 | | - $this->gotDat = $tmp_entered; | 199 | | - $this->obj_sess->sessStore( $this->obj_sess->sessLoad( 'currentcage' ), $tmp_entered ); | 200 | | - | 201 | | - return true; | 202 | | - } // end of function:model() | 203 | | - | 204 | | - /** | 205 | | - * viewメソッド(モデル) | 206 | | - * | 207 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 208 | | - * | 209 | | - * @param void なし | 210 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 211 | | - */ | 212 | | - public function view() | 213 | | - { | 214 | | - // アサイン | 215 | | - $this->smarty->assign ( 'header', $this->obj_util->getHeader() ); | 216 | | - | 217 | | - $this->smarty->assign ( 'entered_id', $this->gotDat[ 'id' ] ); | 218 | | - $this->smarty->assign ( 'entered_title', $this->gotDat[ 'title' ] ); | 219 | | - $this->smarty->assign ( 'entered_slug', $this->gotDat[ 'slug' ] ); | 220 | | - | 221 | | - $this->smarty->assign ( 'mycage', $this->mycage ); | 222 | | - | 223 | | - // 表示 | 224 | | - $this->smarty->display( 'pagedel_confirm.tpl' ); | 225 | | - | 226 | | - return true; | 227 | | - | 228 | | - } // end of function:view() | 229 | | - | 230 | | - } // end of class:pagedel_confirm | 231 | | - | 232 | | -?> |
| | @@ -1,11 +0,0 @@ | 1 | | -; =================================================================== | 2 | | -; SimplePage Flavor用設定ファイル | 3 | | -; copyright: (C) 2008-2011 Risoluto Developers / All Rights Reserved. | 4 | | -; =================================================================== | 5 | | -; 注意:理解せず値(右辺)にtrue/false/yes/noをを使用しないこと | 6 | | - | 7 | | -;☆許可タグの設定 | 8 | | -; 【設定項目解説】 | 9 | | -; body : ページ本文で許可するタグのリスト(strip_tags()の引数として使用されます) | 10 | | -[ALLOWTAGS] | 11 | | -body = "<a><abbr><acronym><address><b><big><blink><blockquote><br><caption><center><cite><code><col><colgroup><dd><del><dfn><dir><div><dl><dt><em><fieldset><font><form><frame><frameset><h1><h2><h3><h4><h5><h6><hr><i><img><input><ins><kbd><label><legend><li><link><marquee><menu><nobr><ol><optgroup><option><p><pre><q><s><samp><select><small><span><strike><strong><sub><sup><table><tbody><td><textarea><tfoot><th><thead><tr><tt><u><ul><var><wbr><iframe><object>" |
| | @@ -1,12 +0,0 @@ | 1 | | -The BSD License | 2 | | - | 3 | | -Copyright (c) 2008-2012, Risoluto Developers | 4 | | -All rights reserved. | 5 | | - | 6 | | -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | 7 | | - | 8 | | - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | 9 | | - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | 10 | | - * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | 11 | | - | 12 | | -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | @@ -1,11 +0,0 @@ | 1 | | -[Core Members]
| 2 | | -
| 3 | | -* Yuta Hayakawa <haya@risoluto.org>
| 4 | | - - Project Manager
| 5 | | - - Developer
| 6 | | -
| 7 | | -* Shohei Wanibuchi<wanibuchi@risoluto.org>
| 8 | | - - Developer
| 9 | | - - Designer
| 10 | | -
| 11 | | -[Contributors]
|
| | @@ -1,3 +0,0 @@ | 1 | | -ALTER TABLE [[[_PREFIX]]]_t_pages DROP `page_title`;
| 2 | | -
| 3 | | -ALTER TABLE [[[_PREFIX]]]_t_pages ADD `page_slug` VARCHAR( 255 ) AFTER `page_body`;
|
| | @@ -1,293 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * アップグレードFlavor画面(1)クラス | 4 | | - * | 5 | | - * アップグレードFlavor画面(1)を実現するためのクラス | 6 | | - * | 7 | | - * @package risoluto | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2012 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( 'upgrade_base.inc' ); | 17 | | - | 18 | | - class page01 extends upgrade_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラス変数定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * チェック情報格納用変数 | 25 | | - * @access private | 26 | | - * @var array | 27 | | - */ | 28 | | - private $checklist; | 29 | | - /** | 30 | | - * チェック結果格納用変数 | 31 | | - * @access private | 32 | | - * @var array | 33 | | - */ | 34 | | - private $checkresult; | 35 | | - /** | 36 | | - * エラー発生状況格納用変数 | 37 | | - * @access private | 38 | | - * @var boolean | 39 | | - */ | 40 | | - private $errStatus; | 41 | | - | 42 | | - //------------------------------------------------------// | 43 | | - // クラスメソッド定義 | 44 | | - //------------------------------------------------------// | 45 | | - /** | 46 | | - * コンストラクタメソッド | 47 | | - * | 48 | | - * コンストラクタメソッド | 49 | | - * | 50 | | - * @param void なし | 51 | | - * @return void なし | 52 | | - */ | 53 | | - public function __construct() | 54 | | - { | 55 | | - } // end of function:__construct() | 56 | | - | 57 | | - /** | 58 | | - * クローンメソッド | 59 | | - * | 60 | | - * クローンメソッド | 61 | | - * | 62 | | - * @param void なし | 63 | | - * @return void なし | 64 | | - */ | 65 | | - public function __clone() | 66 | | - { | 67 | | - } // end of function:__clone() | 68 | | - | 69 | | - /** | 70 | | - * modelメソッド(モデル) | 71 | | - * | 72 | | - * データ取得等のモデルに相当する部分の処理を行う | 73 | | - * | 74 | | - * @param void なし | 75 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 76 | | - */ | 77 | | - public function model() | 78 | | - { | 79 | | - // 前画面のCageが現在のCageと同一でない or 前画面のActが「upgrade」 and 「page01」 and 「page02」でない場合、 | 80 | | - // アップグレードFlavorに飛ばす | 81 | | - $tmp_cage = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 82 | | - $tmp_cage_self = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 83 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 84 | | - if ( $tmp_cage != $tmp_cage_self or ( $tmp_act != 'upgrade' and $tmp_act != 'page01' and $tmp_act != 'page02' ) ) | 85 | | - { | 86 | | - $this->obj_util->redirectTo( 'upgrade', $tmp_cage_self ); | 87 | | - return false; | 88 | | - } // end of if | 89 | | - | 90 | | - // チェック対象をセットする | 91 | | - // 他にチェック対象があれば、この配列に加えてください。 | 92 | | - // path: チェック対象となるパス / stat: あるべき状態(writable: 書込可 / readable: 読込可) | 93 | | - // readableを指定したとき、その対象が書込可の場合はNGとなります | 94 | | - clearstatcache(); | 95 | | - $tmp_base = RISOLUTO_USERLAND . $this->obj_sess->sessLoad( 'currentcage' ); | 96 | | - $this->checklist = array( | 97 | | - array( | 98 | | - 'path' => $tmp_base | 99 | | - , 'stat' => 'writable' | 100 | | - , 'pass' => false | 101 | | - ) | 102 | | - , array( | 103 | | - 'path' => RISOLUTO_USERLAND . $this->target | 104 | | - , 'stat' => 'writable' | 105 | | - , 'pass' => true | 106 | | - ) | 107 | | - , array( | 108 | | - 'path' => RISOLUTO_DOCROOT . '/js/' . $this->target . '_ckeditor.js' | 109 | | - , 'stat' => 'writable' | 110 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/simplepage_ckeditor.js' ) ? true : false ) | 111 | | - ) | 112 | | - , array( | 113 | | - 'path' => RISOLUTO_CONF . $this->target . '_version' | 114 | | - , 'stat' => 'writable' | 115 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/simplepage_version' ) ? true : false ) | 116 | | - ) | 117 | | - , array( | 118 | | - 'path' => RISOLUTO_CONF . $this->target . '.ini' | 119 | | - , 'stat' => 'writable' | 120 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/simplepage.ini' ) ? true : false ) | 121 | | - ) | 122 | | - , array( | 123 | | - 'path' => RISOLUTO_USERLAND . 'admin/menu/00004_' . $this->target . '.tpl' | 124 | | - , 'stat' => 'writable' | 125 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/00004_simplepage.tpl' ) ? true : false ) | 126 | | - ) | 127 | | - , array( | 128 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/AUTHORS' | 129 | | - , 'stat' => 'writable' | 130 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/AUTHORS' ) ? true : false ) | 131 | | - ) | 132 | | - , array( | 133 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/LICENSE' | 134 | | - , 'stat' => 'writable' | 135 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/LICENSE' ) ? true : false ) | 136 | | - ) | 137 | | - , array( | 138 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pageadd_complete.php' | 139 | | - , 'stat' => 'writable' | 140 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_complete.php' ) ? true : false ) | 141 | | - ) | 142 | | - , array( | 143 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pageadd_complete.tpl' | 144 | | - , 'stat' => 'writable' | 145 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_complete.tpl' ) ? true : false ) | 146 | | - ) | 147 | | - , array( | 148 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pageadd_confirm.php' | 149 | | - , 'stat' => 'writable' | 150 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_confirm.php' ) ? true : false ) | 151 | | - ) | 152 | | - , array( | 153 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pageadd_confirm.tpl' | 154 | | - , 'stat' => 'writable' | 155 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_confirm.tpl' ) ? true : false ) | 156 | | - ) | 157 | | - , array( | 158 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pageadd_entry.php' | 159 | | - , 'stat' => 'writable' | 160 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_entry.php' ) ? true : false ) | 161 | | - ) | 162 | | - , array( | 163 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pageadd_entry.tpl' | 164 | | - , 'stat' => 'writable' | 165 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_entry.tpl' ) ? true : false ) | 166 | | - ) | 167 | | - , array( | 168 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagedel_complete.php' | 169 | | - , 'stat' => 'writable' | 170 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagedel_complete.php' ) ? true : false ) | 171 | | - ) | 172 | | - , array( | 173 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagedel_complete.tpl' | 174 | | - , 'stat' => 'writable' | 175 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagedel_complete.tpl' ) ? true : false ) | 176 | | - ) | 177 | | - , array( | 178 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagedel_confirm.php' | 179 | | - , 'stat' => 'writable' | 180 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagedel_confirm.php' ) ? true : false ) | 181 | | - ) | 182 | | - , array( | 183 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagedel_confirm.tpl' | 184 | | - , 'stat' => 'writable' | 185 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagedel_confirm.tpl' ) ? true : false ) | 186 | | - ) | 187 | | - , array( | 188 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagelist.php' | 189 | | - , 'stat' => 'writable' | 190 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagelist.php' ) ? true : false ) | 191 | | - ) | 192 | | - , array( | 193 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagelist.tpl' | 194 | | - , 'stat' => 'writable' | 195 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagelist.tpl' ) ? true : false ) | 196 | | - ) | 197 | | - , array( | 198 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagemod_complete.php' | 199 | | - , 'stat' => 'writable' | 200 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_complete.php' ) ? true : false ) | 201 | | - ) | 202 | | - , array( | 203 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagemod_complete.tpl' | 204 | | - , 'stat' => 'writable' | 205 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_complete.tpl' ) ? true : false ) | 206 | | - ) | 207 | | - , array( | 208 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagemod_confirm.php' | 209 | | - , 'stat' => 'writable' | 210 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_confirm.php' ) ? true : false ) | 211 | | - ) | 212 | | - , array( | 213 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagemod_confirm.tpl' | 214 | | - , 'stat' => 'writable' | 215 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_confirm.tpl' ) ? true : false ) | 216 | | - ) | 217 | | - , array( | 218 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagemod_entry.php' | 219 | | - , 'stat' => 'writable' | 220 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_entry.php' ) ? true : false ) | 221 | | - ) | 222 | | - , array( | 223 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pagemod_entry.tpl' | 224 | | - , 'stat' => 'writable' | 225 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_entry.tpl' ) ? true : false ) | 226 | | - ) | 227 | | - , array( | 228 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pageview.php' | 229 | | - , 'stat' => 'writable' | 230 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageview.php' ) ? true : false ) | 231 | | - ) | 232 | | - , array( | 233 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/pageview.tpl' | 234 | | - , 'stat' => 'writable' | 235 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageview.tpl' ) ? true : false ) | 236 | | - ) | 237 | | - , array( | 238 | | - 'path' => RISOLUTO_USERLAND . $this->target . '/simplepage_base.inc' | 239 | | - , 'stat' => 'writable' | 240 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/simplepage_base.inc' ) ? true : false ) | 241 | | - ) | 242 | | - ); | 243 | | - | 244 | | - // チェックメソッドを呼び出し、結果を整形 | 245 | | - foreach( $this->checklist as $dat ) | 246 | | - { | 247 | | - if ( $dat[ 'pass' ] ) | 248 | | - { | 249 | | - continue; | 250 | | - } // end of if | 251 | | - | 252 | | - $tmp_result = $this->obj_util->statChecker( $dat ); | 253 | | - if ( $tmp_result[ 'result' ] == 'NG' ) | 254 | | - { | 255 | | - $this->errStatus = 'NG'; | 256 | | - } // end of if | 257 | | - $this->checkresult[] = $tmp_result; | 258 | | - } // end of foreach | 259 | | - | 260 | | - return true; | 261 | | - } // end of function:model() | 262 | | - | 263 | | - /** | 264 | | - * viewメソッド(モデル) | 265 | | - * | 266 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 267 | | - * | 268 | | - * @param void なし | 269 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 270 | | - */ | 271 | | - public function view() | 272 | | - { | 273 | | - // ヘッダ情報をセット | 274 | | - $html_header[ 'robots' ] = 'NOINDEX,NOFOLLOW'; | 275 | | - $html_header[ 'css' ] = array( './css/common.css' ); | 276 | | - $html_header[ 'title' ] = 'アップグレードFlavor(1)'; | 277 | | - | 278 | | - // アサイン | 279 | | - $this->smarty->assign ( 'header', $html_header ); | 280 | | - $this->smarty->assign ( 'checklist', $this->checkresult ); | 281 | | - $this->smarty->assign ( 'err', $this->errStatus ); | 282 | | - | 283 | | - $this->smarty->assign ( 'cage', str_replace( DIRECTORY_SEPARATOR, '.' , $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 284 | | - | 285 | | - // 表示 | 286 | | - $this->smarty->display( 'page01.tpl' ); | 287 | | - | 288 | | - return true; | 289 | | - | 290 | | - } // end of function:view() | 291 | | - | 292 | | - } // end of class:page01 | 293 | | -?> |
| | @@ -1,158 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * アップグレードFlavor画面(2)クラス | 4 | | - * | 5 | | - * アップグレードFlavor画面(2)を実現するためのクラス | 6 | | - * | 7 | | - * @package risoluto | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2012 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( 'upgrade_base.inc' ); | 17 | | - | 18 | | - class page02 extends upgrade_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラス変数定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * チェック情報格納用変数 | 25 | | - * @access private | 26 | | - * @var array | 27 | | - */ | 28 | | - private $checklist; | 29 | | - /** | 30 | | - * チェック結果格納用変数 | 31 | | - * @access private | 32 | | - * @var array | 33 | | - */ | 34 | | - private $checkresult; | 35 | | - /** | 36 | | - * エラー発生状況格納用変数 | 37 | | - * @access private | 38 | | - * @var boolean | 39 | | - */ | 40 | | - private $errStatus; | 41 | | - | 42 | | - //------------------------------------------------------// | 43 | | - // クラスメソッド定義 | 44 | | - //------------------------------------------------------// | 45 | | - /** | 46 | | - * コンストラクタメソッド | 47 | | - * | 48 | | - * コンストラクタメソッド | 49 | | - * | 50 | | - * @param void なし | 51 | | - * @return void なし | 52 | | - */ | 53 | | - public function __construct() | 54 | | - { | 55 | | - } // end of function:__construct() | 56 | | - | 57 | | - /** | 58 | | - * クローンメソッド | 59 | | - * | 60 | | - * クローンメソッド | 61 | | - * | 62 | | - * @param void なし | 63 | | - * @return void なし | 64 | | - */ | 65 | | - public function __clone() | 66 | | - { | 67 | | - } // end of function:__clone() | 68 | | - | 69 | | - /** | 70 | | - * modelメソッド(モデル) | 71 | | - * | 72 | | - * データ取得等のモデルに相当する部分の処理を行う | 73 | | - * | 74 | | - * @param void なし | 75 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 76 | | - */ | 77 | | - public function model() | 78 | | - { | 79 | | - // 前画面のCageが現在のCageと同一でない or 前画面のActが「page01」and「page02」and「page03」でない場合、 | 80 | | - // アップグレードFlavorトップに飛ばす | 81 | | - $tmp_cage = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 82 | | - $tmp_cage_self = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 83 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 84 | | - if ( $tmp_cage != $tmp_cage_self or ( $tmp_act != 'page01' and $tmp_act != 'page02' and $tmp_act != 'page03' ) ) | 85 | | - { | 86 | | - $this->obj_util->redirectTo( 'upgrade', $tmp_cage_self ); | 87 | | - return false; | 88 | | - } // end of if | 89 | | - | 90 | | - // チェック対象をセットする | 91 | | - // 他にチェック対象があれば、この配列に加えてください。 | 92 | | - // section: セクション名 / key: キー名 | 93 | | - $this->checklist = array( | 94 | | - array( | 95 | | - 'section' => 'DBS' | 96 | | - , 'key' => 'DEFAULT_DSN' | 97 | | - ) | 98 | | - ); | 99 | | - | 100 | | - // 値が取得できるかをチェック | 101 | | - foreach( $this->checklist as $dat ) | 102 | | - { | 103 | | - | 104 | | - // コンフィグから値を取得し、値をチェックする | 105 | | - $tmp_val = $this->obj_conf->get( $dat[ 'section' ], $dat[ 'key' ] ); | 106 | | - if ( ! empty( $tmp_val ) ) | 107 | | - { | 108 | | - $this->checkresult[] = array( | 109 | | - 'section' => $dat[ 'section' ] | 110 | | - , 'key' => $dat[ 'key' ] | 111 | | - , 'result' => 'OK' | 112 | | - ); | 113 | | - } // end of if | 114 | | - else | 115 | | - { | 116 | | - $this->checkresult[] = array( | 117 | | - 'section' => $dat[ 'section' ] | 118 | | - , 'key' => $dat[ 'key' ] | 119 | | - , 'result' => 'NG' | 120 | | - ); | 121 | | - $this->errStatus = 'NG'; | 122 | | - } // end of else | 123 | | - } // end of foreach | 124 | | - | 125 | | - return true; | 126 | | - } // end of function:model() | 127 | | - | 128 | | - /** | 129 | | - * viewメソッド(モデル) | 130 | | - * | 131 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 132 | | - * | 133 | | - * @param void なし | 134 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 135 | | - */ | 136 | | - public function view() | 137 | | - { | 138 | | - // ヘッダ情報をセット | 139 | | - $html_header[ 'robots' ] = 'NOINDEX,NOFOLLOW'; | 140 | | - $html_header[ 'css' ] = array( './css/common.css' ); | 141 | | - $html_header[ 'title' ] = 'アップグレードFlavor(2)'; | 142 | | - | 143 | | - // アサイン | 144 | | - $this->smarty->assign ( 'header', $html_header ); | 145 | | - $this->smarty->assign ( 'checklist', $this->checkresult ); | 146 | | - $this->smarty->assign ( 'err', $this->errStatus ); | 147 | | - | 148 | | - $this->smarty->assign ( 'cage', str_replace( DIRECTORY_SEPARATOR, '.' , $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 149 | | - | 150 | | - // 表示 | 151 | | - $this->smarty->display( 'page02.tpl' ); | 152 | | - | 153 | | - return true; | 154 | | - | 155 | | - } // end of function:view() | 156 | | - | 157 | | - } // end of class:page02 | 158 | | -?> |
| | @@ -1 +0,0 @@ | 1 | | -simplepage | | | \ No newline at end of file |
| | @@ -1,170 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * アップグレードFlavor画面(3)クラス | 4 | | - * | 5 | | - * アップグレードFlavor画面(3)を実現するためのクラス | 6 | | - * | 7 | | - * @package risoluto | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2012 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( 'upgrade_base.inc' ); | 17 | | - | 18 | | - /** | 19 | | - * データベース操作クラス | 20 | | - */ | 21 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 22 | | - | 23 | | - class page03 extends upgrade_base | 24 | | - { | 25 | | - //------------------------------------------------------// | 26 | | - // クラス変数定義 | 27 | | - //------------------------------------------------------// | 28 | | - /** | 29 | | - * チェック情報格納用変数 | 30 | | - * @access private | 31 | | - * @var array | 32 | | - */ | 33 | | - private $checklist; | 34 | | - /** | 35 | | - * チェック結果格納用変数 | 36 | | - * @access private | 37 | | - * @var array | 38 | | - */ | 39 | | - private $checkresult; | 40 | | - /** | 41 | | - * エラー発生状況格納用変数 | 42 | | - * @access private | 43 | | - * @var boolean | 44 | | - */ | 45 | | - private $errStatus; | 46 | | - /** | 47 | | - * データベース操作クラスインスタンスを保持する変数 | 48 | | - * @access private | 49 | | - * @var object | 50 | | - */ | 51 | | - private $obj_db; | 52 | | - | 53 | | - //------------------------------------------------------// | 54 | | - // クラスメソッド定義 | 55 | | - //------------------------------------------------------// | 56 | | - /** | 57 | | - * コンストラクタメソッド | 58 | | - * | 59 | | - * コンストラクタメソッド | 60 | | - * | 61 | | - * @param void なし | 62 | | - * @return void なし | 63 | | - */ | 64 | | - public function __construct() | 65 | | - { | 66 | | - } // end of function:__construct() | 67 | | - | 68 | | - /** | 69 | | - * クローンメソッド | 70 | | - * | 71 | | - * クローンメソッド | 72 | | - * | 73 | | - * @param void なし | 74 | | - * @return void なし | 75 | | - */ | 76 | | - public function __clone() | 77 | | - { | 78 | | - } // end of function:__clone() | 79 | | - | 80 | | - /** | 81 | | - * modelメソッド(モデル) | 82 | | - * | 83 | | - * データ取得等のモデルに相当する部分の処理を行う | 84 | | - * | 85 | | - * @param void なし | 86 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 87 | | - */ | 88 | | - public function model() | 89 | | - { | 90 | | - // 前画面のCageが現在のCageと同一でない or 前画面のActが「page02」 and 「page03」 and 「page04」でない場合、 | 91 | | - // アップグレードFlavorトップに飛ばす | 92 | | - $tmp_cage = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 93 | | - $tmp_cage_self = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 94 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 95 | | - if ( $tmp_cage != $tmp_cage_self or ( $tmp_act != 'page02' and $tmp_act != 'page03' and $tmp_act != 'page04' ) ) | 96 | | - { | 97 | | - $this->obj_util->redirectTo( 'upgrade', $tmp_cage_self ); | 98 | | - return false; | 99 | | - } // end of if | 100 | | - | 101 | | - // チェック対象となるDSNをセットする | 102 | | - // 他にチェック対象があれば、この配列に加えてください。 | 103 | | - // section: セクション名 / key: キー名 | 104 | | - $this->checklist = array( | 105 | | - array( | 106 | | - 'section' => 'DBS' | 107 | | - , 'key' => 'DEFAULT_DSN' | 108 | | - ) | 109 | | - ); | 110 | | - | 111 | | - // 値が取得できるかをチェック | 112 | | - foreach( $this->checklist as $dat ) | 113 | | - { | 114 | | - // データベース操作クラスのインスタンスを生成する | 115 | | - $this->obj_db = new RisolutoDb(); | 116 | | - | 117 | | - // データベースに接続できたかどうかで結果を判定する | 118 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( $dat[ 'section' ], $dat[ 'key' ] ) ) ) | 119 | | - { | 120 | | - $this->checkresult[] = array( | 121 | | - 'dsn' => $dat[ 'key' ] | 122 | | - , 'result' => 'OK' | 123 | | - ); | 124 | | - // 成功した場合は接続をクローズする | 125 | | - $this->obj_db->dbDisConnect(); | 126 | | - } // end of if | 127 | | - else | 128 | | - { | 129 | | - $this->checkresult[] = array( | 130 | | - 'dsn' => $dat[ 'key' ] | 131 | | - , 'result' => 'NG' | 132 | | - ); | 133 | | - $this->errStatus = 'NG'; | 134 | | - } // end of else | 135 | | - } // end of foreach | 136 | | - | 137 | | - return true; | 138 | | - } // end of function:model() | 139 | | - | 140 | | - /** | 141 | | - * viewメソッド(モデル) | 142 | | - * | 143 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 144 | | - * | 145 | | - * @param void なし | 146 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 147 | | - */ | 148 | | - public function view() | 149 | | - { | 150 | | - // ヘッダ情報をセット | 151 | | - $html_header[ 'robots' ] = 'NOINDEX,NOFOLLOW'; | 152 | | - $html_header[ 'css' ] = array( './css/common.css' ); | 153 | | - $html_header[ 'title' ] = 'アップグレードFlavor(3)'; | 154 | | - | 155 | | - // アサイン | 156 | | - $this->smarty->assign ( 'header', $html_header ); | 157 | | - $this->smarty->assign ( 'checklist', $this->checkresult ); | 158 | | - $this->smarty->assign ( 'err', $this->errStatus ); | 159 | | - | 160 | | - $this->smarty->assign ( 'cage', str_replace( DIRECTORY_SEPARATOR, '.' , $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 161 | | - | 162 | | - // 表示 | 163 | | - $this->smarty->display( 'page03.tpl' ); | 164 | | - | 165 | | - return true; | 166 | | - | 167 | | - } // end of function:view() | 168 | | - | 169 | | - } // end of class:page03 | 170 | | -?> |
| | @@ -1,220 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * アップグレードFlavor(4)クラス | 4 | | - * | 5 | | - * アップグレードFlavor(4)を実現するためのクラス | 6 | | - * | 7 | | - * @package risoluto | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2012 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( 'upgrade_base.inc' ); | 17 | | - | 18 | | - /** | 19 | | - * データベース操作クラス | 20 | | - */ | 21 | | - require_once( RISOLUTO_FUNC . 'risoluto_db.php' ); | 22 | | - | 23 | | - class page04 extends upgrade_base | 24 | | - { | 25 | | - //------------------------------------------------------// | 26 | | - // クラス変数定義 | 27 | | - //------------------------------------------------------// | 28 | | - /** | 29 | | - * チェック情報格納用変数 | 30 | | - * @access private | 31 | | - * @var array | 32 | | - */ | 33 | | - private $checklist; | 34 | | - /** | 35 | | - * チェック結果格納用変数 | 36 | | - * @access private | 37 | | - * @var array | 38 | | - */ | 39 | | - private $checkresult; | 40 | | - /** | 41 | | - * エラー発生状況格納用変数 | 42 | | - * @access private | 43 | | - * @var boolean | 44 | | - */ | 45 | | - private $errStatus; | 46 | | - /** | 47 | | - * データベース操作クラスインスタンスを保持する変数 | 48 | | - * @access private | 49 | | - * @var object | 50 | | - */ | 51 | | - private $obj_db; | 52 | | - | 53 | | - //------------------------------------------------------// | 54 | | - // クラスメソッド定義 | 55 | | - //------------------------------------------------------// | 56 | | - /** | 57 | | - * コンストラクタメソッド | 58 | | - * | 59 | | - * コンストラクタメソッド | 60 | | - * | 61 | | - * @param void なし | 62 | | - * @return void なし | 63 | | - */ | 64 | | - public function __construct() | 65 | | - { | 66 | | - } // end of function:__construct() | 67 | | - | 68 | | - /** | 69 | | - * クローンメソッド | 70 | | - * | 71 | | - * クローンメソッド | 72 | | - * | 73 | | - * @param void なし | 74 | | - * @return void なし | 75 | | - */ | 76 | | - public function __clone() | 77 | | - { | 78 | | - } // end of function:__clone() | 79 | | - | 80 | | - /** | 81 | | - * modelメソッド(モデル) | 82 | | - * | 83 | | - * データ取得等のモデルに相当する部分の処理を行う | 84 | | - * | 85 | | - * @param void なし | 86 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 87 | | - */ | 88 | | - public function model() | 89 | | - { | 90 | | - // 前画面のCageが現在のCageと同一でない or 前画面のActが「page03」 and 「page04」 and 「page05」でない場合、 | 91 | | - // アップグレードFlavorトップに飛ばす | 92 | | - $tmp_cage = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 93 | | - $tmp_cage_self = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 94 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 95 | | - if ( $tmp_cage != $tmp_cage_self or ( $tmp_act != 'page03' and $tmp_act != 'page04' and $tmp_act != 'page05' ) ) | 96 | | - { | 97 | | - $this->obj_util->redirectTo( 'upgrade', $tmp_cage_self ); | 98 | | - return false; | 99 | | - } // end of if | 100 | | - | 101 | | - // チェック対象となるDSNをセットする | 102 | | - // 他にチェック対象があれば、この配列に加えてください。 | 103 | | - // section: セクション名 / key: キー名 | 104 | | - clearstatcache(); | 105 | | - $tmp_base = RISOLUTO_USERLAND . $this->obj_sess->sessLoad( 'currentcage' ); | 106 | | - $this->checklist = array( | 107 | | - array( | 108 | | - 'section' => 'DBS' | 109 | | - , 'key' => 'DEFAULT_DSN' | 110 | | - , 'description' => '既存テーブルの削除' | 111 | | - , 'path' => $tmp_base . '/sql/upgrade_drop.sql' | 112 | | - , 'pass' => ( !file_exists( $tmp_base . '/sql/upgrade_drop.sql' ) or !filesize( $tmp_base . '/sql/upgrade_drop.sql' ) ? true : false ) | 113 | | - ) | 114 | | - , array( | 115 | | - 'section' => 'DBS' | 116 | | - , 'key' => 'DEFAULT_DSN' | 117 | | - , 'description' => 'テーブルの新規追加' | 118 | | - , 'path' => $tmp_base . '/sql/upgrade_create.sql' | 119 | | - , 'pass' => ( !file_exists( $tmp_base . '/sql/upgrade_create.sql' ) or !filesize( $tmp_base . '/sql/upgrade_create.sql' ) ? true : false ) | 120 | | - ) | 121 | | - , array( | 122 | | - 'section' => 'DBS' | 123 | | - , 'key' => 'DEFAULT_DSN' | 124 | | - , 'description' => '既存テーブルの変更' | 125 | | - , 'path' => $tmp_base . '/sql/upgrade_modify.sql' | 126 | | - , 'pass' => ( !file_exists( $tmp_base . '/sql/upgrade_modify.sql' ) or !filesize( $tmp_base . '/sql/upgrade_modify.sql' ) ? true : false ) | 127 | | - ) | 128 | | - , array( | 129 | | - 'section' => 'DBS' | 130 | | - , 'key' => 'DEFAULT_DSN' | 131 | | - , 'description' => 'データの操作' | 132 | | - , 'path' => $tmp_base . '/sql/upgrade_data.sql' | 133 | | - , 'pass' => ( !file_exists( $tmp_base . '/sql/upgrade_data.sql' ) or !filesize( $tmp_base . '/sql/upgrade_data.sql' ) ? true : false ) | 134 | | - ) | 135 | | - ); | 136 | | - | 137 | | - // 指定された分だけ処理を回す | 138 | | - foreach( $this->checklist as $dat ) | 139 | | - { | 140 | | - if ( $dat[ 'pass' ] ) | 141 | | - { | 142 | | - continue; | 143 | | - } // end of if | 144 | | - | 145 | | - // データベース操作クラスのインスタンスを生成する | 146 | | - $this->obj_db = new RisolutoDb(); | 147 | | - | 148 | | - // エラーフラグを初期化(デフォルトはtrue) | 149 | | - $tmp_errflag = true; | 150 | | - | 151 | | - // データベースに接続する | 152 | | - if ( $this->obj_db->dbConnect( $this->obj_conf->get( $dat[ 'section' ], $dat[ 'key' ] ) ) ) | 153 | | - { | 154 | | - | 155 | | - $tmp_errflag = $this->obj_db->fileSQLExec( $dat[ 'path' ], $this->target ); | 156 | | - | 157 | | - // 接続に成功している場合は接続をクローズする | 158 | | - $this->obj_db->dbDisConnect(); | 159 | | - | 160 | | - // エラーフラグの値によって格納する値を変更する | 161 | | - if ( $tmp_errflag ) | 162 | | - { | 163 | | - $this->checkresult[] = array( | 164 | | - 'description' => $dat[ 'description' ] | 165 | | - , 'result' => 'OK' | 166 | | - ); | 167 | | - } // end of if | 168 | | - else | 169 | | - { | 170 | | - $this->checkresult[] = array( | 171 | | - 'description' => $dat[ 'description' ] | 172 | | - , 'result' => 'NG' | 173 | | - ); | 174 | | - $this->errStatus = 'NG'; | 175 | | - } // end of else | 176 | | - } // end of if | 177 | | - else | 178 | | - { | 179 | | - $this->checkresult[] = array( | 180 | | - 'description' => $dat[ 'description' ] | 181 | | - , 'result' => 'NG' | 182 | | - ); | 183 | | - $this->errStatus = 'NG'; | 184 | | - } // end of else | 185 | | - } // end of foreach | 186 | | - | 187 | | - return true; | 188 | | - } // end of function:model() | 189 | | - | 190 | | - /** | 191 | | - * viewメソッド(モデル) | 192 | | - * | 193 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 194 | | - * | 195 | | - * @param void なし | 196 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 197 | | - */ | 198 | | - public function view() | 199 | | - { | 200 | | - // ヘッダ情報をセット | 201 | | - $html_header[ 'robots' ] = 'NOINDEX,NOFOLLOW'; | 202 | | - $html_header[ 'css' ] = array( './css/common.css' ); | 203 | | - $html_header[ 'title' ] = 'アップグレードFlavor(4)'; | 204 | | - | 205 | | - // アサイン | 206 | | - $this->smarty->assign ( 'header', $html_header ); | 207 | | - $this->smarty->assign ( 'checklist', $this->checkresult ); | 208 | | - $this->smarty->assign ( 'err', $this->errStatus ); | 209 | | - | 210 | | - $this->smarty->assign ( 'cage', str_replace( DIRECTORY_SEPARATOR, '.' , $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 211 | | - | 212 | | - // 表示 | 213 | | - $this->smarty->display( 'page04.tpl' ); | 214 | | - | 215 | | - return true; | 216 | | - | 217 | | - } // end of function:view() | 218 | | - | 219 | | - } // end of class:page04 | 220 | | -?> |
| | @@ -1,106 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * アップグレードFlavor画面(finish)クラス | 4 | | - * | 5 | | - * アップグレードFlavor画面(finish)を実現するためのクラス | 6 | | - * | 7 | | - * @package risoluto | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2012 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( 'upgrade_base.inc' ); | 17 | | - | 18 | | - class finish extends upgrade_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラスメソッド定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * コンストラクタメソッド | 25 | | - * | 26 | | - * コンストラクタメソッド | 27 | | - * | 28 | | - * @param void なし | 29 | | - * @return void なし | 30 | | - */ | 31 | | - public function __construct() | 32 | | - { | 33 | | - } // end of function:__construct() | 34 | | - | 35 | | - /** | 36 | | - * クローンメソッド | 37 | | - * | 38 | | - * クローンメソッド | 39 | | - * | 40 | | - * @param void なし | 41 | | - * @return void なし | 42 | | - */ | 43 | | - public function __clone() | 44 | | - { | 45 | | - } // end of function:__clone() | 46 | | - | 47 | | - /** | 48 | | - * modelメソッド(モデル) | 49 | | - * | 50 | | - * データ取得等のモデルに相当する部分の処理を行う | 51 | | - * | 52 | | - * @param void なし | 53 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 54 | | - */ | 55 | | - public function model() | 56 | | - { | 57 | | - // 前画面のCageが現在のCageと同一でないor 前画面のActが「page06」でない場合、 | 58 | | - // インストーラトップに飛ばす | 59 | | - $tmp_cage = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 60 | | - $tmp_cage_self = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 61 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 62 | | - if ( $tmp_cage != $tmp_cage_self or $tmp_act != 'page06' ) | 63 | | - { | 64 | | - $this->obj_util->redirectTo( 'upgrade', $tmp_cage_self ); | 65 | | - return false; | 66 | | - } // end of if | 67 | | - | 68 | | - // ignoreファイルを作成する | 69 | | - $this->obj_util->fileOperator( 'make', RISOLUTO_USERLAND . $this->obj_sess->sessLoad( 'currentcage' ) . '/ignore' ); | 70 | | - | 71 | | - // セッションを切る | 72 | | - $this->obj_sess->sessEnd(); | 73 | | - | 74 | | - return true; | 75 | | - | 76 | | - } // end of function:model() | 77 | | - | 78 | | - /** | 79 | | - * viewメソッド(モデル) | 80 | | - * | 81 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 82 | | - * | 83 | | - * @param void なし | 84 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 85 | | - */ | 86 | | - public function view() | 87 | | - { | 88 | | - // ヘッダ情報をセット | 89 | | - $html_header[ 'robots' ] = 'NOINDEX,NOFOLLOW'; | 90 | | - $html_header[ 'css' ] = array( './css/common.css' ); | 91 | | - $html_header[ 'title' ] = 'アップグレードFlavor(finish)'; | 92 | | - | 93 | | - // アサイン | 94 | | - $this->smarty->assign ( 'header', $html_header ); | 95 | | - | 96 | | - $this->smarty->assign ( 'cage', str_replace( DIRECTORY_SEPARATOR, '.' , $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 97 | | - | 98 | | - // 表示 | 99 | | - $this->smarty->display( 'finish.tpl' ); | 100 | | - | 101 | | - return true; | 102 | | - | 103 | | - } // end of function:view() | 104 | | - | 105 | | - } // end of class:page06 | 106 | | -?> |
| | @@ -1,327 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * アップグレードFlavor画面(6)クラス | 4 | | - * | 5 | | - * アップグレードFlavor画面(6)を実現するためのクラス | 6 | | - * | 7 | | - * @package risoluto | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2012 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( 'upgrade_base.inc' ); | 17 | | - | 18 | | - class page05 extends upgrade_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラス変数定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * チェック情報格納用変数 | 25 | | - * @access private | 26 | | - * @var array | 27 | | - */ | 28 | | - private $checklist; | 29 | | - /** | 30 | | - * チェック結果格納用変数 | 31 | | - * @access private | 32 | | - * @var array | 33 | | - */ | 34 | | - private $checkresult; | 35 | | - /** | 36 | | - * エラー発生状況格納用変数 | 37 | | - * @access private | 38 | | - * @var boolean | 39 | | - */ | 40 | | - private $errStatus; | 41 | | - | 42 | | - //------------------------------------------------------// | 43 | | - // クラスメソッド定義 | 44 | | - //------------------------------------------------------// | 45 | | - /** | 46 | | - * コンストラクタメソッド | 47 | | - * | 48 | | - * コンストラクタメソッド | 49 | | - * | 50 | | - * @param void なし | 51 | | - * @return void なし | 52 | | - */ | 53 | | - public function __construct() | 54 | | - { | 55 | | - } // end of function:__construct() | 56 | | - | 57 | | - /** | 58 | | - * クローンメソッド | 59 | | - * | 60 | | - * クローンメソッド | 61 | | - * | 62 | | - * @param void なし | 63 | | - * @return void なし | 64 | | - */ | 65 | | - public function __clone() | 66 | | - { | 67 | | - } // end of function:__clone() | 68 | | - | 69 | | - /** | 70 | | - * modelメソッド(モデル) | 71 | | - * | 72 | | - * データ取得等のモデルに相当する部分の処理を行う | 73 | | - * | 74 | | - * @param void なし | 75 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 76 | | - */ | 77 | | - public function model() | 78 | | - { | 79 | | - // 前画面のCageが現在のCageと同一でない or 前画面のActが「page04」 and 「page05」 and 「page06」でない場合、 | 80 | | - // インストーラトップに飛ばす | 81 | | - $tmp_cage = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 82 | | - $tmp_cage_self = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 83 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 84 | | - if ( $tmp_cage != $tmp_cage_self or ( $tmp_act != 'page04' and $tmp_act != 'page05' and $tmp_act != 'page06' ) ) | 85 | | - { | 86 | | - $this->obj_util->redirectTo( 'upgrade', $tmp_cage_self ); | 87 | | - return false; | 88 | | - } // end of if | 89 | | - | 90 | | - // 配置対象をセットする | 91 | | - // 他に配置する対象があれば、この配列に加えてください。 | 92 | | - // target: 対象ファイル名 / destination: 配置先のパス/パーミッション/オーナ名/グループ名) / | 93 | | - // operation: 操作の内容(copy/copy_with_replace/move/unlink/mkdir/rmdir) | 94 | | - clearstatcache(); | 95 | | - $tmp_base = RISOLUTO_USERLAND . $this->obj_sess->sessLoad( 'currentcage' ); | 96 | | - $this->filelist = array( | 97 | | - array( | 98 | | - 'target' => $tmp_base . '/file/simplepage_ckeditor.js' | 99 | | - , 'destination' => RISOLUTO_DOCROOT . '/js/' . $this->target . '_ckeditor.js' | 100 | | - , 'operation' => 'copy_with_replace' | 101 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/simplepage_ckeditor.js' ) ? true : false ) | 102 | | - ) | 103 | | - , array( | 104 | | - 'target' => $tmp_base . '/file/simplepage_version' | 105 | | - , 'destination' => RISOLUTO_CONF . $this->target . '_version' | 106 | | - , 'operation' => 'copy_with_replace' | 107 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/simplepage_version' ) ? true : false ) | 108 | | - ) | 109 | | - , array( | 110 | | - 'target' => $tmp_base . '/file/simplepage.ini' | 111 | | - , 'destination' => RISOLUTO_CONF . $this->target . '.ini' | 112 | | - , 'operation' => 'copy_with_replace' | 113 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/simplepage.ini' ) ? true : false ) | 114 | | - ) | 115 | | - , array( | 116 | | - 'target' => $tmp_base . '/file/00004_simplepage.tpl' | 117 | | - , 'destination' => RISOLUTO_USERLAND . 'admin/menu/00004_' . $this->target . '.tpl' | 118 | | - , 'operation' => 'copy_with_replace' | 119 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/00004_simplepage.tpl' ) ? true : false ) | 120 | | - ) | 121 | | - , array( | 122 | | - 'target' => $tmp_base . '/file/AUTHORS' | 123 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/AUTHORS' | 124 | | - , 'operation' => 'copy_with_replace' | 125 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/AUTHORS' ) ? true : false ) | 126 | | - ) | 127 | | - , array( | 128 | | - 'target' => $tmp_base . '/file/LICENSE' | 129 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/LICENSE' | 130 | | - , 'operation' => 'copy_with_replace' | 131 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/LICENSE' ) ? true : false ) | 132 | | - ) | 133 | | - , array( | 134 | | - 'target' => $tmp_base . '/file/pageadd_complete.php' | 135 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pageadd_complete.php' | 136 | | - , 'operation' => 'copy_with_replace' | 137 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_complete.php' ) ? true : false ) | 138 | | - ) | 139 | | - , array( | 140 | | - 'target' => $tmp_base . '/file/pageadd_complete.tpl' | 141 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pageadd_complete.tpl' | 142 | | - , 'operation' => 'copy_with_replace' | 143 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_complete.tpl' ) ? true : false ) | 144 | | - ) | 145 | | - , array( | 146 | | - 'target' => $tmp_base . '/file/pageadd_confirm.php' | 147 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pageadd_confirm.php' | 148 | | - , 'operation' => 'copy_with_replace' | 149 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_confirm.php' ) ? true : false ) | 150 | | - ) | 151 | | - , array( | 152 | | - 'target' => $tmp_base . '/file/pageadd_confirm.tpl' | 153 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pageadd_confirm.tpl' | 154 | | - , 'operation' => 'copy_with_replace' | 155 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_confirm.tpl' ) ? true : false ) | 156 | | - ) | 157 | | - , array( | 158 | | - 'target' => $tmp_base . '/file/pageadd_entry.php' | 159 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pageadd_entry.php' | 160 | | - , 'operation' => 'copy_with_replace' | 161 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_entry.php' ) ? true : false ) | 162 | | - ) | 163 | | - , array( | 164 | | - 'target' => $tmp_base . '/file/pageadd_entry.tpl' | 165 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pageadd_entry.tpl' | 166 | | - , 'operation' => 'copy_with_replace' | 167 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageadd_entry.tpl' ) ? true : false ) | 168 | | - ) | 169 | | - , array( | 170 | | - 'target' => $tmp_base . '/file/pagedel_complete.php' | 171 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagedel_complete.php' | 172 | | - , 'operation' => 'copy_with_replace' | 173 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagedel_complete.php' ) ? true : false ) | 174 | | - ) | 175 | | - , array( | 176 | | - 'target' => $tmp_base . '/file/pagedel_complete.tpl' | 177 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagedel_complete.tpl' | 178 | | - , 'operation' => 'copy_with_replace' | 179 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagedel_complete.tpl' ) ? true : false ) | 180 | | - ) | 181 | | - , array( | 182 | | - 'target' => $tmp_base . '/file/pagedel_confirm.php' | 183 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagedel_confirm.php' | 184 | | - , 'operation' => 'copy_with_replace' | 185 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagedel_confirm.php' ) ? true : false ) | 186 | | - ) | 187 | | - , array( | 188 | | - 'target' => $tmp_base . '/file/pagedel_confirm.tpl' | 189 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagedel_confirm.tpl' | 190 | | - , 'operation' => 'copy_with_replace' | 191 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagedel_confirm.tpl' ) ? true : false ) | 192 | | - ) | 193 | | - , array( | 194 | | - 'target' => $tmp_base . '/file/pagelist.php' | 195 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagelist.php' | 196 | | - , 'operation' => 'copy_with_replace' | 197 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagelist.php' ) ? true : false ) | 198 | | - ) | 199 | | - , array( | 200 | | - 'target' => $tmp_base . '/file/pagelist.tpl' | 201 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagelist.tpl' | 202 | | - , 'operation' => 'copy_with_replace' | 203 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagelist.tpl' ) ? true : false ) | 204 | | - ) | 205 | | - , array( | 206 | | - 'target' => $tmp_base . '/file/pagemod_complete.php' | 207 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagemod_complete.php' | 208 | | - , 'operation' => 'copy_with_replace' | 209 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_complete.php' ) ? true : false ) | 210 | | - ) | 211 | | - , array( | 212 | | - 'target' => $tmp_base . '/file/pagemod_complete.tpl' | 213 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagemod_complete.tpl' | 214 | | - , 'operation' => 'copy_with_replace' | 215 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_complete.tpl' ) ? true : false ) | 216 | | - ) | 217 | | - , array( | 218 | | - 'target' => $tmp_base . '/file/pagemod_confirm.php' | 219 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagemod_confirm.php' | 220 | | - , 'operation' => 'copy_with_replace' | 221 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_confirm.php' ) ? true : false ) | 222 | | - ) | 223 | | - , array( | 224 | | - 'target' => $tmp_base . '/file/pagemod_confirm.tpl' | 225 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagemod_confirm.tpl' | 226 | | - , 'operation' => 'copy_with_replace' | 227 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_confirm.tpl' ) ? true : false ) | 228 | | - ) | 229 | | - , array( | 230 | | - 'target' => $tmp_base . '/file/pagemod_entry.php' | 231 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagemod_entry.php' | 232 | | - , 'operation' => 'copy_with_replace' | 233 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_entry.php' ) ? true : false ) | 234 | | - ) | 235 | | - , array( | 236 | | - 'target' => $tmp_base . '/file/pagemod_entry.tpl' | 237 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pagemod_entry.tpl' | 238 | | - , 'operation' => 'copy_with_replace' | 239 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pagemod_entry.tpl' ) ? true : false ) | 240 | | - ) | 241 | | - , array( | 242 | | - 'target' => $tmp_base . '/file/pageview.php' | 243 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pageview.php' | 244 | | - , 'operation' => 'copy_with_replace' | 245 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageview.php' ) ? true : false ) | 246 | | - ) | 247 | | - , array( | 248 | | - 'target' => $tmp_base . '/file/pageview.tpl' | 249 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/pageview.tpl' | 250 | | - , 'operation' => 'copy_with_replace' | 251 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/pageview.tpl' ) ? true : false ) | 252 | | - ) | 253 | | - , array( | 254 | | - 'target' => $tmp_base . '/file/simplepage_base.inc' | 255 | | - , 'destination' => RISOLUTO_USERLAND . $this->target . '/simplepage_base.inc' | 256 | | - , 'operation' => 'copy_with_replace' | 257 | | - , 'pass' => ( !file_exists( $tmp_base . '/file/simplepage_base.inc' ) ? true : false ) | 258 | | - ) | 259 | | - ); | 260 | | - | 261 | | - // 処理を行う | 262 | | - foreach( $this->filelist as $dat ) | 263 | | - { | 264 | | - if ( $dat[ 'pass' ] ) | 265 | | - { | 266 | | - continue; | 267 | | - } // end of if | 268 | | - | 269 | | - // 処理を呼び出す | 270 | | - $tmp_errflag = $this->obj_util->fileOperator( $dat[ 'operation' ], $dat[ 'target' ], $dat[ 'destination' ], $this->target ); | 271 | | - | 272 | | - // 処理結果によって、状態を変える | 273 | | - if ( $tmp_errflag ) | 274 | | - { | 275 | | - $this->checkresult[] = array( | 276 | | - 'operation' => $dat[ 'operation' ] | 277 | | - , 'target' => $dat[ 'target' ] | 278 | | - , 'destination' => $dat[ 'destination' ] | 279 | | - , 'result' => 'OK' | 280 | | - ); | 281 | | - } // end of if | 282 | | - else | 283 | | - { | 284 | | - $this->checkresult[] = array( | 285 | | - 'operation' => $dat[ 'operation' ] | 286 | | - , 'target' => $dat[ 'target' ] | 287 | | - , 'destination' => $dat[ 'destination' ] | 288 | | - , 'result' => 'NG' | 289 | | - ); | 290 | | - $this->errStatus = 'NG'; | 291 | | - } // end of else | 292 | | - } // end of foreach | 293 | | - | 294 | | - return true; | 295 | | - } // end of function:model() | 296 | | - | 297 | | - /** | 298 | | - * viewメソッド(モデル) | 299 | | - * | 300 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 301 | | - * | 302 | | - * @param void なし | 303 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 304 | | - */ | 305 | | - public function view() | 306 | | - { | 307 | | - // ヘッダ情報をセット | 308 | | - $html_header[ 'robots' ] = 'NOINDEX,NOFOLLOW'; | 309 | | - $html_header[ 'css' ] = array( './css/common.css' ); | 310 | | - $html_header[ 'title' ] = 'アップグレードFlavor(5)'; | 311 | | - | 312 | | - // アサイン | 313 | | - $this->smarty->assign ( 'header', $html_header ); | 314 | | - $this->smarty->assign ( 'checklist', $this->checkresult ); | 315 | | - $this->smarty->assign ( 'err', $this->errStatus ); | 316 | | - | 317 | | - $this->smarty->assign ( 'cage', str_replace( DIRECTORY_SEPARATOR, '.' , $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 318 | | - | 319 | | - // 表示 | 320 | | - $this->smarty->display( 'page05.tpl' ); | 321 | | - | 322 | | - return true; | 323 | | - | 324 | | - } // end of function:view() | 325 | | - | 326 | | - } // end of class:page05 | 327 | | -?> |
| | @@ -1,98 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * アップグレードFlavor画面(6)クラス | 4 | | - * | 5 | | - * アップグレードFlavor画面(6)を実現するためのクラス | 6 | | - * | 7 | | - * @package risoluto | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2012 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( 'upgrade_base.inc' ); | 17 | | - | 18 | | - class page06 extends upgrade_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラスメソッド定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * コンストラクタメソッド | 25 | | - * | 26 | | - * コンストラクタメソッド | 27 | | - * | 28 | | - * @param void なし | 29 | | - * @return void なし | 30 | | - */ | 31 | | - public function __construct() | 32 | | - { | 33 | | - } // end of function:__construct() | 34 | | - | 35 | | - /** | 36 | | - * クローンメソッド | 37 | | - * | 38 | | - * クローンメソッド | 39 | | - * | 40 | | - * @param void なし | 41 | | - * @return void なし | 42 | | - */ | 43 | | - public function __clone() | 44 | | - { | 45 | | - } // end of function:__clone() | 46 | | - | 47 | | - /** | 48 | | - * modelメソッド(モデル) | 49 | | - * | 50 | | - * データ取得等のモデルに相当する部分の処理を行う | 51 | | - * | 52 | | - * @param void なし | 53 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 54 | | - */ | 55 | | - public function model() | 56 | | - { | 57 | | - // 前画面のCageが現在のCageと同一でない or 前画面のActが「page05」でない場合、 | 58 | | - // インストーラトップに飛ばす | 59 | | - $tmp_cage = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'lastcage' ) ); | 60 | | - $tmp_cage_self = str_replace( DIRECTORY_SEPARATOR, '.', $this->obj_sess->sessLoad( 'currentcage' ) ); | 61 | | - $tmp_act = $this->obj_sess->sessLoad( 'lastact' ); | 62 | | - if ( $tmp_cage != $tmp_cage_self or ( $tmp_act != 'page05' ) ) | 63 | | - { | 64 | | - $this->obj_util->redirectTo( 'upgrade', $tmp_cage_self ); | 65 | | - return false; | 66 | | - } // end of if | 67 | | - | 68 | | - } // end of function:model() | 69 | | - | 70 | | - /** | 71 | | - * viewメソッド(モデル) | 72 | | - * | 73 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 74 | | - * | 75 | | - * @param void なし | 76 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 77 | | - */ | 78 | | - public function view() | 79 | | - { | 80 | | - // ヘッダ情報をセット | 81 | | - $html_header[ 'robots' ] = 'NOINDEX,NOFOLLOW'; | 82 | | - $html_header[ 'css' ] = array( './css/common.css' ); | 83 | | - $html_header[ 'title' ] = 'アップグレードFlavor(6)'; | 84 | | - | 85 | | - // アサイン | 86 | | - $this->smarty->assign ( 'header', $html_header ); | 87 | | - | 88 | | - $this->smarty->assign ( 'cage', str_replace( DIRECTORY_SEPARATOR, '.' , $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 89 | | - | 90 | | - // 表示 | 91 | | - $this->smarty->display( 'page06.tpl' ); | 92 | | - | 93 | | - return true; | 94 | | - | 95 | | - } // end of function:view() | 96 | | - | 97 | | - } // end of class:page06 | 98 | | -?> |
| | @@ -1,104 +0,0 @@ | 1 | | -<?php | 2 | | -/** | 3 | | - * アップグレードFlavor画面(0)クラス | 4 | | - * | 5 | | - * アップグレードFlavor画面(0)を実現するためのクラス | 6 | | - * | 7 | | - * @package risoluto | 8 | | - * @author Risoluto Developers | 9 | | - * @license http://opensource.org/licenses/bsd-license.php new BSD license | 10 | | - * @copyright (C) 2008-2012 Risoluto Developers / All Rights Reserved. | 11 | | - */ | 12 | | - | 13 | | - /** | 14 | | - * 基底クラス | 15 | | - */ | 16 | | - require_once( 'upgrade_base.inc' ); | 17 | | - | 18 | | - class upgrade extends upgrade_base | 19 | | - { | 20 | | - //------------------------------------------------------// | 21 | | - // クラス変数定義 | 22 | | - //------------------------------------------------------// | 23 | | - /** | 24 | | - * バージョン情報格納用変数 | 25 | | - * @access private | 26 | | - * @var array | 27 | | - */ | 28 | | - private $versioninfo; | 29 | | - | 30 | | - //------------------------------------------------------// | 31 | | - // クラスメソッド定義 | 32 | | - //------------------------------------------------------// | 33 | | - /** | 34 | | - * コンストラクタメソッド | 35 | | - * | 36 | | - * コンストラクタメソッド | 37 | | - * | 38 | | - * @param void なし | 39 | | - * @return void なし | 40 | | - */ | 41 | | - public function __construct() | 42 | | - { | 43 | | - } // end of function:__construct() | 44 | | - | 45 | | - /** | 46 | | - * クローンメソッド | 47 | | - * | 48 | | - * クローンメソッド | 49 | | - * | 50 | | - * @param void なし | 51 | | - * @return void なし | 52 | | - */ | 53 | | - public function __clone() | 54 | | - { | 55 | | - } // end of function:__clone() | 56 | | - | 57 | | - /** | 58 | | - * modelメソッド(モデル) | 59 | | - * | 60 | | - * データ取得等のモデルに相当する部分の処理を行う | 61 | | - * | 62 | | - * @param void なし | 63 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 64 | | - */ | 65 | | - public function model() | 66 | | - { | 67 | | - // ディレクトリ名からバージョン情報を取得する | 68 | | - $this->versioninfo = explode( '_to_', str_replace( 'upgrade' . DIRECTORY_SEPARATOR, '', $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 69 | | - return true; | 70 | | - } // end of function:model() | 71 | | - | 72 | | - /** | 73 | | - * viewメソッド(モデル) | 74 | | - * | 75 | | - * テンプレート関連処理等のビューに相当する部分の処理を行う | 76 | | - * | 77 | | - * @param void なし | 78 | | - * @return boolean ファンクション実行結果( true:正常終了 / false: 異常終了 ) | 79 | | - */ | 80 | | - public function view() | 81 | | - { | 82 | | - // ヘッダ情報をセット | 83 | | - $html_header[ 'robots' ] = 'NOINDEX,NOFOLLOW'; | 84 | | - $html_header[ 'css' ] = array( './css/common.css' ); | 85 | | - $html_header[ 'title' ] = 'アップグレードFlavor(upgrade)'; | 86 | | - | 87 | | - // アサイン | 88 | | - $this->smarty->assign ( 'header', $html_header ); | 89 | | - | 90 | | - $this->smarty->assign ( 'cage', str_replace( DIRECTORY_SEPARATOR, '.' , $this->obj_sess->sessLoad( 'currentcage' ) ) ); | 91 | | - $this->smarty->assign ( 'fromVer', $this->versioninfo[0] ); | 92 | | - $this->smarty->assign ( 'toVer', $this->versioninfo[1] ); | 93 | | - | 94 | | - $this->smarty->assign ( 'target', $this->target ); | 95 | | - | 96 | | - // 表示 | 97 | | - $this->smarty->display( 'upgrade.tpl' ); | 98 | | - | 99 | | - return true; | 100 | | - | 101 | | - } // end of function:view() | 102 | | - | 103 | | - } // end of class:install | 104 | | -?> |
旧リポジトリブラウザで表示
|