Edited by: MillerUk on 30/08/2011 09:02:54
Originally by: Mediek Ordos
Nice, and usefull, are you going to share your adjustments ?
Ill drop you admin link later MJ, we alterd the templates again :-) worked sweet as a nut again nice one m8ty :-)
Ill Show You how to add the members listing firstly... bear in mind this is not the final way i want it to look as it does not show pagination so if you have loads registered it will show one big list.
Look For the following line.
break;
case "add_admin";
then add above
case "auditmembers":
// Authorised to access this area?
// Connect to server and select database.
SQLconnect(open);
$query = mysql_query("SELECT securityLevel FROM admins WHERE username = \"".$_SESSION['character']."\";");
while ($row = mysql_fetch_array($query)) {
$securityLevel = "$row[securityLevel]";
}
SQLconnect(close);
// Audit Members List
?>
<?php
// Connect to server and select database.
SQLconnect(open);
// Set query
$query = mysql_query("SELECT * FROM users ORDER BY tsName;");
// Build admin table
echo "<table width=\"100%\" border=\"0\">";
echo "<tr><td width=\"32px\"></td><td>Teamspeak Name</td><td align=\"center\">Corp</td><td width=\"100px\">Databse Id</td><td width=\"40px\"></td></tr>";
// Populate admin table
while ($row = mysql_fetch_array($query)) {
$id = "$row[entryID]";
$tsID = "$row[tsUniqueID]";
$characterID = "$row[characterID]";
$username = "$row[tsName]";
$databseid = "$row[tsDatabaseID]";
// Get the characters current corporation
if ($characterID !== "") {
try {
$fetch = $pheal->eveScope->CharacterInfo(array('characterID' => $characterID));
$fetchCorporation = $fetch->corporation;
$fetchAlliance = $fetch->alliance;
} catch (PhealException $e) {
die("An error occured: ".$e->getMessage()." [A".__LINE__."]");
}
}
if ($id == $c->adminID) {
echo "<tr class=\"listRootAdmin\">";
} else {
echo "<tr>";
}
echo "<td width=\"32px\">";
if ($characterID !== "") {
echo "<img src=\"http://image.eveonline.com/Character/".$characterID."_32.jpg\" border=\"0\">";
} else {
echo "<img src=\"images/admin.png\" border=\"0\">";
}
echo "</td><td>".$username."<br><font size=1>".$tsID."</font></td><td align=\"center\">".$fetchCorporation."<br /><font size=\"2\">".$fetchAlliance."</font></td><td align=\"center\">".$databaseid."</td>";
if ($id == $c->adminID && $id == $_SESSION["EVEOTSid"]) {
echo "<td><a href=\"?menu=member_edit&id=".$id."\"><img src=\"images/edit.png\" border=\"0\" title=\"Edit\"></a></td></tr>";
} else if ($id == $c->adminID) {
echo "<td></td></tr>";
} else {
echo "<td><a href=\"?menu=member_edit&id=".$id."\"><img src=\"images/edit.png\" border=\"0\" title=\"Edit\"></a> <a href=\"?menu=delete_member&id=".$id."\" onclick=\"return confirm('Are you sure you want to delete ".$username."?')\"><img src=\"images/delete.png\" border=\"0\" title=\"Delete\"></a></td></tr>";
}
}
echo "</table>";
SQLconnect(close);
break;
Then you need to add the new page to the navagation links which should look something similar to below:
<a href="admin_panel.php?menu=main">Main</a><br />
<a href="admin_panel.php?menu=logs">Logs</a><br />
<a href="admin_panel.php?menu=audit">Audit</a><br />
<a href="admin_panel.php?menu=auditmembers">Audit Members</a><br /><br /> <a href="admin_panel.php?menu=whitelist">Edit Whitelist</a><br />
which in the end should loook somthing similar to
http://img20.imageshack.us/img20/926/teamspeaklist.png