mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-06 04:44:21 +00:00
some fixes for admin panel
This commit is contained in:
@@ -21,10 +21,10 @@
|
||||
<tr class="slr3">
|
||||
<td>
|
||||
<select name="p" size="1" class="slr3">
|
||||
<option value="player" <?php if($_POST['p']=='player'){echo "selected";}?>>Search Player</option>
|
||||
<option value="player" <?php if($_POST['p']=='player'){echo "selected";}?>>Search Players</option>
|
||||
<option value="alliances" <?php if($_POST['p']=='alliances'){echo "selected";}?>>Search Alliances</option>
|
||||
<option value="villages" <?php if($_POST['p']=='villages'){echo "selected";}?>>Search Villages</option>
|
||||
<option value="email" <?php if($_POST['p']=='email'){echo "selected";}?>>Search E-mail</option>
|
||||
<option value="email" <?php if($_POST['p']=='email'){echo "selected";}?>>Search E-mails</option>
|
||||
<option value="ip" <?php if($_POST['p']=='ip'){echo "selected";}?>>Search IPs</option>
|
||||
<option value="deleted_players" <?php if($_POST['p']=='deleted_players'){echo "selected";}?>>Search Deleted Players</option>
|
||||
</select>
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_SESSION['id']; ?>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/gold_1.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<table id="member" style="width:300px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Give Free gold for specific user</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Amount</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<b>How much gold?</b>
|
||||
</center>
|
||||
</td>
|
||||
<td>
|
||||
<center>
|
||||
<input class="give_gold" name="gold" value="20" maxlength="4">
|
||||
<img src="../img/admin/gold.gif" class="gold" alt="Gold" name="gold" title="Gold"/>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<b>For which user (id)?</b>
|
||||
</center>
|
||||
</td>
|
||||
<td>
|
||||
<center>
|
||||
<input class="give_gold" name="id" value="">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<center>
|
||||
<input type="image" src="../img/admin/b/ok1.gif" value="submit" title="Give Players Free Gold">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if(isset($_GET['g']))
|
||||
{
|
||||
echo '<br /><br /><font color="Red"><b>Gold Added</font></b>';
|
||||
}
|
||||
?>
|
||||
@@ -25,6 +25,7 @@
|
||||
<td>Name</td>
|
||||
<td>Population</td>
|
||||
<td>Coordinates</td>
|
||||
<td>Add Troops</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php
|
||||
@@ -41,12 +42,13 @@ $delLink = '<a href="?action=delVil&did='.$varray[$i]['wref'].'" onClick="return
|
||||
$delLink = '<a href="#"><img src="../img/Admin/del_g.gif" class="del"></a>';
|
||||
}
|
||||
}
|
||||
|
||||
$addTroops = '<a href="?p=addTroops&did='.$varray[$i]['wref'].'"> Edit Troops</a>';
|
||||
echo '
|
||||
<tr>
|
||||
<td><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td>
|
||||
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Recount<a/></td>
|
||||
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
|
||||
<td>'.$addTroops.' </td>
|
||||
<td>'.$delLink.' </td>
|
||||
</tr>
|
||||
';
|
||||
|
||||
+3
-1
@@ -100,7 +100,8 @@ $timeformat = new timeFormatGenerator;
|
||||
<a href="?p=online">Online Users</a>
|
||||
<a href="?p=notregistered">Players Not Activated</a>
|
||||
<br />
|
||||
<a href="?p=search"><b>Search</b></a>
|
||||
<a href="#"><b>Search</b></a>
|
||||
<a href="?p=search">Search Players/Alliances/Villages/E-mails/IPs/Deleted Players</a>
|
||||
<a href="?p=message">Search Messages/Battle Reports</a>
|
||||
<br />
|
||||
<a href="#"><b>Ban</b></a>
|
||||
@@ -109,6 +110,7 @@ $timeformat = new timeFormatGenerator;
|
||||
<br />
|
||||
<a href="#"><b>Gold</b></a>
|
||||
<a href="?p=gold">Give All Free Gold</a>
|
||||
<a href="?p=usergold">Give Free Gold To Specific User</a>
|
||||
<a href="?p=maintenenceResetGold">Reset Gold</a>
|
||||
<br />
|
||||
<a href="#"><b>Medals</b></a>
|
||||
|
||||
@@ -25,5 +25,5 @@ if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id = ".$id."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."&g=ok");
|
||||
header("Location: ../../../Admin/admin.php?p=usergold&g");
|
||||
?>
|
||||
@@ -29,7 +29,7 @@ for($i=1;$i<=$amt;$i++) {
|
||||
$cp = $pop-1;
|
||||
$q = "insert into `s1_vdata`(`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`,`natar`) values ('$wid','3','WW village',0,$pop,$cp,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,$time,1)";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
$q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid,0,1,0,4,0,1,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,3,0,4,0,4,0,1,0,4,0,2,0,1,0,2,20,17,20,11,20,15,20,10,10,22,10,25,0,0,0,0,10,19,0,0,0,0,0,0,10,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,0,'World Wonder')";
|
||||
$q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid,0,1,0,4,0,1,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,3,0,4,0,4,0,1,0,4,0,2,0,1,0,2,20,17,20,11,20,15,20,10,10,22,10,25,0,0,0,0,10,19,0,0,0,0,0,0,10,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,40,'World Wonder')";
|
||||
mysql_query($q);
|
||||
$database->addUnits($wid);
|
||||
$database->addTech($wid);
|
||||
|
||||
@@ -196,25 +196,25 @@ class adm_DB {
|
||||
}
|
||||
|
||||
function DelVillage($wref){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 1;";
|
||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
if(mysql_num_rows($result) > 0){
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
||||
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 1;";
|
||||
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref;";
|
||||
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref;";
|
||||
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref;";
|
||||
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref;";
|
||||
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref;";
|
||||
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref;";
|
||||
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref;";
|
||||
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ ob_start();
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if(!file_exists('GameEngine/config.php') && !file_exists('../../GameEngine/config.php')) {header("Location: install/");}
|
||||
if(!file_exists('GameEngine/config.php') && !file_exists('../../GameEngine/config.php') && !file_exists('../../config.php')) {header("Location: install/");}
|
||||
|
||||
$script_name = ($_SERVER['REQUEST_URI'] == 'karte.php') ? 'karte' : $_SERVER['REQUEST_URI'];
|
||||
include ("Battle.php");
|
||||
|
||||
Reference in New Issue
Block a user