Пример #1
0
        <div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span >&times;</span></button>
                <h4 class="modal-title text-left">Add New Room</h4>
              </div>
              <div class="modal-body ">
				  <?php 
        if (isset($_POST['addRoomBtn'])) {
            $roomNum = $_POST['roomNum'];
            //Check if is not Null
            if ($validate->checkNotNull($roomNum)) {
                if ($validate->checkNumeric($roomNum)) {
                    if ($rooms->checkRoomNum($roomNum)) {
                        if ($rooms->addRoom($roomNum)) {
                            header("location:rooms.php?action=Insert Sucsessful Completed");
                        } else {
                            ?>
											<p class="alert alert-danger">Some Things Wrong in Connection With DataBase Try Again Later</p>    
										<?php 
                        }
                    } else {
                        ?>
										<p class="alert alert-danger">This Room Inserted To The DataBase Befor</p>    
									<?php 
                    }
                } else {
                    ?>
                            	<p class="alert alert-danger">Room Number Must Be Number </p>    
                                <?php 
Пример #2
0
<?php

/**
 * Created by IntelliJ IDEA.
 * User: hakaya
 * Date: 18.06.2015
 * Time: 14:33
 */
include "../include/db/connectionconf.php";
include "../include/db/rooms.php";
$rom = new rooms();
$baslik = $_GET['baslik'];
$renk = $_GET['renk'];
$rom->addRoom($baslik, $renk);