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


PHP access::need方法代码示例

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


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

示例1: array

<?php

require "../../base.php";
global $_base;
$_base->page->theme_file = "doc";
access::need("mod");
$_base->page->add_title("Apache status");
echo '
<h1>Apache status</h1>
<p>
	Velg sorteringsrekkefølge:
</p>';
$orders = array("last" => array("Siste visning &raquo;", "Sorterer etter siste visning"), "count" => array("Antall rader oppført &raquo;", "Sorterer etter antall rader oppført"));
foreach ($orders as $order => $info) {
    echo '
<p>
	<a href="?order=' . urlencode($order) . '">' . $info[0] . '</a>
</p>';
}
if (isset($_GET['order']) && array_key_exists($_GET['order'], $orders)) {
    $order = $_GET['order'];
    $_base->page->add_message($orders[$order][1]);
} else {
    if (isset($_GET['order'])) {
        $_base->page->add_message("Ugyldig sorteringsnavn.", "error");
    }
    $_base->page->load();
}
$request = new httpreq();
$data = $request->get("/httpd-status-server", array());
if (!$data) {
开发者ID:Kuzat,项目名称:kofradia,代码行数:31,代码来源:index.php

示例2: empty

<?php

require "../base.php";
global $_base;
// krev admin tilgang
access::need("admin");
$_base->page->add_title("Registrer donasjonsoppføring");
// har vi brukerid?
if (isset($_POST['up_id'])) {
    $up_id = empty($_POST['up_id']) ? false : intval($_POST['up_id']);
    $player = false;
    if ($up_id) {
        // kontroller at brukeren finnes
        $result = \Kofradia\DB::get()->query("SELECT up_id, up_name, u_email, up_access_level FROM users_players, users WHERE up_id = {$up_id} AND up_u_id = u_id");
        if ($result->rowCount() == 0) {
            $_base->page->add_error("Fant ikke brukeren.");
            redirect::handle();
        }
        $player = $result->fetch();
    }
    // registrere donasjon?
    if (isset($_POST['time']) && isset($_POST['amount']) && !isset($_POST['edit'])) {
        // kontroller dato
        $date = check_date($_POST['time']);
        // d.m.y H:i:s
        if ($date) {
            $time = $_base->date->get();
            $time->setDate($date[3], $date[2], $date[1]);
            $time->setTime($date[4], $date[5], $date[6]);
        }
        // kontroller beløp
开发者ID:Kuzat,项目名称:kofradia,代码行数:31,代码来源:registrer_donasjon.php

示例3: isset

<?php

require "../base.php";
access::need("crewet");
$global = isset($_POST['noglobal']) ? "" : " GLOBAL";
$result = \Kofradia\DB::get()->query("SHOW{$global} STATUS");
$result->debug();
//$avg = $variables['Questions'] / $variables['Uptime'];
开发者ID:Kuzat,项目名称:kofradia,代码行数:8,代码来源:mysql_status.php

示例4: error_reporting

<?php

require "../../base.php";
error_reporting(E_ALL & ~E_NOTICE);
global $_game;
// anti-bot
#$antibot_name = "poker";
#$antibot_span = 30;
#$antibot_return = PHP_SELF;
#antibot::require_antibot($antibot_name, $antibot_span, $antibot_return);
ess::$b->page->add_title("Moderator poker");
access::need_nostat();
access::need("forum_mod");
// legg til css
ess::$b->page->add_css("#poker_info { margin: 10px auto 0 auto }\n.kort_wrapper { width: 257px; margin: 0 auto 0 auto; padding: 4px 0 }\n#kort_wrapper { width: 260px; margin: 0 auto 0 auto; padding-bottom: 10px }\n.kort_wrapper .kort, .kort_i {\n\tfont-family: Arial, Verdana, Tahoma;\n\twidth: 45px;\n\ttext-align: center;\n\tborder: 1px solid #000;\n\tbackground: #FFFFFF;\n\theight: 85px;\n\tfont-size: 30px;\n\tpadding: 0 0 5px 0;\n\tmargin: 0 2px 0 2px;\n\tline-height: 50px;\n\tfloat: left;\n}\n.kort_wrapper .kort {\n\tbackground: #488C9F;\n\tcursor: pointer;\n}\n.kg_0, .kg_1 { color: #000000 }\n.kg_2, .kg_3 { color: #FF0000 }\n.kort_submit { clear: left; text-align: center; margin-top: 0 }");
echo '
<h1>Poker</h1>
<p align="center">
	15. april 2007: Da kan moderatorene og nostat ha det morsomt med den gamle pokerversjonen!
</p>
<!--<p>
	<b style="color: #FF0000">Oppdatering 4. mars:</b> Nå er det gjort litt endringer på gevinstene og man vinner kun på 1 par dersom man har 9, 10, J, Q, K eller A. Maksimumsgrensen er også fjernet.
</p>-->';
// 5-korts draw
// innstillinger
$farger = array(array("Kløver", '<img src="' . STATIC_LINK . '/other/poker_clubs.gif" alt="Kløver" />'), array("Spar", '<img src="' . STATIC_LINK . '/other/poker_spades.gif" alt="Spar" />'), array("Hjerter", '<img src="' . STATIC_LINK . '/other/poker_hearts.gif" alt="Hjerter" />'), array("Ruter", '<img src="' . STATIC_LINK . '/other/poker_diams.gif" alt="Ruter" />'));
$tegn = array(1 => 2, 3, 4, 5, 6, 7, 8, 9, 10, "J", "Q", "K", "A");
$gevinster = array(array(9, "royal straight flush", 100), array(8, "straight flush", 12), array(7, "fire like", 4), array(6, "hus", 3), array(5, "flush", 2.4), array(4, "straight", 2.2), array(3, "tre like", 1.9), array(2, "to par", 1.6), array(1, "ett par", 1.2), array(0, "ingenting", 0.2));
$kortstokk = array(1 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52);
// oppføring fra databasen?
$result = \Kofradia\DB::get()->query("SELECT id, upoker_up_id, cards, time, cash, finished FROM users_poker WHERE upoker_up_id = " . login::$user->player->id);
开发者ID:Kuzat,项目名称:kofradia,代码行数:31,代码来源:poker.php

示例5: define

<?php

define("ALLOW_GUEST", true);
require "../base.php";
putlog("NOTICE", "%c4%b%u{$_SERVER['REMOTE_ADDR']}%u%b viste {$_SERVER['REQUEST_URI']}");
access::need("sadmin");
$data = array();
foreach ($GLOBALS as $key => $value) {
    if ($key == "GLOBALS" || $key == "data" || $key == "key" || $key == "value") {
        continue;
    }
    $data[$key] = $value;
}
ob_start();
var_dump($data);
$data = ob_get_contents();
ob_clean();
echo 'GLOBALS:
<pre>' . htmlspecialchars($data) . '</pre>';
开发者ID:Kuzat,项目名称:kofradia,代码行数:19,代码来源:debuginfo.php

示例6: action_panel

    /** Vis panelet */
    public static function action_panel()
    {
        access::need("crewet");
        ess::$b->page->add_title("Panelet");
        echo '
<h1>Support panelet</h1>
<p class="h_right"><a href="./">Tilbake</a></p>';
        // vis kategori
        self::show_panel_category();
        // vis oversikt over kategoriene
        self::show_main_panel_info();
    }
开发者ID:Kuzat,项目名称:kofradia,代码行数:13,代码来源:class.support.php


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