Changeset 238
- Timestamp:
- Jan 16, 2008, 9:59:47 PM (17 years ago)
- Location:
- quests
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/action.php
r235 r238 4 4 5 5 if (array_key_exists('delete', $_GET) and Licence(1)) { 6 $ questID = $_GET['ID'];7 $Database->SQLCommand("DELETE FROM quests WHERE ID = '$ questID' AND Language <> '0'");6 $QuestID = $_GET['ID']; 7 $Database->SQLCommand("DELETE FROM quests WHERE ID = '$QuestID' AND Language <> '0'"); 8 8 echo 'Quest byl smazán!'; 9 WriteLog('Quest smazán! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 4); 10 } 11 12 if (array_key_exists('NotComplete', $_GET) and Licence(1)) { 13 $QuestID = $_GET['ID']; 14 $Database->SQLCommand("UPDATE quests SET Complete = '0' WHERE ID = '$QuestID'"); 15 echo 'Quest byl vrázen k opravì!'; 16 WriteLog('Quest Byl brácen k opravì <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 4); 9 17 } 10 18 … … 15 23 U¾ivatel: '; 16 24 if (Licence(0)) echo '<b>'.$_SESSION['User'].'</b><br />'; else echo '<input type="text" name="user"><br />'; 17 echo 'Text zprávy: <input type="text" name="text" size=" 20"><br />25 echo 'Text zprávy: <input type="text" name="text" size="50"> 18 26 <input type="submit" value="Ulo¾it"><br /> 19 27 </form>'; … … 29 37 echo 'Zpráva vlo¾ena!'; 30 38 } 31 }32 33 if (array_key_exists('NotComplete', $_GET) and Licence(1)) {34 $questID = $_GET['ID'];35 $Database->SQLCommand("UPDATE quests SET Complete = '0' WHERE ID = '$questID'");36 echo 'Quest byl vrázen k opravì!';37 39 } 38 40 -
quests/export.php
r235 r238 33 33 $AddObjectiveText4 = @$_GET['AddObjectiveText4']; 34 34 35 if (($Export == 'Mangos') and (Licence(1) )) {} else die('');35 if (($Export == 'Mangos') and (Licence(1) == False)) {die('Nemáte oprávnìní');} 36 36 37 37 … … 143 143 header("Location: ".$save_filename); 144 144 145 } 145 } echo 'vyskytla se chyba!'; 146 146 } 147 148 WriteLog('Sta¾ení SQL souboru: Export: '.$Export.' Diakritika: '.$Diacritical, 2); 147 149 148 150 … … 151 153 <div style=" border: 2px dotted black; padding: 0px 5px 5px 5px;"> 152 154 <big><b><i>Pro server:</b></i></big><br> 155 <b>Export Questù:</b><br /> 153 156 <form action="export.php" method="get"> 154 157 <table border="1"> … … 189 192 </td></tr> 190 193 </table> 191 <br><input type="submit" value="Generovat"> 194 <br><input type="submit" value="Generovat"> SQL soubor (Sta¾ení) 192 195 </form> 196 <b>Èeský pøeklad MaNGOS Minimanageru:</b><br /> 197 - Stránky projektu: <a href="http://sourceforge.net/projects/mmfpm/">http://sourceforge.net/projects/mmfpm/</a><br> 198 - Pøeklad: <a href="http://wow.zdechov.net/minimanager/lang/csCZ.zip">Èe¹tina do minimanageru</a><br> 199 - Diskusní forum pro pøípadné pøipomínky: <a href="http://wow.zdechov.net/forum/viewtopic.php?p=5533">Forum</a> 200 193 201 </div> 194 202 <br> -
quests/includes/global.php
r235 r238 10 10 $Database->SelectDatabase($Config['Database']['Database']); 11 11 12 //globální funkce 13 include('global_function.php'); 14 15 12 16 //pøihlá¹ení 13 17 if (array_key_exists('LoginUser',$_POST)) { … … 18 22 $_SESSION['UserID'] = $Line['ID']; 19 23 $_SESSION['User'] = $Line['user']; 24 WriteLog('Login: '.$_SESSION['User'], 3); 20 25 } 21 26 //odhlá¹ení … … 24 29 $_SESSION['Pass'] = ''; 25 30 $_SESSION['UserID'] = ''; 31 WriteLog('Odhlá¹ení', 3); 26 32 } 27 33 //záznam o aktivitì 28 34 if (Licence(0)) 29 35 $Database->SQLCommand("UPDATE user SET LastIP = '".$_SERVER['REMOTE_ADDR']."', LastLogin = now() WHERE ID = ".$_SESSION['UserID']); 30 31 function Licence($Licence)32 { // BEGIN function Licence33 global $Database;34 if (isset($_SESSION['User']) and $_SESSION['User'] <> '') {35 // $User = $_SESSION['User'];36 $Pass = $_SESSION['Pass'];37 38 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID']));39 if (!$Line) {40 return false;41 } else {42 if ($Licence == 1) {43 if ($Line['gm'] == 1) {44 return true;45 } else return false;46 }47 If ($Line['pass'] == $Pass) {48 49 // zapsání poslení pou¾ité IP50 // $Addres = $_SERVER['REMOTE_ADDR'];51 // $Database->SQLCommand("UPDATE user SET LastLogin = now(), LastIP = '$Addres' WHERE user = '$User'");52 53 return True;54 } else { return False;55 // die('Nemáte zde pøístup, pøihla¹te se: <a href="'.$Config['Web']['BaseURL'].'">zde</a>');56 }57 }58 } else { return False;59 // die('Nemáte zde pøístup, pøihla¹te se: <a href="'.$Config['Web']['BaseURL'].'">zde</a>');60 }61 62 } // END function Licence63 64 65 $Texts = array(66 // array('Title'),67 array('Details'),68 array('Objectives'),69 array('OfferRewardText'),70 array('RequestItemsText'),71 array('EndText'),72 array('ObjectiveText1'),73 array('ObjectiveText2'),74 array('ObjectiveText3'),75 array('ObjectiveText4'),76 );77 36 78 37 … … 110 69 // echo 'Administrace:'; 111 70 echo '<br /><a href="priorite.php" Title="Naètení priority questù (Moderator only)">Priorita</a><br />'; 71 echo '<a href="log.php" Title="Log dìní (Moderator only)">Log</a><br />'; 112 72 } 113 73 -
quests/priorite.php
r231 r238 41 41 '; 42 42 43 WriteLog('Naètení priority questù!', 4); 43 44 44 45 -
quests/save.php
r237 r238 31 31 $UserID = $Line['user']; 32 32 $complete = 1; 33 WriteLog('Quest: '.$entry.' Opraven moderátorem! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 4); 33 34 } 34 35 … … 49 50 // $Database->SQLCommand("UPDATE ajquests SET state = '1' WHERE entry = '$entry'"); 50 51 echo 'Quest: '.$entry.' ulo¾en!<br />'; 52 WriteLog('Quest: '.$entry.' ulo¾en! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 1); 51 53 } else { 52 54 $sql = "UPDATE quests SET complete = '$complete', Title = '$Title', … … 60 62 // echo $sql.'<br />'; 61 63 echo 'Zmìny v Questu: '.$entry.' ulo¾eny!<br />'; 64 WriteLog('Zmìny v Questu: '.$entry.' ulo¾eny! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 1); 62 65 $Database->SQLCommand("DELETE FROM `quests_vote` WHERE `quests_vote`.`IDquest` = ".$QuestID); 63 66 } … … 65 68 66 69 // ++$QuestID; 67 echo 'Pøekládat: <a href="ListQuests.php?selection">Nepøelo ¾ené</a> ';70 echo 'Pøekládat: <a href="ListQuests.php?selection">Nepøeloµené</a> '; 68 71 69 72 } -
quests/statistic.php
r235 r238 9 9 <br /> 10 10 <br /> 11 Poèet vyexportování questù: <b> 12 <?php 13 14 $ID = $Database->SQLCommand("SELECT count(*) FROM log WHERE type = 2"); 15 $Line = mysql_fetch_row($ID); 16 echo $Line[0]; 17 ?> 18 </b><br /><br /> 11 19 <b>Seznam u¾ivatelù: </b> 12 20 <table border="1" cellpadding="1" cellspacing="0">
Note:
See TracChangeset
for help on using the changeset viewer.