GarQet
Own3d!
- Joined
- Feb 10, 2009
- Messages
- 1,381
- Solutions
- 14
- Reaction score
- 81
Hello!
I had a few minutes free time and I decided to do a small script for lazy administrators.
TIBIACOM layout!
Step 1) [layout.php]
Go to line 568,
Instead this:
Add this:
Step 2) [index.php]
After:
Add this:
Step 3) [Create file "access.php" in main folder of your acc]
Past it:
Screens:
Yours GarQet.
I had a few minutes free time and I decided to do a small script for lazy administrators.
TIBIACOM layout!
Step 1) [layout.php]
Go to line 568,
Instead this:
Code:
<b><a href="?subtopic=shopadmin"><b>Shop Admin</b></a><b></div>
Code:
<b><a href="?subtopic=shopadmin"><b>Shop Admin</b></a><b><br>
<b><a href="?subtopic=access"><b>Access</b></a><b></div>
Step 2) [index.php]
After:
Code:
case "adminpanel":
$topic = "Admin Panel";
$subtopic = "adminpanel";
include("adminpanel.php");
break;
Code:
case "access":
$topic = "Change Access";
$subtopic = "access";
include("access.php");
break;
Step 3) [Create file "access.php" in main folder of your acc]
Past it:
Code:
<?PHP
$tekst = array("<b><center>Player</center></b>", "<b><center>Tutor</center></b>", "<b><center>Senior Tutor</center></b>", "<b><center>Gamemaster</center></b>", "<b><center>Community Manager</center></b>", "<b><center>GOD</center></b>");
$tekst1 = array("<b><center>1</center></b>", "<b><center>2</center></b>", "<b><center>3</center></b>", "<b><center>4</center></b>", "<b><center>5</center></b>", "<b><center>6</center></b>");
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
$offertype = $_REQUEST['offer_type'];
if((empty($action)) AND (empty($offertype))) {
$main_content .= '<br><h2><center><a href="?subtopic=access&action=group_id">ACCESS</a></center>';
}
if($action == "group_id") {
$player = stripslashes(ucwords(strtolower(trim($_REQUEST['character']))));
$group_id = $_POST['group_id'];
if($_POST["group_id"] == 0)
$group_id = "1";
$group_id2 = "Player";
if($_POST["group_id"] >= 7)
$group_id = "1";
$group_id2 = "Player";
if($_POST["group_id"] == 1)
$group_id2 = "Player";
if($_POST["group_id"] == 2)
$group_id2 = "Tutor";
if($_POST["group_id"] == 3)
$group_id2 = "Senior Tutor";
if($_POST["group_id"] == 4)
$group_id2 = "Gamemaster";
if($_POST["group_id"] == 5)
$group_id2 = "Community Manager";
if($_POST["group_id"] == 6)
$group_id2 = "GOD";
if($_POST["group_id"] >= 7)
$group_id = "1";
if(empty($player)) {
$main_content .= '<form action="" method="post"><B>Enter Character Name:</B><input type="textbox" name="character"><br>
<B>Rank Number:</B><input type="textbox" name="group_id"><br>
<br><br><input type="submit" value="Submit">
</form></center><form action="?subtopic=access" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>
<center><table border="0" cellspacing="1" cellpadding="4" width="50%">
<tr bgcolor="' . $config['site']['vdarkborder'] . '">
<td class="white" style="text-align: center; font-weight: bold;">Rank Number</td>
<td class="white" style="text-align: center; font-weight: bold;">Position</td>
</tr></center>
<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']) . '">
<td style="text-align: center;">' . $tekst1[0] . '<br>' . $tekst1[1] . '<br>' . $tekst1[2] . '<br>' . $tekst1[3] . '<br>' . $tekst1[4] . '<br>' . $tekst1[5] . '' . $tekst1[6] . '</td>
<td style="text-align: center;">' . $tekst[0] . '<br>' . $tekst[1] . '<br>' . $tekst[2] . '<br>' . $tekst[3] . '<br>' . $tekst[4] . '<br>' . $tekst[5] . '' . $tekst[6] . '</td>
</tr></table>';
$main_content .= "
<table border='0' CELLSPACING=1 CELLPADDING=4 WIDTH=100%><tbody><TR><td><div style='text-align: right; margin: 20px auto; font-size: 10px;'>
Coded by <a target='blank' href='http://otland.net/members/GarQet/'>GarQet</a></div></td></tr></tbody></table>";
} else {
$player_data = $SQL->query("SELECT * FROM `players` WHERE `name` = '".$player."';")->fetch();
$SQL->query("UPDATE `players` SET `group_id` = '".$group_id."' WHERE `name` = '".$player."'");
$main_content .= '<b><center>Rank <i>'.$player.'</i> has changed! His current rank is a '.$group_id2.'<i>!</b></center><br>
<form action="?subtopic=access" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>';
$main_content .= "
<table border='0' CELLSPACING=1 CELLPADDING=4 WIDTH=100%><tbody><TR><td><div style='text-align: right; margin: 20px auto; font-size: 10px;'>
Coded by <a target='blank' href='http://otland.net/members/GarQet/'>GarQet</a></div></td></tr></tbody></table>";
}
}
} else {
$main_content .= 'Sorry, you have not the rights to access this page.';
}
?>
Screens:
Yours GarQet.