Guest User

single-espresso_events

a guest
Nov 3rd, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.31 KB | None | 0 0
  1. <?php
  2. /* theme setting */
  3. $theme_setting = unserialize(get_option('javo_themes_settings'));
  4. /* theme setting */
  5.  
  6. $postId = get_the_ID();
  7.  
  8. $postData = get_post( $postId );
  9.  
  10. EE_Registry::instance()->load_helper( 'People_View' );
  11. $people = EEH_People_View::get_people_for_event();
  12.  
  13.  
  14. $speakersartist=0;
  15. $sponsorsCount=0;
  16. $organizerCount=0;
  17. foreach ( $people as $type => $persons ){
  18. $cbr1=0;
  19. foreach ( $persons as $person ){
  20. if($type=='Speakers/Artist'){
  21. $speakersartist++;
  22. break;
  23. }
  24.  
  25. if($type=='Sponsors'){
  26. $sponsorsCount++;
  27. break;
  28. }
  29. if($type=='Organizer'){
  30. $organizerCount++;
  31. break;
  32. }
  33.  
  34. }
  35.  
  36. }
  37.  
  38. $event_website = get_post_meta( $postId, 'event_website', true );
  39. //$event_start_date = get_post_meta( $postId, 'event_start_date', true );
  40. //$event_end_date = get_post_meta( $postId, 'event_end_date', true );
  41.  
  42. $event_schedule = get_post_meta( $postId, 'event_schedule', true );
  43. $event_faq = get_post_meta( $postId, 'event_faq', true );
  44. $event_term_condition = get_post_meta( $postId, 'event_term_condition', true );
  45. //$venue_details = get_post_meta( $postId, 'venue_details', true );
  46. $event_video = get_post_meta( $postId, 'event_video', true );
  47. $event_images = get_post_meta( $postId, 'event_images', true );
  48. $organizer_name = get_post_meta( $postId, 'organizer_name', true );
  49. $organizer_company = get_post_meta( $postId, 'organizer_company', true );
  50. $organizer_website = get_post_meta( $postId, 'organizer_website', true );
  51. $organizer_number = get_post_meta( $postId, 'organizer_number', true );
  52. //$comments = get_post_meta( $postId, 'comments', true );
  53. //$event_social_media = get_post_meta( $postId, 'event_social_media', true );
  54.  
  55. $facebook_url = get_post_meta( $postId, 'facebook_url', true );
  56. $twitter_url = get_post_meta( $postId, 'twitter_url', true );
  57. $youtube_url = get_post_meta( $postId, 'youtube_url', true );
  58. $linkdin_url = get_post_meta( $postId, 'linkdin_url', true );
  59. $pint_rest_url = get_post_meta( $postId, 'pint_rest_url', true );
  60. $google_url = get_post_meta( $postId, 'google_url', true );
  61. $instagram_url = get_post_meta( $postId, 'instagram_url', true );
  62. $social_media_feeds = get_post_meta( $postId, 'social_media_feeds', true );
  63.  
  64.  
  65. // Location for event /
  66.  
  67. $venue_string = NULL;
  68. $sql_for_venue = "SELECT * FROM wp_esp_event_venue WHERE EVT_ID = '".$postId."'";
  69. $venue_id = $wpdb->get_results($sql_for_venue) or die(mysql_error());
  70.  
  71. if( !empty( $venue_id ))
  72.  
  73. $venue_id = $venue_id[0];
  74.  
  75. if( !empty( $venue_id )){
  76.  
  77. $venue_id = $venue_id->VNU_ID;
  78. $sql_for_venue_detail = "SELECT * FROM wp_esp_venue_meta WHERE VNU_ID = '$venue_id'"; $venue_detail = $wpdb->get_results($sql_for_venue_detail) or die(mysql_error());
  79.  
  80. if( !empty( $venue_detail ))
  81. $venue_detail = $venue_detail[0] ;
  82.  
  83. if( !empty( $venue_detail ) and !empty( get_the_title( $venue_id ))){
  84. $venue_string .= ' <a class="ahe-venue-detail " href="'.esc_url( get_permalink($venue_id) ).'" role="button"><i class="fa fa-map-marker" aria-hidden="true"></i>
  85. '.get_the_title( $venue_id ).' / '.$venue_detail->VNU_city.'</a>';
  86. ;}
  87. else if ( !empty( get_the_title( $venue_id ) )){
  88. $venue_string .= ' <a class="ahe-venue-detail" href="'.esc_url( get_permalink($venue_id) ).'" role="button"><i class="fa fa-map-marker" aria-hidden="true"></i>
  89. '.get_the_title( $venue_id ).'</a>';
  90. }elseif ( !empty($venue_detail->VNU_city) ) {
  91. $venue_string .= ' <a class="ahe-venue-detail" href="'.esc_url( get_permalink($venue_id) ).'" role="button"><i class="fa fa-map-marker" aria-hidden="true"></i>
  92. '.$venue_detail->VNU_city.'</a>';
  93. }
  94.  
  95. }
  96.  
  97. // Location for event /
  98.  
  99. // Date_time for event /
  100.  
  101. $sql = "SELECT * FROM wp_esp_datetime WHERE EVT_ID = '".$postId."'";
  102. $date_and_time = $wpdb->get_results($sql) or die(mysql_error());
  103.  
  104.  
  105.  
  106. if( !empty( $date_and_time ) ){
  107.  
  108. $date_string = NULL;
  109. $start_date_array = NULL;
  110. $end_date_array = NULL;
  111. foreach ( $date_and_time as $dateAndTime ) {
  112.  
  113. $start_date = $dateAndTime->DTT_EVT_start;
  114. $end_date = $dateAndTime->DTT_EVT_end ;
  115.  
  116. $start_date_array[] = array( $start_date , strtotime( $start_date ) );
  117. $end_date_array[] = array( $end_date , strtotime( $end_date ) );
  118.  
  119. }
  120. if( !empty( $start_date_array ) and !empty( $end_date_array ) ){
  121.  
  122. usort($start_date_array , "compare_Date");
  123. usort($end_date_array , "compare_Date");
  124. $date_string .= '<p class="ahe-venue-detail" ><i class="fa fa-calendar" aria-hidden="true"></i>
  125. '. date("jS, M h:i A", strtotime($start_date_array[0][0])) .' to ' . date("jS, M h:i A", strtotime($end_date_array[ count( $end_date_array ) - 1 ][0])) .' </p>';
  126. }else{
  127. $date_string = '<p class="ahe-venue-detail" ><i class="fa fa-calendar" aria-hidden="true"></i>
  128. Schedule is not available</p>';
  129.  
  130. }
  131. }else{
  132. $date_string = '<p class="ahe-venue-detail" ><i class="fa fa-calendar" aria-hidden="true"></i>
  133. Schedule is not available</p>';
  134.  
  135. }
  136. // Date_time for event /
  137. ?>
  138.  
  139. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  140. <meta name="viewport" content="width=device-width, initial-scale=1">
  141. <title><?php wp_title( '|', true, 'right' ); ?></title>
  142. <link rel="profile" href="http://gmpg.org/xfn/11" />
  143. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  144. <link rel="icon" type="image/x-icon" href="<?php echo $theme_setting['favicon_url']; ?>" />
  145. <link rel="shortcut icon" type="image/x-icon" href="<?php echo $javo_tso->get('favicon_url', '');?>" />
  146. <!-- Custom styles for this template -->
  147. <link href="<?php echo get_template_directory_uri(); ?>/assets/css/bootstrap.min.css" rel="stylesheet">
  148.  
  149.  
  150.  
  151.  
  152. <link href="<?php echo get_template_directory_uri(); ?>/assets/css/font-awesome.min.css" rel="stylesheet">
  153. <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  154. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  155.  
  156.  
  157. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" /></script>
  158.  
  159. <script src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.colorbox.js"></script>
  160. <script src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.colorbox-min.js"></script>
  161.  
  162. <script type='text/javascript' src='http://code.jquery.com/ui/1.11.4/jquery-ui.js?ver=4.6.1'></script>
  163. <?php wp_head(); ?>
  164. <script src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.colorbox.js"></script>
  165. <script src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.colorbox-min.js"></script>
  166. <link href="<?php echo get_template_directory_uri(); ?>/assets/css/event_style.css" rel="stylesheet">
  167.  
  168. <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/assets/css/lightbox.min.css">
  169.  
  170.  
  171.  
  172. </head>
  173. <!-- NAVBAR
  174. ================================================== -->
  175. <body <?php body_class(); ?>>
  176. <div class="navbar-wrapper">
  177. <div class="container">
  178.  
  179. <nav class="navbar navbar-inverse navbar-static-top">
  180. <div class="container">
  181. <div class="navbar-header">
  182. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  183. <span class="sr-only">Toggle navigation</span>
  184. <span class="icon-bar"></span>
  185. <span class="icon-bar"></span>
  186. <span class="icon-bar"></span>
  187. </button>
  188. <a class="navbar-brand small_logo" href="<?php echo home_url('/');?>"><img class="img-responsive" src="<?php echo $theme_setting['logo_url']; ?>"></a>
  189. </div>
  190. <div id="navbar" class="navbar-collapse collapse">.
  191. <ul class="nav navbar-nav">
  192. <?php
  193. wp_nav_menu( array(
  194. 'menu_class' => 'nav navbar-nav',
  195. 'theme_location' => 'primary',
  196. 'depth' => 3,
  197. 'container' => false,
  198. 'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
  199. 'walker' => new wp_bootstrap_navwalker()
  200. )); ?>
  201. </ul>
  202. </div>
  203. </div>
  204. </nav>
  205. </div>
  206. </div>
  207. <!-- Carousel
  208. ================================================== -->
  209. <div class="ahe-detail-header">
  210. <div class="fix_h_w">
  211. <img src="<?php echo get_the_post_thumbnail_url( $postId, 'full' ); ?>" width="100%" />
  212. <div class="container">
  213. <div class="ahe-detail-caption">
  214. <h1 class="slider-text"><?=stripslashes($postData->post_title);?></h1>
  215.  
  216. <?php echo $date_string; ?>
  217. <?php echo $venue_string; ?>
  218. <p><a class="ahe-btn-ticket" href="#" role="button">Sponsor this Event</a></p>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. <div class="container-fluid ahe-Tbooking">
  225. <div class="container">
  226. <h3>Ticket Booking</h3>
  227. <div class="ahe-booking-custom-form">
  228. <?php echo do_shortcode('[ESPRESSO_TICKET_SELECTOR event_id='.$postId.']'); ?>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="container-fluid ahe-about-event">
  233. <div class="container">
  234. <h3>About the Event</h3>
  235. <div class="ahe-width">
  236. <?=stripslashes($postData->post_content);?>
  237. Event Website: <?php echo stripslashes($event_website); ?>
  238. </div>
  239. </div>
  240. </div>
  241. <div class="container-fluid ahe-Tbooking">
  242. <div class="container">
  243. <h3>MEDIA GALLERY</h3>
  244. <div>
  245. <!-- Nav tabs -->
  246. <ul class="nav nav-tabs" role="tablist">
  247. <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">PHOTOS</a></li>
  248. <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">VIDEOS</a></li>
  249. </ul>
  250.  
  251. <!-- Tab panes -->
  252. <div class="tab-content">
  253. <div role="tabpanel" class="tab-pane active" id="home"><?php echo do_shortcode($event_images);?></div>
  254. <div role="tabpanel" class="tab-pane" id="profile"><?php echo do_shortcode($event_video);?></div>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259.  
  260.  
  261. <!-- <?php if($event_images!='') { ?>
  262. <div class="container-fluid ahe-Tbooking">
  263. <div class="container">
  264. <h3>MEDIA GALLERY</h3>
  265. <?=stripslashes($event_images);?>
  266. </div>
  267. </div>
  268.  
  269. <?php } ?>
  270. <?php if($event_video!='') { ?>
  271. <div class="container-fluid ahe-Tbooking">
  272. <div class="container">
  273. <h3>Event Video</h3>
  274. <?php echo do_shortcode($event_video);?>
  275. </div>
  276. </div>
  277. <?php } ?> -->
  278. <?php if($event_schedule!='') { ?>
  279. <div class="container-fluid ahe-about-event">
  280. <div class="container">
  281. <h3>Schedule</h3>
  282. <div class="ahe-width">
  283. <div class="ahe-custom-schedule-box">
  284. <?php echo do_shortcode($event_schedule);?>
  285. </div>
  286. </div>
  287. </div>
  288. </div>
  289. <?php } ?>
  290. <?php if($speakersartist>0){?>
  291. <div class="container-fluid ahe-Tbooking">
  292. <div class="container">
  293. <h3>MEET OUR SPEAKERS</h3>
  294.  
  295. <div id="myCarousel" class="carousel slide" data-ride="carousel">
  296. <!-- Indicators -->
  297. <ol class="carousel-indicators">
  298. <?php
  299.  
  300. foreach ( $people as $type => $persons ){
  301. $cbr1=0;
  302. foreach ( $persons as $person ){
  303. if($type=='Speakers/Artist'){
  304.  
  305. ?>
  306. <li data-target="#myCarousel" data-slide-to="<?=$cbr1?>" <?php if($cbr1==0) { ?> class="active" <?php } ?>></li>
  307. <?php } $cbr1++; } } ?>
  308. </ol>
  309.  
  310. <!-- Wrapper for slides -->
  311. <div class="carousel-inner" role="listbox">
  312. <?php
  313. $cbr12=0;
  314. foreach ( $people as $type => $persons ){
  315. foreach ( $persons as $person ){
  316.  
  317. if($type=='Speakers/Artist'){
  318.  
  319. $spnsr = $person->ID();
  320. $feature_image = get_the_post_thumbnail( $person->ID(), array( 800, 300 ) );
  321. $people_website = get_post_meta( $spnsr, 'people_website', true );
  322. ?>
  323. <div class="item <?php if($cbr12==0) { ?>active<?php } ?>">
  324. <div class="row">
  325. <div class="col-sm-4"><a href="<?php echo get_permalink($spnsr) ?>"><?=$feature_image;?></a></div>
  326. <div class="col-sm-8"><h5><a href="<?php echo get_permalink($spnsr) ?>"><?php echo stripslashes($person->full_name()); ?></a> <!-- - <small>Project Manager</small> --></h5>
  327. <?php echo $person->get('PER_bio' ); ?>
  328. <!-- <div class="ahe-social-icon">
  329. <a target="_blank" href="#"><i class="fa fa-facebook"></i></a>
  330. <a target="_blank" href="#"><i class="fa fa-twitter"></i></a>
  331. <a target="_blank" href="#"><i class="fa fa-globe"></i></a>
  332. </div> -->
  333. Website: <a href="<?=stripslashes($people_website);?>" target="_blank"><?=stripslashes($people_website);?></a>
  334. </div>
  335. </div>
  336.  
  337. </div>
  338. <?php $cbr12++; } } } ?>
  339. </div>
  340.  
  341. <!-- Left and right controls -->
  342. <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
  343. <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
  344. <span class="sr-only">Previous</span>
  345. </a>
  346. <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
  347. <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
  348. <span class="sr-only">Next</span>
  349. </a>
  350. </div>
  351. </div>
  352. </div>
  353. <?php } ?>
  354. <?php if($sponsorsCount>0) { ?>
  355. <div class="container-fluid ahe-about-event">
  356. <div class="container">
  357. <h3>Our Sponsors</h3>
  358. <!-- Wrapper for slides -->
  359. <div class="slider1">
  360. <?php
  361. $cbr1=0;
  362. foreach ( $people as $type => $persons ){
  363. foreach ( $persons as $person ){
  364. if($type=='Sponsors'){
  365. $spnsr = $person->ID();
  366. $feature_image = get_the_post_thumbnail_url( $person->ID());
  367. $people_website = get_post_meta( $spnsr, 'people_website', true );
  368. ?>
  369.  
  370. <div class="slide"><a href="<?php echo get_permalink($spnsr) ?>"><img src="<?=$feature_image;?>" ></a></div>
  371.  
  372. <?php $cbr1++; } } } ?>
  373. </div>
  374. <!-- Left and right controls -->
  375. </div>
  376. </div>
  377.  
  378. <?php } ?>
  379. <?php if($organizerCount>0) { ?>
  380. <div class="container-fluid ahe-organizer">
  381. <div class="container">
  382. <h3>Organizer</h3>
  383. <div class="ahe-width">
  384. <ul class="ahe-organizer-section">
  385. <?php
  386. $cbr1=0;
  387. foreach ( $people as $type => $persons ){
  388. foreach ( $persons as $person ){
  389. if($type=='Organizer'){
  390. $spnsr = $person->ID();
  391.  
  392. $organizer_website = get_post_meta( $spnsr, 'people_website', true );
  393. $organizer_company = get_post_meta( $spnsr, 'organizer_company', true );
  394. $organizer_number = get_post_meta( $spnsr, 'organizer_number', true );
  395. ?>
  396. <li>Organizer Name: <span><a href="<?php echo get_permalink($spnsr) ?>"><?php echo stripslashes($person->full_name()); ?></a></span></li>
  397. <li>Organizer Company: <span><?=stripslashes($organizer_company)?></span></li>
  398. <li>Organizer Website: <span><a href="<?=stripslashes($organizer_website)?>" target="_blank"><?=stripslashes($organizer_website)?></a></span></li>
  399. <li>Organizer Number: <span><?=stripslashes($organizer_number)?></span></li>
  400. <?php } $cbr1++; } } ?>
  401. </ul>
  402. </div>
  403. </div>
  404. </div>
  405. <?php } ?>
  406. <?php if($event_faq!='') { ?>
  407. <div class="container-fluid ahe-faq">
  408. <div class="container">
  409. <h3 class="ahe-white">FAQS</h3>
  410. <div class="ahe-width">
  411. <?php echo do_shortcode($event_faq); ?>
  412. </div>
  413. </div>
  414. </div>
  415. <?php } ?>
  416.  
  417. <!-- <?php if($event_social_media!='') { ?>
  418. <div class="container-fluid ahe-about-event">
  419. <div class="container">
  420. <h3>social media feeds</h3>
  421. <?php echo nl2br($event_social_media); ?>
  422. </div>
  423. </div>
  424. <?php } ?> -->
  425. <?php if($event_term_condition!='') { ?>
  426. <div class="container-fluid ahe-organizer">
  427. <div class="container">
  428. <h3>Terms & Condition</h3>
  429. <div class="ahe-width">
  430. <?php echo stripslashes($event_term_condition); ?>
  431. </div>
  432. </div>
  433. </div>
  434. <?php } ?>
  435. <!-- <?php if($comments!='') { ?>
  436. <div class="container-fluid ahe-about-event">
  437. <div class="container">
  438. <h3>Comments</h3>
  439. <div class="ahe-width">
  440. <?=stripslashes($comments);?>
  441. </div>
  442. </div>
  443. </div>
  444. <?php } ?> -->
  445.  
  446. <div class="container-fluid ahe-organizer">
  447. <div class="container">
  448. <h3>Let's connect!</h3>
  449.  
  450. <?php echo do_shortcode($social_media_feeds); ?>
  451. <div class="ahe-social-icon">
  452. <?php if($instagram_url!='') { ?>
  453. <a target="_blank" href="<?=$instagram_url?>"><i class="fa fa-instagram"></i></a>
  454. <?php } ?>
  455.  
  456. <?php if($facebook_url!='') { ?>
  457. <a target="_blank" href="<?=$facebook_url?>"><i class="fa fa-facebook"></i></a>
  458. <?php } ?>
  459.  
  460. <?php if($twitter_url!='') { ?>
  461. <a target="_blank" href="<?=$twitter_url?>"><i class="fa fa-twitter"></i></a>
  462. <?php } ?>
  463.  
  464. <?php if($youtube_url!='') { ?>
  465. <a target="_blank" href="<?=$youtube_url?>"><i class="fa fa-youtube"></i></a>
  466. <?php } ?>
  467.  
  468. <?php if($linkdin_url!='') { ?>
  469. <a target="_blank" href="<?=$linkdin_url?>"><i class="fa fa-linkedin"></i></a>
  470. <?php } ?>
  471.  
  472. <?php if($pint_rest_url!='') { ?>
  473. <a target="_blank" href="<?=$pint_rest_url?>"><i class="fa fa-pinterest"></i></a>
  474. <?php } ?>
  475.  
  476. <?php if($google_url!='') { ?>
  477. <a target="_blank" href="<?=$google_url?>"><i class="fa fa-google-plus"></i></a>
  478. <?php } ?>
  479.  
  480. </div>
  481. <div class="ahe-subscribe">
  482. <h5>Subscribe to Our Newsletter Now & Stay Informed!</h5>
  483. <div class="ahe-field-main">
  484. <input type="email" placeholder="Enter your email"><input type="button" value="Subscribe">
  485. </div>
  486. </div>
  487.  
  488. </div>
  489. </div>
  490. <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> -->
  491. <script src="<?php echo get_template_directory_uri(); ?>/assets/js/lightbox-plus-jquery.min.js"></script>
  492.  
  493. <script src="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.bxslider.js"></script>
  494. <link href="<?php echo get_template_directory_uri(); ?>/assets/js/jquery.bxslider.css" rel="stylesheet">
  495. </body>
  496. <?php get_footer(); ?>
  497. <script type="text/javascript">
  498. // jQuery(".ticket-selector-tbl-qty-slct option[value='0']").each(function() {
  499. //jQuery(this).remove();
  500. //});
  501. jQuery(document).ready(function(){
  502. jQuery('.slider1').bxSlider({
  503. slideWidth: 200,
  504. minSlides: 2,
  505. maxSlides: 4,
  506. slideMargin: 10
  507. });
  508. });
  509. </script>
  510. </html>
Add Comment
Please, Sign In to add comment