Changeset 56 for administrace/george/gm_news.php
- Timestamp:
- Aug 21, 2007, 4:15:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
administrace/george/gm_news.php
r55 r56 1 1 <?php 2 $Database->select_db('wow');3 2 4 3 if(array_key_exists('action', $_GET)) … … 6 5 if($_GET['action'] == 'add') 7 6 { 7 require_once('../../global.php'); 8 $Database->select_db('wow'); 8 9 if(array_key_exists('message', $_POST) and array_key_exists('author', $_POST)) 9 10 { 10 11 $Database->insert('gm_news', array('time' => 'NOW()', 'author' => $_POST['author'], 'text' => $_POST['message'])); 11 12 echo('Zpráva byla pøidána!<br>Pokraèujte <a href="../master.php">zde</a>.'); 12 } else echo('Nebyly zadány po adováné údaje pro pøidání aktuality!');13 } else echo('Nebyly zadány po¾adováné údaje pro pøidání aktuality!'); 13 14 } else if($_GET['action'] == 'show_all') 14 15 { … … 20 21 } else echo('Neznámá akce!'); 21 22 } else { 23 $Database->select_db('wow'); 22 24 $DbResult = $Database->select('gm_news', '*,UNIX_TIMESTAMP(time)', '1 ORDER BY time DESC LIMIT 0, 25'); 23 25 while($Row = $DbResult->fetch_array())
Note:
See TracChangeset
for help on using the changeset viewer.