Changeset 296


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.
Location:
trunk
Files:
3 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();     
  • trunk/includes/global.php

    r295 r296  
    3939function ShowShoutbox()
    4040{
    41   global $Database;
    42  
    43   echo('<strong>Shoutbox:</strong>');
     41  global $Database, $Config;
     42 
     43  echo('<strong><a href="'.$Config['Web']['BaseURL'].'action.php?action=ShoutBoxView">Shoutbox:</a></strong>');
    4444  if(Licence(LICENCE_USER)) echo(' <a href="action.php?action=shoutbox">Vložit</a>');
    4545  echo('<div class="box"><table>');
  • trunk/style/style.css

    r294 r296  
    229229}
    230230
     231.shoutbox div
     232{
     233  border-bottom-style: solid;
     234  border-bottom-width: 1px;
     235  border-bottom-color: #e0e0e0;
     236  padding: 5px;
     237}
     238
    231239.page-bottom
    232240{
Note: See TracChangeset for help on using the changeset viewer.