PageRenderTime 44ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/public_html/detalii_circuit.php

https://bitbucket.org/ocaziituristice/ocaziituristice.ro
PHP | 180 lines | 163 code | 17 blank | 0 comment | 19 complexity | a0c0a9d5385c36a9879350ea23d4e270 MD5 | raw file
  1. <?php
  2. include_once( $_SERVER['DOCUMENT_ROOT'] . '/includes/config_responsive.php' );
  3. include_once( $_SERVER['DOCUMENT_ROOT'] . "/includes/peste_tot.php" );
  4. include( $_SERVER['DOCUMENT_ROOT'] . '/config/functii_pt_afisare.php' );
  5. include_once( $_SERVER['DOCUMENT_ROOT'] . '/config/includes/class/afisare_hotel.php' );
  6. if ( $_REQUEST['id_oferta'] ) {
  7. include_once( $_SERVER['DOCUMENT_ROOT'] . '/config/includes/class/afisare_sejur.php' );
  8. include( $_SERVER['DOCUMENT_ROOT'] . '/config/includes/class/class_sejururi/class_sejur.php' );
  9. $id_oferta = $_REQUEST['id_oferta'];
  10. $id_circuit = $id_oferta;
  11. $GLOBALS['tip_unitate'] = 'Circuit';
  12. setlocale( LC_TIME, array( 'ro.utf-8', 'ro_RO.UTF-8', 'ro_RO.utf-8', 'ro', 'ro_RO', 'ro_RO.ISO8859-2' ) );
  13. $det = new DETALII_SEJUR();
  14. $detalii = $det->select_det_sejur( $id_oferta );
  15. $preturi = $det->select_preturi_circuit( $id_oferta );
  16. $id_hotel = $detalii['id_hotel'];
  17. $detalii_hotel = $det->select_camp_hotel( $id_hotel );
  18. } elseif ( $_REQUEST['id_hotel'] ) {
  19. $id_hotel = $_REQUEST['id_hotel'];
  20. $det = new DETALII_HOTEL();
  21. $detalii_hotel = $det->select_camp_hotel( $id_hotel );
  22. $id_oferta = '';
  23. }
  24. $link_oferta = substr( $sitepath, 0, - 1 ) . make_link_circuit( $detalii_hotel['denumire'], $id_oferta );
  25. if ( ! is_bot() and $link_oferta == ( substr( $sitepath, 0, - 1 ) . $_SERVER['REQUEST_URI'] ) ) {
  26. $sel_ofvisit = "SELECT link FROM oferte_vizitate WHERE id_sesiune_vizitator = '" . session_id() . "' AND link = '" . $link_oferta . "' ";
  27. $que_ofvisit = mysql_query( $sel_ofvisit ) or die( mysql_error() );
  28. if ( mysql_num_rows( $que_ofvisit ) == 0 ) {
  29. $que_of_visit = "INSERT INTO oferte_vizitate (id_oferta, link, referrer, data_vizita, ip_vizitator, id_sesiune_vizitator, user_agent) VALUES ('" . $id_oferta . "', '" . substr( $sitepath, 0, - 1 ) . $_SERVER['REQUEST_URI'] . "', '" . $_SERVER['HTTP_REFERER'] . "', NOW(), '" . $_SERVER['REMOTE_ADDR'] . "', '" . session_id() . "', '" . $_SERVER['HTTP_USER_AGENT'] . "')";
  30. $res_of_visit = mysql_query( $que_of_visit ) or die ( mysql_error() );
  31. }
  32. }
  33. if ( $detalii['denumire'] == '' or $detalii_hotel['denumire'] == '' or $detalii_hotel['tip_unitate'] != 'Circuit' ) {
  34. header( "HTTP/1.0 404 Not Found" );
  35. $handle = curl_init( $sitepath . '404.php' );
  36. curl_exec( $handle );
  37. exit();
  38. }
  39. $sel_cont = "SELECT
  40. GROUP_CONCAT(DISTINCT tari.denumire Order by traseu_circuit.ordine SEPARATOR ', ') as tari,
  41. GROUP_CONCAT(DISTINCT
  42. if(traseu_circuit.tara_principala='da',tari.denumire,'') Order by traseu_circuit.ordine SEPARATOR ',') as tari_principale,
  43. GROUP_CONCAT(DISTINCT localitati.denumire Order by traseu_circuit.ordine SEPARATOR ', ') as localitati,
  44. GROUP_CONCAT(DISTINCT traseu_circuit.id_hotel SEPARATOR ',') as hoteluri
  45. FROM
  46. oferte
  47. inner join hoteluri on oferte.id_hotel = hoteluri.id_hotel
  48. Inner Join traseu_circuit ON hoteluri.id_hotel = traseu_circuit.id_hotel_parinte
  49. Inner Join tari ON traseu_circuit.id_tara = tari.id_tara
  50. Left join localitati on traseu_circuit.id_localitate = localitati.id_localitate
  51. WHERE
  52. hoteluri.tip_unitate = 'Circuit' and
  53. oferte.id_oferta = '" . $id_oferta . "'
  54. Order by traseu_circuit.ordine ";
  55. $que_cont = mysql_query( $sel_cont ) or die( mysql_error() );
  56. $row_of = mysql_fetch_array( $que_cont );
  57. $tari_principale = $row_of['tari_principale'];
  58. @mysql_free_result( $que_cont );
  59. $metas_title = $detalii_hotel['denumire'];
  60. $metas_description = $detalii_hotel['denumire'] . ', ' . $detalii['nr_zile'] . ' zile, masa ' . $detalii['masa'] . ', transport ' . $detalii['transport'];
  61. if ( $detalii['taxa_avion']['inclus'] == 'da' ) {
  62. $metas_description = $metas_description . ' cu toate taxele incluse';
  63. }
  64. ?>
  65. <!DOCTYPE html>
  66. <html lang="ro">
  67. <head>
  68. <?php include_once( $_SERVER['DOCUMENT_ROOT'] . "/includes/header_charset.php" ); ?>
  69. <title><?php echo $metas_title; ?></title>
  70. <meta name="description" content="<?php echo $metas_description; ?>"/>
  71. <link rel="canonical" href="<?php echo $link_oferta; ?>"/>
  72. <meta property="og:title" content="<?php echo $metas_title; ?>"/>
  73. <meta property="og:description" content="<?php echo $metas_description; ?>"/>
  74. <meta property="og:url"
  75. content="<?php echo $sitepath . 'circuit/'/*.fa_link($detalii_hotel['nume_continent']).'/'*/ . fa_link_oferta( $detalii['denumire'] ) . '-' . $id_oferta . '.html'; ?>"/>
  76. <meta property="og:image" content="<?php echo $sitepath . 'img_prima_hotel/' . $detalii_hotel['poza1']; ?>"/>
  77. <meta property="og:site_name" content="<?php echo $denumire_agentie; ?>"/>
  78. <meta property="fb:admins" content="100000435587231"/>
  79. <meta property="fb:app_id" content="314711018608962"/>
  80. <meta property="og:type" content="ocaziituristice:trip"/>
  81. <?php if ( $_REQUEST['denumire_circuit'] <> fa_link_circuit( $detalii_hotel['denumire'] ) ) { ?>
  82. <link rel="canonical"
  83. href="<?php echo $sitepath . 'circuit/'/*.fa_link($detalii_hotel['nume_continent']).'/'*/ . fa_link_circuit( $detalii_hotel['denumire'] ) . '-' . $id_oferta . '.html'; ?>"/>
  84. <?php } ?>
  85. <?php require_once( "includes/header/header_responsive.php" ); ?>
  86. </head>
  87. <body>
  88. <?php include( $_SERVER['DOCUMENT_ROOT'] . '/includes/header/admin_bar_responsive.php' ); ?>
  89. <?php // Header ?>
  90. <header>
  91. <?php require( "includes/header/meniu_header_responsive.php" ); ?>
  92. </header>
  93. <?php // Breadcrumbs and general search ?>
  94. <div class="layout">
  95. <?php require( "includes/header/breadcrumb_responsive_intreg.php" ); ?>
  96. </div>
  97. <script>
  98. function myFunction(x) {
  99. x.classList.toggle("change");
  100. }
  101. </script>
  102. <div class="layout">
  103. <?php if ( isset( $_GET['cerere_oferta'] ) ) { ?>
  104. <div class="NEW-column-full pad20 circuit">
  105. <h2>Multumim pentru cererea efectuata! <span class="green">Care sunt urmatorii pasi?</span></h2>
  106. <div class="NEW-orange NEW-round8px" style="border:1px solid #ffd0d0; padding:10px 5px;">
  107. <img src="<?php echo $imgpath; ?>/cerere_oferta.jpg" class="float-left" style="margin:10px;"/>
  108. <div class="float-right" style="margin:0 10px 0 50px; width:260px;">
  109. <p>Pentru orice nelamuriri sau intrebari nu ezita sa ne contactezi:</p>
  110. <strong>Telefon:</strong> <?php echo $contact_telefon; ?><br/>
  111. <strong>Mobil:</strong> <?php echo $contact_mobil; ?><br/>
  112. <strong>Program:</strong> <?php echo $contact_program; ?>
  113. </div>
  114. <p style="padding-top:17px;" class="black">In scurt timp vei fi contactat (telefonic sau prin
  115. e-mail) de catre un agent de turism din echipa Ocaziituristice.ro in care ti se va prezenta
  116. oferta noastra pentru cererea ta.</p>
  117. <p class="black">Iti multumim pentru interesul acordat!</p>
  118. <br class="clear"/>
  119. </div>
  120. <?php /*?><div class="fb-like-box" data-href="http://www.facebook.com/OcaziiTuristice.ro" data-width="292" data-show-faces="true" data-stream="false" data-header="false" style="float:right;"></div><?php */ ?>
  121. <br/><br/>
  122. <h2 class="red">Spune-le si prietenilor tai despre aceasta oferta</h2>
  123. <br/>
  124. <img src="<?php echo $sitepath . 'thumb_hotel/' . $detalii_hotel['poza1']; ?>" class="images"
  125. style="margin:10px;"/>
  126. <h3 style="margin:10px 10px 0 10px;"><?php echo $metas_title; ?></h3>
  127. <div class="grey italic"><?php echo $sitepath . fa_link( $detalii_hotel['denumire_continent'] ) . '/' . fa_link_oferta( $detalii['denumire'] ) . '-' . $id_oferta . '.html'; ?></div>
  128. <div style="float:left; margin:30px 0 0 30px;">
  129. <a name="fb_share"></a>
  130. <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
  131. </div>
  132. <br class="clear"/>
  133. </div>
  134. <?php } ?>
  135. <?php include_once( $_SERVER['DOCUMENT_ROOT'] . "/includes/circuite/detalii_circuit_responsive.php" ); ?>
  136. <div class="circuit">
  137. <div id="alteOferteVizitate"></div>
  138. </div>
  139. </div>
  140. <?php // Newsletter ?>
  141. <?php require_once( $_SERVER['DOCUMENT_ROOT'] . "/includes/newsletter_responsive.php" ); ?>
  142. <?php // Footer ?>
  143. <?php require_once( $_SERVER['DOCUMENT_ROOT'] ."/includes/footer/footer_responsive.php" ); ?>
  144. <?php include_once( $_SERVER['DOCUMENT_ROOT'] . "/includes/addins_bodybottom_responsive.php" ); ?>
  145. <?php
  146. if ( ! is_bot() and $link_oferta == ( substr( $sitepath, 0, - 1 ) . $_SERVER['REQUEST_URI'] and isset( $err_logare_admin ) ) ) {
  147. $sel_ofvisit = "SELECT link FROM oferte_vizitate WHERE id_sesiune_vizitator = '" . session_id() . "' AND link = '" . $link_oferta . "' ";
  148. $que_ofvisit = mysql_query( $sel_ofvisit ) or die( mysql_error() );
  149. if ( mysql_num_rows( $que_ofvisit ) == 0 ) {
  150. $que_of_visit = "INSERT INTO oferte_vizitate (id_oferta, link, referrer, data_vizita, ip_vizitator, id_sesiune_vizitator, user_agent) VALUES ('" . $id_oferta . "', '" . substr( $sitepath, 0, - 1 ) . $_SERVER['REQUEST_URI'] . "', '" . $_SERVER['HTTP_REFERER'] . "', NOW(), '" . $_SERVER['REMOTE_ADDR'] . "', '" . session_id() . "', '" . $_SERVER['HTTP_USER_AGENT'] . "')";
  151. $res_of_visit = mysql_query( $que_of_visit ) or die ( mysql_error() );
  152. }
  153. }
  154. ?>
  155. <script>
  156. $("#alteOferteVizitate").empty().html('<img src="/images/loader.gif" alt="" />');
  157. $("#alteOferteVizitate").load("/includes/oferte_vizualizate_altii_responsive.php?idOf=<?php echo $id_oferta; ?>");
  158. </script>
  159. <?php if ( $detalii_hotel['cod_remarketing'] ) {
  160. echo $detalii_hotel['cod_remarketing'];
  161. } ?>
  162. </body>
  163. </html>