forked from StartupAPI/users
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplan_switch.php
More file actions
23 lines (19 loc) · 828 Bytes
/
plan_switch.php
File metadata and controls
23 lines (19 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
require_once(dirname(__FILE__).'/config.php');
require_once(dirname(__FILE__).'/User.php');
include(dirname(__FILE__).'/view/account/plan_switch.php');
# this yields Smarty object as $smarty
if (preg_match("/^Smarty-3/",$smarty->_version)) {
$smarty->setTemplateDir(UserConfig::$smarty_templates.'/account');
$smarty->setCompileDir(UserConfig::$smarty_compile);
$smarty->setCacheDir(UserConfig::$smarty_cache);
} elseif (preg_match("/^2\./",$smarty->_version)) {
$smarty->template_dir = UserConfig::$smarty_templates.'/account';
$smarty->compile_dir = UserConfig::$smarty_compile;
$smarty->cache_dir = UserConfig::$smarty_cache;
} else {
die("Cannot handle smarty version ".$smarty->_version);
}
require_once(UserConfig::$header);
$smarty->display('plan_switch.tpl');
require_once(UserConfig::$footer);