Esempio n. 1
0
 public function load()
 {
     parent::load();
     $this->Filter = new FilterWordsModel();
     $m = new ChatModel();
     if ($this->isPost() && isset($_POST['text'])) {
         $text = stripslashes(htmlspecialchars(trim($_POST['text'])));
         if ($text != "") {
             $m->SendToChat($this->data['name'], $this->player->playerId, $text);
         }
     }
     $m->DeleteOldChat();
     $this->chats = $m->GetFromChat();
     $m->dispose();
 }
Esempio n. 2
0
 public function load()
 {
     parent::load();
     $this->Filter = new FilterWordsModel();
     $m = new ChatModel();
     $this->chats = $m->GetFromChat();
     $storCtat = array();
     while ($this->chats->next()) {
         $text = $this->Filter->FilterWords($this->chats->row['text']);
         $storCtat[$this->chats->row['ID']] = array(date("g:i A", $this->chats->row['date']), $this->chats->row['username'], $text, $this->chats->row['userid']);
     }
     ksort($storCtat);
     foreach ($storCtat as $ChatLine) {
         echo "<div class=\"msgln\">(" . $ChatLine[0] . ") <b><a href=\"profile.php?uid=" . $ChatLine[3] . "\" target=\"_blank\">" . $ChatLine[1] . "</a></b>: " . $ChatLine[2] . "<br></div>";
     }
     $m->dispose();
 }
Esempio n. 3
0
 function load()
 {
     parent::load();
     $this->Filter = new FilterWordsModel();
     $m = new ChatModel();
     $this->chats = $m->GetFromChat();
     $storCtat = array();
     while ($this->chats->next()) {
         $text = $this->Filter->FilterWords($this->chats->row['text']);
         $storCtat[$this->chats->row['ID']] = array(date('g:i A', $this->chats->row['date']), $this->chats->row['username'], $text, $this->chats->row['userid']);
     }
     ksort($storCtat);
     foreach ($storCtat as $ChatLine) {
         echo '<div class="msgln">(' . $ChatLine[0] . ') <b><a href="profile.php?uid=' . $ChatLine[3] . '" target="_blank">' . $ChatLine[1] . '</a></b>: ' . $ChatLine[2] . '<br></div>';
     }
     $m->dispose();
 }