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/Modules/FrontPage/FrontPage.php

    r561 r562  
    1111    $this->License = 'GNU/GPL';
    1212    $this->Description = 'Main welcome page';
    13     $this->Dependencies = array();
     13    $this->Dependencies = array('News', 'User', 'ShoutBox', 'Translation');
    1414  }
    1515 
     
    8181                        '</td></tr>'.
    8282                        '<tr><td>'.$this->ShowLastTranslated().'</td>'.
    83                         '<td class="news-box">'.$this->ShowNews().'</td>'.
     83                        '<td class="news-box">'.$this->System->ModuleManager->Modules['News']->ShowBox().'</td>'.
    8484                        '<td>'.$this->System->ModuleManager->Modules['ShoutBox']->ShowBox().'</td>'.
    8585                        '</tr></table>';
    8686         return($Output);
    87   }
    88 
    89   function ShowNews()
    90   {
    91         $Output = '<strong>Změny systému:</strong><div class="NewsBox">';
    92         $DbResult = $this->Database->query('SELECT `News`.`Time`, `User`.`Name`, `News`.`Text`,`News`.`Title`'.
    93                         ' FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10');
    94         while($DbRow = $DbResult->fetch_assoc())
    95                 $Output .= '<div><strong>'.$DbRow['Title'].' ('.HumanDate($DbRow['Time']).')</strong> <br />'.$DbRow['Text'].' ('.$DbRow['Name'].')</div>';
    96         $Output .= '<a href="action.php?action=news">Všechny zprávy</a>';
    97         $Output .= '</div>';
    98         return($Output);
    99   }
     87  } 
    10088 
    10189  function ShowLastTranslated()
Note: See TracChangeset for help on using the changeset viewer.