Changeset 475 for trunk/Modules/Chat/Chat.php
- Timestamp:
- Jan 1, 2013, 12:34:19 PM (12 years ago)
- Location:
- trunk/Modules/Chat
- Files:
-
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Chat/Chat.php
r471 r475 1 1 <?php 2 2 3 include_once(' ../Common/Global.php');3 include_once('Common/Global.php'); 4 4 5 class ChatHistory extends Page5 class PageChatHistory extends Page 6 6 { 7 var $FullTitle = 'Výpis z historie chatu'; 8 var $ShortTitle = 'Historie chatu'; 9 7 function __construct() 8 { 9 parent::__construct(); 10 $this->FullTitle = 'Výpis z historie chatu'; 11 $this->ShortTitle = 'Historie chatu'; 12 $this->NavigationPath[] = array('Name' => $this->ShortTitle, 'URL' => 'chat'); 13 } 14 10 15 function dechexr($Num) 11 16 { … … 17 22 { 18 23 global $MonthNames; 19 24 20 25 if(!$this->System->Modules['User']->CheckPermission('Chat', 'Display')) return('Nemáte oprávnění'); 21 26 22 if(array_key_exists('date',$_GET)) $Date = $_GET['date']; else $Date = date('Y-m-d'); 23 $DateParts = explode('-',$Date); 27 if(array_key_exists('date', $_GET)) $Date = $_GET['date']; 28 else $Date = date('Y-m-d'); 29 $DateParts = explode('-', $Date); 24 30 25 31 $DbResult = $this->Database->select('ChatHistory', 'MAX(Time), MIN(Time)'); 26 32 $RowTotal = $DbResult->fetch_array(); 27 33 28 $StartDateTimeParts = explode(' ', $RowTotal['MIN(Time)']);29 $StartDateParts = explode('-', $StartDateTimeParts[0]);30 $EndDateTimeParts = explode(' ', $RowTotal['MAX(Time)']);31 $EndDateParts = explode('-', $EndDateTimeParts[0]);34 $StartDateTimeParts = explode(' ', $RowTotal['MIN(Time)']); 35 $StartDateParts = explode('-', $StartDateTimeParts[0]); 36 $EndDateTimeParts = explode(' ', $RowTotal['MAX(Time)']); 37 $EndDateParts = explode('-', $EndDateTimeParts[0]); 32 38 33 39 if(!array_key_exists('year', $_SESSION)) $_SESSION['year'] = date('Y', time()); … … 81 87 } 82 88 83 $System->AddModule(new ChatHistory()); 84 $System->Modules['ChatHistory']->GetOutput(); 89 class ModuleChat extends AppModule 90 { 91 function __construct($System) 92 { 93 parent::__construct($System); 94 $this->Name = 'Chat'; 95 $this->Version = '1.0'; 96 $this->Creator = 'Chronos'; 97 $this->License = 'GNU/GPL'; 98 $this->Description = 'Show history of IRC chat and previous SunriseChat'; 99 $this->Dependencies = array(); 100 } 101 102 function Start() 103 { 104 parent::Start(); 105 $this->System->Pages['chat'] = 'PageChatHistory'; 106 } 107 } 85 108 86 109 ?>
Note:
See TracChangeset
for help on using the changeset viewer.