Changeset 296 for trunk/action.php


Ignore:
Timestamp:
Dec 28, 2009, 11:57:36 AM (15 years ago)
Author:
george
Message:
  • Přidáno: Zobrazení zpráv ze shoutboxu na samostatné stránce.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/action.php

    r295 r296  
    200200}
    201201
     202function ShoutBoxView()
     203{
     204  global $Database;
     205 
     206  $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `shoutbox`');
     207  $DbRow = mysql_fetch_row($DbResult);
     208  $PageList = GetPageList($DbRow[0]);   
     209
     210  echo('<h3>Shoutbox</h3>');
     211  echo($PageList['Output']);
     212  if(Licence(LICENCE_USER)) echo(' <a href="action.php?action=shoutbox">Vložit</a>');
     213  echo('<div class="shoutbox">');
     214  $ID = $Database->SQLCommand('SELECT * FROM shoutbox ORDER BY ID DESC '.$PageList['SQLLimit']);
     215  while($Line = mysql_fetch_assoc($ID))
     216    echo('<div><strong>'.$Line['user'].'</strong>: '.htmlspecialchars($Line['text']).'</div>');
     217  echo('</div>');
     218  echo($PageList['Output']);
     219}
     220
    202221ShowPage();
    203222
     
    211230else if($Action == 'delete') Delete();
    212231else if($Action == 'dbkit') DatabaseKit();
     232else if($Action == 'ShoutBoxView') ShoutBoxView();
    213233
    214234ShowFooter();     
Note: See TracChangeset for help on using the changeset viewer.