2 /*yotsubanome multiBBS reader
3 from 2ch PHP script 18c
7 error_reporting(E_ALL); // show all errors for debugging
9 /* Enviorment Settings */
10 // Do not change unless you renamed the directories
11 define("PHP_DIRECTORY", '../core/'); // yotsubanome "C:\windows\system\"
12 define("DATA_DIR", PHP_DIRECTORY.'data/'); // data directory
13 define("CSS_DIR", DATA_DIR.'css/'); // CSS directory
14 define("ICON_DIR", DATA_DIR.'icon/'); // icon directory [Graphics of the software go here]
15 define("TEMP_DIR", PHP_DIRECTORY.'temp/'); // upload content temperary directory
16 define("TPLT_DIR", DATA_DIR.'tplt/'); // template directory
18 //include_once(PHP_DIRECTORY.'config.php'); // 引入設定檔
20 if(!defined("PHP_SELF"))define("PHP_SELF", 'yotsubanome.php'); // このスクリプト名 // 主程式名 (若是修改了主程式名,請配合修改)
21 if(!defined("BBSMENU")) define("BBSMENU", 0); // BBSmenu for the frame at BBS home page
22 if(!defined("INDEXBBS")) define("INDEXBBS", 0); // home page BBS list
23 if(!defined("BBSMENU") and !defined("INDEXBBS")) define("LISTBBS", 1); // misc. BBS list
26 $handle = opendir('../');
27 while(false !== ($file = readdir($handle))){
28 if($file != 'core' and $file != 'script' and $file != '.' and $file != '..'){ // do not include system core directory or distribution directory
29 if(is_dir('../'.$file) and is_file('../'.$file.'/config.php') || is_file('../'.$file.'/'.PHP_SELF)) array_push($board, $file);
37 if(BBSMENU && !INDEXBBS && !LISTBBS){
38 foreach($board as $dir){
39 include('../'.$dir.'/config.php');
40 $bbsdat .= '<a href="../'.$dir.'/" target="cont">'.$config['TITLE'].'</a><br>';
41 //++++ <font color="#ff0099">new</font>
42 //++++ <font color="#6f0069">old</font>
45 }else if(!BBSMENU && INDEXBBS && !LISTBBS){
46 foreach($board as $dir){
47 include('../'.$dir.'/config.php');
48 $bbsdat .= '<a href="../'.$dir.'/">'.$config['TITLE'].'</a><br>';
49 //++++ <font color="#ff0099">new</font>
50 //++++ <font color="#6f0069">old</font>
53 }else if(!BBSMENU && !INDEXBBS && LISTBBS){
54 foreach($board as $dir){
55 include('../'.$dir.'/config.php');
56 echo $config['TITLE'].'<br>';
57 $bbsdat .= '<a href="../'.$dir.'/">'.$config['TITLE'].'</a><br>';
58 //++++ <font color="#ff0099">new</font>
59 //++++ <font color="#6f0069">old</font>
61 // define("$config['TITLE']", '');
66 if(LISTBBS) print_r($board);