Changeset 227
- Timestamp:
- Jan 14, 2008, 9:43:21 PM (17 years ago)
- Location:
- quests
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/action.php
r220 r227 7 7 $Database->SQLCommand("DELETE FROM quests WHERE ID = '$questID' AND Language <> '0'"); 8 8 echo 'Quest byl smazán!'; 9 } 10 11 if (array_key_exists('shoutbox', $_GET)) { 12 $shoutbox = $_GET['shoutbox']; 13 if ($shoutbox == '') { 14 echo '<form action="action.php?shoutbox=1" method="post"> 15 U¾ivatel: '; 16 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 /> 18 <input type="submit" value="Ulo¾it"><br /> 19 </form>'; 20 } else { 21 if (Licence(0)) $user = $_SESSION['User']; else { 22 $user = $_POST['user']; 23 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE user = '$user'")); 24 if (!$Line) {} else die('Toto jméno je registrováno nemù¾ete psát za nìj. Pokud jste '.$user.' pak se pøihlaste.'); 25 } 26 $text = $_POST['text']; 27 $Database->SQLCommand("INSERT INTO `shoutbox` ( `user` , `text` , `date` , `IP` ) 28 VALUES ( '$user', '$text', now(), '".$_SERVER['REMOTE_ADDR']."');"); 29 echo 'Zpráva vlo¾ena!'; 30 } 9 31 } 10 32 … … 22 44 if (($vote > 5) OR ($vote < 1)) die ('Spadná známka'); 23 45 24 //TODO: if (Licence(0)) die('Hlasovat mù ¾ou jenom registrovaní!');46 //TODO: if (Licence(0)) die('Hlasovat mùµou jenom registrovaní!'); 25 47 26 48 … … 35 57 36 58 $Database->SQLCommand("INSERT INTO `quests_vote` ( `IDquest` , `IDuser` , `vote` ) VALUES ( '$questID', '$IDuser', '$vote');"); 37 echo 'Hlas byl ulo ¾en! Hlasoval jste: '.$vote.'<br /> Nyní je známka questu '.$NewVote;59 echo 'Hlas byl uloµen! Hlasoval jste: '.$vote.'<br /> Nyní je známka questu '.$NewVote; 38 60 39 61 } else echo 'Ji¾ jste hlasoval!'; … … 100 122 ShowFooter(); 101 123 ?> 124 -
quests/includes/global.php
r225 r227 90 90 <tr> 91 91 <td width="150" valign="top"> 92 <br />93 <b>Odkazy:</b><br />94 92 <a href="index.php">Domù</a><br /> 95 93 <a href="http://wow.zdechov.net/forum/viewforum.php?f=22">Forum projektu</a><br /> … … 115 113 116 114 echo '<br /><form action="action.php" method="get"> 117 <input type="text" name="search" size=" 13"><br>115 <input type="text" name="search" size="8"> 118 116 <input type="submit" value="Hledat"> 119 117 </form> … … 121 119 122 120 if (Licence(0)) { 123 echo 'Jste pøihlá¹en jako: <b>'.$_SESSION['User'].'</b> <a href="index.php?Logout">Odhlásit</a>';121 // echo 'Jste pøihlá¹en jako: <b>'.$_SESSION['User'].'</b> <a href="index.php?Logout">Odhlásit</a>'; 124 122 } else { 125 123 echo ' … … 140 138 '; 141 139 } 142 echo '<br /><br />Online u¾ivatelé:<br />'; 140 141 echo '<p style=" overflow: auto; width: 100%; height: 200px;"> 142 <b>Shoutbox: </b><a href="action.php?shoutbox">Vlo¾it</a> 143 <table border="1" cellpadding="1" cellspacing="0">'; 144 $ID = $Database->SQLCommand("SELECT * FROM shoutbox ORDER BY ID DESC LIMIT 10"); 145 while ($Line = mysql_fetch_array($ID)) 146 echo '<tr><td><small><b>'.$Line['user'].'</b>: '.$Line['text'].'</small></td></tr>'; 147 echo '</table> 148 </p> 149 '; 150 151 echo 'Online u¾ivatelé:<br />'; 143 152 $ID = $Database->SQLCommand("SELECT user FROM `user` WHERE LastLogin >= Now()-300"); 144 153 while ($Line = mysql_fetch_array($ID)) … … 159 168 </td> 160 169 </tr> 161 <tr><td></td><td> <span style="color: grey">Program naprogramoval maron (maron2@cetrum.cz)</span> </td></tr> 170 <tr> 171 <td></td><td> <span style="color: grey">Program naprogramoval maron (maron2@cetrum.cz)</span>'; 172 if (Licence(0)) 173 echo ' Jste pøihlá¹en jako: <b>'.$_SESSION['User'].'</b> <a href="index.php?Logout">Odhlásit</a>'; 174 echo ' </td></tr> 162 175 </table> 163 176 </body> -
quests/index.php
r224 r227 30 30 - Názvy mìst, míst, postav, vìcí aj. pøekládejte pouze jednodu¹í slova jako mìsto, moèál, les.. slo¾itìj¹í vykloòujte (pø. Stormwind city -> Mìsto Stormwind, at Camp Taurajo -> u Tábora Taurajo)<br /> 31 31 <br /> 32 - Zaèít pøekládat mù¾ete kliknutím na Nepøelo¾ené Questy<br><br >32 - Zaèít pøekládat mù¾ete kliknutím na Nepøelo¾ené Questy<br><br /> 33 33 34 34 … … 44 44 $ID = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user Where ID ='$UserID'")); 45 45 if ($ID['Email'] == '' ) 46 Echo '< br><br /><span style="color: red"><b>Nemáte nastavený e-mail, <a href="Options.php">nastavit</a></b></span>';46 Echo '<span style="color: red"><b>Nemáte nastavený e-mail, <a href="Options.php">nastavit</a></b></span>'; 47 47 48 48 -
quests/statistic.php
r204 r227 2 2 3 3 include('includes/global.php'); 4 5 $ID = mysql_fetch_row($Database->SQLCommand("SELECT count(entry) FROM quests WHERE Language <> '0' AND Complete = '1'"));6 $NumberTranslate = $ID[0];7 8 $ID = mysql_fetch_row($Database->SQLCommand("SELECT count(*) FROM quests WHERE Language = '0'"));9 $NumberAJQuests = $ID[0];10 4 11 $Percent = ($NumberTranslate/$NumberAJQuests)*100; 5 ?> 12 6 13 $PercentBar = $Percent*4; 14 $obrazek = imagecreatetruecolor(400,60); 15 $Color1 = imagecolorallocate($obrazek,225,246,247); 16 $Color2 = imagecolorallocate($obrazek,77,225,251); 17 $Color3 = imagecolorallocate($obrazek,2,59,199); 18 imagefilledrectangle($obrazek,0,0,400,59,$Color1); 19 imagefilledrectangle($obrazek,0,0,$PercentBar,59,$Color2); 20 imagestring($obrazek, 10, 120, 15, $NumberTranslate.'/'.$NumberAJQuests, $Color3); 21 imagestring($obrazek, 10, 120, 30, $Percent.' %', $Color3); 22 imagestring($obrazek, 1, 240, 50, 'Aktualizováno: '.date("m.d.y H:i"), $Color3); 23 24 25 // header('Content-Type: image/png'); 26 imagepng($obrazek,'statistic.png'); 27 imagedestroy($obrazek); 28 29 echo '<img src="statistic.png">'; 7 <b>Statistika pøelo¾ených questù:</b><br> 8 <img alt="quests" src="quests_statistic.php" title="statistika pøekladu úkolù"> 9 10 <?php 30 11 31 12 ShowFooter();
Note:
See TracChangeset
for help on using the changeset viewer.