]> 4ch.mooo.com Git - test.git/blobdiff - yotsubanome.php
modified: yotsubanome.php
[test.git] / yotsubanome.php
index fd7c3fb8f838b7e6fb01d48ee69094b8f0bb59be..aa434944f59554f48698a18c0b658305e6e19e1f 100755 (executable)
@@ -197,7 +197,7 @@ function updatelog($resno=0,$page_num=-1,$single_page=false){
        for($page = $page_start; $page <= $page_end; $page++){
                $dat = ''; $pte_vals['{$THREADS}'] = '';
                head($dat, $resno);
-               //form($dat, $resno);
+               form($dat, $resno);
                // 輸出討論串內容
                for($i = 0; $i < $inner_for_count; $i++){
                        // 取出討論串編號
@@ -342,7 +342,11 @@ function arrangeThread($PTE, $tree, $tree_cut, $posts, $hiddenReply, $resno=0, $
                // 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($config['ALLOW_NONAME']==3){
+                       if($name) $name = '';
+                       if($tripkeycount) $name = '';
+                       if($email) $now = "<a href=\"mailto:$email\" class=\"linkmail\">$now</a>";
+               }elseif($config['ALLOW_NONAME']==2){ // 強制砍名
                        if($tripkeycount==1) $name = preg_match('/(\\'.TRIP_KEY.'.{10})/', $name, $matches) ? '<span class="postertrip">'.$matches[1].'</span>' : '';
                        if($tripkeycount==2) $name = preg_match('/(\\'.TRIP_KEY.TRIP_KEY.'.{16})/', $name, $matches) ? '<span class="postertrip">'.$matches[1].'</span>' : '';
                        if($tripkeycount==3) $name = preg_match('/(\\'.TRIP_KEY.'.{32})/', $name, $matches) ? '<span class="postertrip">'.$matches[1].'</span>' : '';
@@ -697,15 +701,15 @@ function regist(){
        $com = str_replace("\n", '', $com); // 若還有\n換行字元則取消換行
        // 預設的內容
        if(!$name || ereg("^[ | |]*$", $name)){
-               if(ALLOW_NONAME) $name = DEFAULT_NONAME;
+               if($config['ALLOW_NONAME']) $name = $config['DEFAULT_NONAME'];
                else error(_T('regist_withoutname'), $dest);
        }
        if(!$sub || ereg("^[ | |]*$", $sub)){
-               if(ALLOW_NOSUB) $sub = DEFAULT_NOTITLE;
+               if($config['ALLOW_NOSUB']) $sub = $config['DEFAULT_NOTITLE'];
                else error(_T('regist_withoutsubject'), $dest);
        }
        if(!$com || ereg("^[ | |\t]*$", $com)){
-               if(ALLOW_NOSUB) $com = DEFAULT_NOCOMMENT;
+               if($config['ALLOW_NOCOM']) $com = $config['DEFAULT_NOCOMMENT'];
                else error(_T('regist_withoutcomment'), $dest);
        }
        // 修整標籤樣式
@@ -716,15 +720,13 @@ function regist(){
        if($up_incomplete) $com .= '<br /><br /><span class="warn_txt">'._T('notice_incompletefile').'</span>'; // 上傳附加圖檔不完全的提示
 
        // 密碼和時間的樣式 
-       if($pwd=='') if(ALLOW_NOPASS) error(_T('regist_withoutpassword'), $dest); else $pwd = ($pwdc=='') ? substr(rand(),0,8) : $pwdc;
+       if($pwd=='') if($config['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'));
 //---- $yd = $youbi[gmdate('w', $time+TIME_ZONE*60*60)];
        $yd = $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 +734,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);
        }
 
        // 連續投稿 / 相同附加圖檔檢查
@@ -1397,7 +1399,7 @@ function searchCategory(){
        $dat .= "<div>$links</div>\n";
        for($i = 0; $i < $loglist_cut_count; $i++){
                $posts = $PIO->fetchPosts($loglist_cut[$i]); // 取得文章內容
-               $dat .= arrangeThread($PTE, ($posts[0]['resto'] ? $posts[0]['resto'] : $posts[0]['no']), null, $posts, 0, $loglist_cut[$i], array(), array(), false, false, false); // 逐個輸出 (引用連結不顯示)
+               $dat .= arrangeThread($PTE, ($posts[0]['resto'] ? $posts[0]['resto'] : $posts[0]['no']), null, $posts, 0, $loglist_cut[$i], array(), array(), false, false, false, 0, 0, 0, 0, 0); // 逐個輸出 (引用連結不顯示)
        }
 
        $dat .= '<table border="1"><tr>';
@@ -1508,7 +1510,7 @@ function showstatus(){
 <tr><td>'._T('info_basic_bumphours').'</td><td colspan="3"> '.MAX_AGE_TIME.' '._T('info_basic_hours').' '._T('info_basic_0disable').'</td></tr>
 <tr><td>'._T('info_basic_urllinking').'</td><td colspan="3"> '.AUTO_LINK.' '._T('info_0no1yes').'</td></tr>
 <tr><td>'._T('info_basic_com_limit').'</td><td colspan="3"> '.COMM_MAX._T('info_basic_com_after').'</td></tr>
-<tr><td>'._T('info_basic_anonpost').'</td><td colspan="3"> '.ALLOW_NONAME.' '._T('info_basic_anonpost_opt').'</td></tr>
+<tr><td>'._T('info_basic_anonpost').'</td><td colspan="3"> '.$config['ALLOW_NONAME'].' '._T('info_basic_anonpost_opt').'</td></tr>
 <tr><td>'._T('info_basic_del_incomplete').'</td><td colspan="3"> '.KILL_INCOMPLETE_UPLOAD.' '._T('info_0no1yes').'</td></tr>
 <tr><td>'._T('info_basic_use_sample',THUMB_Q).'</td><td colspan="3"> '.USE_THUMB.' '._T('info_0notuse1use').'</td></tr>
 <tr><td>'._T('info_basic_useblock').'</td><td colspan="3"> '.BAN_CHECK.' '._T('info_0disable1enable').'</td></tr>