Exemplo n.º 1
0
Arquivo: Rooms.php Projeto: Trim/movim
 function prepareRooms()
 {
     $view = $this->tpl();
     $cod = new \modl\ConferenceDAO();
     $view->assign('conferences', $cod->getAll());
     $view->assign('room', $this->get('r'));
     return $view->draw('_rooms', true);
 }
Exemplo n.º 2
0
 function prepareRooms($edit = false)
 {
     $view = $this->tpl();
     $cod = new \modl\ConferenceDAO();
     $list = $cod->getAll();
     $connected = [];
     if (is_array($list)) {
         foreach ($list as $key => $room) {
             if ($this->checkConnected($room->conference, $room->nick)) {
                 $room->connected = true;
                 array_push($connected, $room);
                 unset($list[$key]);
             }
         }
         $connected = array_merge($connected, $list);
     }
     $view->assign('edit', $edit);
     $view->assign('conferences', $connected);
     $view->assign('room', $this->get('r'));
     return $view->draw('_rooms', true);
 }
Exemplo n.º 3
0
 function ajaxSetBookmark($item = false)
 {
     $arr = array();
     if ($item) {
         array_push($arr, $item);
     }
     $sd = new \modl\SubscriptionDAO();
     $cd = new \modl\ConferenceDAO();
     foreach ($sd->getSubscribed() as $s) {
         array_push($arr, array('type' => 'subscription', 'server' => $s->server, 'title' => $s->title, 'subid' => $s->subid, 'tags' => unserialize($s->tags), 'node' => $s->node));
     }
     foreach ($cd->getAll() as $c) {
         array_push($arr, array('type' => 'conference', 'name' => $c->name, 'autojoin' => $c->autojoin, 'nick' => $c->nick, 'jid' => $c->conference));
     }
     $b = new Set();
     $b->setArr($arr)->setTo($this->user->getLogin())->request();
 }