-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
47 lines (38 loc) · 803 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<pre><?php
error_reporting(E_ALL & ~E_WARNING);
function getListFiles($dir="dbc/",$type='dbc') {
$list = array();
if(!$temp = @scandir($dir))
return;
foreach($temp as $f){
if(strlen($f)>2){
if(is_file($dir.$f)){
$filename = explode('.',$f);
if($filename[1]==$type){
$list[] = $filename[0];
}
}
}
}
return $list;
}
$_dir = 'wdb/';
$names = getListFiles('wdb/','wdb');
include_once("config.php"); // including conecting info
include_once("wdb.class.php");
include_once(FILE_FMT);
$wdb = new WDBparser();
foreach($names as $name){
$fmt = $WDBfmt[$name];
$wdb->_set($name);
if(strlen($fmt) == 0)
continue;
$_r = array();
$_r['name'] = $name;
$_r = array_merge($_r,$wdb->getHeader());
$i = 0;
$out = array();
$out = $wdb->getData();
print_r($_r);
}
?>