<?
include("../assets/lib_carrito.php");
include("main.php");

header("location: buy_prod.php");

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Bravacar - Rent a Car - Online bookings</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Abstract" CONTENT="rent a car  madeira island, car rental lisbon, car rental algarve, car rental porto, car rental online bookings, funchal rent a car, madeira rent a car">
<META NAME="Copyright" CONTENT="Bravacar 2006 - Carlos Pontes">
<META NAME="Description" CONTENT="Bravacar - Easy rent a car bookings in Portugal.  Bookings available in Lisbon, Madeira Island, Algarve and Porto.  Customers pay only a small percentage when booking online and pay the remainder at pickup location.">
<META NAME="Generator" CONTENT="carlos alberto pontes">
<META NAME="Keywords" CONTENT="rent a car,car rentals portugal,bravacar, car rental in madeira, rent a car in lisbon, rent a car in oporto, porto car rental, lisbon car rental, faro car rental, algarve rent a car, netrent rent a car, rent, car, rent a car, car rental, rental, car rentals, rentals, holiday rentals, cheap rent a car, cheap car rental, cheap rental, cheap car rentals, cheap rentals, cheap holiday rentals, portugal rent a car, portugal car rental,madeira car rental,algarve car rental,lisbon car rental,porto car rental,bravacar madeira,bravacar porto, bravacar lisbon, bravacar faro">
<META NAME="Language" CONTENT="en">
<META NAME="revisit-after" CONTENT="2 days">
<LINK REL="STYLESHEET" TYPE="text/css" HREF="../html/style.css">
<LINK REL="STYLESHEET" TYPE="text/css" HREF="../html/site.css">
</HEAD>
<BODY STYLE="background-color: rgb(255,255,255); background-image: none; margin: 0px;">
    <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="619">
        <TR VALIGN="TOP" ALIGN="LEFT">
            <TD WIDTH="69" HEIGHT="46"><IMG SRC="../assets/images/autogen/clearpixel.gif" WIDTH="69" HEIGHT="1" BORDER="0" ALT=""></TD>
            <TD WIDTH="550"><IMG SRC="../assets/images/autogen/clearpixel.gif" WIDTH="550" HEIGHT="1" BORDER="0" ALT=""></TD>
        </TR>
        <TR VALIGN="TOP" ALIGN="LEFT">
            <TD></TD>
            <TD WIDTH="550" CLASS="TextObject">
                <P><?       
