View Source: /source/superuser.php

Click here for the source, OR
Other files that you may wish to view the source of:

Source of: /source/superuser.php

<?
require_once "common.php";
addnav("Return to the mundane","village.php");
if (
$session[user][superuser]<2) {
    
page_header("INFIDEL!");
    
output("For attempting to defile the gods, you have been smitten down!");
    
addnews("`&".$session[user][name]." was smote down for attempting to defile the gods (they tried to hack superuser pages).");
    
$session[user][hitpoints]=0;
    
$session[user][alive]=0;
    
addnav("Daily News","news.php");
    
page_footer();
    exit();
}
if (
$_GET[op]=="newsdelete"){
    
$sql "DELETE FROM news WHERE newsid='$_GET[newsid]'";
    
db_query($sql);
    
$return $_GET['return'];
    
$return preg_replace("'[?&]c=[[:digit:]]*'","",$return);
    
$return substr($return,strrpos($return,"/")+1);
    
redirect($return);
}
if (
$_GET[op]=="commentdelete"){
    
$sql "DELETE FROM commentary WHERE commentid='$_GET[commentid]'";
    
db_query($sql);
    
$return $_GET['return'];
    
$return preg_replace("'[?&]c=[[:digit:]]*'","",$return);
    
$return substr($return,strrpos($return,"/")+1);
    if (
strpos($return,"?")===false && strpos($return,"&")!==false){
        
$x strpos($return,"&");
        
$return substr($return,0,$x-1)."?".substr($return,$x+1);
    }
    
redirect($return);
}

page_header("Superuser Grotto");
if (
$_GET[op]=="checkcommentary"){
    
addnav("Return to the grotto","superuser.php");
    
commentary("' or '1'='1","X",100);
}else{
    if (
$session[user][sex]){
        
output("`^You duck in to a secret cave that few know about.  Inside you are greeted ");
        
output("by the sight of numerous muscular bare-chested men who wave palm fronds at you ");
        
output("and offer to feed you grapes as you lounge on Greko-Roman couches draped with ");
        
output("silk.`n`n");
    }else{
        
output("`^You duck in to a secret cave that few know about.  Inside you are greeted ");
        
output("by the sight of numerous scantily clad buxom women who wave palm fronds at you ");
        
output("and offer to feed you grapes as you lounge on Greko-Roman couches draped with ");
        
output("silk.`n`n");
    }
    
commentary("superuser","Engage in idle conversation with other gods:",25);
    
addnav("Creature Editor","creatures.php");
    
addnav("Taunt Editor","taunt.php");
    if (
$session[user][superuser]>=3){
        
addnav("User Editor","user.php");
        
addnav("Recent Commentary","superuser.php?op=checkcommentary");
        
addnav("Game Settings","configuration.php");
        
addnav("Donator Page","donators.php");
    }
    
addnav("Petition Viewer","viewpetition.php");
    
addnav("Weapon Editor","weaponeditor.php");
    
addnav("Armor Editor","armoreditor.php");
    
addnav("Referers","referers.php");
    
addnav("Stats","stats.php");
}
page_footer();
?>