function registerRoom($id, $rtype, $floor, $prize)
{
    include "select_Room.php";
    $value = selectRoom($id);
    if ($value == false) {
        mysql_query("INSERT INTO  rooms (id,rtype,floor,prize) VALUES ('" . $id . "','" . $rtype . "','" . $floor . "','" . $prize . "');");
        return true;
    } else {
        return false;
    }
}
Exemple #2
0
            <tr>
               <td bgcolor="#D9D9FF" align="center">3 pm</td>
               <?php 
selectRoom('S1500');
timeLine('S1500', 'Saturday 3:00pm', $checked);
timeLine('S1510', 'Saturday 3:10pm', $checked);
timeLine('S1520', 'Saturday 3:20pm', $checked);
timeLine('S1530', 'Saturday 3:30pm', $checked);
timeLine('S1540', 'Saturday 3:40pm', $checked);
timeLine('S1550', 'Saturday 3:50pm', $checked);
?>
            </tr>
            <tr>
               <td bgcolor="#6699FF" align="center">4 pm</td>
               <?php 
selectRoom('S1600');
timeLine('S1600', 'Saturday 4:00pm', $checked);
timeLine('S1610', 'Saturday 4:10pm', $checked);
timeLine('S1620', 'Saturday 4:20pm', $checked);
timeLine('S1630', 'Saturday 4:30pm', $checked);
timeLine('S1640', 'Saturday 4:40pm', $checked);
timeLine('S1650', 'Saturday 4:50pm', $checked);
?>
            </tr>
            </table>
         <input type="submit" value="Update" name="Update">
         <input type="submit" value="Clear Schedule" name="Reset">
      </form>
      <?php 
footer("Return to Event Selection", "AdminSchedule.php");
?>
Exemple #3
0
        ?>
" name="EventID"/>
                  <input type="hidden" value="<?php 
        print $SchedID;
        ?>
" name="SchedID"/>
                  <input type="submit" value="Update" name="Save"/>
               </td>
               <td colspan="2">Day: <?php 
        selectDay(substr($_REQUEST['StartTime'], 0, 1));
        ?>
Time: <?php 
        selectTime($_REQUEST['StartTime']);
        ?>
Room<?php 
        selectRoom($_REQUEST['RoomID']);
        print $error;
        ?>
</td>
            </tr>
         <?php 
    }
    $cntResult = $db->query("select    count(*)\n                                      from     {$EventScheduleTable} s,\n                                               {$RoomsTable}         r\n                                      where    s.EventID = '{$EventID}'\n                                      and      s.RoomID  = r.RoomID\n                                      order by StartTime") or die("Unable to get schedule information for event:" . sqlError());
    if ($cntResult->fetchColumn() > 0) {
        $cntResult = $db->query("select    s.StartTime,\n                                                  s.EndTime,\n                                                  r.RoomName,\n                                                  s.RoomID,\n                                                  s.SchedID\n                                         from     {$EventScheduleTable} s,\n                                                  {$RoomsTable}         r\n                                         where    s.EventID = '{$EventID}'\n                                         and      s.RoomID  = r.RoomID\n                                         order by StartTime") or die("Unable to get schedule information for event:" . sqlError());
        while ($cntRow = $cntResult->fetch(PDO::FETCH_ASSOC)) {
            // $moveSuccessful or
            // $_REQUEST['MoveEventID'] != $EventID
            // $_REQUEST['StartTime'] != $cntRow['StartTime']
            // $_REQUEST['RoomID'] != $cntRow['RoomID']
            if (isset($_REQUEST['MoveEventID'])) {