Example #1
0
File: navi.php Project: nopuls/dzcp
function navi($kat)
{
    global $db, $chkMe, $userid, $designpath;
    if ($k = _fetch(db("SELECT `level` FROM " . $db['navi_kats'] . " WHERE `placeholder` = '" . up($kat) . "'"))) {
        $intern = $chkMe >= 2 ? '' : " AND s1.`internal` = '0'";
        $permissions = $kat == 'nav_admin' && admin_perms($userid) ? "" : $intern . " AND " . intval($chkMe) . " >= '" . intval($k['level']) . "'";
        $qry = db("SELECT s1.* FROM " . $db['navi'] . " AS s1 LEFT JOIN " . $db['navi_kats'] . " AS s2 ON s1.kat = s2.placeholder\n                 WHERE s1.kat = '" . up($kat) . "' AND s1.`shown` = '1' " . $permissions . "\n                 ORDER BY s1.pos");
        while ($get = _fetch($qry)) {
            if ($get['type'] == 0) {
                $link = '';
            } elseif ($get['type'] == 1 || $get['type'] == 2 || $get['type'] == 3) {
                $name = $get['wichtig'] == 1 ? '<span class="fontWichtig">' . navi_name(re($get['name'])) . '</span>' : navi_name(re($get['name']));
                $target = $get['target'] == 1 ? '_blank' : '_self';
                if (file_exists($designpath . '/menu/' . $get['kat'] . '.html')) {
                    $link = show("menu/" . $get['kat'] . "", array("target" => $target, "href" => re($get['url']), "title" => strip_tags($name), "css" => ucfirst(str_replace('nav_', '', re($get['kat']))), "link" => $name));
                } else {
                    $link = show("menu/nav_link", array("target" => $target, "href" => re($get['url']), "title" => strip_tags($name), "css" => ucfirst(str_replace('nav_', '', re($get['kat']))), "link" => $name));
                }
                $table = strstr($link, '<tr>') ? true : false;
            }
            $navi .= $link;
        }
    }
    return empty($navi) ? '' : ($table ? '<table class="navContent" cellspacing="0">' . $navi . '</table>' : $navi);
}
Example #2
0
<?php

session_start();
## OUTPUT BUFFER START ##
include "../../buffer.php";
## INCLUDES ##
include basePath . "/inc/config.php";
include basePath . "/inc/bbcode.php";
## FILEMANAGER ##
if (!admin_perms($userid)) {
    echo '<b>Wrong permissions!</b>';
} else {
    ?>
<!--
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * "Support Open Source software. What about a donation today?"
 * 
 * File Name: browser.php
 * 	This page compose the File Browser dialog frameset.
 * 
 * File Authors:
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
Example #3
0
<?php

## OUTPUT BUFFER START ##
include "../inc/buffer.php";
## INCLUDES ##
include basePath . "/inc/config.php";
include basePath . "/inc/bbcode.php";
## SETTINGS ##
$time_start = generatetime();
lang($language);
$where = _site_config;
$dir = "admin";
## SECTIONS ##
$check = db("SELECT s1.user FROM " . $db['permissions'] . " s1, " . $db['users'] . " s2\n               WHERE s1.user = '******'\n               AND s2.id = '" . intval($userid) . "'\n               AND s2.pwd = '" . $_SESSION['pwd'] . "'");
if (!admin_perms($_SESSION['id'])) {
    $index = error(_error_wrong_permissions, 1);
} else {
    define('_adminMenu', true);
    if (file_exists(basePath . '/admin/menu/' . strtolower($_GET['admin']) . '.php')) {
        include basePath . '/admin/menu/' . strtolower($_GET['admin']) . '.php';
    }
    //Site Permissions
    $qry = db("SELECT * FROM " . $db['permissions'] . "\n               WHERE user = '******'");
    $check = _fetch($qry);
    define('_holder', "['[link]','?admin=[name]','background-image:url(menu/[name].gif);'],\n");
    unset($amenu);
    $files = get_files(basePath . '/admin/menu/');
    foreach ($files as $file) {
        if (strstr(strtolower($file), '.php')) {
            $nav = file(basePath . '/admin/menu/' . $file);
            $navType = trim(str_replace('// Typ:', '', $nav[2]));