forked from supernova-ws/SuperNova
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rw.php
75 lines (59 loc) · 2.26 KB
/
rw.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* rw.php
*
* 1.0st - Security checks & tests by Gorlum for http://supernova.ws
* @version 1.0
* @copyright 2008 by ????? for XNova
*/
define('INSIDE' , true);
define('INSTALL' , false);
$ugamela_root_path = './';
include($ugamela_root_path . 'extension.inc');
include($ugamela_root_path . 'common.'.$phpEx);
if ($IsUserChecked == false) {
includeLang('login');
header("Location: login.php");
}
check_urlaubmodus ($user);
$open = true;
$reportid = $_GET["raport"];
$raportrow = doquery("SELECT * FROM {{table}} WHERE `rid` = '".(mysql_escape_string($_GET["raport"]))."';", 'rw', true);
if ($allow == 1 || $open) {
$Page = "<html>";
$Page .= "<head>";
$Page .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$dpath."/formate.css\">";
$Page .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1251\" />";
$Page .= "</head>";
$Page .= "<body>";
$Page .= "<center>";
if (($raportrow["owners"] == $user["id"]) and
($raportrow["a_zestrzelona"] == 1)) {
$Page .= "<td>Êîíòàêò ñ ôëîòîì áûë ïîòåðÿí.<br>";
$Page .= "(Ñêîðåå âñåãî ôëîò áûë óíè÷òîæåí çà 1 ðàóíä.)</td>";
} else {
$report = stripslashes($raportrow["raport"]);
foreach ($lang['tech_rc'] as $id => $s_name) {
$str_replace1 = array("[ship[".$id."]]");
$str_replace2 = array($s_name);
$report = str_replace($str_replace1, $str_replace2, $report);
}
$no_fleet = "<table border=1 align=\"center\"><tr><th>Òèï</th></tr><tr><th>Âñåãî</th></tr><tr><th>Îðóæèå</th></tr><tr><th>Ùèòû</th></tr><tr><th>Áðîíÿ</th></tr></table>";
$destroyed = "<table border=1 align=\"center\"><tr><th><font color=\"red\"><strong>Óíè÷òîæåíû!</strong></font></th></tr></table>";
$str_replace1 = array($no_fleet);
$str_replace2 = array($destroyed);
$report = str_replace($str_replace1, $str_replace2, $report);
$Page .= $report;
}
$Page .= "<br /><br />";
$Page .= "Share this report - ";
$Page .= $reportid;
$Page .= "<br /><br />";
$Page .= "</center>";
$Page .= "</body>";
$Page .= "</html>";
echo $Page;
}
// -----------------------------------------------------------------------------------------------------------
// History version
?>