2013-12-29 15:08:33 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns room id array
|
|
|
|
*/
|
|
|
|
function mRoomList() {
|
2014-01-05 19:35:01 +01:00
|
|
|
$room_source = sql_select("SELECT `RID` FROM `Room` WHERE `show` = 'Y'");
|
2013-12-29 15:08:33 +01:00
|
|
|
if ($room_source === false)
|
|
|
|
return false;
|
|
|
|
if (count($room_source) > 0)
|
|
|
|
return $room_source;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns room by id.
|
|
|
|
*
|
|
|
|
* @param $id RID
|
|
|
|
*/
|
|
|
|
function mRoom($id) {
|
2014-01-05 19:35:01 +01:00
|
|
|
$room_source = sql_select("SELECT * FROM `Room` WHERE `RID`=" . sql_escape($id) . " AND `show` = 'Y' LIMIT 1");
|
2013-12-29 15:08:33 +01:00
|
|
|
if ($room_source === false)
|
|
|
|
return false;
|
|
|
|
if (count($room_source) > 0)
|
|
|
|
return $room_source[0];
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|