Changeset 21441 for branches/version-2_12-dev/html
- Timestamp:
- 2012/02/06 11:05:15 (12 years ago)
- Location:
- branches/version-2_12-dev/html
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/html/admin/load_module_config.php
r21420 r21441 37 37 $module_id = isset($_GET['module_id']) ? $_GET['module_id'] : null; 38 38 39 if (!empty($module_id) && is_numeric($module_id)) {39 if (!empty($module_id) && is_numeric($module_id)) { 40 40 41 41 GC_Utils::gfPrintLog("loading module ====> module_id = " . $module_id); -
branches/version-2_12-dev/html/install/index.php
r21420 r21441 35 35 require_once DATA_REALDIR . 'module/HTTP/Request.php'; 36 36 37 if (!defined("ADMIN_DIR")){37 if (!defined("ADMIN_DIR")) { 38 38 define("ADMIN_DIR","admin/"); 39 39 } … … 57 57 $temp_dir = $ownDir . 'temp'; 58 58 59 if (!is_writable($temp_dir)) {59 if (!is_writable($temp_dir)) { 60 60 SC_Utils_Ex::sfErrorHeader($temp_dir . "にユーザ書込み権限(777, 707等)を付与して下さい。", true); 61 61 exit; … … 77 77 $mode = isset($_POST['mode_overwrite']) ? $_POST['mode_overwrite'] : $_POST['mode']; 78 78 79 switch ($mode) {79 switch ($mode) { 80 80 // ようこそ 81 81 case 'welcome': … … 105 105 //入力値のエラーチェック 106 106 $objPage->arrErr = lfCheckWebError($objWebParam); 107 if (count($objPage->arrErr) == 0) {107 if (count($objPage->arrErr) == 0) { 108 108 $objPage = lfDispStep2($objPage); 109 109 } else { … … 133 133 $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 134 134 135 if (count($objPage->arrErr) == 0) {135 if (count($objPage->arrErr) == 0) { 136 136 // スキップする場合には次画面へ遷移 137 137 $skip = $_POST["db_skip"]; … … 144 144 // テーブルの作成 145 145 $objPage->arrErr = lfExecuteSQL("./sql/create_table_".$arrRet['db_type'].".sql", $dsn); 146 if (count($objPage->arrErr) == 0) {146 if (count($objPage->arrErr) == 0) { 147 147 $objPage->tpl_message.="○:テーブルの作成に成功しました。<br />"; 148 148 } else { … … 151 151 152 152 // 初期データの作成 153 if (count($objPage->arrErr) == 0) {153 if (count($objPage->arrErr) == 0) { 154 154 $objPage->arrErr = lfExecuteSQL("./sql/insert_data.sql", $dsn); 155 if (count($objPage->arrErr) == 0) {155 if (count($objPage->arrErr) == 0) { 156 156 $objPage->tpl_message.="○:初期データの作成に成功しました。<br />"; 157 157 } else { … … 163 163 if (count($objPage->arrErr) == 0) { 164 164 $objPage->arrErr = lfCreateSequence(getSequences(), $dsn); 165 if (count($objPage->arrErr) == 0) {165 if (count($objPage->arrErr) == 0) { 166 166 $objPage->tpl_message.="○:シーケンスの作成に成功しました。<br />"; 167 167 } else { … … 170 170 } 171 171 172 if (count($objPage->arrErr) == 0) {172 if (count($objPage->arrErr) == 0) { 173 173 $objPage = lfDispStep3($objPage); 174 174 $objPage->tpl_mode = 'step4'; … … 191 191 192 192 // テーブルの削除 193 if (count($objPage->arrErr) == 0) {193 if (count($objPage->arrErr) == 0) { 194 194 $objPage->arrErr = lfExecuteSQL("./sql/drop_table.sql", $dsn, false); 195 if (count($objPage->arrErr) == 0) {195 if (count($objPage->arrErr) == 0) { 196 196 $objPage->tpl_message.="○:テーブルの削除に成功しました。<br />"; 197 197 } else { … … 201 201 202 202 // シーケンスの削除 203 if (count($objPage->arrErr) == 0) {203 if (count($objPage->arrErr) == 0) { 204 204 $objPage->arrErr = lfDropSequence(getSequences(), $dsn); 205 if (count($objPage->arrErr) == 0) {205 if (count($objPage->arrErr) == 0) { 206 206 $objPage->tpl_message.="○:シーケンスの削除に成功しました。<br />"; 207 207 } else { … … 218 218 $objPage = lfDispComplete($objPage); 219 219 220 if (isset($_POST['send_info']) && $_POST['send_info'] === 'true'){220 if (isset($_POST['send_info']) && $_POST['send_info'] === 'true') { 221 221 // サイト情報を送信 222 222 $req = new HTTP_Request("http://www.ec-cube.net/mall/use_site.php"); … … 224 224 225 225 $arrSendData = array(); 226 foreach ($_POST as $key => $val){227 if (ereg("^senddata_*", $key)) {226 foreach ($_POST as $key => $val) { 227 if (ereg("^senddata_*", $key)) { 228 228 $arrSendDataTmp = array(str_replace("senddata_", "", $key) => $val); 229 229 $arrSendData = array_merge($arrSendData, $arrSendDataTmp); … … 332 332 $mess = ""; 333 333 $hasErr = false; 334 foreach ($arrWriteFile as $val) {334 foreach ($arrWriteFile as $val) { 335 335 // listdirsの保持データを初期化 336 336 initdirs(); … … 342 342 343 343 foreach ($arrDirs as $path) { 344 if (file_exists($path)) {344 if (file_exists($path)) { 345 345 $filemode = lfGetFileMode($path); 346 346 $real_path = realpath($path); 347 347 348 348 // ディレクトリの場合 349 if (is_dir($path)) {350 if (!is_writable($path)) {349 if (is_dir($path)) { 350 if (!is_writable($path)) { 351 351 $mess.= ">> ×:$real_path($filemode) \nユーザ書込み権限(777, 707等)を付与して下さい。\n"; 352 352 $hasErr = true; … … 355 355 } 356 356 } else { 357 if (!is_writable($path)) {357 if (!is_writable($path)) { 358 358 $mess.= ">> ×:$real_path($filemode) \nユーザ書込み権限(666, 606等)を付与して下さい。\n"; 359 359 $hasErr = true; … … 388 388 umask(0); 389 389 $path = HTML_REALDIR . "upload/temp_template"; 390 if (!file_exists($path)) {390 if (!file_exists($path)) { 391 391 mkdir($path); 392 392 } 393 393 $path = HTML_REALDIR . "upload/save_image"; 394 if (!file_exists($path)) {394 if (!file_exists($path)) { 395 395 mkdir($path); 396 396 } 397 397 $path = HTML_REALDIR . "upload/temp_image"; 398 if (!file_exists($path)) {398 if (!file_exists($path)) { 399 399 mkdir($path); 400 400 } 401 401 $path = HTML_REALDIR . "upload/graph_image"; 402 if (!file_exists($path)) {402 if (!file_exists($path)) { 403 403 mkdir($path); 404 404 } 405 405 $path = HTML_REALDIR . "upload/mobile_image"; 406 if (!file_exists($path)) {406 if (!file_exists($path)) { 407 407 mkdir($path); 408 408 } 409 409 $path = DATA_REALDIR . "downloads/module"; 410 if (!file_exists($path)) {410 if (!file_exists($path)) { 411 411 mkdir($path); 412 412 } 413 413 $path = DATA_REALDIR . "downloads/update"; 414 if (!file_exists($path)) {414 if (!file_exists($path)) { 415 415 mkdir($path); 416 416 } 417 417 $path = DATA_REALDIR . "upload/csv"; 418 if (!file_exists($path)) {418 if (!file_exists($path)) { 419 419 mkdir($path); 420 420 } … … 557 557 $objQuery = new SC_Query($dsn); 558 558 $cnt = $objQuery->count("dtb_baseinfo"); 559 if ($cnt > 0) {559 if ($cnt > 0) { 560 560 $objQuery->update("dtb_baseinfo", $sqlval); 561 561 } else { … … 610 610 global $objDb; 611 611 612 if (defined('HTTP_URL')) {612 if (defined('HTTP_URL')) { 613 613 $normal_url = HTTP_URL; 614 614 } else { … … 617 617 } 618 618 619 if (defined('HTTPS_URL')) {619 if (defined('HTTPS_URL')) { 620 620 $secure_url = HTTPS_URL; 621 621 } else { … … 625 625 626 626 // 店名、管理者メールアドレスを取得する。(再インストール時) 627 if (defined('DEFAULT_DSN')) {627 if (defined('DEFAULT_DSN')) { 628 628 $objQuery = new SC_Query(); 629 629 $tables = $objQuery->listTables(); 630 630 631 if (!PEAR::isError($tables) && in_array("dtb_baseinfo", $tables)) {631 if (!PEAR::isError($tables) && in_array("dtb_baseinfo", $tables)) { 632 632 $arrRet = $objQuery->select("shop_name, email01", "dtb_baseinfo"); 633 633 $shop_name = $arrRet[0]['shop_name']; … … 673 673 function lfInitDBParam($objDBParam) { 674 674 675 if (defined('DB_SERVER')) {675 if (defined('DB_SERVER')) { 676 676 $db_server = DB_SERVER; 677 677 } else { … … 679 679 } 680 680 681 if (defined('DB_TYPE')) {681 if (defined('DB_TYPE')) { 682 682 $db_type = DB_TYPE; 683 683 } else { … … 685 685 } 686 686 687 if (defined('DB_PORT')) {687 if (defined('DB_PORT')) { 688 688 $db_port = DB_PORT; 689 689 } else { … … 691 691 } 692 692 693 if (defined('DB_NAME')) {693 if (defined('DB_NAME')) { 694 694 $db_name = DB_NAME; 695 695 } else { … … 697 697 } 698 698 699 if (defined('DB_USER')) {699 if (defined('DB_USER')) { 700 700 $db_user = DB_USER; 701 701 } else { … … 724 724 $secure_dir = ereg_replace("^https?://[a-zA-Z0-9_~=&\?\.\-]+", "", $arrRet['secure_url']); 725 725 726 if ($normal_dir != $secure_dir) {726 if ($normal_dir != $secure_dir) { 727 727 $objErr->arrErr['normal_url'] = "※ URLに異なる階層を指定することはできません。"; 728 728 $objErr->arrErr['secure_url'] = "※ URLに異なる階層を指定することはできません。"; … … 757 757 $objErr->arrErr = $objFormParam->checkError(); 758 758 759 if (count($objErr->arrErr) == 0) {759 if (count($objErr->arrErr) == 0) { 760 760 if (!defined("DB_TYPE")) { 761 761 define("DB_TYPE", $arrRet['db_type']); … … 767 767 $objDB = MDB2::connect($dsn, $options); 768 768 // 接続成功 769 if (!PEAR::isError($objDB)) {769 if (!PEAR::isError($objDB)) { 770 770 $dbFactory = SC_DB_DBFactory_Ex::getInstance($arrRet['db_type']); 771 771 // データベースバージョン情報の取得 … … 786 786 $arrErr = array(); 787 787 788 if (!file_exists($filepath)) {788 if (!file_exists($filepath)) { 789 789 $arrErr['all'] = ">> スクリプトファイルが見つかりません"; 790 790 } else { 791 if ($fp = fopen($filepath,"r")) {791 if ($fp = fopen($filepath,"r")) { 792 792 $sql = fread($fp, filesize($filepath)); 793 793 fclose($fp); … … 797 797 $objDB = MDB2::connect($dsn, $options); 798 798 // 接続エラー 799 if (!PEAR::isError($objDB)) {799 if (!PEAR::isError($objDB)) { 800 800 $objDB->setCharset("utf8"); 801 801 $sql_split = split(";",$sql); 802 foreach ($sql_split as $key => $val){802 foreach ($sql_split as $key => $val) { 803 803 SC_Utils::sfFlush(true); 804 804 if (trim($val) != "") { 805 805 $ret = $objDB->query($val); 806 if (PEAR::isError($ret) && $disp_err) {806 if (PEAR::isError($ret) && $disp_err) { 807 807 $arrErr['all'] = ">> " . $ret->message . "<br />"; 808 808 // エラー文を取得する … … 930 930 931 931 //管理機能SSL制限 932 if ($objWebParam->getValue('admin_force_ssl') == 1 and strpos($secure_url,"https://") !== FALSE){932 if ($objWebParam->getValue('admin_force_ssl') == 1 and strpos($secure_url,"https://") !== FALSE) { 933 933 $force_ssl = "TRUE"; 934 } else{934 } else { 935 935 $force_ssl = "FALSE"; 936 936 } … … 938 938 $allow_hosts = array(); 939 939 $hosts = $objWebParam->getValue('admin_allow_hosts'); 940 if (!empty($hosts)){940 if (!empty($hosts)) { 941 941 $hosts = str_replace("\r","",$hosts); 942 if (strpos($hosts,"\n") === false){942 if (strpos($hosts,"\n") === false) { 943 943 $hosts .= "\n"; 944 944 } 945 945 $hosts = explode("\n",$hosts); 946 foreach ($hosts as $key=>$host){946 foreach ($hosts as $key=>$host) { 947 947 $host = trim($host); 948 if (strlen($host) >= 8) {948 if (strlen($host) >= 8) { 949 949 $allow_hosts[] = $host; 950 950 } … … 953 953 //パスワード暗号化方式決定 954 954 $arrAlgos = hash_algos(); 955 if (array_search('sha256', $arrAlgos) !== FALSE) {955 if (array_search('sha256', $arrAlgos) !== FALSE) { 956 956 $algos = 'sha256'; 957 957 }elseif(array_search('sha1', $arrAlgos) !== FALSE) { … … 959 959 }elseif(array_search('md5', $arrAlgos) !== FALSE) { 960 960 $algos = 'md5'; 961 } else{961 } else { 962 962 $algos = ''; 963 963 } -
branches/version-2_12-dev/html/test/upgrade/index.php
r21420 r21441 57 57 ); 58 58 59 switch (getMode()) {59 switch (getMode()) { 60 60 61 61 case 'products_list': -
branches/version-2_12-dev/html/user_data/packages/admin/js/ownersstore.js.php
r20970 r21441 67 67 //all others 68 68 } else { 69 if (document.getElementById("TB_overlay") === null){69 if (document.getElementById("TB_overlay") === null) { 70 70 $("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>"); 71 71 $("#TB_overlay").click(this.remove); … … 73 73 } 74 74 75 if (this.detectMacFF()){75 if (this.detectMacFF()) { 76 76 //use png overlay so hide flash 77 77 $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); … … 101 101 var ajaxContentH = TB_HEIGHT - 45; 102 102 103 if ($("#TB_window").css("display") != "block") {103 if ($("#TB_window").css("display") != "block") { 104 104 $("#TB_window").append( 105 105 "<div id='TB_title'>"
Note: See TracChangeset
for help on using the changeset viewer.