forked from avscms/avscms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatic.php
executable file
·50 lines (47 loc) · 1.5 KB
/
static.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
<?php
define('_VALID', true);
require 'include/config.php';
require 'include/function_global.php';
require 'include/function_smarty.php';
require 'classes/filter.class.php';
$page = NULL;
$pages_allowed = array('terms', 'privacy', 'dmca', '_2257', 'webmasters', 'advertise', 'faq');
$page = get_request_arg('static', 'STRING');
$template = 'static/' .$page;
switch ( $page ) {
case 'faq':
$self_title = 'Freqvently Asked Questions';
$break;
case 'terms':
$self_title = 'Terms & Conditions';
break;
case 'privacy':
$self_title = 'Privacy Policy';
break;
case 'dmca':
$self_title = 'DMCA';
break;
case '_2257':
$self_title = NULL;
$template = 'static/2257';
break;
case 'webmasters':
$self_title = 'Embed Videos';
break;
case 'advertise':
$self_title = 'Advertise';
break;
default:
VRedirect::go($config['BASE_URL']. '/notfound/page_invalid');
}
$self_title = ( isset($self_title) ) ? $self_title. ' - ' .$config['site_name'] : $config['site_name'];
$smarty->assign('errors',$errors);
$smarty->assign('messages',$messages);
$smarty->assign('menu', 'home');
$smarty->assign('self_title', $self_title);
$smarty->assign('template', $template.'.tpl');
$smarty->loadFilter('output', 'trimwhitespace');
$smarty->display('header.tpl');
$smarty->display('static.tpl');
$smarty->display('footer.tpl');
?>