mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 08:34:33 +00:00
first commit
This commit is contained in:
+179
@@ -0,0 +1,179 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename sysmsg.php ##
|
||||
## Developed by: Dixie ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
include_once("GameEngine/Account.php");
|
||||
|
||||
$max_per_pass = 1000;
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
if (mysql_num_rows(mysql_query("SELECT id FROM ".TB_PREFIX."users WHERE access = 9 AND id = ".$session->uid)) != '1') die("Hacking attempt!");
|
||||
|
||||
|
||||
|
||||
if(isset($_GET['del'])){
|
||||
|
||||
$query="SELECT * FROM ".TB_PREFIX."users ORDER BY id + 0 DESC";
|
||||
|
||||
$result=mysql_query($query) or die (mysql_error());
|
||||
|
||||
for ($i=0; $row=mysql_fetch_row($result); $i++) {
|
||||
|
||||
$updateattquery = mysql_query("UPDATE ".TB_PREFIX."users SET ok = '0' WHERE id = '".$row[0]."'")
|
||||
|
||||
or die(mysql_error());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (@$_POST['submit'] == "Send")
|
||||
|
||||
{
|
||||
|
||||
unset ($_SESSION['m_message']);
|
||||
|
||||
$_SESSION['m_message'] = $_POST['message'];
|
||||
|
||||
$NextStep = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (@isset($_POST['confirm']))
|
||||
|
||||
{
|
||||
|
||||
if ($_POST['confirm'] == 'No' ) $Interupt = true;
|
||||
|
||||
if ($_POST['confirm'] == 'Yes'){
|
||||
|
||||
|
||||
|
||||
if(file_exists("Templates/text.tpl")) {
|
||||
|
||||
|
||||
|
||||
$myFile = "Templates/text.tpl";
|
||||
|
||||
$fh = fopen($myFile, 'w') or die("<br/><br/><br/>Can't open file: templates/text.tpl");
|
||||
|
||||
$text = file_get_contents("Templates/text_format.tpl");
|
||||
|
||||
$text = preg_replace("'%TEKST%'",$_SESSION['m_message'] ,$text);
|
||||
|
||||
fwrite($fh, $text);
|
||||
|
||||
|
||||
|
||||
$query="SELECT * FROM ".TB_PREFIX."users ORDER BY id + 0 DESC";
|
||||
|
||||
$result=mysql_query($query) or die (mysql_error());
|
||||
|
||||
for ($i=0; $row=mysql_fetch_row($result); $i++) {
|
||||
|
||||
$updateattquery = mysql_query("UPDATE ".TB_PREFIX."users SET ok = '1' WHERE id = '".$row[0]."'")
|
||||
|
||||
or die(mysql_error());
|
||||
|
||||
}
|
||||
|
||||
$done = true;
|
||||
|
||||
} else { die("<br/><br/><br/>wrong"); }
|
||||
|
||||
}}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title><?php echo SERVER_NAME ?></title>
|
||||
|
||||
<link REL="shortcut icon" HREF="favicon.ico"/>
|
||||
|
||||
<meta http-equiv="cache-control" content="max-age=0" />
|
||||
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
|
||||
<meta http-equiv="expires" content="0" />
|
||||
|
||||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
|
||||
|
||||
|
||||
<script src="mt-full.js?0ac36" type="text/javascript"></script>
|
||||
|
||||
<script src="unx.js?0ac36" type="text/javascript"></script>
|
||||
|
||||
<script src="new.js?0ac36" type="text/javascript"></script>
|
||||
|
||||
<link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7c" rel="stylesheet" type="text/css" />
|
||||
|
||||
<link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css" />
|
||||
|
||||
<?php
|
||||
|
||||
if($session->gpack == null || GP_ENABLE == false) {
|
||||
|
||||
echo "
|
||||
|
||||
<link href='".GP_LOCATE."travian.css?e21d2' rel='stylesheet' type='text/css' />
|
||||
|
||||
<link href='".GP_LOCATE."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
|
||||
|
||||
} else {
|
||||
|
||||
echo "
|
||||
|
||||
<link href='".$session->gpack."travian.css?e21d2' rel='stylesheet' type='text/css' />
|
||||
|
||||
<link href='".$session->gpack."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
window.addEvent('domready', start);
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<?php
|
||||
|
||||
if($session->gpack == null || GP_ENABLE == false) {
|
||||
|
||||
echo "
|
||||
|
||||
<link href='".GP_LOCATE."travian.css?e21d2' rel='stylesheet' type='text/css' />
|
||||
|
||||
<link href='".GP_LOCATE."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
|
||||
Reference in New Issue
Block a user