Changeset 562 for trunk/action.php


Ignore:
Timestamp:
Aug 13, 2013, 11:45:33 PM (11 years ago)
Author:
chronos
Message:
  • Modified: News admin announcement message system transformed to application module.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/action.php

    r561 r562  
    184184}
    185185
    186 function ShowNewsHistory()
    187 {
    188   global $System, $User;
    189  
    190   $DbResult = $System->Database->query('SELECT COUNT(*) FROM `News`');
    191   $DbRow = $DbResult->fetch_row();
    192   $PageList = GetPageList($DbRow[0]);   
    193 
    194   $Output = '<h3>Novinky</h3>'.$PageList['Output'];
    195   if($User->Licence(LICENCE_ADMIN)) $Output .= ' <a href="admin/?action=addnew">Vložit</a>';
    196   $Output .= '<div class="shoutbox">';
    197   $DbResult = $System->Database->query('SELECT `News`.`Time`, `News`.`Text`, `News`.`Title`, '.
    198         '`User`.`Name` AS `User` FROM `News` JOIN `User` ON `User`.`Id`=`News`.`User` ORDER BY `News`.`Time` DESC '.$PageList['SQLLimit']);
    199   while($Line = $DbResult->fetch_assoc())
    200     $Output .= '<div><strong>'.$Line['Title'].' ('.HumanDate($Line['Time']).')</strong><br/> '.$Line['Text'].' ('.$Line['User'].')</div>';
    201   $Output .= '</div>'.$PageList['Output'];
    202   return($Output);
    203 }
    204186
    205187if(array_key_exists('group', $_GET)) $GroupId = LoadGroupIdParameter();
     
    209191if(array_key_exists('action', $_GET)) $Action = $_GET['action'];
    210192
    211 if($Action == 'news') $Output = ShowNewsHistory();
    212193else if($Action == 'search') $Output = Search();
    213194else if($Action == 'dbkit') $Output = DatabaseKit();
Note: See TracChangeset for help on using the changeset viewer.