-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPortalMain.php
More file actions
70 lines (52 loc) · 1.58 KB
/
Copy pathPortalMain.php
File metadata and controls
70 lines (52 loc) · 1.58 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
<?php
/**
* @package SimplePortal
*
* @author SimplePortal Team
* @copyright 2014 SimplePortal Team
* @license BSD 3-clause
*
* @version 2.3.7
*/
if (!defined('SMF'))
die('Hacking attempt...');
/*
void sportal_main()
// !!!
void sportal_credits()
// !!!
*/
function sportal_main()
{
global $smcFunc, $context, $sourcedir;
if (WIRELESS)
redirectexit('action=forum');
$context['page_title'] = $context['forum_name'];
if (isset($context['page_title_html_safe']))
$context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title']));
if (!empty($context['standalone']))
setupMenuContext();
$actions = array(
'addarticle' => array('PortalArticles.php', 'sportal_add_article'),
'articles' => array('PortalArticles.php', 'sportal_articles'),
'credits' => array('', 'sportal_credits'),
'pages' => array('PortalPages.php', 'sportal_pages'),
'removearticle' => array('PortalArticles.php', 'sportal_remove_article'),
'shoutbox' => array('PortalShoutbox.php', 'sportal_shoutbox'),
);
if (!isset($_REQUEST['sa']) || !isset($actions[$_REQUEST['sa']]))
$_REQUEST['sa'] = 'articles';
if (!empty($actions[$_REQUEST['sa']][0]))
require_once($sourcedir . '/' . $actions[$_REQUEST['sa']][0]);
$actions[$_REQUEST['sa']][1]();
}
function sportal_credits()
{
global $sourcedir, $context, $txt;
require_once($sourcedir . '/PortalAdminMain.php');
loadLanguage('SPortalAdmin', sp_languageSelect('SPortalAdmin'));
sportal_information(false);
$context['page_title'] = $txt['sp-info_title'];
$context['sub_template'] = 'information';
}
?>