Changeset 21514 for branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php
- Timestamp:
- 2012/02/15 19:56:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php
r21490 r21514 108 108 if (SC_Utils_Ex::isBlank($this->arrErr)) { 109 109 if ($this->tryView($objFormParam)) { 110 $file_url = htmlspecialchars(ereg_replace($objFormParam->getValue('top_dir'), "", $objFormParam->getValue('select_file')));110 $file_url = htmlspecialchars(ereg_replace($objFormParam->getValue('top_dir'), '', $objFormParam->getValue('select_file'))); 111 111 $tpl_onload = "win02('./file_view.php?file=". $file_url ."', 'user_data', '600', '400');"; 112 112 $this->setTplOnLoad($tpl_onload); … … 125 125 if (SC_Utils_Ex::isBlank($this->arrErr)) { 126 126 if (is_dir($objFormParam->getValue('select_file'))) { 127 $disp_error = "※ ディレクトリをダウンロードすることは出来ません。<br/>";127 $disp_error = '※ ディレクトリをダウンロードすることは出来ません。<br/>'; 128 128 $this->setDispError('select_file', $disp_error); 129 129 } else { … … 156 156 if (SC_Utils_Ex::isBlank($this->arrErr)) { 157 157 if (!$this->tryCreateDir($objFileManager, $objFormParam)) { 158 $disp_error = "※ ".htmlspecialchars($objFormParam->getValue('create_file'), ENT_QUOTES)."の作成に失敗しました。<br/>";158 $disp_error = '※ '.htmlspecialchars($objFormParam->getValue('create_file'), ENT_QUOTES)."の作成に失敗しました。<br/>"; 159 159 $this->setDispError('create_file', $disp_error); 160 160 } else { … … 225 225 // 共通定義 226 226 $this->lfInitParamCommon($objFormParam); 227 $objFormParam->addParam( "選択ファイル", 'select_file', MTEXT_LEN, 'a', array());227 $objFormParam->addParam('選択ファイル', 'select_file', MTEXT_LEN, 'a', array()); 228 228 } 229 229 … … 237 237 // 共通定義 238 238 $this->lfInitParamCommon($objFormParam); 239 $objFormParam->addParam( "選択ファイル", 'select_file', MTEXT_LEN, 'a', array('SELECT_CHECK'));239 $objFormParam->addParam('選択ファイル', 'select_file', MTEXT_LEN, 'a', array('SELECT_CHECK')); 240 240 } 241 241 … … 249 249 // 共通定義 250 250 $this->lfInitParamCommon($objFormParam); 251 $objFormParam->addParam( "選択ファイル", 'select_file', MTEXT_LEN, 'a', array());252 $objFormParam->addParam( "作成ファイル名", 'create_file', MTEXT_LEN, 'a', array('EXIST_CHECK', 'FILE_NAME_CHECK_BY_NOUPLOAD'));251 $objFormParam->addParam('選択ファイル', 'select_file', MTEXT_LEN, 'a', array()); 252 $objFormParam->addParam('作成ファイル名', 'create_file', MTEXT_LEN, 'a', array('EXIST_CHECK', 'FILE_NAME_CHECK_BY_NOUPLOAD')); 253 253 } 254 254 … … 260 260 */ 261 261 function lfInitParamCommon(&$objFormParam) { 262 $objFormParam->addParam( "ルートディレクトリ", 'top_dir', MTEXT_LEN, 'a', array());263 $objFormParam->addParam( "現在の階層ディレクトリ", 'now_dir', MTEXT_LEN, 'a', array());264 $objFormParam->addParam( "現在の階層ファイル", 'now_file', MTEXT_LEN, 'a', array());265 $objFormParam->addParam( "ツリー選択状態", 'tree_status', MTEXT_LEN, 'a', array());266 $objFormParam->addParam( "ツリー選択ディレクトリ", 'tree_select_file', MTEXT_LEN, 'a', array());262 $objFormParam->addParam('ルートディレクトリ', 'top_dir', MTEXT_LEN, 'a', array()); 263 $objFormParam->addParam('現在の階層ディレクトリ', 'now_dir', MTEXT_LEN, 'a', array()); 264 $objFormParam->addParam('現在の階層ファイル', 'now_file', MTEXT_LEN, 'a', array()); 265 $objFormParam->addParam('ツリー選択状態', 'tree_status', MTEXT_LEN, 'a', array()); 266 $objFormParam->addParam('ツリー選択ディレクトリ', 'tree_select_file', MTEXT_LEN, 'a', array()); 267 267 } 268 268 … … 274 274 */ 275 275 function lfInitFile(&$objUpFile) { 276 $objUpFile->addFile( "ファイル", 'upload_file', array(), FILE_SIZE, true, 0, 0, false);276 $objUpFile->addFile('ファイル', 'upload_file', array(), FILE_SIZE, true, 0, 0, false); 277 277 } 278 278 … … 316 316 $create_dir = ereg_replace("/$", "", $objFormParam->getValue('now_dir')); 317 317 // ファイル作成 318 if ($objFileManager->sfCreateFile($create_dir. "/".$objFormParam->getValue('create_file'), 0755)) {318 if ($objFileManager->sfCreateFile($create_dir.'/'.$objFormParam->getValue('create_file'), 0755)) { 319 319 $create_dir_flg = true; 320 320 } … … 356 356 */ 357 357 function setDispPath($objFormParam) { 358 $tpl_now_dir = "";358 $tpl_now_dir = ''; 359 359 // Windows 環境で DIRECTORY_SEPARATOR が JavaScript に渡るとエスケープ文字と勘違いするので置換 360 360 $html_realdir = str_replace(DIRECTORY_SEPARATOR, '/', HTML_REALDIR); … … 421 421 */ 422 422 function lfGetParentDir($dir) { 423 $parent_dir = "";423 $parent_dir = ''; 424 424 $dir = ereg_replace("/$", "", $dir); 425 425 $arrDir = explode('/', $dir); … … 455 455 $tpl_javascript .= "arrTree = new Array();\n"; 456 456 foreach ($arrTree as $arrVal) { 457 $tpl_javascript .= "arrTree[".$arrVal['count']."] = new Array(".$arrVal['count'].", '".$arrVal['type']."', '".$arrVal['path']."', ".$arrVal['rank'].",";457 $tpl_javascript .= 'arrTree['.$arrVal['count']."] = new Array(".$arrVal['count'].", '".$arrVal['type']."', '".$arrVal['path']."', ".$arrVal['rank'].","; 458 458 if ($arrVal['open']) { 459 459 $tpl_javascript .= "true);\n";
Note: See TracChangeset
for help on using the changeset viewer.