Exemplo n.º 1
0
 /**
  * Gibt die Namen aller typen zurück
  * Dazu wird bei allen Typen getName() (definiert in AbstractProfileField)
  * aufgerufen.
  *
  * Rückgabe ist ein array ( $func => $name)
  *
  * KONVENTION: Die Dateien heißen profilefield_type_[0-9]+.php
  */
 public static function getAllTypes()
 {
     // wir benötigen auf jeden fall den AbstractProfileFieldType
     require_once "include/includes/class/profilefield_types/AbstractProfileFieldType.php";
     $files = read_ext("include/includes/class/profilefield_types", "php", 0, 0);
     $types = array();
     foreach ($files as $file) {
         if (preg_match("/^.*profilefield_type_[0-9]+.*\$/", $file)) {
             $parts = explode("_", $file);
             $func = array_pop($parts);
             self::_loadClass($func);
             $types[$func] = self::$profilefield_classes[$func]->getName();
         }
     }
     return $types;
 }
Exemplo n.º 2
0
 protected function load_addons($addons = '')
 {
     $buffer = '';
     if (!is_array($addons)) {
         $addons = array($addons);
     }
     // Ordner nach dynamischen Dateien durchsuchen
     $js = read_ext('include/includes/js/global', 'js');
     $css = read_ext('include/includes/css/global', 'css');
     // Dynamisches CSS laden (css vor js laden!)
     foreach ($css as $file) {
         $buffer .= "\n" . '<link rel="stylesheet" type="text/css" href="include/includes/css/global/' . $file . '" />';
     }
     // Dynamisches Javascript laden
     // sort jquery Top -- should be removed later by Olox
     usort($js, array($this, "getJqueryThingy"));
     foreach ($js as $file) {
         $buffer .= "\n" . '<script type="text/javascript" src="include/includes/js/global/' . $file . '"></script>';
     }
     // Alle statischen Inhalte pruefen
     foreach ($addons as $addon) {
         $dir = explode('.', $addon);
         $dir = end($dir);
         if (file_exists('include/includes/' . $dir . '/' . $addon)) {
             if ($dir == 'js') {
                 $buffer .= "\n" . '<script type="text/javascript" src="include/includes/' . $dir . '/' . $addon . '"></script>';
             } else {
                 if ($dir == 'css') {
                     $buffer .= "\n" . '<link rel="stylesheet" type="text/css" href="include/includes/' . $dir . '/' . $addon . '" />';
                 }
             }
         } else {
             $buffer = "\n" . '<script language="javascript">' . "\nalert('Couldn\\'t find the file \"include/includes/" . $dir . "/" . $addon . "\"!');" . "\n</script>";
         }
     }
     return $buffer;
 }
Exemplo n.º 3
0
<?php

/**
 * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL)
 * @copyright (C) 2000-2010 ilch.de
 * @version $Id$
 */
defined('main') or die('no direct access');
defined('admin') or die('only admin access');
$design = new design('Ilch Admin-Control-Panel :: Eigene Box/Page', '', 2);
// func einbinden
$funcs = read_ext('include/admin/inc/selfbp', 'php');
foreach ($funcs as $file) {
    require_once 'include/admin/inc/selfbp/' . $file;
}
switch ($menu->get(1)) {
    case 'imagebrowser':
        $file = 'imagebrowser.php';
        break;
    case 'overview':
        $file = 'overview.php';
        break;
    default:
        $file = 'selfbp.php';
        break;
}
require_once "include/admin/inc/selfbp/pages/" . $file;
// check ob selfp und selfbp beschreibbar sind
$f = false;
if (!is_writable('./include/contents/selfbp/selfp')) {
    $f = true;
Exemplo n.º 4
0
// 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();
Exemplo n.º 5
0
<?php

// update-datei für das sql. Siehe Entwicklerdokumentation
$files = read_ext("update/revision", "php", 0, 0);
// updatefiles bestimmen
$updateFiles = array();
$versions = array();
foreach ($files as $file) {
    if (preg_match("/^revision_[0-9]+/", $file)) {
        $updateFiles[] = $file;
        $parts = explode("_", $file);
        $versions[$file] = $parts[1];
    }
}
// sortieren nach versionen
asort($versions);
if (!isset($allgAr["revision"])) {
    $currentversion = 0;
} else {
    $currentversion = $allgAr["revision"];
}
$update_messages = array();
foreach ($versions as $key => $version) {
    if ($currentversion < $version) {
        if (file_exists('update/revision/' . $key . '.php')) {
            // dann müssen wir ein update machen
            include_once 'update/revision/' . $key . '.php';
            $currentversion = $version;
            // aktuelle version setzen
            db_query(sprintf("UPDATE `prefix_config` SET `wert` =  '%d' WHERE `schl` = 'revision';", $currentversion));
        }
Exemplo n.º 6
0
/**
 * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL)
 * @copyright (C) 2000-2010 ilch.de
 * @version $Id$
 */
defined('main') or die('no direct access');
defined('admin') or die('only admin access');
$design = new design('Ilch Admin-Control-Panel :: Konfiguration', '', 2);
$design->header();
if (!is_admin()) {
    echo 'Dieser Bereich ist nicht f&uuml;r dich...';
    $design->footer();
    exit;
}
// Load needed functions
$funcs = read_ext('include/admin/inc/allg', 'php');
foreach ($funcs as $file) {
    require_once 'include/admin/inc/allg/' . $file;
}
if (empty($_POST['submit'])) {
    // Template laden
    $tpl = new tpl('allg', 1);
    // Template-Header ausgeben
    $tpl->out(0);
    // Kategorien-ID und NAME
    $katid = 0;
    $katname = '';
    // Abfrage für Menü und admin/allg.php starten
    $abf = 'SELECT * FROM `prefix_config` WHERE hide = 0 ORDER BY `kat`,`pos`,`typ` ASC';
    $erg = db_query($abf);
    while ($row = db_fetch_assoc($erg)) {