Cheetah
params.inc.php
Go to the documentation of this file.
1 <?php
2 
8 if(isLogged()) {
9  $iLoggedId = (int)getLoggedId();
10  if(file_exists(CH_DIRECTORY_PATH_ROOT . 'user' . $iLoggedId . '.php') && is_file(CH_DIRECTORY_PATH_ROOT . 'user' . $iLoggedId . '.php'))
11  require_once( CH_DIRECTORY_PATH_CACHE . 'user' . $iLoggedId . '.php');
12 }
13 
14 $GLOBALS['ChWsbTemplateJsOptions'] = array();
15 $GLOBALS['ChWsbTemplateJsTranslations'] = array();
16 $GLOBALS['ChWsbTemplateJsImages'] = array();
17 
18 //--- Initialize template's engine ---//
19 require_once(CH_DIRECTORY_PATH_INC . 'languages.inc.php');
20 require_once(CH_DIRECTORY_PATH_CLASSES . "ChWsbTemplate.php");
21 
23 $oSysTemplate->init();
24 
25 //--- Add default CSS ---//
26 $oSysTemplate->addCssSystem(array(
27  'default.css',
28  'common.css',
29  'common_phone.css',
30  'common_tablet.css',
31  'general.css',
32  'general_phone.css',
33  'anchor.css',
34  'forms_adv.css',
35  'join.css',
36  'login_form.css',
37  'top_menu.css',
38  'icons.css',
39  'loading.css',
40 ));
41 
42 //--- Add default JS ---//
43 $oSysTemplate->addJsSystem(array(
44  'jquery.js',
45  'jquery-migrate.min.js',
46  'jquery.jfeed.js',
47  'jquery.embedly.min.js',
48  'jquery.ui.core.min.js',
49  'jquery.ui.widget.min.js',
50  'jquery.ui.position.min.js',
51  'jquery.ui.tabs.min.js',
52  'functions.js',
53  'jquery.dolRSSFeed.js',
54  'jquery.float_info.js',
55  'jquery.webForms.js',
56  'jquery.form.min.js',
57  'jquery.dolEmbedly.js',
58  'jquery.dolPopup.js',
59  'jquery.dolRetina.js',
60  'common_anim.js',
61  'join.js',
62  'login.js',
63  'ChWsbVoting.js',
64  'user_status.js',
65  'jquery.cookie.min.js',
66 ));
67 
68 //--- Add default language keys in JS output ---//
69 $oSysTemplate->addJsTranslation(array(
70  '_Counter',
71  '_PROFILE_ERR',
72  '_sys_txt_btn_loading',
73  '_Errors in join form',
74 ));
75 
76 $oSysTemplate->addJsOption(array(
77  'sys_embedly_key'
78 ));
79 
80 //--- Add default images in JS output ---//
81 //$oSysTemplate->addJsImage(array());
82 
87 $tmpl = $oSysTemplate->getCode();
88 
89 require_once( CH_DIRECTORY_PATH_ROOT . "templates/tmpl_" . $tmpl . "/scripts/ChTemplConfig.php" );
91 //--- Initialize template's engine ---//
92 
93 //--- Add forms' CSS/JS for its correct work in Login/Join popup ---//
94 if(!isLogged()) {
95  ch_import('ChTemplFormView');
96  $oForm = new ChTemplFormView(array());
97  $oForm->addCssJs(true, true);
98 }
99 
100 if (defined('CH_PROFILER') && CH_PROFILER) require_once(CH_DIRECTORY_PATH_MODULES . 'cheetah/profiler/classes/ChProfiler.php');
101 
102 // if IP is banned - total block
103 if ((int)getParam('ipBlacklistMode') == 1 && ch_is_ip_blocked()) {
104  echo _t('_Sorry, your IP been banned');
105  exit;
106 }
ChTemplFormView
Definition: ChTemplFormView.php:11
ChWsbTemplate
Definition: ChWsbTemplate.php:121
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
php
isLogged
isLogged()
Definition: profiles.inc.php:24
$oForm
$oForm
Definition: host_tools.php:42
exit
exit
Definition: cart.php:21
getParam
getParam($sParamName, $bUseCache=true)
Definition: db.inc.php:130
$GLOBALS
if(isLogged()) $GLOBALS['ChWsbTemplateJsOptions']
Definition: params.inc.php:14
getLoggedId
getLoggedId()
Definition: profiles.inc.php:32
$site
$site['ver']
Definition: version.inc.php:8
ChTemplConfig
Definition: ChTemplConfig.php:21
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
$tmpl
$tmpl
Definition: params.inc.php:87
$oSysTemplate
$oSysTemplate
Definition: params.inc.php:22
$oTemplConfig
$oTemplConfig
Definition: params.inc.php:90
ch_is_ip_blocked
ch_is_ip_blocked($sCurIP='')
Definition: utils.inc.php:1042