Bsi booking hotol system

pinoshine

Utente Attivo
15 Set 2012
95
0
0
Ciao a tutti, ho comprato un booking system in php pero' e' solo per singolo hotel, io avrei bisogno di associare la tabella degli hotels presenti in una tabella chiamata "hotel" alle camere in vendita del booking system, questo 'e l'esempio user e pass sono "admin"
vi posto il mio codice cosi' magari potete aiutarmi:
questa e' la classe con le informazioni delle camere:
PHP:
public function getBookingInfo($info , $clientid=0, $condition=""){ 
        global $bsiCore; 
        switch($info){ 
            case 1: 
            $sql = "SELECT booking_id, DATE_FORMAT(start_date, '".$bsiCore->userDateFormat."') AS start_date, DATE_FORMAT(end_date, '".$bsiCore->userDateFormat."') AS end_date, total_cost, DATE_FORMAT(booking_time, '".$bsiCore->userDateFormat."') AS booking_time, payment_type, client_id  FROM bsi_bookings where payment_success=true and CURDATE() <= end_date and is_deleted=false and is_block=false  ".$condition." ";
             break; 
         
            case 2: 
            $sql = "SELECT booking_id, DATE_FORMAT(start_date, '".$bsiCore->userDateFormat."') AS start_date, DATE_FORMAT(end_date, '".$bsiCore->userDateFormat."') AS end_date, total_cost, DATE_FORMAT(booking_time, '".$bsiCore->userDateFormat."') AS booking_time, payment_type, client_id, is_deleted  FROM bsi_bookings where payment_success=true and (CURDATE() > end_date OR is_deleted=true)  and is_block=false ".$condition." ";
             break; 
             
            case 3: 
            $sql = "SELECT booking_id, DATE_FORMAT(start_date, '".$bsiCore->userDateFormat."') AS start_date, DATE_FORMAT(end_date, '".$bsiCore->userDateFormat."') AS end_date, end_date as checkout, total_cost, DATE_FORMAT(booking_time, '".$bsiCore->userDateFormat."') AS booking_time, payment_type, is_deleted, is_block  FROM bsi_bookings where client_id=".$clientid;
             break; 
         
        } 
        return $sql;

questa e' invece la tabella degli hotels:
Codice:
CREATE TABLE IF NOT EXISTS `hotel` (
  `idhotel` int(11) NOT NULL auto_increment,
  `nome` varchar(150) NOT NULL,
  `tipologia` varchar(150) NOT NULL,
  `stelle` varchar(20) NOT NULL,
  `email` varchar(50) NOT NULL,
  `tel` varchar(50) NOT NULL,
  `fax` varchar(50) NOT NULL,
  `stato` varchar(20) NOT NULL,
  `commissione` varchar(10) NOT NULL,
  `descr_breve` text NOT NULL,
  `descr_lunga` text NOT NULL,
  PRIMARY KEY  (`idhotel`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

Grazie

Edit: questo e' quello che ho comprato:
user e pass sono: "admin"
 
Dimenticavo! Chi sa aiutarmi posso mandare via email l'intero script cosi' da poterlo modificare
 

Discussioni simili