Location: PHPKode > projects > VampMan: V:tR Character Manager > vampman-1.0.2/phpnuke/modules/charactersheet/admin/index.php
<?php
if (!defined('ADMIN_FILE')) {
        die (_accessdenied);
}

$querystr = "SELECT radminsuper, admlanguage FROM "
.$prefix."_authors where aid='$aid'";
$result = sql_query($querystr, $dbi) or die (_notresource);
list($radminsuper) = sql_fetch_row($result, $dbi);
include ("header.php");
$path = __FILE__;
$path = str_replace("/admin/index.php","",$path);
$module_name = substr($path,strrpos($path,"/")+1);
get_lang($module_name);

require("$path/mainfunctions.php");
require("$path/includes/arrays.php");
GraphicAdmin();
Opentable();
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='charactersheet'"));
$admins = explode(",", $row['admins']);

$auth_user = 0;

for ($i=0; $i < sizeof($admins); $i++) {
        if ($aid == $admins[$i] AND $admins[$i] != '') {
                $auth_user = 1;
        }
}

if ($radminsuper==1 || $auth_user == 1) {


   switch($op) {
      case "":
      {
	         include ("charactersheet/main.php");
	         break;
      }
      case "charactersheet":
      {
       		include ("charactersheet/main.php");
       		break;
      }
      case "character_viewuser":
      {
        echo "<a href=\"admin.php?op=charactersheet\">"._returntoadmin."</a><br><br>";
       	include("charactersheet/viewuser.php");
      	break;
      }
      case "character_viewcharacter":
      {
        echo "<a href=\"admin.php?op=charactersheet\">"._returntoadmin."</a><br><br>";
	
      	if($submit == _preview)
	    	{include ("charactersheet/preview.php");}
	else if($submit == _submit)
	    	{include ("charactersheet/submit.php");}
	else
	    	{include ("charactersheet/viewcharacter.php");}
       	break;

      }
      case "character_deletecharacter":
      {
      	echo "<a href=\"admin.php?op=charactersheet\">"._returntoadmin."</a><br><br>";
		include ("charactersheet/deletecharacter.php");
		break;
      }
      case "character_xprequest":
      {
      	echo "<a href=\"admin.php?op=charactersheet\">"._returntoadmin."</a><br><br>";
      	include("charactersheet/xprequest.php");
		break;
      }     
	  case "character_xpspend":
      {
      	echo "<a href=\"admin.php?op=charactersheet\">"._returntoadmin."</a><br><br>";
      	include("charactersheet/xpspend.php");
		break;
      }
	  
   }
}
else {
   echo _accessdenied;
}

   closetable();
   include("footer.php");

?>
Return current item: VampMan: V:tR Character Manager