Beispiel #1
0
$ts = isset($_GET['ts']) ? $_GET['ts'] : '';
$rec = isset($_GET['rec']) ? intval($_GET['rec']) : '0';
$spellset = isset($_GET['spellset']) ? $_GET['spellset'] : '';
$playerid = isset($_GET['playerid']) ? $_GET['playerid'] : null;
$acctid = isset($_GET['acctid']) ? $_GET['acctid'] : null;
$guildid = isset($_GET['guildid']) ? $_GET['guildid'] : null;
$aaid = isset($_GET['aaid']) ? $_GET['aaid'] : null;
$searchbar = '';
$body = '';
$javascript = '';
$breadcrumbs = '';
$headbar = '';
require_once 'lib/headbars.php';
require_once 'lib/breadcrumbs.php';
if (isset($_GET['admin'])) {
    if (session::is_admin()) {
        require_once 'lib/admin.php';
    }
}
switch ($editor) {
    case '':
        $body = new Template("templates/intro.tmpl.php");
        $body->set('current_revision', $current_revision);
        break;
    case 'loot':
        require_once 'lib/loot.php';
        break;
    case 'npc':
        require_once 'lib/npc.php';
        break;
    case 'spawn':
Beispiel #2
0
function check_admin_authorization()
{
    global $tmpl;
    if (!session::is_admin()) {
        $body = "<center><br><br><br><br><br><h2>Sorry, only admins have access to this function.<br><br><a href=\"javascript:history.back();\">Go Back</a></h2>";
        $tmpl->set('body', $body);
        echo $tmpl->fetch('templates/index.tmpl.php');
        exit;
    }
}
Beispiel #3
0
function build_tabs()
{
    global $editor, $z, $zoneid, $npcid, $playerid, $acctid, $guildid;
    $tabstatus1 = "off";
    $tabstatus2 = "off";
    $tabstatus3 = "off";
    $tabstatus4 = "off";
    $tabstatus5 = "off";
    $tabstatus6 = "off";
    $tabstatus7 = "off";
    $tabstatus8 = "off";
    $tabstatus9 = "off";
    $tabstatus10 = "off";
    $tabstatus11 = "off";
    $tabstatus12 = "off";
    $tabstatus13 = "off";
    $tabstatus14 = "off";
    $tabstatus15 = "off";
    $tabstatus16 = "off";
    $tabstatus17 = "off";
    $tabstatus18 = "off";
    $tabstatus19 = "off";
    $tabstatus20 = "off";
    $tabstatus21 = "off";
    $tabstatus22 = "off";
    $tabstatus23 = "off";
    $zoneurl = "";
    $npcurl = "";
    if ($z) {
        $zoneurl = "&z={$z}&zoneid={$zoneid}";
    }
    if ($npcid) {
        $npcurl = "&npcid={$npcid}";
    }
    switch ($editor) {
        case '':
            break;
        case 'npc':
            $tabstatus1 = "on";
            break;
        case 'loot':
            $tabstatus2 = "on";
            break;
        case 'spawn':
            $tabstatus3 = "on";
            break;
        case 'merchant':
            $tabstatus4 = "on";
            break;
        case 'spellset':
            $tabstatus5 = "on";
            break;
        case 'spells':
            $tabstatus5 = "on";
            break;
        case 'spellops':
            $tabstatus5 = "on";
            break;
        case 'faction':
            $tabstatus6 = "on";
            break;
        case 'tradeskill':
            $tabstatus7 = "on";
            break;
        case 'zone':
            $tabstatus8 = "on";
            break;
        case 'misc':
            $tabstatus9 = "on";
            break;
        case 'server':
            $tabstatus10 = "on";
            break;
        case 'adventures':
            $tabstatus11 = "on";
            break;
        case 'tasks':
            $tabstatus12 = "on";
            break;
        case 'items':
            $tabstatus13 = "on";
            break;
        case 'player':
            $tabstatus14 = "on";
            break;
        case 'account':
            $tabstatus15 = "on";
            break;
        case 'guild':
            $tabstatus16 = "on";
            break;
        case 'mail':
            $tabstatus17 = "on";
            break;
        case 'aa':
            $tabstatus18 = "on";
            break;
        case 'qglobal':
            $tabstatus19 = "on";
            break;
        case 'util':
            $tabstatus20 = "on";
            break;
        case 'altcur':
            $tabstatus21 = "on";
            break;
        case 'inv':
            $tabstatus22 = "on";
            break;
        case 'keys':
            $tabstatus23 = "on";
            break;
    }
    $admin = '';
    if (session::is_admin()) {
        $admin = "<a href=\"index.php?admin\">Admin</a> | ";
    }
    ob_start();
    echo "      <div id=\"menubar\">\n        <div class=\"{$tabstatus1}\"><a href=\"index.php?editor=npc{$zoneurl}{$npcurl}\">NPCs</a></div>\n        <div class=\"{$tabstatus2}\"><a href=\"index.php?editor=loot{$zoneurl}{$npcurl}\">Loot</a></div>\n        <div class=\"{$tabstatus3}\"><a href=\"index.php?editor=spawn{$zoneurl}{$npcurl}\">Spawns</a></div>\n        <div class=\"{$tabstatus4}\"><a href=\"index.php?editor=merchant{$zoneurl}{$npcurl}\">Merchants</a></div>\n        <div class=\"{$tabstatus5}\"><a href=\"index.php?editor=spellops{$zoneurl}{$npcurl}\">Spells</a></div>\n        <div class=\"{$tabstatus6}\"><a href=\"index.php?editor=faction\">Factions</a></div>\n        <div class=\"{$tabstatus7}\"><a href=\"index.php?editor=tradeskill\">Tradeskills</a></div>\n        <div class=\"{$tabstatus8}\"><a href=\"index.php?editor=zone{$zoneurl}\">Zones</a></div>\n        <div class=\"{$tabstatus9}\"><a href=\"index.php?editor=misc{$zoneurl}\">Misc</a></div>\n        <div class=\"{$tabstatus10}\"><a href=\"index.php?editor=server\">Server</a></div>\n        <div class=\"{$tabstatus11}\"><a href=\"index.php?editor=adventures{$zoneurl}{$npcurl}\">Adventures</a></div><br/><br/>\n        <div class=\"{$tabstatus12}\"><a href=\"index.php?editor=tasks\">Tasks</a></div>\n        <div class=\"{$tabstatus13}\"><a href=\"index.php?editor=items\">Items</a></div>\n        <div class=\"{$tabstatus14}\"><a href=\"index.php?editor=player\">Players</a></div>\n        <div class=\"{$tabstatus15}\"><a href=\"index.php?editor=account\">Accounts</a></div>\n        <div class=\"{$tabstatus16}\"><a href=\"index.php?editor=guild\">Guilds</a></div>\n        <div class=\"{$tabstatus17}\"><a href=\"index.php?editor=mail\">Mail</a></div>\n        <div class=\"{$tabstatus18}\"><a href=\"index.php?editor=aa\">AAs</a></div>\n        <div class=\"{$tabstatus19}\"><a href=\"index.php?editor=qglobal\">QGlobals</a></div>\n        <div class=\"{$tabstatus20}\"><a href=\"index.php?editor=util\">Utilities</a></div>\n        <div class=\"{$tabstatus21}\"><a href=\"index.php?editor=altcur\">Alt Curr</a></div>\n        <div class=\"{$tabstatus22}\"><a href=\"index.php?editor=inv\">Inventory</a></div>\n        <div class=\"{$tabstatus23}\"><a href=\"index.php?editor=keys\">Keys</a></div><br/>\n        <div style=\"float: right;\">{$admin}<a href=\"index.php?logout\">Logout</a></div><br/><br/>\n      </div>\n";
    $headbar = ob_get_contents();
    ob_end_clean();
    return $headbar;
}