$design->footer(1); } } #anzeigen $design->header(); $tpl = new tpl('selfbp', 1); $akl = ''; if (isset($_REQUEST['akl'])) { $akl = $_REQUEST['akl']; } #löschen if (isset($_REQUEST['del'])) { $del = $_REQUEST['del']; $a = substr($del, 0, 1); $e = substr($del, 1); if ($e != 'neu') { unlink('include/contents/selfbp/self' . $a . '/' . $e); } } $text = get_text($akl); $properties = get_properties($text); if (!isset($properties['wysiwyg'])) { $properties['wysiwyg'] = 1; } $text = edit_text($text, false); #$text = rteSafe($text); $filename = get_filename($akl); $akl = get_akl($akl); $view = get_view($properties['view']); $tpl->set_ar_out(array('akl' => $akl, 'text' => $text, 'filename' => $filename, 'exfilename' => $filename, 'wysiwyg' => $properties['wysiwyg'], 'title' => $properties['title'], 'hmenu' => $properties['hmenu'], 'view' => $view, 'viewoptions' => $properties['viewoptions'], 'wysiwyg_editor' => $properties['wysiwyg'] == 1 ? '<script type="text/javascript">buttonPath = "include/images/icons/editor/"; imageBrowse = "admin.php?selfbp-imagebrowser"; makeWhizzyWig("bbwy", "all");</script>' : ''), 0); $design->footer();
$properties[$x['name']] = $x['value']; } unset($out); return $properties; } if ($menu->get(1) != '') { // moegliche endungen $ende_ar = array('.html', '.htm', '.php'); $um = $menu->get(1); // um ../ backlinks in unterordner kicken. $um = str_replace('../', '', $um); $um = str_replace('./', '', $um); foreach ($ende_ar as $ext) { $file = 'include/contents/selfbp/selfp/' . $menu->get(1) . $ext; if (file_exists($file)) { $properties = get_properties($file); if ($properties['view'] == "fullscreen") { require_once $file; } elseif ($properties['view'] == "popup") { if ($menu->get(2) != 'true') { $title = $allgAr['title'] . ' :: ' . $properties['title']; $hmenu = $properties['hmenu']; $design = new design($title, $hmenu); $design->header(); ?> <script language="JavaScript" type="text/javascript"> <!-- var fenster = window.open('index.php?self-<?php echo $menu->get(1); ?> -true','Seite','<?php
// zuerst die seiten $tpl->out("overview pages start"); $pages = read_ext("include/contents/selfbp/selfp", "php"); if (sizeof($pages) > 0) { foreach ($pages as $page) { $properties = get_properties(get_text("p" . $page)); $tpl->set("filename", $page); $tpl->set_ar_out($properties, "overview pages_item"); } } else { $tpl->out("overview no pages"); } $tpl->out("overview pages end"); // end of pages // dann die boxen $tpl->out("overview boxes start"); $boxes = read_ext("include/contents/selfbp/selfb", "php"); if (sizeof($boxes) > 0) { foreach ($boxes as $box) { $properties = get_properties(get_text("b" . $box)); $tpl->set("filename", $box); $tpl->set_ar_out($properties, "overview boxes_item"); } } else { $tpl->out("overview no boxes"); } $tpl->out("overview boxes end"); // end of boxes // buttons für die aktionen $tpl->out("overview actions"); $design->footer();
/** initialise the program, setup database, read configuration, etc. * @return void */ function initialise() { if (!defined('E_NONE')) { /** consistency in PHPs defined error levels requires E_NONE too, imho */ define('E_NONE', 0); } if (!function_exists('microtime')) { /** Kludge for environments without microtime() * @return string microseconds always 0.0 and current timestamp (seconds) */ function microtime() { return "0.0 " . time(); } } /** This global keeps track of the script performance * * We record the start time of the script execution as soon as we are able to. * When all is said and done, we can do calculations about elapsed time, etc.. * @global object $PERFORMANCE */ global $PERFORMANCE; $PERFORMANCE = new stdClass(); $PERFORMANCE->time_start = microtime(); /** This global variable holds all configuration parameters * * The following essential parameters are defined in /config.php * (see {@link config-example.php} for more information): * * - $CFG->db_type defines the database type. * - $CFG->db_server defines the name of the database server. * - $CFG->db_username holds the username to use when connecting to the server. * - $CFG->db_password holds the password to use when connecting to the server. * - $CFG->db_name holds the name of the database to use. * - $CFG->prefix holds the tablename prefix. * - $CFG->dir is the absolute directory path of 'index.php' and 'config.php'. * - $CFG->www is the URI which corresponds with the directory $CFG->dir. * - $CFG->progdir is the absolute path to the program directory * - $CFG->progwww is the URI which corresponds with the directory $CFG->progdir. * - $CFG->datadir is the absolute path to a private directory outside the document root. * * There is one optional parameter than can be specified in /config.php: * * - $CFG->debug is a parameter to switch debugging ON * * Two additional parameters are derived from $CFG->www and $CFG->progwww * (see {@link calculate_uri_shortcuts()} for more information): * * - $CFG->www_short (uri without scheme/authority when identical with progwww) * - $CFG->progwww_short (uri without scheme/authority when identical with www) * * All other configuration parameters are retrieved from the database. * * @global object $CFG */ global $CFG; /** this global object is associated with the logged in user * * @global object $USER */ global $USER; /* keep error messages to ourselves; don't leak information while not debugging */ error_reporting(E_NONE); if (!isset($CFG->debug)) { $CFG->debug = FALSE; } if ($CFG->debug) { error_reporting(E_ALL); } /** 'version.php' defines internal and external version numbers */ require_once $CFG->progdir . '/version.php'; /** 'utf8lib.php' contains essential routines for manipulating UTF-8 string */ require_once $CFG->progdir . '/lib/utf8lib.php'; /** the name of the script (entrypoint) that is currently running (see {@link wasentry_script_name()}) */ global $WAS_SCRIPT_NAME; $WAS_SCRIPT_NAME = wasentry_script_name(WASENTRY); /** This global object is used to access the database * * @global object $DB */ global $DB; /** Manufacture an object of the database class corresponding with '$CFG->db_type' */ include_once $CFG->progdir . '/lib/database/databaselib.php'; $DB = database_factory($CFG->prefix, $CFG->db_type); if ($DB === FALSE) { error_exit('020'); } if (!$DB->connect($CFG->db_server, $CFG->db_username, $CFG->db_password, $CFG->db_name)) { trigger_error($DB->errno . '/' . $DB->error); error_exit('030'); } /* Trying to get rid of the magic (see also magic_unquote()) asap, ie. before reading from database */ if (ini_get('magic_quotes_sybase') == 1) { error_exit('060'); } if (get_magic_quotes_runtime() == 1) { set_magic_quotes_runtime(0); } /** utility routines, including shortcuts for database manupulation */ require_once $CFG->progdir . '/lib/waslib.php'; /** utility routines for generating HTML-code */ require_once $CFG->progdir . '/lib/htmllib.php'; /** utility routines for generating HTML-dialogs */ require_once $CFG->progdir . '/lib/dialoglib.php'; /* retrieve all configuration settings from the database, including the internal database version */ $properties = get_properties(); if ($properties !== FALSE) { foreach ($properties as $name => $value) { if (!isset($CFG->{$name})) { $CFG->{$name} = $value; } } unset($name); unset($value); } else { $CFG->version = '?'; } unset($properties); // Maybe calculate a shortcut for 'www' and 'progwww' (needed in appropriate_legal_notices() called in error_exit()) list($CFG->www_short, $CFG->progwww_short) = calculate_uri_shortcuts($CFG->www, $CFG->progwww); /** this global array holds all valid and active languages * * @global object $LANGUAGE; */ global $LANGUAGE; /** Load the code for the global LANGUAGE object */ include_once $CFG->progdir . '/lib/language.class.php'; $LANGUAGE = new Language(); }
/** retrieve configuration parameters for this combination of theme and area * * * @param int $theme_id * @param int $area_id * @return bool|array FALSE on error, or an array with parameters * @uses get_properties() */ function get_properties($theme_id, $area_id) { $tablename = 'themes_areas_properties'; $where = array('theme_id' => $theme_id, 'area_id' => $area_id); return get_properties($tablename, $where); }