} } else { $to_return = false; } } jecho($to_return); break; /** * Getting cameras list */ /** * Getting cameras list */ case "get-cameras": $camera = array(); $sql = $QUERIES->getCamerasList(); $result = mysql_query($sql) or die("Error: " . mysql_error()); while ($row = mysql_fetch_array($result)) { $camera[] = array("id" => $row["cameraid"], "text" => $row["cameraid"]); } jecho($camera); break; /** * Logging out */ /** * Logging out */ case "logout": unset($_SESSION["user"]); unset($_SESSION["frame_id"]);