本文整理汇总了PHP中Properties::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Properties::get方法的具体用法?PHP Properties::get怎么用?PHP Properties::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Properties
的用法示例。
在下文中一共展示了Properties::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
public function get($secname, $pname, $default = null)
{
if (!isset($this->_props)) {
$this->load();
}
return parent::get($secname, $pname, $default);
}
示例2: getDetailed
public function getDetailed($criterion = null)
{
$Properties = new Properties();
$featured_properties = $this->get($criterion);
foreach ($featured_properties as &$featured_property) {
$featured_property = $Properties->get($featured_property->property_id);
}
return $featured_properties;
}
示例3: testGetBool
function testGetBool()
{
global $UBAR_GLOB;
$path = $UBAR_GLOB['UBAR_ROOT'] . "test" . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "sample.properties";
$pathToPropertiesClass = $UBAR_GLOB['UBAR_ROOT'] . "core" . DIRECTORY_SEPARATOR . "Properties.php";
$props = new Properties($path);
// test valid
$this->assertEquals(TRUE, $props->getBool("sample.boolean"));
// test unable to convert (other errors covered in test_get()
try {
$props->getBool("sample.badboolean");
$this->fail("Expected exception trying to get property you can't convert to bool.");
} catch (Exception $e) {
$value = $props->get("sample.badboolean");
$expectedMessage = "The property found, " . $value . ", with the key \"sample.badboolean\" could not be converted to a boolean value in the file \"{$path}\".";
$this->assertEquals($expectedMessage, $e->getMessage());
}
}
示例4: gallery
function gallery()
{
global $specialchars;
global $ADMIN_CONF;
global $CatPage;
global $GALLERY_CONF;
if (false !== ($changeart = getRequestValue('changeart', 'post'))) {
header('content-type: text/html; charset=' . CHARSET . '');
if ($changeart == "gallery_new") {
if (false !== ($galleryname = getRequestValue('galleryname', 'post'))) {
echo newGallery($galleryname);
}
exit;
} elseif ($changeart == "gallery_del") {
if (false !== ($galleryname = getRequestValue('galleryname', 'post'))) {
echo deleteGallery($galleryname);
}
exit;
} elseif ($changeart == "gallery_rename") {
if (false !== ($galleryname = getRequestValue('galleryname', 'post')) and false !== ($gallerynewname = getRequestValue('gallerynewname', 'post'))) {
echo renameGallery($galleryname, $gallerynewname);
}
exit;
} elseif ($changeart == "gallery_size") {
if (false !== ($new_global_width = getRequestValue('new_global_width', 'post')) and false !== ($new_global_height = getRequestValue('new_global_height', 'post')) and (ctype_digit($new_global_width) or ctype_digit($new_global_height) or $new_global_width == "auto" or $new_global_height == "auto" or $new_global_width == "" or $new_global_height == "")) {
$GALLERY_CONF->set("maxwidth", $new_global_width);
$GALLERY_CONF->set("maxheight", $new_global_height);
ajax_return("success", true);
} elseif (false !== ($thumbnail_global_max_width = getRequestValue('thumbnail_global_max_width', 'post')) and false !== ($thumbnail_global_max_height = getRequestValue('thumbnail_global_max_height', 'post')) and (ctype_digit($thumbnail_global_max_width) or ctype_digit($thumbnail_global_max_height or $new_global_width == "" or $new_global_height == ""))) {
$GALLERY_CONF->set("maxthumbwidth", $thumbnail_global_max_width);
$GALLERY_CONF->set("maxthumbheight", $thumbnail_global_max_height);
ajax_return("success", true);
} else {
ajax_return("error", true, returnMessage(false, getLanguageValue("properties_error_save")), true, true);
}
} elseif ($changeart == "gallery_subtitle") {
if (false !== ($subtitle = getRequestValue('subtitle', 'post', false)) and false !== ($curent_dir = getRequestValue('curent_dir', 'post')) and false !== ($file = getRequestValue('file', 'post'))) {
if (!is_file(GALLERIES_DIR_REL . $curent_dir . "/texte.conf.php") and false === newConf(GALLERIES_DIR_REL . $curent_dir . "/texte.conf.php")) {
ajax_return("error", true, returnMessage(false, getLanguageValue("gallery_error_subtitle_conf")), true, true);
}
$tmp = new Properties(GALLERIES_DIR_REL . $curent_dir . "/texte.conf.php");
$tmp->set($file, $subtitle);
ajax_return("success", true);
}
exit;
} elseif ($changeart == "file_rename") {
if (false !== ($newfile = getRequestValue('newfile', 'post')) and false !== ($orgfile = getRequestValue('orgfile', 'post')) and false !== ($curent_dir = getRequestValue('curent_dir', 'post'))) {
$dir = GALLERIES_DIR_REL . $curent_dir . "/";
if (true !== ($error = moveFileDir($dir . $orgfile, $dir . $newfile, true))) {
ajax_return("error", true, $error, true, "js-dialog-reload");
}
$dir = GALLERIES_DIR_REL . $curent_dir . "/" . PREVIEW_DIR_NAME . "/";
if (true !== ($error = moveFileDir($dir . $orgfile, $dir . $newfile, true))) {
ajax_return("error", true, $error, true, "js-dialog-reload");
}
$tmp = new Properties(GALLERIES_DIR_REL . $curent_dir . "/texte.conf.php");
$tmp->set($newfile, $tmp->get($orgfile));
$tmp->delete($orgfile);
ajax_return("success", true);
}
exit;
} elseif ($changeart == "gallery_ftp") {
changeFromFtp();
} else {
exit;
}
}
if (getRequestValue('chancefiles') == "true") {
require_once BASE_DIR_ADMIN . "jquery/File-Upload/upload.class.php";
exit;
}
$dircontent = getDirAsArray(GALLERIES_DIR_REL, "dir", "sort");
$pagecontent = "";
require_once BASE_DIR_ADMIN . "jquery/File-Upload/fileupload.php";
$pagecontent .= '<ul class="js-gallery mo-ul">';
foreach ($dircontent as $pos => $currentgalerien) {
$pagecontent .= '<li class="js-file-dir mo-li ui-widget-content ui-corner-all">';
$pagecontent .= getFileUpload($currentgalerien, $specialchars->rebuildSpecialChars($currentgalerien, false, true), getLanguageValue("images"));
$pagecontent .= '</li>';
}
$pagecontent .= '</ul>';
$new_gallery = '<ul class="js-new-gallery mo-ul new-gallery">';
$new_gallery .= '<li class="js-file-dir mo-li ui-widget-content ui-corner-all">';
$new_gallery .= getFileUpload($specialchars->rebuildSpecialChars(getLanguageValue("gallery_name_new"), false, true), getLanguageValue("gallery_name_new"), getLanguageValue("images"), " mo-hidden");
$new_gallery .= '</li>';
$new_gallery .= '</ul>';
$max_img = '<input type="text" name="new_global_width" value="' . $GALLERY_CONF->get('maxwidth') . '" size="4" maxlength="4" class="mo-input-digit js-in-digit-auto" /> x <input type="text" name="new_global_height" value="' . $GALLERY_CONF->get('maxheight') . '" size="4" maxlength="4" class="mo-input-digit js-in-digit-auto" /> ' . getLanguageValue("pixels");
$max_prev_img = '<input type="text" name="thumbnail_global_max_width" value="' . $GALLERY_CONF->get('maxthumbwidth') . '" size="4" maxlength="4" class="mo-input-digit js-in-digit" /> x <input type="text" name="thumbnail_global_max_height" value="' . $GALLERY_CONF->get('maxthumbheight') . '" size="4" maxlength="4" class="mo-input-digit js-in-digit" /> ' . getLanguageValue("pixels");
$titel = "gallery_help_conf";
$template[$titel]["toggle"] = true;
$template[$titel][] = array(getLanguageValue("gallery_scale"), $max_img);
$template[$titel][] = array(getLanguageValue("gallery_scale_thumbs"), $max_prev_img);
$ftp_form = '<form action="index.php?action=' . ACTION . '" method="post">';
$ftp_form .= '<input type="hidden" name="changeart" value="gallery_ftp" />';
$ftp_form .= '<input type="submit" value="' . getLanguageValue("gallery_text_from_ftp_button") . '" />';
$ftp_form .= '</form>';
$template[$titel][] = array(getLanguageValue("gallery_text_from_ftp"), $ftp_form);
return array(contend_template($template) . $pagecontent, $new_gallery);
}
示例5: config
function config()
{
global $CMS_CONF;
global $specialchars;
global $CONTACT_CONF;
global $ADMIN_CONF;
global $USER_SYNTAX;
if (getRequestValue('savesyntax', 'post') == "true") {
if (false !== ($content = getRequestValue('content', 'post', false)) and $CMS_CONF->get('usecmssyntax') == "true") {
$USER_SYNTAX->setFromTextarea($content);
require_once BASE_DIR_ADMIN . 'editsite.php';
$selctbox = '<span id="replace-item">' . returnUserSyntaxSelectbox() . '</span>';
$var_UserSyntax = '0E0M0P0T0Y0';
# die userSxntax hat sich geändert deshalb schiecken wir dem editor userSyntax die neuen
global $USER_SYNTAX;
$moziloUserSyntax = $USER_SYNTAX->toArray();
if (count($moziloUserSyntax) > 0) {
$moziloUserSyntax = array_keys($moziloUserSyntax);
rsort($moziloUserSyntax);
$var_UserSyntax = implode('|', $moziloUserSyntax);
}
$var_UserSyntax = '<span id="moziloUserSyntax">' . $var_UserSyntax . '</span>';
echo ajax_return("success", false) . $selctbox . $var_UserSyntax;
} elseif ($CMS_CONF->get('usecmssyntax') == "true") {
require_once BASE_DIR_ADMIN . 'editsite.php';
$selctbox = '<span id="replace-item">' . returnUserSyntaxSelectbox() . '</span>';
$selctbox .= '<textarea id="page-content">' . $USER_SYNTAX->getToTextarea() . '</textarea>';
echo ajax_return("success", false) . $selctbox;
}
exit;
} elseif (getRequestValue('chanceconfig', 'post') == "true") {
echo set_config_para();
exit;
}
$pagecontent = NULL;
$show = $ADMIN_CONF->get("config");
if (!is_array($show)) {
$show = array();
}
$template = array();
$error = array();
// ALLGEMEINE EINSTELLUNGEN
$titel = "config_titel_cmsglobal";
// Zeile "WEBSITE-TITEL", "TITEL-TRENNER" und "WEBSITE-TITELLEISTE"
if (ROOT or in_array("websitetitle", $show)) {
$error[$titel][] = false;
$template[$titel][] = '<div class="ui-helper-clearfix">' . '<div class="mo-in-li-l">' . getLanguageValue("config_text_websitetitle") . '</div>' . '<div class="mo-in-li-r">' . '<input type="text" class="mo-input-text" name="websitetitle" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("websitetitle"), true, true) . '" />' . '</div>' . '</div>' . '<div class="mo-padding-top ui-helper-clearfix">' . '<div class="mo-in-li-l">' . getLanguageValue("config_text_websitetitleseparator") . '</div>' . '<div class="mo-in-li-r">' . '<input type="text" class="mo-input-text" name="titlebarseparator" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("titlebarseparator"), true, true) . '" />' . '</div>' . '</div>' . '<div class="mo-padding-top">' . getLanguageValue("config_text_websitetitlebar") . '<br /><input type="text" class="mo-input-text mo-input-margin-top" name="titlebarformat" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("titlebarformat"), true, true) . '" />' . '</div>';
}
// Zeile "WEBSITE-BESCHREIBUNG" und "WEBSITE-KEYWORDS"
if (ROOT or in_array("websitedescription", $show)) {
$error[$titel][] = false;
$template[$titel][] = getLanguageValue("config_text_websitedescription") . '<br /><input type="text" class="mo-input-text mo-input-margin-top" name="websitedescription" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("websitedescription"), true, true) . '" /><div class="mo-padding-top">' . getLanguageValue("config_text_websitekeywords") . '</div><input type="text" class="mo-input-text mo-input-margin-top" name="websitekeywords" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("websitekeywords"), true, true) . '" />';
}
// Zeile "SPRACHAUSWAHL"
if (ROOT or in_array("cmslanguage", $show)) {
$tmp_array = getDirAsArray(BASE_DIR_CMS . 'sprachen', "file", "natcasesort");
if (count($tmp_array) <= 0) {
$error[$titel][] = getLanguageValue("config_error_language_empty");
} elseif (!in_array("language_" . $CMS_CONF->get('cmslanguage') . ".txt", $tmp_array)) {
$error[$titel][] = getLanguageValue("config_error_languagefile_error") . "<br />" . CMS_DIR_NAME . "/sprachen/language_" . $CMS_CONF->get('cmslanguage') . ".txt";
} else {
$error[$titel][] = false;
}
$conf_inhalt = '<div class="mo-select-div"><select name="cmslanguage" class="mo-select">';
foreach ($tmp_array as $file) {
$currentlanguagecode = substr($file, strlen("language_"), strlen($file) - strlen("language_") - strlen(".txt"));
$selected = NULL;
// aktuell ausgewählte Sprache als ausgewählt markieren
if ($currentlanguagecode == $CMS_CONF->get("cmslanguage")) {
$selected = " selected";
}
$conf_inhalt .= '<option' . $selected . ' value="' . $currentlanguagecode . '">';
// Übersetzer aus der aktuellen Sprachdatei holen
$languagefile = new Properties(BASE_DIR_CMS . "sprachen/" . $file);
$conf_inhalt .= $currentlanguagecode . " (" . getLanguageValue("config_input_translator") . " " . $languagefile->get("_translator_0") . ")";
$conf_inhalt .= "</option>";
}
$conf_inhalt .= "</select></div>";
$template[$titel][] = array(getLanguageValue("config_text_cmslanguage"), $conf_inhalt);
}
// Zeile "STANDARD-KATEGORIE"
if (ROOT or in_array("defaultcat", $show)) {
$tmp_array = getDirAsArray(CONTENT_DIR_REL, "dir", "natcasesort");
if (count($tmp_array) <= 0) {
$error[$titel][] = getLanguageValue("config_error_defaultcat_emty");
} elseif (!in_array($CMS_CONF->get('defaultcat'), $tmp_array)) {
$error[$titel][] = getLanguageValue("config_error_defaultcat_existed") . "<br />" . $specialchars->rebuildSpecialChars($CMS_CONF->get('defaultcat'), true, true);
} else {
$error[$titel][] = false;
}
$conf_inhalt = '<div class="mo-select-div"><select name="defaultcat" class="mo-select">';
foreach ($tmp_array as $element) {
if (count(getDirAsArray(CONTENT_DIR_REL . $element, array(EXT_PAGE, EXT_HIDDEN), "none")) == 0) {
continue;
}
$selected = NULL;
if ($element == $CMS_CONF->get("defaultcat")) {
$selected = "selected ";
}
$conf_inhalt .= '<option ' . $selected . 'value="' . $element . '">' . $specialchars->rebuildSpecialChars($element, true, true) . "</option>";
//.........这里部分代码省略.........
示例6: main
/**
* Main method parses the XML files and creates SQL files.
*
* @return void
* @throws Exception If there is an error parsing the data xml.
*/
public function main()
{
$this->validate();
$targetDatabase = $this->getTargetDatabase();
$platform = $this->getPlatformForTargetDatabase();
// Load the Data XML -> DB Name properties
$map = new Properties();
try {
$map->load($this->getDataDbMap());
} catch (IOException $ioe) {
throw new BuildException("Cannot open and process the datadbmap!", $ioe);
}
DataModelBuilder::setBuildProperties($this->getPropelProperties());
// Parse each file in teh data -> db map
foreach ($map->keys() as $dataXMLFilename) {
$dataXMLFile = new PhingFile($this->srcDir, $dataXMLFilename);
// if file exists then proceed
if ($dataXMLFile->exists()) {
$dbname = $map->get($dataXMLFilename);
$db = $this->getDatabase($dbname);
if (!$db) {
throw new BuildException("Cannot find instantiated Database for name '{$dbname}' from datadbmap file.");
}
$db->setPlatform($platform);
$outFile = $this->getMappedFile($dataXMLFilename);
$this->log("Creating SQL from XML data dump file: " . $dataXMLFile->getAbsolutePath());
try {
$dataXmlParser = new XmlToData($db, $this->dbEncoding);
$data = $dataXmlParser->parseFile($dataXMLFile->getAbsolutePath());
} catch (Exception $e) {
throw new Exception("Exception parsing data XML: " . $e->getMessage());
}
$fp = fopen($outFile->getAbsolutePath(), 'w');
$currTable = null;
foreach ($data as $dataRow) {
if ($currTable !== $dataRow->getTable()) {
$currTable = $dataRow->getTable();
$builder = DataModelBuilder::builderFactory($currTable, 'datasql');
}
$sql = $builder->buildRowSql($dataRow);
fwrite($fp, $sql);
}
fclose($fp);
// Place the generated SQL file(s)
$p = new Properties();
if ($this->getSqlDbMap()->exists()) {
$p->load($this->getSqlDbMap());
}
$p->setProperty($outFile->getName(), $db->getName());
$p->store($this->getSqlDbMap(), "Sqlfile -> Database map");
} else {
$this->log("File '" . $dataXMLFile->getAbsolutePath() . "' in datadbmap does not exist, so skipping it.", PROJECT_MSG_WARN);
}
}
// foreach data xml file
}
示例7:
*
* @see GlobalConstants::DEV_MODE
*/
if (!isset($UBAR_GLOB['DEV_MODE'])) {
$UBAR_GLOB['DEV_MODE'] = $props->getBool('DEV_MODE', GlobalConstants::DEV_MODE);
}
/**
* Define a property appender based on dev mode to simplify the dev mode value
* retrieval
*/
$UBAR_GLOB['PROP_APPEND'] = $UBAR_GLOB['DEV_MODE'] ? '_DEV_MODE' : '';
/**
* Define the default locale.
* @see GlobalConstants::LOCALE_DEFAULT
*/
$UBAR_GLOB['LOCALE_DEFAULT'] = $props->get('LOCALE_DEFAULT', GlobalConstants::LOCALE_DEFAULT);
/**
* Define display errors flag.
* @see GlobalConstants::DISPLAY_ERRORS
*/
$UBAR_GLOB['DISPLAY_ERRORS'] = $props->getBool('DISPLAY_ERRORS', GlobalConstants::DISPLAY_ERRORS);
/**
* Define display html errors (vs plain text).
* @see GlobalConstants::HTML_ERRORS
*/
$UBAR_GLOB['HTML_ERRORS'] = $props->getBool('HTML_ERRORS', GlobalConstants::HTML_ERRORS);
/**
* Define error display level. Currently unused.
* @see GlobalConstants::ERROR_LEVEL
*
* @todo switch to int values and make use of this
示例8: main
/**
* Main method parses the XML files and creates SQL files.
*
* @return void
* @throws Exception If there is an error parsing the data xml.
* @throws BuildException
*/
public function main()
{
$this->validate();
$targetDatabase = $this->getTargetDatabase();
$platform = $this->getGeneratorConfig()->getConfiguredPlatform();
// Load the Data XML -> DB Name properties
$map = new Properties();
try {
$map->load($this->getDataDbMap());
} catch (IOException $ioe) {
throw new BuildException("Cannot open and process the datadbmap!", $ioe);
}
// Parse each file in the data -> db map
foreach ($map->keys() as $dataXMLFilename) {
$dataXMLFile = new PhingFile($this->srcDir, $dataXMLFilename);
// if file exists then proceed
if ($dataXMLFile->exists()) {
$dbname = $map->get($dataXMLFilename);
$db = $this->getDatabase($dbname);
if (!$db) {
throw new BuildException("Cannot find instantiated Database for name '{$dbname}' from datadbmap file.");
}
$db->setPlatform($platform);
$outFile = $this->getMappedFile($dataXMLFilename);
$sqlWriter = new FileWriter($outFile);
$this->log("Creating SQL from XML data dump file: " . $dataXMLFile->getAbsolutePath());
try {
$dataXmlParser = new XmlToDataSQL($db, $this->getGeneratorConfig(), $this->dbEncoding);
$dataXmlParser->transform($dataXMLFile, $sqlWriter);
} catch (Exception $e) {
throw new BuildException("Exception parsing data XML: " . $e->getMessage(), $x);
}
// Place the generated SQL file(s)
$p = new Properties();
if ($this->getSqlDbMap()->exists()) {
$p->load($this->getSqlDbMap());
}
$p->setProperty($outFile->getName(), $db->getName());
$p->store($this->getSqlDbMap(), "Sqlfile -> Database map");
} else {
$this->log("File '" . $dataXMLFile->getAbsolutePath() . "' in datadbmap does not exist, so skipping it.", Project::MSG_WARN);
}
}
// foreach data xml file
}
示例9: Language
$Punycode = new idna_convert();
require_once BASE_DIR_CMS . "Language.php";
$language = new Language();
setTimeLocale($language);
$activ_plugins = array();
$deactiv_plugins = array();
$plugin_first = array();
# Vorhandene Plugins finden und in array $activ_plugins und $deactiv_plugins einsetzen
# wird für Search und Pluginplatzhaltern verwendet
list($activ_plugins, $deactiv_plugins, $plugin_first) = findPlugins();
require_once BASE_DIR_CMS . "Syntax.php";
require_once BASE_DIR_CMS . "Smileys.php";
$syntax = new Syntax();
$smileys = new Smileys(BASE_DIR_CMS . "smileys");
require_once BASE_DIR_CMS . "Plugin.php";
$tmp_layout = $CMS_CONF->get("cmslayout");
if ($CMS_CONF->get("draftmode") == "true" and $CMS_CONF->get("draftlayout") != "false" and getRequestValue('draft') != "true") {
$tmp_layout = $CMS_CONF->get("draftlayout");
}
$LAYOUT_DIR = LAYOUT_DIR_NAME . "/" . $tmp_layout;
$TEMPLATE_FILE = $LAYOUT_DIR . "/template.html";
$LAYOUT_DIR_URL = $specialchars->replaceSpecialChars(URL_BASE . $LAYOUT_DIR, true);
if ($CMS_CONF->get("usecmssyntax") == "false") {
define("USE_CMS_SYNTAX", false);
} else {
define("USE_CMS_SYNTAX", true);
}
if (getRequestValue('draft') == "true") {
define("DRAFT", true);
} else {
define("DRAFT", false);
示例10: SpecialChars
// Properties Class
require_once BASE_DIR_CMS . "Properties.php";
// Language Class
require_once BASE_DIR_CMS . "Language.php";
require_once BASE_DIR_ADMIN . "filesystem.php";
require_once BASE_DIR_CMS . "SpecialChars.php";
$specialchars = new SpecialChars();
foreach ($LANG_INSTALL as $lang => $tmp) {
if (!is_file(BASE_DIR_ADMIN . LANGUAGE_DIR_NAME . "/language_" . $lang . ".txt")) {
unset($LANG_INSTALL[$lang]);
}
}
if (is_file(BASE_DIR_ADMIN . CONF_DIR_NAME . '/basic.conf.php') and isFileRW(BASE_DIR_ADMIN . CONF_DIR_NAME . '/basic.conf.php')) {
$ADMIN_CONF = new Properties(BASE_DIR_ADMIN . CONF_DIR_NAME . '/basic.conf.php');
}
if ($ADMIN_CONF !== false and (!isset($_POST['language']) or $_POST['language'] == "false") and is_file(BASE_DIR_ADMIN . LANGUAGE_DIR_NAME . "/language_" . $ADMIN_CONF->get('language') . ".txt")) {
$LANG_TMP = $ADMIN_CONF->get('language');
}
$LANG = new Language(BASE_DIR_ADMIN . LANGUAGE_DIR_NAME . "/language_" . $LANG_TMP . ".txt");
if (is_file(BASE_DIR_CMS . CONF_DIR_NAME . '/main.conf.php') and isFileRW(BASE_DIR_CMS . CONF_DIR_NAME . '/main.conf.php')) {
$CMS_CONF = new Properties(BASE_DIR_CMS . CONF_DIR_NAME . '/main.conf.php');
setTimeLocale($LANG);
}
session_start();
ini_set("default_charset", CHARSET);
header('content-type: text/html; charset=' . strtolower(CHARSET));
$steps = array("help", "language", "chmod_test", "environment", "rewrite", "password", "finish");
$html_check_update = '';
if (is_file("update.php")) {
require_once "update.php";
$steps = array("help", "language", "chmod_test", "environment", "rewrite", "password", "update", "finish");
示例11: unset
unset($users_array[$id]);
# die refresh ajax anfrage
#!!!!!!!!!!!!!! kann gelöscht werden wenn ich das mit dem neuen multi mode fertig habe
/* if(getRequestValue('refresh_session') == "true") {
$hidden_action = "";
foreach($users_array as $action) {
if($action == "home" or $action == "login") continue;
if(in_array($action,$array_tabs))
$hidden_action .= ",".$action;
}
if(strlen($hidden_action) > 1)
$hidden_action = substr($hidden_action,1);
exit($hidden_action);
}*/
# es gab ein redirect
if (false !== ($tmp = strstr($USERS->get($id), "#"))) {
$tmp = substr($tmp, 1);
$message .= returnMessage(false, getLanguageValue("error_multi_user_tab", false, getLanguageValue($tmp . "_button"), MULTI_USER_TIME));
$USERS->set($id, $tmp);
# nur reingehen bei click auf eins der tabs
} elseif (getRequestValue('multi', 'get') and $tmp_action != "home" and in_array($tmp_action, $array_tabs)) {
if ("freetab" == ($tmp = $USERS->get($id))) {
$tmp = "home";
}
$url = $_SERVER['HTTP_HOST'] . URL_BASE . ADMIN_DIR_NAME . '/index.php?nojs=true&action=' . $tmp . '&multi=true';
$USERS->set($id, $tmp_action);
# seite besetzt
if (in_array($tmp_action, $users_array)) {
$USERS->set($id, "busy#" . $tmp_action);
header("Location: http://{$url}");
exit;
示例12: plugins
function plugins()
{
global $ADMIN_CONF;
global $CatPage;
global $message;
global $specialchars;
global $debug;
$plugin_manage_open = false;
# plugins löschen
if (getRequestValue('plugin-all-del', 'post') and getRequestValue('plugin-del', 'post')) {
plugin_del();
$plugin_manage_open = true;
}
# hochgeladenes plugin installieren
if (isset($_FILES["plugin-install-file"]["error"]) and getRequestValue('plugin-install', 'post') and $_FILES["plugin-install-file"]["error"] == 0 and strtolower(substr($_FILES["plugin-install-file"]["name"], -4)) == ".zip") {
$debug .= "install=" . $_FILES["plugin-install-file"]["name"] . "<br />\n";
plugin_install();
$plugin_manage_open = true;
} elseif ($plugin_select = $specialchars->rebuildSpecialChars(getRequestValue('plugin-install-select', 'post'), false, false) and getRequestValue('plugin-install', 'post') and is_file(PLUGIN_DIR_REL . $specialchars->replaceSpecialChars($plugin_select, false)) !== false and strtolower(substr($plugin_select, -4)) == ".zip") {
$debug .= "local install=" . getRequestValue('plugin-install-select', 'post') . "<br />\n";
plugin_install($plugin_select);
$plugin_manage_open = true;
}
$showdebug = false;
if ($showdebug and !empty($debug)) {
$message .= returnMessage(false, $debug);
}
require_once BASE_DIR_CMS . "Plugin.php";
if (false !== ($plugin_name = getRequestValue('pluginadmin'))) {
#,'get'
if (file_exists(PLUGIN_DIR_REL . $plugin_name)) {
define("PLUGINADMIN", $plugin_name);
if (file_exists(PLUGIN_DIR_REL . PLUGINADMIN . "/plugin.conf.php") and file_exists(PLUGIN_DIR_REL . PLUGINADMIN . "/index.php")) {
require_once PLUGIN_DIR_REL . PLUGINADMIN . "/index.php";
# Enthält der Code eine Klasse mit dem Namen des Plugins und ist es auch der Dirname?
if (class_exists(PLUGINADMIN) and in_array(PLUGINADMIN, get_declared_classes())) {
# $PLUGIN_ADMIN_ADD_HEAD gibts nur hier und ist für sachen die in den head sollen
global $PLUGIN_ADMIN_ADD_HEAD;
$PLUGIN_ADMIN_ADD_HEAD = array();
$multi_user = "";
if (defined('MULTI_USER') and MULTI_USER) {
$multi_user = "&multi=true";
}
define("PLUGINADMIN_GET_URL", URL_BASE . ADMIN_DIR_NAME . "/index.php?pluginadmin=" . PLUGINADMIN . "&nojs=true&action=" . ACTION . $multi_user);
$plugin = new $plugin_name();
$info = $plugin->getInfo();
$config = $plugin->getConfig();
if (PLUGIN_DIR_REL . $plugin_name . '/' . $config["--admin~~"]["datei_admin"] == PLUGIN_DIR_REL . PLUGINADMIN . "/index.php") {
return $plugin->getContent("");
} else {
return require_once PLUGIN_DIR_REL . $plugin_name . '/' . $config["--admin~~"]["datei_admin"];
}
}
} else {
die;
}
} else {
die;
}
}
if (getRequestValue('chanceplugin', 'post') == "true" and false !== ($plugin_name = getRequestValue('plugin_name', 'post'))) {
if (file_exists(PLUGIN_DIR_REL . $plugin_name) and file_exists(PLUGIN_DIR_REL . $plugin_name . "/plugin.conf.php") and file_exists(PLUGIN_DIR_REL . $plugin_name . "/index.php")) {
$conf_plugin = new Properties(PLUGIN_DIR_REL . $plugin_name . "/plugin.conf.php");
} else {
die("Fatal Error");
}
if (false !== ($activ = getRequestValue(array($plugin_name, 'active'), 'post')) and ($activ == "true" or $activ == "false")) {
$conf_plugin->set("active", $activ);
ajax_return("success", true);
} elseif ($conf_plugin->get("active") == "true") {
require_once PLUGIN_DIR_REL . $plugin_name . "/index.php";
# Enthält der Code eine Klasse mit dem Namen des Plugins und ist es auch der Dirname?
if (class_exists($plugin_name) and in_array($plugin_name, get_declared_classes())) {
$plugin = new $plugin_name();
# das ist nötig weil es sein kann das in getInfo() variblen initaliesiert werden
$tmp = $plugin->getInfo();
$config = $plugin->getConfig();
echo save_plugin_settings($conf_plugin, $config, $plugin_name);
exit;
} else {
die("Fatal Error");
}
}
die("Fatal Error");
}
$pagecontent = '';
$show = $ADMIN_CONF->get("plugins");
if (!is_array($show)) {
$show = array();
}
if (ROOT or in_array("plugin_-_manage", $show)) {
$multi_user = "";
if (defined('MULTI_USER') and MULTI_USER) {
$multi_user = "&multi=true";
}
$html_manage = "";
$plugin_manage = array();
$disabled = '';
if (!function_exists('gzopen')) {
$disabled = ' disabled="disabled"';
//.........这里部分代码省略.........
示例13: getInfo
function getInfo()
{
global $ADMIN_CONF;
global $lang_contact_admin;
$dir = PLUGIN_DIR_REL . "CONTACT/";
$language = $ADMIN_CONF->get("language");
$lang_contact_admin = new Properties($dir . "sprachen/admin_language_" . $language . ".txt", false);
$info = array("<b>CONTACT</b>", "2.0", $lang_contact_admin->get("config_help_contact"), "mozilo", "", array('{CONTACT}' => $lang_contact_admin->get("toolbar_platzhalter_CONTACT")));
return $info;
}
示例14: makeCONTACTSetings
function makeCONTACTSetings($file)
{
if (is_file($file)) {
$CONTACT = new Properties($file);
} else {
return;
}
if (!$CONTACT->get('formularmail')) {
global $ADMIN_CONF;
if ($ADMIN_CONF->get('adminmail')) {
$CONTACT->set('formularmail', str_replace("%40", "@", $ADMIN_CONF->get('adminmail')));
}
}
if (is_file(BASE_DIR . 'update/formular.conf')) {
$tmp_conf = getTextConf(BASE_DIR . 'update/formular.conf');
mo_unlink(BASE_DIR . 'update/formular.conf');
foreach ($tmp_conf as $name => $value) {
$tmp_set = explode(",", $value);
$tmp_name = "";
$tmp_show = "";
$tmp_mandatory = "";
if ($tmp_set[count($tmp_set) - 1] and $tmp_set[count($tmp_set) - 1] == "true") {
$tmp_mandatory = "true";
}
if ($tmp_set[count($tmp_set) - 2] and $tmp_set[count($tmp_set) - 2] == "true") {
$tmp_show = "true";
}
if (count($tmp_set) == 3) {
$tmp_name = $tmp_set[0];
}
$CONTACT->set('titel_' . $name, $tmp_name);
$CONTACT->set('titel_' . $name . '_show', $tmp_show);
$CONTACT->set('titel_' . $name . '_mandatory', $tmp_mandatory);
}
}
if (is_file(BASE_DIR . 'update/aufgaben.conf')) {
$tmp_conf = getTextConf(BASE_DIR . 'update/aufgaben.conf');
mo_unlink(BASE_DIR . 'update/aufgaben.prop');
$tmp_set = array();
foreach ($tmp_conf as $name => $value) {
$tmp_set[] = $name . ' = ' . $value;
}
if (count($tmp_set) > 0) {
$CONTACT->set('contactformcalcs', implode('<br />', $tmp_set));
}
}
}
示例15: getConfig
function getConfig()
{
global $ADMIN_CONF;
global $CatPage;
if (IS_ADMIN and $this->settings->get("plugin_first") !== "true") {
$this->settings->set("plugin_first", "true");
}
if (file_exists(BASE_DIR . PLUGIN_DIR_NAME . "/MenuSubs/lang/conf_" . $ADMIN_CONF->get("language") . ".txt")) {
$conf_txt = new Properties(BASE_DIR . PLUGIN_DIR_NAME . "/MenuSubs/lang/conf_" . $ADMIN_CONF->get("language") . ".txt");
} else {
$conf_txt = new Properties(BASE_DIR . PLUGIN_DIR_NAME . "/MenuSubs/lang/conf_deDE.txt");
}
// Das muß auf jeden Fall geschehen!
$config = array();
$descriptions = array("no_menusubs_2" => $conf_txt->get("no_menusubs_2"));
$cat_array = $CatPage->get_CatArray(false, false, array(EXT_PAGE, EXT_HIDDEN));
foreach ($cat_array as $cat) {
if (strpos($cat, "%2F") !== false) {
continue;
}
$descriptions[FILE_START . $cat . FILE_END] = $CatPage->get_HrefText($cat, false);
}
$config['menusubs_2'] = array("type" => "select", "description" => $conf_txt->get("menusubs_2"), "descriptions" => $descriptions, "multiple" => "false");
$config['sitemap_show_menu2'] = array("type" => "checkbox", "description" => $conf_txt->get("sitemap_show_menu2"));
$config['breadcrumb_delimiter'] = array("type" => "text", "maxlength" => "10", "size" => "10", "description" => 'Trennzeichen der Brotkrümel Einträge. Default ist "»"');
return $config;
}