if ($_SERVER['REQUEST_METHOD'] == "GET") 
{      
    $erro = '';

    if ($_GET["Type"]=='Car')
    {
       $trato        = $_SESSION['title'];
       $nome_cliente = $_SESSION['lastname'].', '.$_SESSION['name'];
       $cod_grupo    = $_GET["cod_grupo"];
       $cod_tarifa   = $_GET["cod_tarifa"];

       db_connect();
       $sql = "select a.desc_extra ";
       $sql = $sql." from tr_rentacar_extras a, tr_rentacar_extras_values b ";
       $sql = $sql." where a.cod_rentacar = b.cod_rentacar ";
       $sql = $sql." and b.cod_rentacar   =".$_GET['cod_rentacar'] ;
       $sql = $sql." and a.cod_extra  = b.cod_extra ";
       $sql = $sql." and b.cod_grupo  = '".$cod_grupo."' ";
       $sql = $sql." and b.cod_tarifa = $cod_tarifa ";
       $sql = $sql." and b.incluido   = 1 ";
       $sql = $sql." order by desc_extra ";   
       
       $result = mysql_query($sql);
       $i = 0;	

       while ($row = mysql_fetch_row($result))
       {     
           $extras_inc[$i] = $row[0];           
           $i = $i + 1;
       } 

       $desc_extra_inc1  = '';
       $desc_extra_inc2  = '';
       $desc_extra_inc3  = '';
       $desc_extra_inc4  = '';
       $desc_extra_inc5  = '';
       $desc_extra_inc6  = '';
       $desc_extra_inc7  = '';
       $desc_extra_inc8  = '';
       $desc_extra_inc9  = '';
       $desc_extra_inc10 = '';
       $desc_extra_inc11 = '';
       $desc_extra_inc12 = '';

       if (isset($extras_inc[0]))
       {
           $desc_extra_inc1 = $extras_inc[0];
       }    

       if (isset($extras_inc[1]))
       {
           $desc_extra_inc2 = $extras_inc[1];
       }    

       if (isset($extras_inc[2]))
       {
           $desc_extra_inc3 = $extras_inc[2];
       }    

       if (isset($extras_inc[3]))
       {
           $desc_extra_inc4 = $extras_inc[3];
       }    

       if (isset($extras_inc[4]))
       {
           $desc_extra_inc5 = $extras_inc[4];
       }    

       if (isset($extras_inc[5]))
       {
           $desc_extra_inc6 = $extras_inc[5];
       }    

       if (isset($extras_inc[6]))
       {
           $desc_extra_inc7 = $extras_inc[6];
       }   

       if (isset($extras_inc[7]))
       {
           $desc_extra_inc8 = $extras_inc[7];
       }   

       if (isset($extras_inc[8]))
       {
           $desc_extra_inc9 = $extras_inc[8];
       }   

       if (isset($extras_inc[9]))
       {
           $desc_extra_inc10 = $extras_inc[9];
       }   

       if (isset($extras_inc[10]))
       {
           $desc_extra_inc11 = $extras_inc[10];
       }   

       if (isset($extras_inc[11]))
       {
           $desc_extra_inc12 = $extras_inc[11];
       }   
         
       db_disconnect();

       $_SESSION["ocarrito"]->ins_car($_GET["id"],$_GET["cod_rentacar"],$_GET["desc_rentacar"],$_GET["cod_regiao"],$_GET["desc_regiao"],$_GET["cod_categoria"],$_GET["desc_categoria"],$_GET["cod_grupo"],$_GET["desc_grupo"],$_GET["pick_up_loc"],$_GET["desc_pick_up_loc"],$_GET["endereco_pick_up"],$_GET["data_pickup"],$_GET["date1"],$_GET["hour1"],$_GET["min1"],$_GET["car_destination"],$_GET["desc_destination"],$_GET["car_dropoff_loc"],$_GET["desc_drop_off_loc"],$_GET["endereco_drop_off"],$_GET["data_drop_off"],$_GET["date2"],$_GET["hour2"],$_GET["min2"],$_GET["nro_dias"],$_GET["cod_extra1"],$_GET["hidden_desc_extra1"],$_GET["qty_extra1"],$_GET["hidden_price_extra1"],$_GET["hidden_price_total_extra1"],$_GET["cod_extra2"],$_GET["hidden_desc_extra2"],$_GET["qty_extra2"],$_GET["hidden_price_extra2"],$_GET["hidden_price_total_extra2"],$_GET["cod_extra3"],$_GET["hidden_desc_extra3"],$_GET["qty_extra3"],$_GET["hidden_price_extra3"],$_GET["hidden_price_total_extra3"],$_GET["cod_extra4"],$_GET["hidden_desc_extra4"],$_GET["qty_extra4"],$_GET["hidden_price_extra4"],$_GET["hidden_price_total_extra4"],$_GET["cod_extra5"],$_GET["hidden_desc_extra5"],$_GET["qty_extra5"],$_GET["hidden_price_extra5"],$_GET["hidden_price_total_extra5"],$_GET["cod_extra_out1"],$_GET["desc_extra_out1"],$_GET["price_extra_out1"],$_GET["price_total_extra_out1"],$desc_extra_inc1,$desc_extra_inc2,$desc_extra_inc3,$desc_extra_inc4,$desc_extra_inc5,$desc_extra_inc6,$desc_extra_inc7,$desc_extra_inc8,$desc_extra_inc9,$desc_extra_inc10,$desc_extra_inc11,$desc_extra_inc12,$_GET["comissao"],$_GET["preco_dia"],$_GET["hidden_preco_total_carro"],$_GET["charged"],$_GET["balance"],$_GET["preco_total"],$trato,$nome_cliente,$_GET["nome_hotel"],$_GET["nro_voo"]);
     }
}

?>

&nbsp;</P>
            </TD>
        </TR>
    </TABLE>
</BODY>
</HTML>
 