-
Notifications
You must be signed in to change notification settings - Fork 0
/
loadSMFSSI.php
37 lines (26 loc) · 1.09 KB
/
loadSMFSSI.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
<?php
require_once(SMF_FOLDER . 'Settings.php');
//TODO: include lightbox js and css dependencies
$headers = '<script type="text/javascript" src="https://www.google.com/jsapi?key=ABQIAAAA4N1cVP8wk_WE1At_kNm57RTJ4bHgoDQQq-6NpuDOPLgwe1GIThRH_hiPQW5HYToH4hz2JfNj41fQAA"></script>';
$headers .= '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>';
$context['html_headers'] = $headers;
//Load SMF's SSI
$ssi_layers = array('html', 'body'); //Shows header & menu
require_once(SMF_FOLDER . 'SSI.php');
if (!empty($db_options['persist']))
$connection = @mysql_pconnect($db_server, $db_user, $db_passwd);
else
$connection = @mysql_connect($db_server, $db_user, $db_passwd);
// Something's wrong, show an error if its fatal (which we assume it is)
if (!$connection) {
if (!empty($db_options['non_fatal'])) {
return null;
} else {
db_fatal_error();
}
}
// Select the database, unless told not to
mysql_select_db($db_name, $connection);
global $smcFunc, $context, $user_info;
$context['smcFunc'] = $smcFunc;
$context['user_info'] = $user_info;