mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-06 12:54:21 +00:00
first commit
This commit is contained in:
+142
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename admin.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
session_start();
|
||||
include("../GameEngine/Database.php");
|
||||
include("../GameEngine/Admin/database.php");
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link REL="shortcut icon" HREF="favicon.ico"/>
|
||||
<title><?php if($_SESSION['access'] == ADMIN){ echo 'Admin Control Panel - TravianX'; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'Multihunter Control Panel - TravianX'; } ?></title>
|
||||
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
|
||||
<link rel=stylesheet type="text/css" href="../img/admin/acp.css">
|
||||
<link rel=stylesheet type="text/css" href="../img/img.css">
|
||||
<script src="/mt-full.js?423cb" type="text/javascript"></script>
|
||||
<script src="ajax.js" type="text/javascript"></script>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="imagetoolbar" content="no">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script language="javascript">
|
||||
function aktiv() {this.srcElement.className='fl1'; }
|
||||
function inaktiv() {event.srcElement.className='fl2'; }
|
||||
|
||||
function del(e,id){
|
||||
if(e == 'did'){ var conf = confirm('Dou you really want delete village id '+id+'?'); }
|
||||
if(e == 'unban'){ var conf = confirm('Dou you really want unban player '+id+'?'); }
|
||||
if(e == 'stopDel'){ var conf = confirm('Dou you really want stop deleting user '+id+'?'); }
|
||||
if(conf){return true;}else{return false;}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div id="ltop1">
|
||||
<div style="position:relative; width:231px; height:100px; float:left;">
|
||||
<img src="http://forum.ragezone.com/f583/img/x.gif" width="1" height="1">
|
||||
</div>
|
||||
<img class="fl2" src="http://forum.ragezone.com/f583/img/admin/x1.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="http://forum.ragezone.com/f583/img/admin/x2.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="http://forum.ragezone.com/f583/img/admin/x3.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="http://forum.ragezone.com/f583/img/admin/x4.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="http://forum.ragezone.com/f583/img/admin/x5.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"></div>
|
||||
|
||||
<div id="lmidall">
|
||||
<div id="lmidlc">
|
||||
<div id="lleft">
|
||||
<a href="<?php echo HOMEPAGE; ?>"><img src="http://forum.ragezone.com/f583/img/en/a/travian0.gif" class="logo_plus" width="116" height="60" border="0"></a>
|
||||
|
||||
<table id="navi_table" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="menu">
|
||||
<?php
|
||||
if($funct->CheckLogin()){?>
|
||||
<?php if($_SESSION['access'] == ADMIN){ ?>
|
||||
<a href="admin.php">ACP Home</a>
|
||||
<a href="<?php echo HOMEPAGE; ?>">Homepage</a>
|
||||
<a href="#"></a><a href="#"></a>
|
||||
|
||||
<a href="?p=server_info">Server Info</a>
|
||||
<a href="?p=online">Online users</a>
|
||||
<a href="?p=search">Search</a>
|
||||
<a href="?p=message">Msg/Rep</a>
|
||||
<a href="?p=ban">Ban</a>
|
||||
<a href="?p=gold">Give Gold</a>
|
||||
<a href="?p=natarstart">Add Natar Villages</a>
|
||||
<a href="?p=natarend">Add World Wonder Villages</a>
|
||||
<a href="?p=admin_log"><font color="Red"><b>Admin Log</font></b></a>
|
||||
<a href="?p=config">Config</a>
|
||||
<a href="#"></a><a href="#"></a><a href="#"></a>
|
||||
<a href="?action=logout">Logout</a>
|
||||
<?php } else if($_SESSION['access'] == MULTIHUNTER){ ?>
|
||||
<a href="admin.php">MCP Home</a>
|
||||
<a href="<?php echo HOMEPAGE; ?>">Homepage</a>
|
||||
<a href="#"></a><a href="#"></a>
|
||||
|
||||
<a href="?p=server_info">Server Info</a>
|
||||
|
||||
<a href="?p=online">Online users</a>
|
||||
|
||||
<a href="?p=search">Search</a>
|
||||
|
||||
<a href="?p=message">Msg/Rep</a>
|
||||
|
||||
<a href="?p=ban">Ban</a>
|
||||
<a href="#"></a><a href="#"></a><a href="#"></a>
|
||||
|
||||
<a href="?action=logout">Logout</a>
|
||||
<?php } }?>
|
||||
</td>
|
||||
</tr>
|
||||
</table></div>
|
||||
<div id="lmid1">
|
||||
<div id="lmid3">
|
||||
|
||||
<?php
|
||||
|
||||
if($funct->CheckLogin()){
|
||||
if($_POST or $_GET){
|
||||
if($_GET['p'] and $_GET['p']!="search"){
|
||||
$filename = '../Templates/Admin/'.$_GET['p'].'.tpl';
|
||||
if(file_exists($filename)){
|
||||
include($filename);
|
||||
}else{
|
||||
include('../Templates/Admin/404.tpl');
|
||||
}
|
||||
}else{
|
||||
include('../Templates/Admin/search.tpl');
|
||||
}
|
||||
if($_POST['p'] and $_POST['s']){
|
||||
$filename = '../Templates/Admin/results_'.$_POST['p'].'.tpl';
|
||||
if(file_exists($filename)){
|
||||
include($filename);
|
||||
}else{
|
||||
include('../Templates/Admin/404.tpl');
|
||||
}
|
||||
}
|
||||
}else{
|
||||
include('../Templates/Admin/home.tpl');
|
||||
}
|
||||
}else{
|
||||
include('../Templates/Admin/login.tpl');
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="lright1"></div>
|
||||
|
||||
<div id="ce"></div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
var http_request = false;
|
||||
|
||||
function macheRequest(url, id)
|
||||
{
|
||||
|
||||
http_request = false;
|
||||
|
||||
if (window.XMLHttpRequest)
|
||||
{ // Mozilla, Safari,...
|
||||
http_request = new XMLHttpRequest();
|
||||
if (http_request.overrideMimeType)
|
||||
{
|
||||
http_request.overrideMimeType('text/xml');
|
||||
// zu dieser Zeile siehe weiter unten
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject)
|
||||
{ // IE
|
||||
try
|
||||
{
|
||||
http_request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
try
|
||||
{
|
||||
http_request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!http_request)
|
||||
{
|
||||
alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
|
||||
return false;
|
||||
}
|
||||
http_request.onreadystatechange = function()
|
||||
{
|
||||
alertInhalt2(id);
|
||||
};
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
|
||||
}
|
||||
|
||||
function alertInhalt2(id)
|
||||
{
|
||||
|
||||
if (http_request.readyState == 4)
|
||||
{
|
||||
if (http_request.status == 200)
|
||||
{
|
||||
// alert(http_request.responseText);
|
||||
myElement = document.getElementById(id);
|
||||
if (myElement != null)
|
||||
{
|
||||
myElement.innerHTML = http_request.responseText;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Bei dem Request ist ein Problem aufgetreten.');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user