1 | <?php
|
---|
2 | session_start();
|
---|
3 |
|
---|
4 | include 'DatabaseConection.php';
|
---|
5 | $Database = new Database('localhost','root','');
|
---|
6 | $Database->SelectDatabase('Quests');
|
---|
7 | ?>
|
---|
8 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|
9 | <HTML>
|
---|
10 | <HEAD>
|
---|
11 | <META http-equiv="Content-Language" content="cs">
|
---|
12 | <META http-equiv="Content-Type" content="text/html; charset=windows-1250">
|
---|
13 | <META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
|
---|
14 | <link rel="SHORTCUT ICON" href="/images/favicon.ico">
|
---|
15 | <TITLE>WoW server Heroes of Fantasy - Projek pøekládání Questù do CZ</TITLE>
|
---|
16 | </HEAD>
|
---|
17 | <html>
|
---|
18 | <body>
|
---|
19 |
|
---|
20 | <?php
|
---|
21 | include 'panel.php';
|
---|
22 |
|
---|
23 | if(array_key_exists('inspect', $_GET)) {
|
---|
24 | $entry = mysql_escape_string($_GET['entry']);
|
---|
25 | $User = mysql_escape_string($_GET['user']);
|
---|
26 |
|
---|
27 | $Database->SQLCommand("UPDATE czquests SET state = '2' WHERE user= '$User' AND entry = '$entry'");
|
---|
28 |
|
---|
29 | Echo 'Quest byl zkontrolován';
|
---|
30 | }
|
---|
31 |
|
---|
32 | if(array_key_exists('save', $_GET)) {
|
---|
33 | $entry = mysql_escape_string($_GET['entry']);
|
---|
34 | $Title = mysql_escape_string($_GET['Title']);
|
---|
35 | $Details = mysql_escape_string($_GET['Details']);
|
---|
36 | $Objectives = mysql_escape_string($_GET['Objectives']);
|
---|
37 | $OfferRewardText = mysql_escape_string($_GET['OfferRewardText']);
|
---|
38 | $RequestItemsText = mysql_escape_string($_GET['RequestItemsText']);
|
---|
39 | $User = $_SESSION['User'];
|
---|
40 |
|
---|
41 |
|
---|
42 | $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM czquests Where user='$User' AND entry = '$entry'"));
|
---|
43 | if (!$Line) {
|
---|
44 | $Database->SQLCommand("INSERT INTO czquests VALUES('$entry','$Title','$Details','$Objectives','$OfferRewardText','$RequestItemsText','1','$User')");
|
---|
45 | $Database->SQLCommand("UPDATE ajquests SET state = '1' WHERE entry = '$entry'");
|
---|
46 | } else {
|
---|
47 | $Database->SQLCommand("UPDATE czquests SET Title = '$Title', Details = '$Details', Objectives = '$Objectives', OfferRewardText = '$OfferRewardText', RequestItemsText = '$RequestItemsText' WHERE entry = '$entry' AND user='$User'");
|
---|
48 |
|
---|
49 | }
|
---|
50 |
|
---|
51 | echo 'Quest: '.$entry.' uloen, v blízké dobì bude zkontrolován a vloen na server.!<br />';
|
---|
52 | ++$entry;
|
---|
53 | echo 'Pøekládat: <a href="Form.php?entry='.$entry.'">['.$entry.']</a> ';
|
---|
54 |
|
---|
55 | //nastavení hodnoty 1 pro updatování statistiky
|
---|
56 | $Database->SQLCommand("UPDATE var SET Value = '1' WHERE Name = 'UpdateStatistic'");
|
---|
57 |
|
---|
58 |
|
---|
59 | $Database->Disconnect();
|
---|
60 | }
|
---|
61 | ?>
|
---|
62 | </body>
|
---|
63 | </html>
|
---|