当前位置: 首页>>代码示例>>PHP>>正文


PHP design::addheader方法代码示例

本文整理汇总了PHP中design::addheader方法的典型用法代码示例。如果您正苦于以下问题:PHP design::addheader方法的具体用法?PHP design::addheader怎么用?PHP design::addheader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在design的用法示例。


在下文中一共展示了design::addheader方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: die

<?php

defined('main') or die('no direct access');
$fid = intval($menu->get(3));
$uid = $_SESSION['authid'];
switch ($menu->get(2)) {
    default:
        $abf = 'SELECT * FROM prefix_user WHERE id = ' . $uid;
        $erg = db_query($abf);
        $row = db_fetch_assoc($erg);
        $title = $allgAr['title'] . ' :: Users :: Details von ' . $row['name'];
        $hmenu = $extented_forum_menu . '<a class="smalfont" href="?user">Users</a><b> &raquo; </b> Details von ' . $row['name'] . $extented_forum_menu_sufix;
        $design = new design($title, $hmenu, 1);
        $design->addheader('<link rel="stylesheet" type="text/css" href="include/includes/css/uprofil/uprofil.css">');
        $design->addheader('<script type="text/javascript" src="include/includes/js/uprofil.js"></script>');
        $design->addheader('<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>');
        $design->addheader('<script type="text/javascript" src="include/includes/js/jquery.textareaAutoResize.js"></script>');
        $design->addheader('<script type="text/javascript" src="include/includes/js/bbcode.js"></script>');
        $design->header();
        if (loggedin() and $menu->get(2) == $_SESSION['authid']) {
            //Header
            include __DIR__ . DIRECTORY_SEPARATOR . '../header.php';
            $tpl = new tpl('uprofil/fcheck.htm');
            $FAnzahl = db_count_query('SELECT count(id) FROM prefix_friendscheck WHERE fid = ' . $uid);
            $BAnzahl = db_count_query('SELECT count(id) FROM prefix_userblock WHERE uid = ' . $uid);
            $abfF = 'SELECT u.*, f.* FROM prefix_friendscheck f LEFT JOIN prefix_user u ON u.id = f.uid WHERE f.fid = ' . $uid . ' ORDER BY f.id ASC';
            $ergF = db_query($abfF);
            $abfBlock = 'SELECT u.*, f.* FROM prefix_userblock f LEFT JOIN prefix_user u ON u.id = f.bid WHERE f.uid = ' . $uid . ' ORDER BY f.id ASC';
            $ergBlock = db_query($abfBlock);
            $tpl->out(0);
            if ($FAnzahl > 0) {
开发者ID:kveldscholten,项目名称:uProfile,代码行数:31,代码来源:fcheck.php

示例2: news_find_kat

<?php

#   Copyright by: Manuel
#   Support: www.ilch.de
defined('main') or die('no direct access');
$title = $allgAr['title'] . ' :: News';
$hmenu = 'News';
$design = new design($title, $hmenu);
$design->addheader('<link rel="alternate" type="application/atom+xml" title="News (Atom)" href="index.php?news-atom" />
<link rel="alternate" type="application/rss+xml" title="News (RSS)" href="index.php?news-rss" />');
function news_find_kat($kat)
{
    $katpfad = 'include/images/news/';
    $katjpg = $katpfad . $kat . '.jpg';
    $katgif = $katpfad . $kat . '.gif';
    $katpng = $katpfad . $kat . '.png';
    if (file_exists($katjpg)) {
        $pfadzumBild = $katjpg;
    } elseif (file_exists($katgif)) {
        $pfadzumBild = $katgif;
    } elseif (file_exists($katpng)) {
        $pfadzumBild = $katpng;
    }
    if (!empty($pfadzumBild)) {
        $kategorie = '<img style="" src="' . $pfadzumBild . '" alt="' . $kat . '">';
    } else {
        $kategorie = '<b>' . $kat . '</b><br /><br />';
    }
    return $kategorie;
}
if (!is_numeric($menu->get(1))) {
开发者ID:kveldscholten,项目名称:Ilch-1.1,代码行数:31,代码来源:news.php

示例3: user_has_admin_right

function user_has_admin_right(&$menu, $sl = true)
{
    if ($_SESSION['authright'] <= -8) {
        // co leader...
        return true;
    } else {
        $uri_to_check1 = $menu->get(0);
        $uri_to_check2 = $menu->get(1);
        if (count($_SESSION['authmod']) < 1 or !loggedin()) {
            if ($sl === true) {
                if (!loggedin()) {
                    $design = new design('', '', 0);
                    $menu->set_url(0, 'user');
                    load_modul_lang();
                    $tpl = new tpl('user/login.htm');
                    $design->addheader($tpl->get(0));
                    $design->header();
                    $tpl->set_out('WDLINK', 'admin.php', 1);
                    $design->footer();
                } else {
                    echo '<strong>Keine Berechtigung!</strong> <a href="index.php">Startseite</a>';
                }
            }
            return false;
        } elseif (isset($_SESSION['authmod'][$uri_to_check1]) and $_SESSION['authmod'][$uri_to_check1] == true or isset($_SESSION['authmod'][$uri_to_check1 . '-' . $uri_to_check2]) and $_SESSION['authmod'][$uri_to_check1 . '-' . $uri_to_check2] == true) {
            return true;
        } elseif (count($_SESSION['authmod']) > 0 and loggedin()) {
            if ($sl === true) {
                foreach ($_SESSION['authmod'] as $k => $v) {
                    $x = $k;
                    break;
                }
                $x = explode('-', $x);
                $menu->set_url(0, $x[0]);
                if (isset($x[1])) {
                    $menu->set_url(1, $x[1]);
                }
            }
            return true;
        }
    }
    return false;
}
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:43,代码来源:user.php

示例4: die

<?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');
$title = $allgAr['title'] . ' :: ' . $lang['login'];
$hmenu = $extented_forum_menu . $lang['login'] . $extented_forum_menu_sufix;
$tpl = new tpl('user/login.htm');
if (loggedin()) {
    $design = new design($title, $hmenu, 0);
    $design->header();
    if (isset($_POST['wdlink'])) {
        $wd = $_POST['wdlink'];
    } else {
        $wd = 'index.php?' . $allgAr['smodul'];
    }
    wd($wd, $lang['yourareloged']);
    $design->footer();
} else {
    $design = new design($title, $hmenu);
    $design->addheader($tpl->get(0));
    $design->header();
    $tpl = new tpl('user/login.htm');
    $tpl->set_out('WDLINK', 'index.php?' . $allgAr['smodul'], 1);
    $design->footer();
}
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:29,代码来源:login.php

示例5: die

<?php

/*
Script       => ShBox 4.1
Ilch Version => 1.1Q
Entwickler   => NachtWolf / B.Masmann
Date         => 30.11.15
Seite/Sup.   => http://www.ilch.de
                http://www.nf-projekt.de
Kontakt      => Masmann82@gmx.de
*/
defined('main') or die('no direct access');
defined('admin') or die('only admin access');
$design = new design('Admins Area', 'Admins Area', 2);
$design->addheader('<link rel="stylesheet" type="text/css" href="include/images/shbox4/shbox4.css" />
                    <script type="text/javascript" charset="utf-8" src="include/includes/js/shbox4.js" /></script>
                    <script type="text/javascript" src="include/includes/js/jscolor.js" /></script>');
$design->header();
include 'include/includes/class/shbox4class.php';
$var = new ShBox4();
$tpl = new tpl('shbox4admin', 1);
if ($var->shconfig('farbe') == '1') {
    $ar = array('VERSION' => $var->version, 'FARBE' => '<a href="?shbox4admin-farben" class="btn btn-primary">Farben</a>');
    $tpl->set_ar_out($ar, 0);
} else {
    $ar = array('VERSION' => $var->version, 'FARBE' => '');
    $tpl->set_ar_out($ar, 0);
}
if (escape($menu->get(1), 'string') == 'update') {
    $var1 = escape($menu->get(2), 'string');
    $var2 = escape($_POST['id'], 'string');
开发者ID:NachtWolf82,项目名称:ShBox,代码行数:31,代码来源:shbox4admin.php

示例6: get_url

    public function get_url($w = '')
    {
        global $allgAr;
        if ($w != '') {
            $this->type = $w;
        }
        // startwert und pfad zum pruefen raustuefteln.
        if ($this->type == 'contents') {
            $pfad = 'include/contents';
            $smod = $allgAr['smodul'];
        } elseif ($this->type == 'box') {
            $file = 'include/boxes/' . $this->get(0) . '.php';
            return (file_exists($file) and $this->check_rights()) ? $file : false;
        } else {
            $pfad = 'include/admin';
            $smod = 'admin';
        }
        // wennes also leer is wird das startmodul genommen
        if (empty($this->menu_ar[0])) {
            $this->set_url(0, $smod);
        }
        // diverse sachen geprueft zum zurueck geben,
        // is halt so dings wegen selfpages usw...
        if (!file_exists($pfad . '/' . $this->get(0) . '.php') and file_exists($pfad . '/selfbp/selfp/' . $this->get(0) . '.php')) {
            $this->set_url(1, $this->get(0));
            $this->set_url(0, 'self');
        } elseif (!file_exists($pfad . '/' . $this->get(0) . '.php')) {
            if (substr($smod, 0, 5) == 'self-') {
                $this->set_url(1, substr($smod, 5));
                $this->set_url(0, 'self');
            } elseif (file_exists($pfad . '/selfbp/selfp/' . $smod . '.php')) {
                $this->set_url(1, $smod);
                $this->set_url(0, 'self');
            } else {
                $this->set_url(0, $smod);
            }
        }
        // pruefen ob der client die noetigen rechte hat
        // das modul zu sehen.. bzw. den menupunkt zu sehen
        $exit = !$this->check_rights();
        // das usermodul kann aus eigener sicherheit nicht
        // gesperrt werden, sonst koennen sich member
        // usw. nicht mehr einloggen, bzw. es kann
        // sich sonst keiner registrieren. deshalb is das
        // user modul immer frei geschaltet
        $alwaysallowed = array('regist', 'login', '1', '2', 'confirm', 'remind', '13', '3', 'logout');
        if ($exit === true and $this->get(0) == 'user' and in_array($this->get(1), $alwaysallowed)) {
            $exit = false;
            debug('o');
        }
        if ($exit) {
            $title = $allgAr['title'] . ' :: Keine Berechtigung';
            $hmenu = 'Keine Berechtigung';
            $design = new design($title, $hmenu);
            if (loggedin()) {
                $design->header();
                if (is_coadmin()) {
                    echo 'Entweder diese Seite ist nicht in der Navigation verlinkt und die Option
<strong>Zugriff auf nicht im Menü verlinkte Module für alle?</strong> steht auf <strong>nein</strong> oder aber du hast kein Recht sie zu betrachten, deswegen kommt diese Meldung.<br />
Also entweder die Seite <strong>' . $this->get(0) . '</strong> in der <a href="admin.php?menu">Navigation</a> verlinken, oder die Option umstellen, ersteres wird empfohlen.';
                } else {
                    echo 'Du hast leider nicht die n&ouml;tigen Rechte, um diese Seite zu betrachten.';
                }
            } else {
                $tpl = new tpl('user/login');
                $design->addheader($tpl->get(0));
                $design->header();
                $tpl->set_out('WDLINK', 'index.php', 1);
            }
            $design->footer();
            exit;
        }
        return $this->get(0) . '.php';
    }
开发者ID:rjdesign,项目名称:Ilch-1.2,代码行数:74,代码来源:menu.php


注:本文中的design::addheader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。