* Delete room from database. * Note. This action is used in both modes and by admin. */ /** * Delete room from database. * Note. This action is used in both modes and by admin. */ case 'deleteRoom': doRoom('delete', 0, $iRoomId); $sContents = parseXml($aXmlTemplates['result'], TRUE_VAL); break; case 'enterRoom': doRoom('enter', $sId, $iRoomId); break; case 'exitRoom': doRoom('exit', $sId, $iRoomId); break; case 'checkRoomPassword': $sId = getValue("SELECT `ID` FROM `" . MODULE_DB_PREFIX . "Rooms` WHERE `ID`='" . $iRoomId . "' AND `Password`='" . $sPassword . "' LIMIT 1"); if (empty($sId)) { $sContents = parseXml($aXmlTemplates['result'], "msgWrongRoomPassword", FAILED_VAL); } else { $sContents = parseXml($aXmlTemplates['result'], "", SUCCESS_VAL); } break; /** * ===> Next actions are needed for XML version only. <=== * Gets information about all online users. * NOTE. This action is used in XML mode and by ADMIN. * @comment Use this function instead of admin function "getOnline". */
if (empty($iRoomId)) { $sContents = parseXml($aXmlTemplates['result'], "msgErrorCreatingRoom", FAILED_VAL); } else { $sContents = parseXml($aXmlTemplates['result'], $iRoomId, SUCCESS_VAL); } break; /** * Delete room from database. * Note. This action is used in both modes and by admin. */ /** * Delete room from database. * Note. This action is used in both modes and by admin. */ case 'deleteRoom': doRoom('delete', 0, $iRoomId, ""); $sContents .= parseXml($aXmlTemplates['result'], TRUE_VAL); break; /** * Chat user changes room. * Note. This action is used in both modes. */ /** * Chat user changes room. * Note. This action is used in both modes. */ case 'changeRoom': getResult("UPDATE `" . MODULE_DB_PREFIX . "CurrentUsers` SET `RoomID`='" . $iRoomId . "', `When`=UNIX_TIMESTAMP(), `Status`='room' WHERE `ID`='" . $sId . "'"); break; /** * ===> Next actions are needed for XML version only. <===