Changeset 346 for trunk/Modules/Chat/Chat.php
- Timestamp:
- Jan 17, 2012, 2:10:21 PM (13 years ago)
- Location:
- trunk/Modules/Chat
- Files:
-
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Chat/Chat.php
r343 r346 1 1 <?php 2 3 include_once('../global.php');4 5 2 6 3 class ChatHistory extends Page … … 18 15 { 19 16 global $MonthNames; 20 17 21 18 if(!$this->System->Models['User']->CheckPermission('Chat', 'Display')) return('Nemáte oprávnění'); 22 19 23 if(array_key_exists('date',$_GET)) $Date = $_GET['date']; else $Date = date('Y-m-d'); 24 $DateParts = explode('-',$Date); 20 if(array_key_exists('date', $_GET)) $Date = $_GET['date']; 21 else $Date = date('Y-m-d'); 22 $DateParts = explode('-', $Date); 25 23 26 24 $DbResult = $this->Database->select('ChatHistory', 'MAX(Time), MIN(Time)'); 27 25 $RowTotal = $DbResult->fetch_array(); 28 26 29 $StartDateTimeParts = explode(' ', $RowTotal['MIN(Time)']);30 $StartDateParts = explode('-', $StartDateTimeParts[0]);31 $EndDateTimeParts = explode(' ', $RowTotal['MAX(Time)']);32 $EndDateParts = explode('-', $EndDateTimeParts[0]);27 $StartDateTimeParts = explode(' ', $RowTotal['MIN(Time)']); 28 $StartDateParts = explode('-', $StartDateTimeParts[0]); 29 $EndDateTimeParts = explode(' ', $RowTotal['MAX(Time)']); 30 $EndDateParts = explode('-', $EndDateTimeParts[0]); 33 31 34 32 if(!array_key_exists('year', $_SESSION)) $_SESSION['year'] = date('Y', time()); … … 82 80 } 83 81 84 $System->AddModule(new ChatHistory()); 85 $System->Modules['ChatHistory']->GetOutput(); 82 class ModuleChat extends Module 83 { 84 function __construct($Database, $System) 85 { 86 parent::__construct($Database, $System); 87 $this->Name = 'Chat'; 88 $this->Version = '1.0'; 89 $this->Creator = 'Chronos'; 90 $this->License = 'GNU/GPL'; 91 $this->Description = 'Show history of IRC chat and previous SunriseChat'; 92 $this->Dependencies = array(); 93 $this->Models = array(); 94 } 95 96 function Init() 97 { 98 $this->System->Pages['chat'] = 'ChatHistory'; 99 } 100 } 86 101 87 102 ?>
Note:
See TracChangeset
for help on using the changeset viewer.