示例#1
0
文件: Rooms.php 项目: 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);
 }
示例#2
0
文件: Rooms.php 项目: Anon215/movim
 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);
 }
示例#3
0
文件: Bookmark.php 项目: Nyco/movim
 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();
 }