/*************************************************************************** manage_booking.php ------------------- begin : Fri Feb 14 2003 copyright : (C) The OpenFlyers Group email : opendev@chakram.ws $Id: manage_booking.php,v 1.20 2003/11/26 09:11:41 claratte Exp $ Purpose: Display books of a member Author: Christophe Laratte ***************************************************************************/ $user_session->set_old_menus($menu,$sub_menu); require_once('pool/formatting_functions.php'); //*********************************** database accesses ********************************************************* $query='select booking.*, instructors.SIGN, real_auth.LAST_NAME, real_auth.FIRST_NAME, aircrafts.CALLSIGN from (booking, aircrafts) left join authentication as real_auth on booking.MEMBER_NUM=real_auth.NUM left join instructors on booking.INST_NUM=instructors.INST_NUM left join authentication as inst_auth on booking.INST_NUM=inst_auth.NUM where booking.AIRCRAFT_NUM=aircrafts.NUM and booking.CLUB_NUM='.$user_session->get_club_num(); if(!define_global('all_slots',false)) { $query=$query.' and booking.END_DATE>=\''.date('Y-m-d H:i:s').'\''; } if((!$user_session->is_anybody_book_allowed())and(!$user_session->is_nothing_allowed())) { if($user_session->is_instructor()) { $query=$query.' and (booking.MEMBER_NUM='.$user_session->get_authentication_num().' or booking.INST_NUM='.$user_session->get_authentication_num().')'; } else { $query=$query.' and booking.MEMBER_NUM='.$user_session->get_authentication_num(); } } if((!$user_session->is_freeze_aircraft_allowed())and(!$user_session->is_nothing_allowed())) { $query=$query.' and booking.SLOT_TYPE!=2'; } $query=$query.' order by booking.START_DATE'; $result=$database->query($query); // $result is used whithin the HTML code below ///////////////////////////////////// HTML DISPLAY START HERE //////////////////////////////////////////////////// require_once('includes/header.php'); ?>
require_once('includes/menus.php'); ?>Pilote | Avion | Instructeur | Sièges disponibles | actions possibles | |
=display_slot_datetime($row->START_DATE,$row->END_DATE)?> | if($row->SLOT_TYPE==2) { ?>Mécanique } elseif(($row->LAST_NAME=='')and($row->FIRST_NAME=='')) { ?>??? } else { ?>=$row->FIRST_NAME.' '.$row->LAST_NAME?> }?> | =stripslashes($row->CALLSIGN)?> | =stripslashes($row->SIGN)?> | =$row->FREE_SEATS?> |