]> 4ch.mooo.com Git - test.git/blobdiff - x.php
modified: data/js/script.js
[test.git] / x.php
diff --git a/x.php b/x.php
old mode 100644 (file)
new mode 100755 (executable)
index ff67f93..a2c4ec4
--- a/x.php
+++ b/x.php
@@ -1,67 +1,76 @@
 <?php
 /*yotsubanome multiBBS reader
 from 2ch PHP script 18c
-X v0.0.0.0
+X v0.0.0.4
 */
 
-error_reporting(E_ALL); // show all errors for debugging
+//error_reporting(E_ALL); // show all errors for debugging
 
-/* Enviorment Settings */
-// Do not change unless you renamed the directories
-define("PHP_DIRECTORY", '../core/'); // 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
-
-//include_once(PHP_DIRECTORY.'config.php'); // 引入設定檔
-
-if(!defined("PHP_SELF"))define("PHP_SELF", 'yotsubanome.php'); // このスクリプト名 // 主程式名 (若是修改了主程式名,請配合修改)
+/* DIR config */
 if(!defined("BBSMENU")) define("BBSMENU", 0); // BBSmenu for the frame at BBS home page
 if(!defined("INDEXBBS")) define("INDEXBBS", 0); // home page BBS list
-if(!defined("BBSMENU") and !defined("INDEXBBS")) define("LISTBBS", 1); // misc. BBS list
+if(!BBSMENU && !INDEXBBS){
+       define("LISTBBS", 1); // misc. BBS list
+       $qazw = '../';
+       }else{
+       $qazw = './';
+       define("LISTBBS", 0); // misc. BBS list
+}
+
+/* Config */
+if(!defined("PHP_SELF"))define("PHP_SELF", 'yotsubanome.php'); // このスクリプト名 // 主程式名 (若是修改了主程式名,請配合修改)
+$config['TITLE'] = '画像掲示板';
 
+/* BBS SEARCH */
 $board = array();
-$handle = opendir('../');
+$handle = opendir($qazw);
 while(false !== ($file = readdir($handle))){
-       if($file != 'core' and $file != 'script' and $file != '.' and $file != '..'){ // do not include system core directory or distribution directory
-               if(is_dir('../'.$file) and is_file('../'.$file.'/config.php') || is_file('../'.$file.'/'.PHP_SELF)) array_push($board, $file);
+if($file != 'test')
+       if($file != 'my' and $file != 'lite' and $file != 'pg' and $file != 'script' and $file != '.' and $file != '..'){ // do not include system core directory or distribution directory
+               if(is_dir($qazw.$file) and is_file($qazw.$file.'/config.php') || is_file($qazw.$file.'/'.PHP_SELF)) array_push($board, $file);
        }
 }
 closedir($handle);
 
-// display the list
+/* BBS list display */
 $bbsi = 0;
 $bbsdat = '';
-if(BBSMENU && !INDEXBBS && !LISTBBS){
+if(BBSMENU && !INDEXBBS){
        foreach($board as $dir){
-               include('../'.$dir.'/config.php');
-               $bbsdat .= '<a href="../'.$dir.'/" target="cont">'.$config['TITLE'].'</a><br>';
+               if($dir != 'test') include($qazw.$dir.'/config.php');
+               $config['TITLE'] = preg_replace('/@四葉の芽(.*?)/', '', $config['TITLE']);
+               $bbsdat .= '<a href="'.$qazw.$dir.'/" target="cont">'.$config['TITLE'].'</a><br>';
 //++++ <font color="#ff0099">new</font>
 //++++ <font color="#6f0069">old</font>
                $bbsi++;
        }
-}else if(!BBSMENU && INDEXBBS && !LISTBBS){
+}
+/*if(!BBSMENU && INDEXBBS){
        foreach($board as $dir){
                include('../'.$dir.'/config.php');
-               $bbsdat .= '<a href="../'.$dir.'/">'.$config['TITLE'].'</a><br>';
+               $config['TITLE'] = preg_replace('/@四葉の芽(.*?)/', '', $config['TITLE']);
+               $bbsdat .= '<a href="'.$qazw.$dir.'/">'.$config['TITLE'].'</a><br>';
 //++++ <font color="#ff0099">new</font>
 //++++ <font color="#6f0069">old</font>
                $bbsi++;
        }
-}else if(!BBSMENU && !INDEXBBS && LISTBBS){
+}*/
+if(!BBSMENU/* && !INDEXBBS && LISTBBS*/){
        foreach($board as $dir){
-               include('../'.$dir.'/config.php');
-               echo $config['TITLE'].'<br>';
-               $bbsdat .= '<a href="../'.$dir.'/">'.$config['TITLE'].'</a><br>';
+               if($dir != 'test') include($qazw.$dir.'/config.php');
+               $config['TITLE'] = preg_replace('/@四葉の芽(.*?)/', '', $config['TITLE']);
+               $bbsdat .= '<a href="'.$qazw.$dir.'/">'.$config['TITLE'].'</a><br>';
 //++++ <font color="#ff0099">new</font>
 //++++ <font color="#6f0069">old</font>
                $bbsi++;
-//             define("$config['TITLE']", '');
        }
 }
-// print
+
+/* Print BBS list */
 print_r($bbsdat);
-if(LISTBBS) print_r($board);
+//echo $bbsdat;
+//if(LISTBBS) print_r($board);
+//echo LISTBBS,'<br>';
+//echo BBSMENU.'<br>';
+//echo INDEXBBS.'<br>';
 ?>