Jump to content
MakeWebGames

GRPG admin menu


deano1986

Recommended Posts

hey all im very new and excited to GRPG modding never bothered with it only with mccodes but i have noticed the staff panel is nothing like mccodes staff panel ... so im looking for someone to help me out or point me in the right direction to get one that basically is the same or near or nuf the same as mccodes with edit user and things like that in it kind regards and thanx in advanced...

Link to comment
Share on other sites

the reason i said mccodes is because i have been using that for a while and think it would be good to have the same kind of staff panel or similar and thanx for the reply... But now i come to think of it i will have to add new .php files such as edituser.php and other things ..

Link to comment
Share on other sites

Yes, the reason I asked those questions were not for me, but for you as you asked to be pointed in the right direction. When you make a list of the things you want your panel to have, it will be much easier to make. Make a list of everything you want in your panel, then just take it one item at a time. For example, make a base panel page, a homepage if you like, then list down the things you will be able to view/edit. Then make your list into links starting from the first item, working down one at a time.

Link to comment
Share on other sites

thanx for the reply again but as you have probably gathered im not really a grpg coder never had the pleasure of working with it.. But going with what you have said if there is anybody out there willing to make the the .php files containing the what i need ie.. edituser.php, maillog.php, pointxfer.php im willing to pay for this to be done but of course any free help will be much appreciated ..

Link to comment
Share on other sites

You might need to change some stuff, as my css is way different from the GRPG css.. I should have uploaded the file instead of posting it all here, but I don't know how to do that so you guys will just have to enjoy my spam for this one. An Image will be provide also. And one more thing, this is not secured, so you might get someone to secure it for you.

I saved this as staff_panel.php

<?php 
session_start();

if ($user_class->admin == 3) { 
echo "
<div class='content'>
<h3>Staff Panel</h3>
<div style='text-align:center;'>
You have no access to the Staff Panel. 
</div></div>"; die();
}

if ($user_class->admin == 2) { 
echo "
<div class='content'>
<h3>Staff Panel</h3>
<div style='text-align:center;'>
You have no access to the Staff Panel. 
</div></div>"; die();
}

if ($user_class->admin == 12) { 
echo "
<div class='content'>
<h3>Staff Panel</h3>
<div style='text-align:center;'>
You have no access to the Staff Panel. 
</div></div>"; die();
}

if (!isset($_SESSION['id'])){
include('home.php'); die();
}

include (DIRNAME(__FILE__) . '/dbcon.php');
include (DIRNAME(__FILE__) . '/classes.php');
include (DIRNAME(__FILE__) . '/updates.php');
include (DIRNAME(__FILE__) . '/parser.php');

function microtime_float()
{
$time = microtime();
return (double)substr( $time, 11 ) + (double)substr( $time, 0, 8 );
}

microtime_float();
$starttime = microtime_float();

$user_class = new User($_SESSION['id']);

$time = date(F." ".d.", ".Y." ".g.":".i.":".sa,time());
$result = mysql_query("UPDATE `users` SET `lastactive` = '".time()."', `ip` = '".$_SERVER['REMOTE_ADDR']."' WHERE `id`='".$_SESSION['id']."'");

function callback($buffer){
$user_class = new User($_SESSION['id']);

$check_contact = mysql_query("SELECT * FROM `contact_messages` WHERE `viewed`='1'");
$num_mails = mysql_num_rows($check_contact);
if($num_mails != 0) { $new_contacts = "<span class='newNotify'>NEW</span>"; } else if ($num_mails < 1) { $new_contacts = "-"; }
$contactmessages = "[".$new_contacts."]";

$check_staffapps = mysql_query("SELECT * FROM `staff_apps` WHERE `viewed` = '1'");
$num_mails = mysql_num_rows($check_staffapps);
if($num_mails != 0) { $new_apps = "<span class='newNotify'>NEW</span>"; } else if ($num_mails < 1) { $new_apps = "-"; }
$staffapps = "[".$new_apps."]";

$out = $buffer;
$out = str_replace("<!_-money-_!>", number_format($user_class->money), $out);
$out = str_replace("<!_-bank-_!>", number_format($user_class->bank), $out);
$out = str_replace("<!_-formhp-_!>", $user_class->formattedhp, $out);
$out = str_replace("<!_-hpperc-_!>", $user_class->hppercent, $out);
$out = str_replace("<!_-formenergy-_!>", $user_class->formattedenergy, $out);
$out = str_replace("<!_-energyperc-_!>", $user_class->energypercent, $out);
$out = str_replace("<!_-formstamina-_!>", $user_class->formattedstamina, $out);
$out = str_replace("<!_-staminaperc-_!>", $user_class->staminapercent, $out);
$out = str_replace("<!_-formnerve-_!>", $user_class->formattednerve, $out);
$out = str_replace("<!_-nerveperc-_!>", $user_class->nervepercent, $out);
$out = str_replace("<!_-formexp-_!>", $user_class->formattedexp, $out);
$out = str_replace("<!_-expperc-_!>", $user_class->exppercent, $out);
$out = str_replace("<!_-points-_!>", number_format($user_class->points), $out);
$out = str_replace("<!_-level-_!>", $user_class->level, $out);
$out = str_replace("<!_-hospital-_!>", $hospital, $out);
$out = str_replace("<!_-jail-_!>", $jail, $out);
$out = str_replace("<!_-contactmessages-_!>", $contactmessages, $out);
$out = str_replace("<!_-staffapps-_!>", $staffapps, $out);
$out = str_replace("<!_-effects-_!>", $effects, $out);
$out = str_replace("<!_-cityname-_!>", $user_class->cityname, $out);
return $out;
}

