Location: PHPKode > projects > VampMan: V:tR Character Manager > vampman-1.0.2/phpnuke/modules/charactersheet/index.php
<?php
if (!eregi("modules.php", $PHP_SELF)){
  die ("You can't access this rows directly...");
}
$index = 1;
$registered_only = 1;
require_once("mainfile.php");
include("header.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
require("modules/$module_name/mainfunctions.php");
include("modules/$module_name/includes/arrays.php");
opentable();
global $user;
cookiedecode($user);
$userid = $cookie[0];
$username = $cookie[1];
$addsomething=0;


if(!$userid && $registered_only)
{
	echo _registeredonly;
}
elseif($submit == _preview){
include("preview.php");
}
elseif($submit == _submit)
{
	include("submit.php");
}

elseif($submit == _edit || $mode == "add" || $addsomething || $submit == _remove)
{
include("form.php");
}

else
{


foreach($extra as $key => $values)
{
	if(isset(${$values['name']."num"}))
		$isextra = 1;
	if($submit == "Add ".ucfirst($values['name']))
	$addsomething=1;
}

if($isextra || $addsomething)
{
	include("form.php");

}

elseif($submit == _editdetails)
{
	include("detailssubmit.php");
}

elseif($mode == "editdetails")
{

include("details.php");

}

elseif($mode == "view")
{
include("view.php");
}

elseif($mode == "requestxp")
{
include("xprequest.php");
}

elseif($mode == "spendxp")
{
include("xpspend.php");
}
elseif($mode == "pub")
{
include("pub.php");
}

else
{


	$query = "Select charid,charname,active from ".$prefix."_character_characters where userid = '$userid'";

	$result = sql_query($query,$dbi);
	$num = sql_num_rows($result);

	for($i = 0; $i < $num; $i++)
	{
		$line = sql_fetch_array($result);

		$charid = $line['charid'];
		$charname = $line['charname'];
		$charactive = $line['active'];
		echo "$charname";
		if($charactive) echo " ("._Active.")";
		echo " <a href=\"modules.php?name=$module_name&mode=view&id=$charid\">"._view."</a>";
		echo " | <a href=\"modules.php?name=$module_name&mode=editdetails&id=$charid\">"._details."</a>";
		echo " | <a href=\"modules.php?name=$module_name&mode=requestxp&charid=$charid\">"._xprequest."</a>";
		echo " | <a href=\"modules.php?name=$module_name&mode=spendxp&charid=$charid\">"._xpspend."</a><br>";

	}
	echo "<a href=\"modules.php?name=$module_name&mode=add\">"._newcharacter."</a>";
}
}
closetable();
include("footer.php");
?>
Return current item: VampMan: V:tR Character Manager