Browse the code
| Revision log Information on the revision | |
|---|---|
| Revision: | 233 (differences) |
| Author: | xbright |
| Log message: |
* Updated project.news * Updated MUCkl configuration files (it's recommend to use binding) |
| Change revision: | |
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php # This file is a part of CodingTeam. See <http://www.codingteam.net>. # Copyright (C) 2007-2009 CodingTeam (See AUTHORS and THANKS for details) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, version 3 only. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. class Jabber { private $ct_db; function __construct($db) { $this->ct_db = $db; } function addRoom($projectid, $array) { return $this->ct_db->insert('projects_jabber', array('projectid' => $projectid, 'jid' => $array['jid'], )); } function deleteRoom($projectid, $jid) { $req = $this->ct_db->delete('projects_jabber', array('projectid' => $projectid, 'jid' => $jid)); } function roomExists($projectid, $jid) { $req = $this->ct_db->select('projects_jabber', array('projectid' => $projectid, 'jid' => $jid), '*'); if (count($req)) return TRUE; else return FALSE; } function getRooms($projectid) { return $this->ct_db->select('projects_jabber', array('projectid' => $projectid), '*', 'ORDER BY nbuser DESC'); } } ?>

CodingTeam