예제 #1
0
function addRoomForm()
{
    //global all variables
    global $locationForm, $tool;
    $allRoom = Room::get_rooms();
    $roomHeader = array("Room Information");
    $roomTitle = array("Name", "Description", "Notes", "Room Number", "Room Type");
    //THE CLIENT INFO
    $roomKey = array("name", "desc", "notes", "num", "type");
    $fieldType = array(2 => "text_area", 4 => "drop_down");
    $roomHeader = array("New Room Info");
    $allRoomTypes = RoomType::get_room_types();
    $locationForm->setTitles($roomTitle);
    $locationForm->setHeadings($roomHeader);
    $locationForm->setDatabase($roomKey);
    $locationForm->setAddValue("addRoom");
    $locationForm->setType($allRoomTypes);
    $locationForm->setFieldType($fieldType);
    echo $locationForm->newLocationForm();
}