/
footer.php
executable file
·89 lines (68 loc) · 2.95 KB
/
footer.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
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
<?php
/* $Id: footer.php 59 2009-02-13 03:25:54Z nico-izo $ */
// ENSURE THIS IS BEING INCLUDED IN AN SE SCRIPT
defined('SE_PAGE') or exit();
SE_DEBUG ? $_benchmark->end('page') : NULL;
SE_DEBUG ? $_benchmark->start('shutdown') : NULL;
// GET LANGUAGES AVAILABLE IF NECESSARY
if($setting['setting_lang_anonymous'] == 1 || ($setting['setting_lang_allow'] == 1 && $user->user_exists != 0))
{
$lang_packlist_raw = SECore::getLanguages();
//$lang_packlist = SELanguage::list_packs();
ksort($lang_packlist_raw);
$lang_packlist = array_values($lang_packlist_raw);
}
// ASSIGN LOGGED-IN USER VARS
if( $user->user_exists )
{
$smarty->assign('user_unread_pms', $user->user_message_total(0, 1));
}
// CALL SPECIFIC PAGE HOOK
($hook = SE_Hook::exists('se_'.$page)) ? SE_Hook::call($hook, array()) : NULL;
// CALL FOOTER HOOK
($hook = SE_Hook::exists('se_footer')) ? SE_Hook::call($hook, array()) : NULL;
// CHECK IF IN SMOOTHBOX
$global_smoothbox = false;
if(isset($_GET['in_smoothbox'])) { if($_GET['in_smoothbox'] == true) { $global_smoothbox = true; }}
// ASSIGN GLOBAL SMARTY OBJECTS/VARIABLES
$smarty->assign_by_ref('url', $url);
$smarty->assign_by_ref('misc', $misc);
$smarty->assign_by_ref('datetime', $datetime);
$smarty->assign_by_ref('database', $database);
$smarty->assign_by_ref('admin', $admin);
$smarty->assign_by_ref('user', $user);
$smarty->assign_by_ref('owner', $owner);
$smarty->assign_by_ref('ads', $ads);
$smarty->assign_by_ref('setting', $setting);
$smarty->assign_by_ref('se_javascript', $se_javascript);
$smarty->assign('lang_packlist', $lang_packlist);
$smarty->assign('notifys', $notify->notify_summary());
$smarty->assign('global_plugins', $global_plugins);
$smarty->assign('global_smoothbox', $global_smoothbox);
$smarty->assign('global_page', $page);
$smarty->assign('global_page_title', ( !empty($global_page_title) ? $global_page_title : NULL ));
$smarty->assign('global_page_description', ( !empty($global_page_description) ? str_replace("\"", "'", $global_page_description) : NULL ));
$smarty->assign('global_css', $global_css);
$smarty->assign('global_timezone', $global_timezone);
$smarty->assign('global_language', SELanguage::info('language_id'));
if( SE_DEBUG )
{
$_benchmark->end('shutdown');
$smarty->assign('debug_uid', $_benchmark->getUid());
$smarty->assign_by_ref('debug_benchmark_object', $_benchmark);
$_benchmark->start('output');
}
// DISPLAY PAGE
$smarty->display("$page.tpl");
if( SE_DEBUG )
{
$_benchmark->end('output');
$_benchmark->end('total');
$smarty->assign('debug_benchmark', $_benchmark->getLog());
$smarty->assign('debug_benchmark_total', $_benchmark->getTotalTime());
// Save logging info
file_put_contents('./log/'.$_benchmark->getUid().'.html', $smarty->fetch('debug.tpl'));
//file_put_contents(SE_ROOT.DIRECTORY_SEPARATOR.'log'.DIRECTORY_SEPARATOR.$_benchmark->getUid(), $smarty->fetch('debug.tpl'));
}
exit();
?>