Beispiel #1
0
print_header($day, $month, $year, $area, isset($room) ? $room : "");
// Section with areas, rooms, minicals.
echo "<div id=\"dwm_header\" class=\"screenonly\">\n";
// Show all available areas
echo make_area_select_html('week.php', $area, $year, $month, $day);
// Show all available rooms in the current area:
echo make_room_select_html('week.php', $area, $room, $year, $month, $day);
// Draw the three month calendars
if (!$display_calendar_bottom) {
    minicals($year, $month, $day, $area, $room, 'week');
}
echo "</div>\n";
// Show area and room:
// Get the area and room names
$this_area_name = get_area_name($area);
$this_room_name = get_room_name($room);
// The room is invalid if it doesn't exist, or else it has been disabled, either explicitly
// or implicitly because the area has been disabled
if (!isset($this_area_name) || $this_area_name === FALSE) {
    $this_area_name = '';
}
if (!isset($this_room_name) || $this_room_name === FALSE) {
    $this_room_name = '';
}
echo "<div id=\"dwm\">\n";
echo "<h2>" . htmlspecialchars("{$this_area_name} - {$this_room_name}") . "</h2>\n";
echo "</div>\n";
//y? are year, month and day of the previous week.
//t? are year, month and day of the next week.
$i = mktime(12, 0, 0, $month, $day - 7, $year);
$yy = date("Y", $i);
Beispiel #2
0
    $rooms = get_rooms();
    $softwares = get_software();
    $roomids = get_roomID($room_id);
    include 'room_software.php';
} else {
    if ($action == 'delete_software') {
        $software_id = filter_input(INPUT_POST, 'software_id', FILTER_VALIDATE_INT);
        $room_id = filter_input(INPUT_POST, 'room_id', FILTER_VALIDATE_INT);
        if ($room_id == NULL || $room_id == FALSE || $software_id == NULL || $software_id == FALSE) {
            $error = "Missing or incorrect product id";
        } else {
            delete_software($software_id);
            header("Location: .?software_id={$software_id}");
        }
    } else {
        if ($action == 'add_roomsoft_software') {
            $room_id = filter_input(INPUT_GET, 'room_id', FILTER_VALIDATE_INT);
            if ($room_id == NULL || $room_id == FALSE) {
                $room_id = 1;
            }
            $room_name = get_room_name($room_id);
            $rooms = get_rooms();
            $roomids = get_roomID($room_id);
            $softwares = get_software();
            $software_id = filter_input(INPUT_POST, 'software_id', FILTER_VALIDATE_INT);
            print_r($room_id);
            print_r($software_id);
            include 'room_software.php';
        }
    }
}
 /**
  * 单个查询会议
  * @param [type] $[id] [<会议ID>]
  * @return [type]id [会议ID]
  * @return [type]name [名称]
  * @return [type]content [内容]
  * @return [type]from [发送者]
  * @return [type]place [会议地点]
  * @return [type]apply_id [申请ID]
  * @return [type]participants [参与人员]
  * @return [type]start_time [description]
  * @return [type]end_time [description]
  * @return [type]finish [是否完成] 0:未开始 ,1:正在进行 ,-1:已完成
  * @return [type]status [是否审核]0:未审核,1:已审核,-1审核未通过
  */
 public function getMeetingById($id)
 {
     $id = empty($id) ? $_REQUEST['id'] : $id;
     $map['id'] = array('eq', $id);
     $map['is_del'] = array('eq', 0);
     $result = M('Meeting')->where($map)->field('id,name,content,admin_name,from,place,apply_id,participants,start_time,end_time,finish,status')->find();
     $result['name'] = $result['name'] ? $result['name'] : '';
     $result['content'] = $result['content'] ? $result['content'] : '';
     $result['admin_name'] = $result['admin_name'] ? $result['admin_name'] : '';
     $result['from'] = $result['from'] ? $result['from'] : '';
     $result['place'] = $result['place'] ? get_room_name($result['place']) : '';
     $result['apply_id'] = $result['apply_id'] ? $result['apply_id'] : '';
     $result['participants'] = $result['participants'] ? $this->getParticipants($result['participants']) : '';
     $result['start_time'] = $result['start_time'] ? $result['start_time'] : '';
     $result['end_time'] = $result['end_time'] ? $result['end_time'] : '';
     $result['finish'] = $result['finish'] ? $result['finish'] : '';
     $result['status'] = $result['status'] ? $result['status'] : '';
     if (!empty($_REQUEST['id'])) {
         if ($result) {
             $this->result(1, '成功', $result);
         } else {
             $this->result(0, '失败');
         }
     } else {
         return $result;
     }
 }