From 16b0ae0c610f0f0bd07ec75081476979e099779c Mon Sep 17 00:00:00 2001 From: sparky4 Date: Mon, 21 Mar 2011 19:24:54 -0500 Subject: [PATCH] modified: config.php modified: yotsubanome.php --- config.php | 9 +++++++-- yotsubanome.php | 10 ++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/config.php b/config.php index fdc947c..f789b15 100755 --- a/config.php +++ b/config.php @@ -51,6 +51,9 @@ TODO: ChangeLog: ---------------------- +2011/3/21 +-[config.php & yotsubanome.php] time system is more flexible + 2011/3/6 -[system wide] hide_btn is a bitch (the back ground is variablish now) @@ -97,8 +100,10 @@ if(is_file('../../conk/.pass.php')) include('../../conk/.pass.php'); // The pass // 伺服器常態設定 if(!defined("PHP_SELF")) define("PHP_SELF", 'yotsubanome.php'); // このスクリプト名 // 主程式名 (若是修改了主程式名,請配合修改) //----define("TIME_ZONE", '-6'); // 時區設定 (GMT時區,參照 http://wwp.greenwichmeantime.com/ ) -define("DATE_FORMAT", "Y/m/d"); // date format -define("EN_SEC", 1); // 時間表示に「秒」を含める 含める:1 含めない:0 +$config['DATE_FORMAT'] = "Y/m/d"; // date format +$config['YOUBI'] = array(_T('sun'),_T('mon'),_T('tue'),_T('wed'),_T('thu'),_T('fri'),_T('sat')); // week format +$config['TIME_FORMAT'] = 'H:i:s'; // time format +//----define("EN_SEC", 1); // 時間表示に「秒」を含める 含める:1 含めない:0 if(!defined("PIXMICAT_LANGUAGE")) define("PIXMICAT_LANGUAGE", 'en_US'); // 語系語定 // ja_JP en_US zh_TW define("HTTP_UPLOAD_DIFF", 50); // HTTP上傳所有位元組與實際位元組之允許誤差值 ini_set("memory_limit", '24M'); // PHP運行的最大記憶體使用量 (php內定8M / 建議32M) diff --git a/yotsubanome.php b/yotsubanome.php index 43f8add..bf441ff 100755 --- a/yotsubanome.php +++ b/yotsubanome.php @@ -718,13 +718,11 @@ function regist(){ // 密碼和時間的樣式 if($pwd=='') if(ALLOW_NOPASS) error(_T('regist_withoutpassword'), $dest); else $pwd = ($pwdc=='') ? substr(rand(),0,8) : $pwdc; $pass = $pwd ? substr(md5($pwd), 2, 8) : '*'; // 生成真正儲存判斷用的密碼 - $youbi = array(_T('sun'),_T('mon'),_T('tue'),_T('wed'),_T('thu'),_T('fri'),_T('sat')); +//---- $youbi = array(_T('sun'),_T('mon'),_T('tue'),_T('wed'),_T('thu'),_T('fri'),_T('sat')); //---- $yd = $youbi[gmdate('w', $time+TIME_ZONE*60*60)]; - $yd = $youbi[date('w', $tome)]; + $yd = $config['YOUBI'][date('w', $tome)]; //---- $now = gmdate('y/m/d', $time+TIME_ZONE*60*60).'('.(string)$yd.')'.gmdate('H:i', $time+TIME_ZONE*60*60); - if(!EN_SEC) - $now = date(DATE_FORMAT, $tome).'('.(string)$yd.')'.date('H:i', $tome); - else $now = date(DATE_FORMAT, $tome).'('.(string)$yd.')'.date('H:i:s', $tome); + $now = date($config['DATE_FORMAT'], $tome).'('.(string)$yd.')'.date($config['TIME_FORMAT'], $tome); //---- if(DISP_ID){ // 顯示ID //---- if($email && DISP_ID==1) $now .= ' ID:????'; @@ -732,7 +730,7 @@ function regist(){ //---- } if(DISP_ID){ // 顯示ID if($email&&DISP_ID==1) $now .= " ID:????"; - else $now .= " ID:".substr(crypt(md5(getREMOTE_ADDR().IDSEED.date(DATE_FORMAT, $tome)),'id'), -8); + else $now .= " ID:".substr(crypt(md5(getREMOTE_ADDR().IDSEED.date($config['DATE_FORMAT'], $tome)),'id'), -8); } // 連續投稿 / 相同附加圖檔檢查 -- 2.39.5