示例#1
0
 public static function getConfig()
 {
     global $LANG, $TEMPLATE, $SITEURL;
     require_once GSPLUGINPATH . 'custom_settings/filehandler.class.php';
     require_once GSPLUGINPATH . 'custom_settings/gs.utils.php';
     $conf = array('lang' => (string) $LANG, 'langFile' => GSPLUGINPATH . 'custom_settings/lang/' . $LANG . '.json', 'i18nLangs' => function_exists('return_i18n_available_languages') ? return_i18n_available_languages() : false, 'handler' => $SITEURL . 'plugins/custom_settings/customsettings.handler.php', 'dataFile' => $SITEURL . 'custom_settings/data.json', 'pluginVer' => self::$version, 'editPerm' => GSutils::pluginIsActive('user-managment') ? self::mu_getUserPermission() : self::getUserPermission(), 'siteTmpl' => strtolower($TEMPLATE), 'requestToken' => fileUtils::requestToken('kosstt'), 'adminDir' => GSADMINPATH, 'baseUrl' => strtolower((string) $SITEURL), 'id' => 'custom_settings', 'template' => strtolower((string) $TEMPLATE));
     $output = htmlspecialchars(json_encode($conf), ENT_COMPAT, 'UTF-8');
     return $output;
 }