Changeset 738 for trunk/Modules/Chat


Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (10 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
Location:
trunk/Modules/Chat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Chat/Chat.php

    r586 r738  
    1010    $this->ParentClass = 'PagePortal';
    1111  }
    12  
     12
    1313  function dechexr($Num)
    1414  {
     
    2020  {
    2121    global $MonthNames;
    22    
     22
    2323    if(!$this->System->User->CheckPermission('Chat', 'Display')) return('Nemáte oprávnění');
    2424
    25     if(array_key_exists('date', $_GET)) $Date = $_GET['date']; 
     25    if(array_key_exists('date', $_GET)) $Date = $_GET['date'];
    2626      else $Date = date('Y-m-d');
    2727    $DateParts = explode('-', $Date);
     
    5656            if(($Year == $StartDateParts[0]) and ($Month == $StartDateParts[1])) $StartDay = ($StartDateParts[2]+0); else $StartDay = 1;
    5757            if(($Year == $EndDateParts[0]) and ($Month == $EndDateParts[1])) $EndDay = ($EndDateParts[2]+0); else $EndDay = date('t',mktime(0,0,0,$Month,0,$Year));
    58             for($Day = $StartDay; $Day <= $EndDay; $Day++) 
    59             { 
     58            for($Day = $StartDay; $Day <= $EndDay; $Day++)
     59            {
    6060              $Text = '<a href="?date='.$Year.'-'.$Month.'-'.$Day.'">'.$Day.'</a> ';
    6161              if(($DateParts[0] == $Year) and ($DateParts[1] == $Month) and ($DateParts[2] == $Day)) $Text = '<strong>'.$Text.'</strong>';
     
    7676    {
    7777      $Text = $Row['Text'];;
    78       // StrTr($Row['text'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 
     78      // StrTr($Row['text'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE");
    7979      $Output .= '['.date('d.m.Y H:i:s',$Row['UNIX_TIMESTAMP(Time)']).'] <span style="color: #'.$this->dechexr($Row['Color']).'"><strong>&lt;'.$Row['Nick'].'&gt;</strong> '.(htmlspecialchars($Text)).'</span><br>';
    8080    }
     
    9797    $this->Dependencies = array();
    9898  }
    99  
     99
    100100  function DoStart()
    101101  {
    102102    $this->System->Pages['chat'] = 'PageChatHistory';
    103   } 
     103  }
    104104}
  • trunk/Modules/Chat/irc_bot.php

    r577 r738  
    1313  var $File;
    1414
    15   function __construct() 
     15  function __construct()
    1616  {
    1717    $this->Jokes = file($this->JokeFileName);
     
    7474      $Line = substr($Line, strlen($Commands[0]));
    7575      $Commands[1] = substr($Line, 0, strpos($Line, ':') + 1);
    76       $Commands[2] = substr($Line, strlen($Commands[1]));     
     76      $Commands[2] = substr($Line, strlen($Commands[1]));
    7777      //print_r($Commands);
    7878
     
    8989      }
    9090
    91      
     91
    9292      explode(':', $Line);
    9393      foreach($Commands as $Index => $Item)
     
    185185
    186186        // hjoke - Posle nahodny vtip
    187         if($Command == 'hjoke') 
     187        if($Command == 'hjoke')
    188188        {
    189189          $Joke = ($this->Jokes[rand(0, (sizeof($this->Jokes) - 1))]);
Note: See TracChangeset for help on using the changeset viewer.