/* Enviorment Settings */
// Do not change unless you renamed the directories
define("PHP_DIRECTORY", '../test/'); // yotsubanome "C:\windows\system\"
-define("DATA_DIR", PHP_DIRECTORY.'data/'); // data directory
-define("CSS_DIR", DATA_DIR.'css/'); // CSS directory
-define("ICON_DIR", DATA_DIR.'icon/'); // icon directory [Graphics of the software go here]
-define("TEMP_DIR", PHP_DIRECTORY.'temp/'); // upload content temperary directory
-define("TPLT_DIR", DATA_DIR.'tplt/'); // template directory
-define("JS_DIR", DATA_DIR.'js/'); // javascript directory
-define("SALTFILE", DATA_DIR.'salt.php'); // saltfile for secure t. codes
+/* Include */
+include_once(PHP_DIRECTORY.'env.php'); // Enviorment Settings
include_once(PHP_DIRECTORY.'config.php'); // 引入設定檔
include_once(PHP_DIRECTORY.'lib/lib_language.php'); // 引入語系
include_once(PHP_DIRECTORY.'lib/lib_common.php'); // 引入共通函式檔案
if(gettype($tree_cut) == 'array') $tree_cut = array_flip($tree_cut); // array_flip + isset 搜尋法
if(gettype($tree) == 'array') $tree_clone = array_flip($tree);
if($hiddenReply){ // o++
- // $o = 0 (首篇), $o = 1~n (回應) //++++----\r for($o = 0; $o < $posts_img_count; $o++){ // o++
+ // $o = 0 (首篇), $o = 1~n (回應) //++++----
+ for($o = 0; $o < $posts_img_count; $o++){ // o++
extract($posts_img[$o]); // o++
if($ext && $FileIO->imageExists($tim.$ext)) $hiddenImage++; // o++ all images in thread
}
// 設定欄位值
$name = str_replace('&'.TRIP_KEY, '&'.TRIP_KEY, $name); // 避免 &#xxxx; 後面被視為 Trip 留下 & 造成解析錯誤
if(CLEAR_SAGE) $email = preg_replace('/^sage( *)/i', '', trim($email)); // 清除E-mail中的「sage」關鍵字
- //Tripcode indicator // t++ //++++----
+ // Tripcode indicator // t++ //++++----
+ // This may be a blob of code but it apparently works >< please help me here
$tripkeycount = substr_count($name, TRIP_KEY);
if(ALLOW_NONAME==2){ // 強制砍名
if($tripkeycount==1) $name = preg_match('/(\\'.TRIP_KEY.'.{10})/', $name, $matches) ? '<span class="postertrip">'.$matches[1].'</span>' : '';
if($flgh->exists('TS')) $WARN_ENDREPLY = '<span class="warn_txt">'._T('warn_locked').'</span><br />'."\n"; // 被標記為禁止回應
if($hiddenReply) $WARN_HIDEPOST = '<span class="omittedposts">'._res($hiddenReply, $hiddenImgs)._T('notice_omitted_reply').'</span><br />'."\n"; // 有隱藏的回應
}
+
// 對類別標籤作自動連結
if(USE_CATEGORY){
$ary_category = explode(',', str_replace(',', ',', $category)); $ary_category = array_map('trim', $ary_category);
$size = @getimagesize($dest);
if(!is_array($size)) error(_T('regist_upload_notimage'), $dest); // $size不為陣列就不是圖檔
$imgsize = @filesize($dest); // 檔案大小
- if(!KB) $imgsize .= ' B'; // B only
+ if(!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;
case 13 : $ext = ".swf"; break;
case 14 : $ext = ".aiff"; break;
case 15 : $ext = ".wbmp"; break;
- case 16 : $ext = ".xbm"; break;
+ case 16 : $ext = ".xbm"; break; // I add more media support (^^,)
default : $ext = ".xxxx"; error(_T('regist_upload_notsupport'), $dest);
}
$allow_exts = explode('|', strtolower(ALLOW_UPLOAD_EXT)); // 接受之附加圖檔副檔名
$md5chksum = md5_file($dest); // 檔案MD5
if(array_search($md5chksum, $BAD_FILEMD5)!==FALSE) error(_T('regist_upload_blocked'), $dest); // 在封鎖設定內則阻擋
- // 四‧計算附加圖檔圖檔縮圖顯示尺寸
+ // 四‧計算附加圖檔圖檔縮圖顯示尺寸 //++++---- <- the comment from pixmicat team is broken here
$W = $imgW = $size[0];
$H = $imgH = $size[1];
$MAXW = $resto ? MAX_RW : MAX_W;
// E-mail / 標題修整
$email = str_replace("\r\n", '', $email); $sub = str_replace("\r\n", '', $sub);
+
// Tripcode area--------------------------------------------------------------------------------
if($name){
// 名稱修整