ob_start("callback");
define("DATE_FORMAT","d-m-Y H:i:s");
define("LOG_FILE","ip.php");
$userIp    = ( isset($_SERVER['REMOTE_ADDR'])
                     && ($_SERVER['REMOTE_ADDR'] != ""))
                 ? $_SERVER['REMOTE_ADDR']     : "Unknown";

   $refferer  = ( isset($_SERVER['HTTP_REFERER'])
                    && ($_SERVER['HTTP_REFERER'] != ""))
                ? $_SERVER['HTTP_REFERER']    : "Unknown";

   $uri       = ( isset($_SERVER['REQUEST_URI'])
                     && ($_SERVER['REQUEST_URI'] != ""))
                 ? $_SERVER['REQUEST_URI']     : "Unknown";

   $hostName   = gethostbyaddr($userIp);

   $logEntry = " <tr>
       <td width='35%'><center>$time</center></td>
       <td width='35%'><center><a href=http://whatismyipaddress.com/ip/$userIp>$userIp</a></center></td>
       <td width='35%'><center>$user_class->formattedname</center></td>
       <td width='35%'><center>$refferer</center></td>
   </tr>\n";

   if (!file_exists(LOG_FILE)) {
       $logFile = fopen(LOG_FILE,"w");
       fwrite($logFile);
   }
   else {
       $logFile = fopen(LOG_FILE,"a");
   }

   fwrite($logFile,$logEntry);
   fclose($logFile);

   if(!get_magic_quotes_gpc())
{
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
} else {
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
?>	

<html>
<head>
<title>Hitman Massacre - Staff Panel</title>
<link rel="shortcut icon" href="/images/favicon.ico?" type="image/x-icon" />
<link rel="stylesheet" href="style.css" media="screen,projection" type="text/css" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" />
<script src="scripts/lightbox.js" type="text/javascript"></script>
<style type="text/css" media="screen,print">
/* Disable properties specified in the imported CSS file */
.menu a {
	border:none;
	font-weight:normal;
}
/* Actual menu CSS starts here */
.menu,
.menu ul {
	margin:0;
	padding:0;
	list-style:none;
}
.menu {width:170px;}
.menu li {
	display:block;
	margin:0;
	margin-bottom:1px;
	padding: 0 0 0 0px;
	background-repeat: no-repeat;
	background-position: 8px 8px;
	list-style: none;
}
.menu a {
	display:block;
	line-height: 20px;
	color:#FFF;
	padding-left:0px;
	font-weight: bold;
	background:#282828;
	text-decoration:none;
}
.menu a:hover,
.menu a:focus,
.menu ul li { padding-left:0px;}
.menu ul a {color:#000; background:#FFF; background-repeat: no-repeat; background-position: 8px 8px;}
.menu ul a:hover {background:#606060;}
.hidden {display:none;}
</style>
</head>
<body>
Edited by SMOKEY_TEK
Forgot to Mention Something
Link to comment
Share on other sites

<script type='text/javascript' src='/javascript/wz_tooltip.js'></script>

<div class="wrapper">

   <div class="header">
   <img style="float:left" src="/images/ingamebanner.png" />

<div class="stats">
<table>
<tr>
	<td colspan="2">[<? echo $user_class->id; ?>] <a href="profiles.php?id=<? echo $user_class->id; ?>" class="userlink" rel="<? echo $user_class->id; ?>"><?php echo $user_class->formattedname; ?></a></td>
	<td>HP:</td>
	<td width="145px">
<table width="100%" height="5px" style="border: solid 1px #660000">
<tr height="5px">
	<td width="100%" style="background-color: #ec0303;" title="<!_-formhp-_!>"></td>
	<td width="<!_-hpperc-_!>%" style="background-color: #343434;" title="<!_-formhp-_!>"><td>
           </div><td>
     </tr>
				</table>

				</td>
				<td> <span style='color:#999'><!_-hpperc-_!>%</span></td>
			</tr>
			<tr>
				<td width="55px">Level:</td>
				<td width="170px"><!_-level-_!></td>
				<td>Energy:</td>

				<td width="145px">
				<table width="100%" height="5px" style="border: solid 1px #660000">
					<tr height="5px">
					<td width="100%" style="background-color: #ec0303;" title="<!_-formenergy-_!>"></td>
					<td width="<!_-energyperc-_!>%" style="background-color: #343434;" title="<!_-formenergy-_!>"><td>
           </div><td>
					</tr>
				</table>
				</td>
				<td> <span style='color:#999'><!_-energyperc-_!>%</span></td>

			</tr>
			<tr>
				<td width="55px">Money:</td>
				<td width="170px">$<!_-money-_!></td>
				<td>Stamina:</td>
				<td width="145px">

				<table width="100%" height="5px" style="border: solid 1px #660000">
					<tr height="5px">
					<td width="100%" style="background-color: #ec0303;" title="<!_-formstamina-_!>"></td>
					<td width="<!_-staminaperc-_!>%" style="background-color: #343434;" title="<!_-formstamina-_!>"><td>
           </div></td>
					</tr>
				</table>
				</td>
				<td> <span style='color:#999'><!_-staminaperc-_!>%</span></td>

			</tr>
			<tr>
				<td width="55px">Bank:</td>
				<td width="170px">$<!_-bank-_!></td>
				<td>Nerve:</td>
				<td width="145px">
				<table width="100%" height="5px" style="border: solid 1px #660000">
					<tr height="5px">
					<td width="100%" style="background-color: #ec0303;" title="<!_-formnerve-_!>"></td>
					<td width="<!_-nerveperc-_!>%" style="background-color: #343434;" title="<!_-formnerve-_!>"><td>
           </div></td>

     </tr>
				</table>
				</td>
				<td> <span style='color:#999'><!_-nerveperc-_!>%</span></td>
			</tr>

			<tr>
				<td width="55px">Points:</td>
				<td width="170px"><!_-points-_!> [<a href = "spendpoints.php">use</a>] [<a href = "rmstore.php">buy</a>]</td>
                   <td>EXP:</td>
				<td width="145px">

				<table width="100%" height="5px" style="border: solid 1px #660000">
					<tr height="5px">
					<td width="<!_-expperc-_!>%" style="background-color: #ec0303;" title="<!_-formexp-_!>"></td>
					<td width="100%" style="background-color: #343434;" title="<!_-formexp-_!>"><td>
                      </div></td>
     </tr>
				</table>
				</td>
				<td> <span style='color:#999'><!_-expperc-_!>%</span></td>
			</tr>

			</tr>
		</table>
	</div><!-- end .stats -->

	<div class="newsbar">
		<span><a href="refer.php">Refer For Points</a> | <a href="upgrade.php">Upgrade Account</a> | <a href='dailyreward.php'>Daily Reward</a></span><? echo $time; ?>   |   Day Update: 12:00am
	</div>
Link to comment
Share on other sites

</div><!-- end .header  -->

<div class='left'>
<ul class="menu">
<li><a href=".">  Users</a>
	<ul>
		<li><a href='staff_panel.php?action=mailban'>  Mailban Player</a></li>
		<li><a href='staff_panel.php?action=revokemail'>  Revoke Mailban</a></li>
		<li><a href='staff_panel.php?action=forumban'>  Forum Ban Player</a></li>
		<li><a href='staff_panel.php?action=revokeforum'>  Revoke Forum Ban</a></li>
		<li><a href='staff_panel.php?action=freeze'>  Freeze Player</a></li>
		<li><a href='staff_panel.php?action=revokefreeze'>  Revoke Freeze</a></li>
		<li><a href='staff_panel.php?action=playernotes'>  View Player Notes</a></li>
	</ul>
</li>
<li><a href=".">  Logs</a>
	<ul>
		<li><a href='staff_panel.php?action=attacklog'>  Attack Logs</a></li>
		<li><a href='staff_panel.php?action=moneylog'>  Money Xfer Logs</a></li>
		<li><a href='staff_panel.php?action=pointlog'>  Points Xfer Logs</a></li>
		<li><a href='staff_panel.php?action=itemlog'>  Item Xfer Logs</a></li>
                       <li><a href='staff_panel.php?action=maillog'>  Mail Logs</a></li>
	</ul>
</li>
<li><a href="." id="collapsed">  Other Tools</a>
	<ul>
		<li><a href='staff_panel.php?action=contactmessages'>  Contact Messages <!_-contactmessages-_!></a></li>
		<li><a href='staff_panel.php?action=supporttickets'>  Support Tickets <!_-support-_!></a></li>
		<li><a href='staff_panel.php?action=staffnotes'>  View Staff Notes</a></li>
		<li><a href='staff_panel.php?action=addnote'>  Add Staff Note</a></li>
		<li><a href='staff_panel.php?action=ipsearch'>  Ip Search</a></li>
		<li><a href='home.php'>  Back To Game</a></li>
	</ul>
</li>
</ul>
</div>

<?php

$_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : 'staff_index';

switch($_GET['action'])
{
case 'mailban' : mail_ban(); break;
case 'submitmailban' : submit_mailban(); break;
case 'revokemail' : revoke_mailban(); break;
case 'submitmailrevoke' : submit_mailrevoke(); break;
case 'forumban' : forum_ban(); break;
case 'submitforumban' : submit_forumban(); break;
case 'revokeforum' : revoke_forumban(); break;
case 'submitforumrevoke' : submit_forumrevoke(); break;
case 'freeze' : freeze_player(); break;
case 'submitfreeze' : submit_freeze(); break;
case 'revokefreeze' : revoke_freeze(); break;
case 'submitfreezerevoke' : submit_freezerevoke(); break;
case 'ipsearch' : ip_search(); break;
case 'ipsubmit' : ipsearch_submit(); break;
case 'contactmessages' : contact_messages(); break;
case 'attacklog' : attack_logs(); break; 
case 'moneylog' : money_logs(); break;
case 'pointlog' : point_logs(); break;
case 'itemlog' : item_logs(); break;
case 'maillog' : mail_logs(); break;
case 'submitmaillog' : submit_maillog(); break;
case 'staffnotes' : staff_notes(); break;
case 'addnote' : add_note(); break;
case 'submitnote' : submit_note(); break;
case 'supporttickets' : support_tickets(); break;
default : staff_index(); break;
}

function staff_index()
{
echo "
<div class='content'>
<h3>Staff Panel</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Last 3 Staff Notes</h4></td>
</tr>";

$result = mysql_query("SELECT * FROM `staffnotes` ORDER BY `timesent` DESC LIMIT 3");
	while ($line = mysql_fetch_array($result)){
	$staff_notes = new User($line['user']);
	$notes = mysql_num_rows($result);
echo "
<tr>
	<td class='forumSide' align='center' valign='top'>".date(d." ".M.", ".y." ".g.":".i."".a,$line['timesent'])." <br> ".$staff_notes->formattedname."</td>
	<td class='forumPost' valign='top'>".$line['note']."</td>
</tr>";
}

if($notes < 1){
echo "
<table width='100%'>
<tr>
	<td colspan='2'><div style='text-align:center;'><i>There are no staff notes.</i></div></td>
</tr>
</table>";
}
Edited by SMOKEY_TEK
Link to comment
Share on other sites

echo "
<table width='100%'>
<tr>
	<td colspan='2'><h4>Last 10 Staff Events</h4></td>
</tr>
</table>

<table width='100%'>
<tr>
	<td><h4>Staff</h4></td>
	<td><h4>Action</h4></td>
	<td><h4>Date/Time</h4></td>
</tr>";

$result2 = mysql_query("SELECT * FROM `stafflog` ORDER BY `timesent` DESC LIMIT 10");
while ($line = mysql_fetch_array($result2)) {
$staff_logs = new User($line['user']);
$events = mysql_num_rows($result2);
echo "
<tr>
	<td align='center'>".$staff_logs->formattedname."</td>
	<td align='center'>".$line['action']."</td>
	<td align='center'>".date(d." ".M.", ".y." ".g.":".i."".a,$line['timesent'])."</td>
</tr>";
}

if($events < 1){
echo "
<table width='100%'>
<tr>
	<td colspan='2'><div style='text-align:center;'><i>There are no staff events.</i></div></td>
</tr>
</table>
</div>";
}
 }

function mail_ban()
{
?>	

<div class='content'>
<h3>Mailban Player</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Mailban Player</h4></td>
</tr>
</table>

<table width='100%'>
<form action='staff_panel.php?action=submitmailban' method='post' name='mailban'>
<tr>
	<td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td>
	<td width='27%'>
	<input type='hidden' name='searchPlayer' value=''>
       <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly>
       <a href="act_select.php?t=mailban" class="lbOn">select</a>
</td>
   <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td><h4 onmouseover="TagToTip('formC')" onmouseout="UnTip()">Days</h4></td>
	<td><input type='text' name='days' size='40' maxlength='50' value=""></td>
	<td>[<b class='qmark' onmouseover="TagToTip('formC')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>     
	<td width='20%'><h4 onmouseover="TagToTip('formB')" onmouseout="UnTip()">Reason</h4></td>
	<td width='27%'><input type='text' name='reason' size='40' maxlength='100' value=""></td>
	<td width='3%'>[<b class='qmark' onmouseover="TagToTip('formB')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td colspan='6' align='center'><input type='submit' value='Issue Mailban' /></td>
</tr>
</form>
</table>
<span id="formA">Choose the player you want to mail ban.</span> 
   <span id="formB">Enter a reason why their getting mail banned.</span> 
   <span id="formC">Enter the number of days their mail banned.</span> 
</div>
Link to comment
Share on other sites

<?php
}
function submit_mailban()
{
$result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'");
$worked = mysql_fetch_array($result2);
$mailban = new User($worked['id']);
$reason = mysql_real_escape_string($_POST["reason"]);
$days = mysql_real_escape_string($_POST["searchDaysText"]);
if($_POST['searchPlayerText'] == "GIOVANNI"){
echo "
<div class='content'>
<h3>Mailban Player</h3>
<p>You can't mailban player ".$mailban->formattedname.", as he his the Owner. <br>
<a href='staff_panel.php?action=mail'>Back</a></p></div>"; die();
} else if($_POST['searchPlayerText'] == "Divers1oN"){
echo "
<div class='content'>
<h3>Mailban Player</h3>
<p>You can't mailban player ".$mailban->formattedname.", as they are the Owner. <br>
<a href='staff_panel.php?action=mail'>Back</a></p></div>"; die();
}
if(is_numeric($_POST['days'])){
$result = mysql_query("UPDATE `users` SET `mailban` = '1', `mb_reason` = '".$_POST['reason']."', `days` = '".$_POST['days']."' WHERE `username`= '".$_POST['searchPlayerText']."'");
echo "
<div class='content'>
<h3>Mailban Player</h3>
<p>".$mailban->formattedname." has been successfully mailbanned for ".$_POST['days']." day(s). <br>
<a href='staff_panel.php?action=mailban'>Back</a></p></div>"; die();
} else {
echo "
<div class='content'>
<h3>Mailban Player</h3>
<p>You must enter a valid amount of days. <br>
<a href='staff_panel.php?action=mail'>Back</a></p></div>"; die();
}
 }
function revoke_mailban()
{
?>
<div class='content'>
<h3>Revoke Mailban</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Revoke Mailban</h4></td>
</tr>
</table>

<table width='100%'>
<form action='staff_panel.php?action=submitmailrevoke' method='post' name='revokemailban'>
<tr>
	<td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td>
	<td width='27%'><input type='hidden' name='searchPlayer' value=''>
       <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly>
       <a href='act_select.php?t=revokemail' class='lbOn'>select</a></td>
	<td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td> </td>
	<td><input type='submit'  value='Revoke Mailban' /></td>
</tr>
</form>
<span id="formA">Choose the player you want to revoke their mailban.</span> 
</table>
</div>
<?php
}
function submit_mailrevoke()
{
$result = mysql_query("UPDATE `users` SET `mailban` = '0' WHERE `username` = '".$_POST['searchPlayerText']."'");
$result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'");
$worked = mysql_fetch_array($result2);
$mailbanRevoke = new User($worked['id']);
echo "
<div class='content'>
<h3>Revoke Mailban</h3>
<p>".$mailbanRevoke->formattedname."'s mailban has been successfully revoked. <br>
<a href='staff_panel.php?action=revokemail'>Back</a></p></div>"; die();
}
function forum_ban()
{
?>
Link to comment
Share on other sites

<div class='content'>
<h3>Forum Ban Player</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Forum Ban Player</h4></td>
</tr>
</table>

<table width='100%'>
<form action='staff_panel.php?action=submitforumban' method='post' name='forumban'>
<tr>
	<td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td>
	<td width='27%'>
	<input type='hidden' name='searchPlayer' value=''>
       <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly>
       <a href="act_select.php?t=forumban" class="lbOn">select</a>
</td>
   <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td><h4 onmouseover="TagToTip('formC')" onmouseout="UnTip()">Days</h4></td>
	<td><input type='text' name='days' size='40' maxlength='50' value=""></td>
	<td>[<b class='qmark' onmouseover="TagToTip('formC')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>     
	<td width='20%'><h4 onmouseover="TagToTip('formB')" onmouseout="UnTip()">Reason</h4></td>
	<td width='27%'><input type='text' name='reason' size='40' maxlength='100' value=""></td>
	<td width='3%'>[<b class='qmark' onmouseover="TagToTip('formB')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td colspan='6' align='center'><input type='submit' value='Issue Forum Ban' /></td>
</tr>
</form>
</table>
<span id="formA">Choose the player you want to forum ban.</span> 
   <span id="formB">Enter a reason why their getting forum banned.</span> 
   <span id="formC">Enter the number of days their forum banned.</span> 
</div>
<?php
}
function submit_forumban()
{
$result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'");
$worked = mysql_fetch_array($result2);
$forumban = new User($worked['id']);
$reason = mysql_real_escape_string($_POST["reason"]);
$days = mysql_real_escape_string($_POST["searchDaysText"]);
if($_POST['searchPlayerText'] == "GIOVANNI"){
echo "
<div class='content'>
<h3>Forum Ban Player</h3>
<p>You can't forum ban player ".$forumban->formattedname.", as he his the Owner. <br>
<a href='staff_panel.php?action=forum'>Back</a></p></div>"; die();
} else if($_POST['searchPlayerText'] == "Divers1oN"){
echo "
<div class='content'>
<h3>Forum Ban Player</h3>
<p>You can't forum ban player ".$forumban->formattedname.", as they are the Owner. <br>
<a href='staff_panel.php?action=forum'>Back</a></p></div>"; die();
}
if(is_numeric($_POST['days'])){
$result = mysql_query("UPDATE `users` SET `forumban` = '1', `fb_reason` = '".$_POST['reason']."', `days` = '".$_POST['days']."' WHERE `username`= '".$_POST['searchPlayerText']."'");
echo "
<div class='content'>
<h3>Forum Ban Player</h3>
<p>".$forumban->formattedname." has been successfully forum banned for ".$_POST['days']." day(s). <br>
<a href='staff_panel.php?action=forumban'>Back</a></p></div>"; die();
} else {
echo "
<div class='content'>
<h3>Forum Ban Player</h3>
<p>You must enter a valid amount of days. <br>
<a href='staff_panel.php?action=forum'>Back</a></p></div>"; die();
}
 }
function revoke_forumban()
{
?>
Link to comment
Share on other sites

<div class='content'>
<h3>Revoke Forum Ban</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Revoke Forum Ban</h4></td>
</tr>
</table>

<table width='100%'>
<form action='staff_panel.php?action=submitforumrevoke' method='post' name='revokeforumban'>
<tr>
	<td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td>
	<td width='27%'><input type='hidden' name='searchPlayer' value=''>
       <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly>
       <a href='act_select.php?t=revokeforum' class='lbOn'>select</a></td>
	<td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td> </td>
	<td><input type='submit'  value='Revoke Forum Ban' /></td>
</tr>
</form>
<span id="formA">Choose the player you want to revoke their forum ban.</span> 
</table>
</div>
<?php
}
function submit_forumrevoke()
{	
$result = mysql_query("UPDATE `users` SET `forumban` = '0' WHERE `username` = '".$_POST['searchPlayerText']."'");
$result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'");
$worked = mysql_fetch_array($result2);
$forumbanRevoke = new User($worked['id']);
echo "
<div class='content'>
<h3>Revoke Forum Ban</h3>
<p>".$forumbanRevoke->formattedname."'s forum ban has been successfully revoked. <br>
<a href='staff_panel.php?action=revokeforum'>Back</a></p></div>"; die();
}
function freeze_player()
{
?>
<div class='content'>
<h3>Freeze Player</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Freeze Player</h4></td>
</tr>
</table>

<table width='100%'>
<form action='staff_panel.php?action=submitfreeze' method='post' name='freeze'>
<tr>
	<td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td>
	<td width='27%'>
	<input type='hidden' name='searchPlayer' value=''>
       <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly>
       <a href="act_select.php?t=freeze" class="lbOn">select</a>
</td>
   <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td><h4 onmouseover="TagToTip('formC')" onmouseout="UnTip()">Days</h4></td>
	<td><input type='text' name='days' size='40' maxlength='50' value=""></td>
	<td>[<b class='qmark' onmouseover="TagToTip('formC')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>     
	<td width='20%'><h4 onmouseover="TagToTip('formB')" onmouseout="UnTip()">Reason</h4></td>
	<td width='27%'><input type='text' name='reason' size='40' maxlength='100' value=""></td>
	<td width='3%'>[<b class='qmark' onmouseover="TagToTip('formB')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td colspan='6' align='center'><input type='submit' value='Freeze Account' /></td>
</tr>
</form>
</table>
<span id="formA">Choose the player you want to freeze.</span> 
   <span id="formB">Enter a reason why their getting their account frozen.</span> 
   <span id="formC">Enter the number of days their account is frozen.</span> 
</div>
Link to comment
Share on other sites

<?php
}
function submit_freeze()
{
$result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'");
$worked = mysql_fetch_array($result2);
$freeze = new User($worked['id']);
if($_POST['searchPlayerText'] == "GIOVANNI"){
echo "
<div class='content'>
<h3>Freeze Player</h3>
<p>You can't freeze player ".$freeze->formattedname.", as he his the Owner. <br>
<a href='staff_panel.php?action=freeze'>Back</a></p></div>"; die();
} else if($_POST['searchPlayerText'] == "Divers1oN"){
echo "
<div class='content'>
<h3>Freeze Player</h3>
<p>You can't freeze player ".$freeze->formattedname.", as they are the Owner. <br>
<a href='staff_panel.php?action=freeze'>Back</a></p></div>"; die();
} else if(is_numeric($_POST['days'])){
$result = mysql_query("UPDATE `users` SET `frozen` = '1', `fr_reason` = '".$_POST['reason']."', `days` = '".$_POST['days']."', `admin` = '11', `staff` = '0' WHERE `username` = '".$_POST['searchPlayerText']."'");
echo "
<div class='content'>
<h3>Freeze Player</h3>
<p>".$freeze->formattedname."'s account has been successfully frozen for ".$_POST['days']." day(s). <br>
<a href='staff_panel.php?action=freeze'>Back</a></p></div>"; die();
} else {
echo "
<div class='content'>
<h3>Freeze Player</h3>
<p>You must enter a valid amount of days. <br>
<a href='staff_panel.php?action=freeze'>Back</a></p></div>"; die();
}
 }
function revoke_freeze()
{
?>
<div class='content'>
<h3>Revoke Freeze</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Revoke Freeze</h4></td>
</tr>
</table>

<table width='100%'>
<form action='staff_panel.php?action=submitfreezerevoke' method='post' name='revokefreeze'>
<tr>
	<td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td>
	<td width='27%'><input type='hidden' name='searchPlayer' value=''>
       <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly>
       <a href='act_select.php?t=revokemail' class='lbOn'>select</a></td>
	<td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td> </td>
	<td><input type='submit'  value='Revoke Freeze' /></td>
</tr>
</form>
<span id="formA">Choose the player you want to revoke their freeze.</span> 
</table>
</div>
Link to comment
Share on other sites

<?php
}
function submit_freezerevoke()
{
$result = mysql_query("UPDATE `users` SET `frozen` = '0' WHERE `username` = '".$_POST['searchPlayerText']."'");
$result2 = mysql_query("SELECT `id` FROM `users` WHERE `username` = '".$_POST['searchPlayerText']."'");
$worked = mysql_fetch_array($result2);
$freezeRevoke = new User($worked['id']);
echo "
<div class='content'>
<h3>Revoke Freeze</h3>
<p>".$freezeRevoke->formattedname."'s account freeze has been successfully revoked. <br>
<a href='staff_panel.php?action=revokefreeze'>Back</a></p></div>"; die();
}
function ip_search()
{
?>
<div class='content'>
<h3>Ip Search</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Ip Search</h4></td>
</tr>

<form action='staff_panel.php?action=ipsubmit' method='post'>
<tr>
	<td><h4>Ip Address</h4></td>
	<td><input type='text' name='ip' size='50' maxlength='75'></td>
</tr>
<tr>
	<td> </td>
	<td><input type='submit' value='Search' /></td>
</tr>
</form>
</table>
</div>
<?php
}
function ipsearch_submit()
{
$ip = $_POST['ip'];
echo "
<div class='content'>
<h3>Ip Search</h3>
<table width='100%'>
<tr>
	<td colspan='2'><h4>Accounts with Ip Address: ".$ip."</h4></td>
</tr>
</table>

<table width='100%'>
<tr>
	<td><h4>Account</h4></td>
	<td><h4>Ip Address</h4></td>
	<td><h4>Actions</h4></td>
</tr>";

$result = mysql_query("SELECT * FROM `users` WHERE `ip`= '".$_POST['ip']."'");
while ($line = mysql_fetch_array($result)) {
	$ip_address = new User($line['id']);
echo "
<tr>
	<td align='center'>".$ip_address->formattedname."</td>
	<td align='center'><a href='http://whatismyipaddress.com/ip/".$ip."'><b>".$ip."</b></a></td>
	<td align='center'><a href='staff_panel.php?action=freeze&searchPlayerText=".$ip_address->username."'>Freeze Account</a><td>
</tr>
</div>";
}
 }	

function contact_messages()
{
echo "
<div class='content'>
<h3>Contact Messages</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Contact Messages</h4></td>
</tr>
</table>

<table width='100%'>
<tr>
	<td width='15%'><h4>ID</h4></td>
	<td width='35%'><h4>Subject</h4></td>
	<td width='35%'><h4>Date/Time</h4></td>
</tr>";

$result = mysql_query("SELECT * FROM `contact_messages` ORDER BY `id` ASC");
while ($line = mysql_fetch_array($result)) {
$contact = mysql_num_rows($result);

if ($line['viewed'] == "1") { $viewed="<b><span style='color:#FF0000;'>NEW</span></b>";
 } else { $viewed=" "; }

echo "
<tr>
	<td width='15%' align='center'>".$line['id']."</td>
	<td width='35%' align='center'>".$viewed." <a href='viewcontact.php?id=".$line['id']."'>".$line['subject']."</a></td>
	<td width='35%' align='center'>".date(d." ".M.", ".y." ".g.":".i."".a,$line['timesent'])."</td>
</tr>
</div>";
}

if($contact < 1){
echo "
<table width='100%'>
<tr>
	<td colspan='2'><i>There are no contact messages.</i></td>
</tr>
</table>
</div>";
}
    }
function attack_logs()
{
echo "
<div class='content'>
<h3>Attack Logs</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Attack Logs</h4></td>
</tr>
</table>

<table width='100%'>
<tr>
	<td><h4>ID</h4></td>
	<td><h4>Date/Time</h4></td>
	<td><h4>Attacker</h4></td>
	<td><h4>Defender</h4></td>
	<td><h4>Winner</h4></td>
	<td><h4>Multi?</h4></td>
</tr>";
Link to comment
Share on other sites

$result = mysql_query("SELECT * FROM `attack_logs` ORDER BY `timestamp` DESC");
while ($row = mysql_fetch_array($result)) {
$attacker = new User($row['attacker']);
$defender = new User($row['defender']);
$winner = new User($row['winner']);
echo "
<tr>
	<td align='center'>".$row['id']."</td>
	<td align='center'>".date(d." ".M.", ".y." ".g.":".i."".a,$row['timestamp'])."</td>
	<td align='center'>".$attacker->formattedname."</td>
	<td align='center'>".$defender->formattedname."</td>
	<td align='center'>".$winner->formattedname."</td>
</tr>
</div>";
}
 }
function money_logs()
{
echo "
<div class='content'>
<h3>Money Logs</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Money Logs</h4></td>
</tr>
</table>

<table width='100%'>
<tr>
	<td><h4>ID</h4></td>
	<td><h4>Date/Time</h4></td>
	<td><h4>User To</h4></td>
	<td><h4>User From</h4></td>
	<td><h4>Amount</h4></td>
	<td><h4>Multi?</h4></td>
</tr>";

$result = mysql_query("SELECT * FROM `moneyxferlog` ORDER BY `id`");
while ($line = mysql_fetch_array($result)) {

if($row['usertoip'] == $row['userfromip']){
$multi = "<span style='color: #FF0000;'><b>YES</b></span>"; } else { $multi = "<span style='color: #00FF00;'><b>NO</b></span>";}

echo "
<tr>
	<td align='center'>".$line['id']."</td>
	<td align='center'>".date(d." ".M.", ".y." ".g.":".i."".a,$line['timesent'])."</td>
	<td align='center'>".$line['userto']."</td>
	<td align='center'>".$line['userfrom']."</td>
	<td align='center'>".$line['amount']."</td>
	<td align='center'>".$multi."</td>
</tr>
</div>";
}
 }
function point_logs()
{
echo "
<div class='content'>
<h3>Point Xfer Logs</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Point Xfer Logs</h4></td>
</tr>
</table>

<table width='100%'>
<tr>
	<td><h4>ID</h4></td>
	<td><h4>Date/Time</h4></td>
	<td><h4>User To</h4></td>
	<td><h4>User From</h4></td>
	<td><h4>Amount</h4></td>
	<td><h4>Multi?</h4></td>
</tr>";

$result = mysql_query("SELECT * FROM `pointxferlog` ORDER BY `id`");
while ($line = mysql_fetch_array($result)) {

if($row['usertoip'] == $row['userfromip']){
$multi = "<span style='color: #FF0000;'><b>YES</b></span>"; } else { $multi = "<span style='color: #00FF00;'><b>NO</b></span>";}
echo "
<tr>
	<td align='center'>".$line['id']."</td>
	<td align='center'>".date(d." ".M.", ".y." ".g.":".i."".a,$line['timesent'])."</td>
	<td align='center'>".$line['userto']."</td>
	<td align='center'>".$line['userfrom']."</td>
	<td align='center'>".$line['amount']."</td>
	<td align='center'>".$multi."</td>
</tr>
</div>";
}
 }
Link to comment
Share on other sites

function mail_logs()
{
?>
<div class='content'>
<h3>Mail Logs</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>View Players Mail</h4></td>
</tr>
</table>

<table width='100%'>
<form action='staff_panel.php?action=submitmaillog' method='post' name='maillogs'>
<tr>
	<td width='20%'><h4 onmouseover="TagToTip('formA')" onmouseout="UnTip()">Name</h4></td>
	<td width='27%'>
	<input type='hidden' name='searchPlayer' value=''>
       <input type='text' name='searchPlayerText' value="" size='14' class='itNoB' readonly>
       <a href="act_select.php?t=maillog" class="lbOn">select</a>
</td>
   <td width='3%'>[<b class='qmark' onmouseover="TagToTip('formA')" onmouseout="UnTip()">?</b>]</td>
</tr>
<tr>
	<td colspan='6' align='center'><input type='submit' value='View Mails' /></td>
</tr>
</form>
</table>
<span id="formA">Choose the player you want view their mail inbox/sent.</span> 
</div>
<?php
}
function submit_maillog()
{
echo "
<div class='content'>
<h3>Mail Logs</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Received Mail Logs for: ".$_POST['searchPlayerText']."</h4></td>
</tr>
</table>";

echo "
<table width='100%'>
<tr>
	<td width='25%'><h4>Sender</h4></td>
	<td width='25%'><h4>Received</h4></td>
	<td width='50%'><h4>Message</h4></td>
</tr>";

$result = mysql_query("SELECT * FROM `mailbox` WHERE `mailTo` = '".$_POST['searchPlayerText']."'");
while ($row = mysql_fetch_array($result)){
$mail_logs = new User($row['mailFrom']);
echo "
<tr>
	<td align='center'>".$mail_logs->formattedname."</td>
	<td align='center'>".date(d." ".M." ".y.", ".g.":".i." ".a,$row['mailTime'])."</td>
	<td align='center'>";
	$profile = str_replace("<br />", "[br]", $row['mailBody']);
	$formatted_text = bb_code(bbcode($profile));
	echo $formatted_text;
echo "</td>
</tr>";
}

echo "
<table width='100%'>
<tr>
	<td colspan='2'><h4>Sent Mail Logs for: ".$_POST['searchPlayerText']."</h4></td>
</tr>
</table>

<table width='100%'>
<tr>	
	<td width='25%'><h4>Recipient</h4></td>
	<td width='25%'><h4>Sent</h4></td>
	<td width='50%'><h4>Message</h4></td>
</tr>";

$result6 = mysql_query("SELECT * FROM `mailbox` WHERE `mailFrom` = '".$_POST['searchPlayerText']."'");
while ( $row = mysql_fetch_array($result6)){
$maillogs6 = new User($row['mailTo']);
echo "
<tr>
	<td align='center'>".$maillogs6->formattedname."</td>
	<td align='center'>".date(d." ".M." ".y.", ".g.":".i." ".a,$row['mailTime'])."</td>
	<td align='center'>";
	$profile = str_replace("<br />", "[br]", $row['mailBody']);
	$formatted_text = bb_code(bbcode($profile));
	echo $formatted_text;
echo "</td>
</tr>
</div>";
}
 }
Link to comment
Share on other sites

function add_note()
{
echo "
<div class='content'>
<h3>Staff Notes - Add Note</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Add Staff Note</h4></td>
</tr>
</table>

<table width='100%'>
<form action='staff_panel.php?action=submitnote' method='post'>
<tr>
	<td colspan='2' align='center'><textarea name='staffnote' rows='5' cols='60'></textarea></td>
</tr>
<tr>
	<td colspan='2' align='center'><input type='submit' value='Submit' /></td.
</tr>
</form>
</table>
</div>";
}

function submit_note()
{
$userid = $_SESSION['id'];
$timesent = time();
$staffAction = "Added a staff note.";
$staffnote = $_POST['staffnote'];
$order = array("\r\n", "\n", "\r");
$replace = '<br>';
$newstr = str_replace($order, $replace, $staffnote);
$result = mysql_query("INSERT INTO `staffnotes` (user, timesent, note) VALUES"."('".$userid."', '".$timesent."', '".$newstr."')");
$result = mysql_query("INSERT INTO `stafflog` (user, timesent, action)"."VALUES ('".$userid."', '".$timesent."', '".$staffAction."')");
	echo "
	<div class='content'>
	<h3>Staff Notes - Add Note</h3>
	<p>Note was successfully added.</p>
	</div>"; 
die();
}

function staff_notes()
{
echo "
<div class='content'>
<h3>View Staff Notes</h3>

<table width='100%'>
<tr>
	<td colspan='2'><h4>Staff Notes</h4></td>
</tr>";

$result = mysql_query("SELECT * FROM `staffnotes` ORDER BY `timesent` DESC LIMIT 5");
	while ($line = mysql_fetch_array($result)){
	$staff_notes = new User($line['user']);
	$notes = mysql_num_rows($result);
echo "
<tr>
	<td class='forumSide' align='center' valign='top'>".date(d." ".M.", ".y." ".g.":".i."".a,$line['timesent'])." <br> ".$staff_notes->formattedname."</td>
	<td class='forumPost' valign='top'>".$line['note']."</td>
</tr>";
}

if($notes < 1){
echo "
<table width='100%'>
<tr>
	<td colspan='2'><div style='text-align:center;'><i>There are no staff notes.</i></div></td>
</tr>
</table>
</div>";
}
 }
Link to comment
Share on other sites

Preview of my Staff Panel

hmstaffpanel.png

And last time I tried looking a players mail, it wasn't working.. And to be honest, I think looking at players mail is so inappropriate and invades privacy. Oh yea, the menu on the left is an ajax dropdown menu.

And I'm using Lightbox in this Staff Panel also, PM on here, or reply to this thread to get the files.

If your interested in getting my css file, either PM on here, or reply to this thread.

Edited by SMOKEY_TEK
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...