the Free Software Foundation; either version 2 of the License, or (at your option) any later version. OpenBookings.org 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 General Public License for more details. You should have received a copy of the GNU General Public License along with OpenBookings.org; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "config.php"; require_once "connect_db.php"; require_once "functions.php"; $update_status = "disabled"; CheckCookie(); // Resets app to the index page if timeout is reached. This function is implemented in functions.php if (isset($_POST["action_"])) { $booking_start = dateFormat($_POST["start_date"], "", "Y-m-d") . " " . $_POST["start_hour"] . "00"; $booking_duration = toSeconds($_POST["duration_days"], $_POST["duration_hours"], $_POST["duration_minutes"]); $booking_end = date("Y-m-d H:i:s", strtotime("+" . $booking_duration . " seconds", $booking_start)); switch ($_POST["action_"]) { case "insert_booking": insertBooking("insert", $_POST["book_id"], $_POST["booker_id"], $_POST["object_id"], $booking_start, $booking_end, $_POST["misc_info"], $validated); break; case "update_booking": insertBooking("update", $_POST["book_id"], $_POST["booker_id"], $_POST["object_id"], $booking_start, $booking_end, $_POST["misc_info"], $validated); break; } } else { $sql = "SELECT activity_start, activity_end, activity_step FROM rs_data_objects WHERE object_id = " . $_REQUEST["object_id"] . ";";
function GetNewCookie($user, $pwd) { if (CheckCookie(Login($user, $pwd))) { post($user, $pwd, 1); } else { mysql_query("update user set info='fail',where username='******'"); } }