]> 4ch.mooo.com Git - test.git/blob - x.php
modified: config.php
[test.git] / x.php
1 <?php
2 /*yotsubanome multiBBS reader
3 from 2ch PHP script 18c
4 X v0.0.0.4
5 */
6
7 //error_reporting(E_ALL); // show all errors for debugging
8
9 /* DIR config */
10 if(!defined("BBSMENU")) define("BBSMENU", 0); // BBSmenu for the frame at BBS home page
11 if(!defined("INDEXBBS")) define("INDEXBBS", 0); // home page BBS list
12 if(!BBSMENU && !INDEXBBS){
13         define("LISTBBS", 1); // misc. BBS list
14         $qazw = '../';
15         }else{
16         $qazw = './';
17         define("LISTBBS", 0); // misc. BBS list
18 }
19
20 /* Config */
21 if(!defined("PHP_SELF"))define("PHP_SELF", 'yotsubanome.php'); // このスクリプト名 // 主程式名 (若是修改了主程式名,請配合修改)
22 $config['TITLE'] = '画像掲示板';
23
24 /* BBS SEARCH */
25 $board = array();
26 $handle = opendir($qazw);
27 while(false !== ($file = readdir($handle))){
28 if($file != 'test')
29         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
30                 if(is_dir($qazw.$file) and is_file($qazw.$file.'/config.php') || is_file($qazw.$file.'/'.PHP_SELF)) array_push($board, $file);
31         }
32 }
33 closedir($handle);
34
35 /* BBS list display */
36 $bbsi = 0;
37 $bbsdat = '';
38 if(BBSMENU && !INDEXBBS){
39         foreach($board as $dir){
40                 if($dir != 'test') include($qazw.$dir.'/config.php');
41                 $config['TITLE'] = preg_replace('/@四葉の芽(.*?)/', '', $config['TITLE']);
42                 $bbsdat .= '<a href="'.$qazw.$dir.'/" target="cont">'.$config['TITLE'].'</a><br>';
43 //++++  <font color="#ff0099">new</font>
44 //++++  <font color="#6f0069">old</font>
45                 $bbsi++;
46         }
47 }
48 /*if(!BBSMENU && INDEXBBS){
49         foreach($board as $dir){
50                 include('../'.$dir.'/config.php');
51                 $config['TITLE'] = preg_replace('/@四葉の芽(.*?)/', '', $config['TITLE']);
52                 $bbsdat .= '<a href="'.$qazw.$dir.'/">'.$config['TITLE'].'</a><br>';
53 //++++  <font color="#ff0099">new</font>
54 //++++  <font color="#6f0069">old</font>
55                 $bbsi++;
56         }
57 }*/
58 if(!BBSMENU/* && !INDEXBBS && LISTBBS*/){
59         foreach($board as $dir){
60                 if($dir != 'test') include($qazw.$dir.'/config.php');
61                 $config['TITLE'] = preg_replace('/@四葉の芽(.*?)/', '', $config['TITLE']);
62                 $bbsdat .= '<a href="'.$qazw.$dir.'/">'.$config['TITLE'].'</a><br>';
63 //++++  <font color="#ff0099">new</font>
64 //++++  <font color="#6f0069">old</font>
65                 $bbsi++;
66         }
67 }
68
69 /* Print BBS list */
70 print_r($bbsdat);
71 //echo $bbsdat;
72 //if(LISTBBS) print_r($board);
73 //echo LISTBBS,'<br>';
74 //echo BBSMENU.'<br>';
75 //echo INDEXBBS.'<br>';
76 ?>