Changeset 383 for beta/pages/admin.php
- Timestamp:
- Sep 28, 2008, 11:22:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
beta/pages/admin.php
r377 r383 1 1 <?php 2 echo "<center>"; 3 $lvl = $player -> GetGmLvl(); 4 echo " 5 <form method=\"post\"> 6 <table align=\"center\" border=\"0\" width=\"300\"> 7 <tr> 8 <td colspan=\"2\"><b>Přidat novinku</b></td> 9 </tr> 10 <tr> 11 <td>Nadpis</td> 12 <td><input type=\"text\" name=\"nadpis\"></td> 13 </tr> 14 <tr> 15 <td>Text</td> 16 <td> 17 <textarea cols=\"30\" rows=\"5\" name=\"text\" autocomplete=\"off\"></textarea> 18 </td> 19 </tr> 20 <tr> 21 <td>Kategorie</td> 22 <td> 23 <select name=\"kategorie\"> 24 <option value=\"\">Vyberte :</option> 25 <option value=\"1\">Server novinky</option> 26 <option value=\"2\">GM novinky</option> 27 <option value=\"3\">In-game novinky</option> 28 <option value=\"4\">Články</option> 29 </select> 30 </td> 31 </tr> 32 <tr> 33 <td></td> 34 <td><input type=\"submit\" value=\"Přidat\" name=\"add\"></td> 35 </tr> 36 37 </table> 38 </form> 39 "; 40 41 if (isset($_POST["add"])) 42 { 43 $db -> select_db("web"); 44 $result = $db -> query("INSERT INTO `articles` ( `id` , `title` , `autor` , `date` , `category` , `text`) VALUES (NULL, '".$_POST["nadpis"]."', '".$_COOKIE["hof-nick"]."', NULL , '".$_POST["kategorie"]."' , '".$_POST["text"]."');"); 45 echo "Přidáno !"; 46 } 47 48 49 echo "</center>"; 2 echo "Menu"; 50 3 ?>
Note:
See TracChangeset
for help on using the changeset viewer.