]> 4ch.mooo.com Git - test.git/blob - x.php
ff67f9354bedd3c7ae55d1e37a4d91fc5cbabc3e
[test.git] / x.php
1 <?php
2 /*yotsubanome multiBBS reader
3 from 2ch PHP script 18c
4 X v0.0.0.0
5 */
6
7 error_reporting(E_ALL); // show all errors for debugging
8
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
17
18 //include_once(PHP_DIRECTORY.'config.php'); // 引入設定檔
19
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
24
25 $board = array();
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);
30         }
31 }
32 closedir($handle);
33
34 // display the list
35 $bbsi = 0;
36 $bbsdat = '';
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>
43                 $bbsi++;
44         }
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>
51                 $bbsi++;
52         }
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>
60                 $bbsi++;
61 //              define("$config['TITLE']", '');
62         }
63 }
64 // print
65 print_r($bbsdat);
66 if(LISTBBS) print_r($board);
67 ?>