blob: c48abc789a35ffca5b549abf14c533981e64d84f (
plain)
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
|
<?php
/**
* Returns room id array
*/
function Room_ids() {
$room_source = sql_select("SELECT `RID` FROM `Room` WHERE `show` = 'Y'");
if ($room_source === false)
return false;
if (count($room_source) > 0)
return $room_source;
return null;
}
/**
* Returns room by id.
*
* @param $id RID
*/
function Room($id) {
$room_source = sql_select("SELECT * FROM `Room` WHERE `RID`=" . sql_escape($id) . " AND `show` = 'Y' LIMIT 1");
if ($room_source === false)
return false;
if (count($room_source) > 0)
return $room_source[0];
return null;
}
?>
|