From: sparky4 Date: Fri, 4 Mar 2011 08:25:14 +0000 (-0600) Subject: modified: config.php X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=0ec43f423b936b7ec170d71e4d32682778d1a3c0;p=test.git modified: config.php modified: yotsubanome.php --- diff --git a/config.php b/config.php index 9067868..b9cf11e 100755 --- a/config.php +++ b/config.php @@ -41,14 +41,18 @@ TODO: 4. core board execution option. 5. Warning: touch(): Unable to create file ../img.csv_loog0 because Permission denied /var/www/+4/test/lib/pio/pio.logflockp.php #554 6. Orginize the system files better + 7. a flexible HTML output (TXT BBS) ChangeLog: ---------------------- -2011/22/20 +2011/3/4 +-[config.php] multiBBS conversion has started with $config['KB'] + +2011/2/24 -[lib_css.php] created () -[lib_env.php] created -2011/22/20 +2011/2/20 -[yotsubanome.php] error system and found bugs rewt5 -[lib_common.php] error system and found bugs rewt5 @@ -112,7 +116,7 @@ define("CONNECTION_STRING", 'log://img.csv_loog:tree.csv_loog/'); // PIO 連線 // loog = yotsubanome log file define("LUT_CACHE", 'lutcache.daty'); define("SIZE_CACHE", 'sizecache.daty'); -//define("CSVSS", '_css.csv_daty'); +//----define("CSVSS", '_css.csv_daty'); define("CSV_SS", 'stylesheets.daty'); /*---- Part 2:板面各項細部功能設定 ----*/ @@ -164,7 +168,8 @@ define("DISP_ID", 2); // IDを表示する 強制:2 する:1 しない:0 // 顯 define("CLEAR_SAGE", 0); // 使用不推文模式時清除E-mail中的「sage」關鍵字 (是:1 否:0) define("USE_QUOTESYSTEM", 1); // 是否打開引用瀏覽系統 [自動轉換>>No.xxxx文字成連結並導引] (是:1 否:0) //++++---- -define("KB", 1); // Kilobytes or Bytes on the image file size display (Kilobytes:1 Bytes:0) +//define("KB", 1); // Kilobytes or Bytes on the image file size display (Kilobytes:1 Bytes:0) +$config['KB'] = 1; // Kilobytes or Bytes on the image file size display (Kilobytes:1 Bytes:0) //++++---- define("SHOW_IMGWH", 1); // 是否顯示附加圖檔之原檔長寬尺寸 (是:1 否:0) define("SHOW_FILENAME", 1); // 是否顯示附加圖檔之原檔文件名 (是:1 否:0) diff --git a/yotsubanome.php b/yotsubanome.php index b73a161..635d38e 100755 --- a/yotsubanome.php +++ b/yotsubanome.php @@ -570,7 +570,7 @@ function regist(){ $size = @getimagesize($dest); if(!is_array($size)) error(_T('regist_upload_notimage'), $dest); // $size不為陣列就不是圖檔 $imgsize = @filesize($dest); // 檔案大小 - if(!KB) $imgsize .= ' B'; // Bytes only + if(!$config['KB']) $imgsize .= ' B'; // Bytes only else $imgsize = ($imgsize>=1024) ? (int)($imgsize/1024).' KB' : $imgsize.' B'; // KB和B的判別 switch($size[2]){ // 判斷上傳附加圖檔之格式 case 1 : $ext = ".gif"; break; @@ -1305,7 +1305,9 @@ function total_size($isupdate=false){ $all = $sp[0]; unset($sp); } - return (int)($all / 1024); + //---- return (int)($all / 1024); + if(!$config['KB']) return (int)($all); + else return (int)($all / 1024); } /* 搜尋(全文檢索)功能 */ @@ -1459,6 +1461,8 @@ function showstatus(){ $counttree = $PIO->threadCount(); // 計算樹狀結構記錄檔目前資料筆數 $tmp_total_size = total_size(); // 附加圖檔使用量總大小 $tmp_ts_ratio = STORAGE_MAX > 0 ? $tmp_total_size / STORAGE_MAX : 0; // 附加圖檔使用量 + if(!$config['KB']) $kbb = ' B'; + else $kbb = ' KB'; // 決定「附加圖檔使用量」提示文字顏色 if($tmp_ts_ratio < 0.3 ) $clrflag_sl = '235CFF'; @@ -1520,11 +1524,11 @@ function showstatus(){ if(STORAGE_LIMIT){ $dat .= ' -'._T('info_fileusage_limit').''.STORAGE_MAX.' KB'._T('info_dsusage_usage').'
'.substr(($tmp_ts_ratio * 100), 0, 6).' % -'._T('info_fileusage_count').''.$tmp_total_size.' KB'; +'._T('info_fileusage_limit').''.STORAGE_MAX.$kbb.''._T('info_dsusage_usage').'
'.substr(($tmp_ts_ratio * 100), 0, 6).' % +'._T('info_fileusage_count').''.$tmp_total_size.$kbb.''; }else{ $dat .= ' -'._T('info_fileusage_count').''.$tmp_total_size.' KB'._T('info_dsusage_usage').'
'._T('info_fileusage_unlimited').''; +'._T('info_fileusage_count').''.$tmp_total_size.$kbb.''._T('info_dsusage_usage').'
'._T('info_fileusage_unlimited').''; } $dat .= '