-
Notifications
You must be signed in to change notification settings - Fork 0
/
node-flightdeal.tpl.php
657 lines (599 loc) · 27.4 KB
/
node-flightdeal.tpl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
<?php
// $Id: node.tpl.php,v 1.6 2011/02/18 05:47:53 andregriffin Exp $
//global $CARTLESS;
$CARTLESS = FALSE;
$CARTTEST = (variable_get('alehap_carttest', FALSE) == '1' && ($user->uid == 1 || array_search('developer', $user->roles) !== FALSE || array_search('uctest', $user->roles) !== FALSE || array_search('product manager', $user->roles) !== FALSE)) ? TRUE : FALSE;
//Get Flight Deal policy
if (substr_count($node->field_dealtype[0]['value'],'Flight')) {
$flightnode = node_load($node->field_dealaux[0]['nid']);
if ($flightnode->type == "flight_deal_fields") {
$flight_policy = ($flightnode->field_flight_deal_policy[0]['value'] ? check_markup($flightnode->field_flight_deal_policy[0]['value'], ($flightnode->field_flight_deal_policy[0]['format'] === NULL ? FILTER_FORMAT_DEFAULT : $flightnode->field_flight_deal_policy[0]['format']), FALSE) : '');
}
//If there's deal auxiliary, but deal aux type is not flight, log this error.
if ($flightnode && $flightnode->type != "flight_deal_fields") {
watchdog('alehap','Invalid deal auxiliary type');
}
}
$company_node = node_load($node->field_company[0]['nid']);
$addr_node = node_load($company_node->field_address[0]['nid']);
// Could we use fieldgroup_groups?
$sql = "SELECT field.field_name, field.weight FROM `content_node_field_instance` as field inner join `content_group_fields` as groupf on (field.field_name = groupf.field_name) where groupf.group_name='group_deal_promotion_type' and field.type_name='deal' order by weight";
$result = db_query($sql);
while ($row = db_fetch_array($result)) {
if ($node->{$row['field_name']}[0]['value'] == 1) {
$promotion_type = $row['field_name'];
break;
}
}
$promotion_type_image_map = array(
'field_deal_of_the_day' => 'deal-of-the-day',
'field_deal_of_the_week' => 'deal-of-the-week',
'field_hot_deal' => 'hot-deal',
'field_red_hot_deal' => 'red-hot-deal',
'field_alehap_favourite' => 'alehap-favourite',
);
$interval = strtotime($node->field_bookdates[0]['value2']) - time();
if ($interval > 0 && $node->field_dealstatus[0]['value'] != 'Past' ) {
$interval = format_interval($interval,4);
$arr = explode(" ", $interval);
$interval_arr = array();
for($i=0;$i<count($arr);$i+=2) {
$interval_arr[$arr[$i+1]] = $arr[$i];
}
}
if ($node->created < $template_separate_time) {
//FOR nodes that created before 03/03/2014, use old template
?>
<div class="innr-contentblog1">
<div class="innr-contentblog1left">
<h1><?php print $title; ?></h1>
<div class="subtitle"><h2><strong><?php print $node->field_subtitle[0]['value']; ?></strong></h2><span><?php print format_date($node->created,'custom',"d.m.Y"); ?></span></div>
<div class="inner-slider">
<?php
$img_url = $node->field_img_url[0]['value'];
if($img_url != "") {
if (file_exists($img_url)) {
$ret = db_query("SELECT fid FROM {files} WHERE filepath='%s'",$img_url);
$row = db_fetch_array($ret);
$fid = $row['fid'];
//Get data from field image cache
$ret2 = db_query("SELECT field_image_cache_data FROM {content_field_image_cache} WHERE field_image_cache_fid = %d",$fid);
$row2 = db_fetch_array($ret2);
$data = unserialize($row2['field_image_cache_data']);
$img_title = $data['title'];
$alt = $data['alt'];
}else{
$img_url = "";
}
}
if ($img_url == "" && $node->field_image_cache[0]['filepath']) {
$img_url = $node->field_image_cache[0]['filepath'];
$img_title = $node->field_image_cache[0]['data']['title'];
$alt = $node->field_image_cache[0]['data']['alt'];
}
if ($img_url == "" && $node->field_image_cache[0]['filepath'] == "") {
watchdog('alehap','missing image. Both file upload field and url text are left blank');
}
?>
<?php if (0) { print theme('imagecache','Deal-Main-Image',$node->field_image_cache[0]['filepath']);} ?>
<img src="<?php print base_path() . $img_url?>" width="607" title="<?php print $img_title ?>" alt="<?php print $alt ?>" />
</div>
</div>
<div class="inner-sidecontent">
<p class="inner-sidecontenttitle">
<?php if (!empty($promotion_type)) { ?>
<img class="<?php print $promotion_type_image_map[$promotion_type] ?>" src="<?php print base_path() . path_to_theme() . "/images/hotdeal/" . $promotion_type_image_map[$promotion_type] ?>.png" />
<?php } ?>
</p>
<p class="sidelinks">
<?php if (time() < strtotime($node->field_bookdates[0]['value'])) { ?>
<a href="javascript:void()"><?php print t('Not yet available') ?></a>
<?php }elseif ( time() >= strtotime($node->field_bookdates[0]['value']) && time() <= (strtotime($node->field_bookdates[0]['value2']+86399)) ) { ?>
<a href="javascript:void()"><?php print t('Available') ?></a>
<?php }elseif (time() > strtotime($node->field_bookdates[0]['value2']) || $node->field_dealstatus[0]['value'] == 'Past' ) { ?>
<a href="javascript:void()" class="sidelink"><?php print t('Expired') ?></a>
<?php } ?>
</p>
<p class="side-add">
<?php if (isset($node->sell_price) && $node->sell_price != 0) { ?>
<strong><?php print t('Best price') ?></strong>
<?php
//$discounts = get_codeless_discounts_for_product_and_quantity($node, 1);
//$discounted_price = alehap2_get_discounted_price_for_product($node,$return_null = TRUE);
if ($discounted_price!="") { ?>
<span class="old-price"><?php print number_format($node->sell_price,0,".","."); ?> VNĐ</span>
<?php
$saving = ($node->sell_price - $discounted_price);
?>
<span class="saving"><?php print t('Saving')." ".number_format($saving,0,".",".")." VNĐ" ?></span>
<span><?php print number_format($discounted_price,0,".","."); ?> VNĐ</span>
<?php }else{ ?>
<span><?php print number_format($node->sell_price,0,".","."); ?> VNĐ</span>
<?php } ?>
<?php }else{ ?>
<strong><?php print t('Call us for current price') ?></strong><span><?php $phone = variable_get('alehap_phone', '(08) 6264 5789'); print $phone ?></span>
<?php } ?>
</p>
<p class="side-quote1">
<?php $interval = ( strtotime($node->field_bookdates[0]['value2']) - time());
if ($interval > 0 && $node->field_dealstatus[0]['value'] != 'Past' ) {
print t('Time remaining') . ": " . format_interval($interval,7);
}
?>
</p>
<div class="date-pong1">
<?php if ((!$CARTLESS || $CARTTEST) && $is_shoppable) { ?>
<?php print $node->content['add_to_cart']['#value']; ?>
<?php print $field_subproducts_rendered; ?>
<?php }else{ ?>
<span class="call-us-text"><?php print t('Call us') ?><br /><?php $phone = variable_get('alehap_phone', '(08) 6264 5789'); print $phone ?></span>
<?php } ?>
</div>
</div>
</div>
<div class="hotelblog">
<div class="hotelblog-leftcontent">
<div class="reviews-blog reviews-blog4">
<h3 class="reviews-title reviews-title4"><span><?php print $title; ?></span></h3>
<ul class="resorts-blog">
<?php if (strpos($node->field_dealtype[0]['value'], 'Hotel') !== FALSE) { ?>
<li><strong><?php print t('Location') ?></strong><span><?php
//Company (maybe Hotel, Airline or travel service) is higher priority
$place_node = node_load($addr_node->field_place[0]['nid']);
if (!$place_node || strpos($node->field_dealtype[0]['value'], 'Tour') === TRUE || strpos($node->field_dealtype[0]['value'], 'Flight') === TRUE ) {
//if we don't have place_node from address,or this is not a Hotel Deal, we use mainplace
$place_node = node_load($node->field_mainplace[0]['nid']);
}
if (!$place_node) {
watchdog('alehap', 'missing any place');
}
//Get all terms
$parents = taxonomy_get_parents_all($place_node->field_placeterm[0]['value']);
$places = "";
$first = TRUE;
foreach ($parents as $parent) {
//Get place node by term ID - related to "place_by_term" view
$place_by_term = sqrl('place_by_term', $parent->tid);
//Load correspoding term object
$term_obj = taxonomy_get_term($place_by_term[0]['field_placeterm_value']);
//Append to places string
//If this is the first item of object, do not append the ','
if ($first) {
$places .= ($term_obj?$term_obj->name:'');
$first = FALSE;
}else{
$places .= ($term_obj?', '.$term_obj->name:'');
}
//IF we reach "Country" place node, break loop
if ($place_by_term[0]['field_placetype_value'] == "Country") {
break;
}
}
//if street address is available, append ',' to it.
//if not, $street_address blank
$street_address = ($addr_node->field_streetaddress[0]['value'])?check_plain($addr_node->field_streetaddress[0]['value']).', ':'';
print $street_address . $places;
?></span></li>
<?php } ?>
<?php if (strpos($node->field_dealtype[0]['value'], 'Hotel') !== FALSE || strpos($node->field_dealtype[0]['value'], 'Tour') !== FALSE) { ?>
<li><strong><?php print t('Time') ?></strong><span><?php print $node->field_duration[0]['value']; ?></span></li>
<?php } ?>
<?php if (0) { ?><li><strong><?php print t('Type') ?></strong><span><?php print $node->field_dealtype[0]['value']; ?></span></li><?php } ?>
<?php if (strpos($node->field_dealtype[0]['value'], 'Flight') !== FALSE) { ?>
<?php if ($company_node && $company_node->status == 1) { ?>
<li><strong><?php print t('Airline') ?></strong><span><a href="<?php print base_path() . $company_node->path ?>" target="_blank"><?php print $company_node->title ?> (<?php print t('Detail'); ?>)</a></span></li>
<?php } ?>
<?php } ?>
<?php /* <li><strong><?php print t('Room') ?></strong><span>Deluxe Garden BungaLow</span></li> */ ?>
<li><strong>
<?php print t('For Travel - Applies') ?>
</strong><span><?php print format_date(strtotime($node->field_traveldates[0]['value']),"custom",'d.m.Y') . " - " . format_date(strtotime($node->field_traveldates[0]['value2']),'custom','d.m.Y') ?></span></li>
<li><strong>
<?php print t('Book Tickets - Expires') ?>
</strong><span><?php print format_date(strtotime($node->field_bookdates[0]['value']),'custom','d.m.Y') . " - " . format_date(strtotime($node->field_bookdates[0]['value2']),'custom','d.m.Y'); ?></span></li>
</ul>
<h2 class="inner4title3"><?php print t('Description'); ?></h2>
<div class="hotelblog-leftcontentblog1 hotelblog-leftcontentbloginner4">
<span class="leftcontentblog1text"> <?php print $node->content['body']['#value']; ?>
</span>
</div>
<?php if ($flight_policy && strpos($node->field_dealtype[0]['value'], 'Flight')!==FALSE) { ?>
<h2 class="inner4title3"><?php print t('Flight Deal Policy'); ?></h2>
<div class="hotelblog-leftcontentblog1 hotelblog-leftcontentbloginner4">
<span class="leftcontentblog1text"> <?php print $flight_policy; ?> </span>
</div>
<?php } ?>
</div>
<!-- Comment FlightDeails -->
<div class="reviews-blog">
<?php if ($node->field_alehap_review && !empty($node->field_alehap_review[0]['value'])) { ?>
<h3 class="reviews-title"><span><?php print t('Alehap reviews') ?></span></h3>
<div class="alehap-reviews">
<?php print $node->field_alehap_review[0]['value'] ?>
</div>
<?php } ?>
<div class="collapsible">
<h3 class="reviews-title collapse-processed"><span><?php print t('User reviews') ?></span><a href="javascript:void()"></a></h3>
<div class="collapsible">
<?php
if (function_exists('comment_render') && $node->comment) {
$edit = array('nid' => $node->nid);
//print comment_render($node) . comment_form_box($edit);
print comment_render($node);
$node->comment = NULL;
}
?>
</div>
</div>
</div>
<div class="g-plusone-wrapper">
<g:plusone href="https://alehap.vn/<?php print $node->path; ?>"></g:plusone>
</div>
<div class="fb-like-button">
<fb:share-button href="https://alehap.vn/<?php print $node->path ?>" type="button"></fb:share-button>
<fb:like <?php print $fbml_param; ?> layout="button_count" send="false" width="100" show_faces="false"></fb:like>
<fb:comments <?php print $fbml_param; ?> width="600" num_posts="10"></fb:comments>
</div>
<div class="innerbotom-blog innerbotom-blog2">
<h3 class="reviews-title reviews-title4 reviews-title5"><?php print t('Similar Deals') ?></h3>
<?php
//load the view by name
print views_embed_view('similar_deals', $display_id = 'default', $node->nid, $node->field_mainplace[0]['nid']);
?>
</div>
</div>
<div class="hotelblog-rightcontent">
<?php if (($menu = menu_local_tasks())) { ?>
<ul class="side-nav">
<?php print $menu ?>
</ul>
<?php } ?>
<?php /*if (strpos($node->field_dealtype[0]['value'], 'Hotel') !== FALSE) { ?>
<div class="rating-blog">
<div class="rating-blogcontent">
<div class="map3"><span class="maptitle"><?php print t('Map') ?></span><a href="#inline_content" class="inline showlink"><?php print t('Show map') ?></a>
<div class="google-map">
<!--<img src="<?php print base_path().path_to_theme() ?>/images/map.png" width="207" height="168" alt="" />-->
<?php $gmap = gmap_location_block_view($node->nid); print $gmap['content'];?>
</div>
</div>
</div>
<p class="map3bg-bottom"></p>
</div>
<?php }*/ ?>
<?php if (0) { ?>
Rating not available
<div class="rating-blog">
<div class="rating-blogcontent">
<strong>Rating Details</strong>
<div class="rating-main">
<div class="rating-maincontent">
<ul class="rating-details">
<li><span>Staff</span><b>9.0</b></li>
<li><span>Food</span><b>9.0</b></li>
<li><span>Location</span><b>9.0</b></li>
<li><span>Service</span><b>9.0</b></li>
<li><span>Cleanliness</span><b>9.0</b></li>
<li><span>Staff</span><b>9.0</b></li>
<li><strong>TOTAL</strong><i>9.0</i></li>
</ul>
</div>
<p class="ratingbottom"></p>
</div>
</div>
<p class="map3bg-bottom"></p>
</div>
<?php } ?>
</div>
</div>
<!-- This contains the hidden content for inline calls-->
<!--
<div style="position:fixed; bottom:-1000px">
<div id='inline_content'>
<?php $gmap2 = gmap_location_block_view($node->nid); print $gmap2['content'];?>
</div>
</div>-->
<?php }else{
//FOR nodes that created after 03/03/2014, use new template
?>
<div class="innr-contentblog1 hotelblog new">
<div class="innr-contentblog1left add">
<h1><?php print $title; ?></h1>
<div class="subtitle add1"><h2><strong><?php print $node->field_subtitle[0]['value']; ?></strong></h2><span><?php print format_date($node->created,'custom',"d.m.Y"); ?></span></div>
<div class="inner-slider add2">
<?php
$img_url = $node->field_img_url[0]['value'];
if($img_url != "") {
if (file_exists($img_url)) {
$ret = db_query("SELECT fid FROM {files} WHERE filepath='%s'",$img_url);
$row = db_fetch_array($ret);
$fid = $row['fid'];
//Get data from field image cache
$ret2 = db_query("SELECT field_image_cache_data FROM {content_field_image_cache} WHERE field_image_cache_fid = %d",$fid);
$row2 = db_fetch_array($ret2);
$data = unserialize($row2['field_image_cache_data']);
$img_title = $data['title'];
$alt = $data['alt'];
}else{
$img_url = "";
}
}
if ($img_url == "" && $node->field_image_cache[0]['filepath']) {
$img_url = $node->field_image_cache[0]['filepath'];
$img_title = $node->field_image_cache[0]['data']['title'];
$alt = $node->field_image_cache[0]['data']['alt'];
}
if ($img_url == "" && $node->field_image_cache[0]['filepath'] == "") {
watchdog('alehap','missing image. Both file upload field and url text are left blank');
}
?>
<?php if (0) { print theme('imagecache','Deal-Main-Image',$node->field_image_cache[0]['filepath']);} ?>
<img src="<?php print base_path() . $img_url?>" width="607" title="<?php print $img_title ?>" alt="<?php print $alt ?>" />
</div>
</div>
<div class="inner-sidecontent">
<!--<p class="inner-sidecontenttitle">-->
<!-- test deal thu -->
<div id="right">
<div class="menu_left">
<div class="top"></div>
<?php if (!empty($promotion_type)) { ?>
<div class="<?php print $promotion_type_image_map[$promotion_type] ?>" ></div>
<?php } ?>
<div class="content">
<div class="desc">
<div class="best"><?php print t('Best price') ?></div>
<!-- <div class="price">PRICE FROM</div>--><br />
<span class="cur"><?php print number_format($node->sell_price,0,".","."); ?> <span>đ</span></span>
<!--<p>Original Price: <span class="color">$200</span> <br /> Save <span class="color">37%</span></p>-->
<?php
if($node->field_inc_tax[0]['value'] == FALSE) {
$tax_notice = t('Excluding taxes and fees');
}else{
$tax_notice = t('Including taxes and all fees');
}
?>
<p class="ex-tax"><?php print $tax_notice; ?></p>
</div>
<div class="title">
<?php if (time() < strtotime($node->field_bookdates[0]['value'])) { ?>
<a href="javascript:void()"><?php print t('Not yet available') ?></a>
<?php }elseif (time() >= strtotime($node->field_bookdates[0]['value']) && time() <= (strtotime($node->field_bookdates[0]['value2']) + 86399) ) { ?>
<a href="javascript:void()" class="available"><?php print t('Available') ?></a>
<?php }elseif (time() > strtotime($node->field_bookdates[0]['value2']) || $node->field_dealstatus[0]['value'] == 'Past' ) { ?>
<a href="javascript:void()"><span class="master"><?php print t('Expired') ?></span></a>
<?php } ?>
</div>
</div>
<div class="button">
<?php if(count($interval_arr)>0) { ?>
<?php foreach($interval_arr as $k => $v) { ?>
<div class="bnt_left"><?php print $v." ".$k ?></div>
<?php } ?>
<?php }else{ ?>
<div class="bnt_left">0 week</div>
<div class="bnt_left">0 day</div>
<div class="bnt_left">0 minute</div>
<div class="bnt_left">0 second</div>
<?php } ?>
<!--<div class="bnt_right">0 HOUR</div>
<div class="bnt_left">9 MINS</div>
<div class="bnt_right">23 SECS</div>-->
<?php /*$interval = ( strtotime($node->field_bookdates[0]['value2']) - time());
if ($interval > 0 && $node->field_dealstatus[0]['value'] != 'Past' ) {?>
<div class="bnt_left"> <?php print t('Time remaining') . ": " . format_interval($interval,7); ?></div>
<?php }*/
?>
</div>
<!--<div class="book">
<div class="book_left">
<img src="<?php print base_path().path_to_theme() ?>/images/book.png" width="105" height="75" border="0" style="margin-top:5px" />
</div>
<div class="book_right">
<span class="mua"><img src="<?php print base_path().path_to_theme() ?>/images/check.png" width="26" height="24" border="0" /> 36<br /> <?php print t('bought'); ?></span>
</div><div class="clear"></div>
</div>-->
<div class="info">
<fieldset>
<!--<form action="" method="post" enctype="multipart/form-data">
<label>Number of adults</label> <br/>
<select>
<option value="1">Dummy text 1</option>
<option value="2">Dummy text 2</option>
<option value="3">Dummy text 3</option>
</select><br/>
<label>Number of children</label><br/>
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select><br/>
<label>Hotel Type</label><br/>
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select><br/>
<label>Travel By</label><br/>
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select><br/>
<label>Quantity: rooms tickets vouchers</label><br/>
<input type="text" name="txt_quan" size="20px" />
<br/>
<label>Travel Date</label><br />
<input type="text" name="txt_date" size="20px" />
<p></p>
<div class="books">
<input type="submit" name="ok" value="BOOK TOUR" />
</div>
</form>-->
<div class="clear"></div>
<div class="weeks-deals">
<h4><?php print t('This Best Weeks Deals'); ?></h4>
<a href="/ve-may-bay-re"><img src="/sites/all/themes/alehap2/images/weeks-deals.jpg"></a>
<a href="/ve-may-bay-re" class="see-all"><?php print t('See All'); ?></a>
</div>
</fieldset>
</div>
</div>
</div>
<!-- ket thuc deal -->
<div class="hotelblog-rightcontent f">
<?php if (($menu = menu_local_tasks())) { ?>
<ul class="side-nav">
<?php print $menu ?>
</ul>
<?php } ?>
<?php if (0) { ?>
Rating not available
<div class="rating-blog">
<div class="rating-blogcontent">
<strong>Rating Details</strong>
<div class="rating-main">
<div class="rating-maincontent">
<ul class="rating-details">
<li><span>Staff</span><b>9.0</b></li>
<li><span>Food</span><b>9.0</b></li>
<li><span>Location</span><b>9.0</b></li>
<li><span>Service</span><b>9.0</b></li>
<li><span>Cleanliness</span><b>9.0</b></li>
<li><span>Staff</span><b>9.0</b></li>
<li><strong>TOTAL</strong><i>9.0</i></li>
</ul>
</div>
<p class="ratingbottom"></p>
</div>
</div>
<p class="map3bg-bottom"></p>
</div>
<?php } ?>
</div>
</div>
<div class="hotelblog-leftcontent test">
<div class="reviews-blog reviews-blog4 test1">
<div class="frame-wrapper">
<!---<h3 class="reviews-title reviews-title4 test2"><span><?php print $title; ?></span></h3>-->
<!--them div ul-->
<ul class="resorts-blog u">
<?php if (strpos($node->field_dealtype[0]['value'], 'Flight') !== FALSE) { ?>
<?php if ($company_node && $company_node->status == 1) { ?>
<li><strong><?php print t('Airline') ?></strong><span><a href="<?php print base_path() . $company_node->path ?>" target="_blank"><?php print $company_node->title ?> (<?php print t('Detail'); ?>)</a></span></li>
<?php } ?>
<?php } ?>
<li class="two-columns"><strong>
<?php if (strpos($node->field_dealtype[0]['value'], 'Hotel') !== FALSE) { ?>
<?php print t('Stay between - Applies') ?>
<?php }elseif (strpos($node->field_dealtype[0]['value'], 'Flight') !== FALSE) { ?>
<?php print t('For Travel - Applies') ?>
<?php }else{ ?>
<?php print t('Trip Departs - Applies') ?>
<?php } ?>
</strong><span><?php print format_date(strtotime($node->field_traveldates[0]['value']),"custom",'d.m.Y') . " - " . format_date(strtotime($node->field_traveldates[0]['value2']),'custom','d.m.Y') ?></span>
<strong>
<?php if (strpos($node->field_dealtype[0]['value'], 'Hotel') !== FALSE) { ?>
<?php print t('Book Before - Expires') ?>
<?php }elseif (strpos($node->field_dealtype[0]['value'], 'Flight') !== FALSE) { ?>
<?php print t('Book Tickets - Expires') ?>
<?php }else{ ?>
<?php print t('Book Tour Before') ?>
<?php } ?>
</strong><span><?php print format_date(strtotime($node->field_bookdates[0]['value']),'custom','d.m.Y') . " - " . format_date(strtotime($node->field_bookdates[0]['value2']),'custom','d.m.Y'); ?></span>
</li>
</ul>
</div>
<div class="frame-wrapper">
<h2 class="inner6"><?php if (strpos($node->field_dealtype[0]['value'], 'Hotel') !== FALSE) { print t('Hotel Description'); } else { print t('Description'); } ?></h2>
<div class="hotelblog-leftcontentblog1 hotelblog-leftcontentbloginner4 inner7">
<span class="leftcontentblog1text"> <?php print $node->content['body']['#value']; ?>
</span>
</div>
</div>
<?php if ($flight_policy && strpos($node->field_dealtype[0]['value'], 'Flight')!==FALSE) { ?>
<div class="frame-wrapper">
<h2 class="inner4title3"><?php print t('Flight Deal Policy'); ?></h2>
<div class="hotelblog-leftcontentblog1 hotelblog-leftcontentbloginner4">
<span class="leftcontentblog1text"> <?php print $flight_policy; ?> </span>
</div>
</div>
<?php } ?>
</div>
<!-- Comment render -->
<div class="frame-wrapper">
<div class="reviews-blog b">
<?php if ($node->field_alehap_review && !empty($node->field_alehap_review[0]['value'])) { ?>
<h3 class="reviews-title"><span><?php print t('Alehap reviews') ?></span></h3>
<div class="alehap-reviews">
<?php print $node->field_alehap_review[0]['value'] ?>
</div>
<?php } ?>
<div class="collapsible">
<h3 class="reviews-title collapse-processed"><span><?php print t('User reviews') ?></span><a href="javascript:void()"></a></h3>
<!-- facebook code -->
<?php
global $user; if (!$user->uid) {
?>
<div class="facebook-content-row">
<div class="fb-left-cell">
<div class="fb-nice-login-button">
<!-- fb button start -->
<?php
$node_fb = node_load(30115);
print $node_fb->body;
?>
<div class="fb-promor-comment-noac">
<img src="<?php print base_path();?>sites/all/themes/alehap2/images/comment-login_noac.png" />
</div>
<!-- fb button end -->
</div>
<div class="fb-arrow ">
<img src="<?php print base_path();?>sites/all/themes/alehap2/images/comment-login_arrow.png" />
</div>
<div class="clean"></div>
</div>
<div class="fb-right-cell">
<img src="<?php print base_path();?>sites/all/themes/alehap2/images/comment-login_text.png" />
</div>
</div>
<?php }?>
<!-- facebook code end -->
<div class="collapsible hotel-promo-comment-block">
<!-- comment form render -->
<?php
if (function_exists('comment_render') && $node->comment) {
print comment_render($node);
$node->comment = NULL;
}
?>
<!-- comment form render end -->
</div>
<!-- facebook code END -->
</div>
</div>
</div>
<div class="g-plusone-wrapper">
<g:plusone href="https://alehap.vn/<?php print $node->path; ?>"></g:plusone>
</div>
<div class="fb-like-button">
<fb:share-button href="http://alehap.vn/<?php print $node->path ?>" type="button"></fb:share-button>
<fb:like <?php print $fbml_param; ?> layout="button_count" send="false" width="100" show_faces="false"></fb:like>
<fb:comments <?php print $fbml_param; ?> width="654" numposts="10"></fb:comments>
</div>
</div>
<div class="innerbotom-blog innerbotom-blog2 i">
<h3 class="reviews-title reviews-title4 reviews-title5"><?php print t('Similar Deals') ?></h3>
<?php
//load the view by name
print views_embed_view('similar_deals', $display_id = 'default', $node->nid, $node->field_mainplace[0]['nid']);
?>
</div>
</div>
<!-- This contains the hidden content for inline calls-->
<!--<div style="position:fixed; bottom:-1000px">
<div id='inline_content'>
<?php $gmap2 = gmap_location_block_view($node->nid); print $gmap2['content'];?>
</div>
</div>-->
<?php } ?>