-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodify.php
More file actions
92 lines (75 loc) · 2.05 KB
/
Copy pathmodify.php
File metadata and controls
92 lines (75 loc) · 2.05 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
*
* @module Forum
* @version 0.5.10
* @authors Julian Schuh, Bernd Michna, "Herr Rilke", Dietrich Roland Pehlke (last)
* @license GNU General Public License
* @platform 2.8.x
* @requirements PHP 5.6.x and higher
*
*/
// prevent this file from being accessed directly
if(!defined('WB_PATH'))
{
header('Location: index.php');
exit;
}
if(!defined('SKIP_CACHE')) define('SKIP_CACHE', 1);
require_once(WB_PATH . '/modules/forum/backend.php');
/**
* Load Language file
*/
$lang = (dirname(__FILE__))."/languages/". LANGUAGE .".php";
require_once ( !file_exists($lang) ? (dirname(__FILE__))."/languages/EN.php" : $lang );
require_once( dirname(__FILE__)."/classes/class.forum_parser.php" );
$parser = new forum_parser();
$forums = $database->query("SELECT * FROM `" . TABLE_PREFIX . "mod_forum_forum` WHERE `section_id` = '".$section_id."' AND `page_id` = '".$page_id."' ORDER BY `displayorder` ASC");
if($database->is_error()) {
/**
* There has been an error during the last query:
*/
$message = $database->get_error();
$forum_list = "";
} elseif (0 == $forums->numRows()) {
/**
* No results found - no forums to list here
*/
$message = $MOD_FORUM['TXT_NO_FORUMS_B'];
$forums_list = "";
} else {
/**
* List the forums
*
*/
$message = "";
ob_start();
$forum_array = array();
while ($forum = $forums->fetchRow( MYSQL_ASSOC ))
{
$forum_array[ $forum['parentid'] ][ $forum['forumid'] ] = $forum;
}
// Zuordnung Foren -> Level:
$arrLevel = getForumLevel();
print_forums(0);
$forums_list = "<ul class='forum_list'>".ob_get_clean()."</ul>";
}
/**
* Collecting the values/datas for the page
*/
$page_data = array(
'WB_PATH' => WB_PATH,
'WB_URL' => WB_URL,
'section_id' => $section_id,
'page_id' => $page_id,
'MOD_FORUM_TXT_CREATE_FORUM_B' => $MOD_FORUM['TXT_CREATE_FORUM_B'],
'MOD_FORUM_TXT_FORUMS_B' => $MOD_FORUM['TXT_FORUMS_B'],
'TEXT_HELP' => $MENU["HELP"],
'TEXT_SETTINGS' => $TEXT['SETTINGS'],
'message' => $message,
'forums_list' => $forums_list
);
echo $parser->render(
"modify.lte",
$page_data
);