hjkhghopjkertteerterterterertertrtoirh
bnmbertsurhetertertertertertertertpdf'tdfg
/
home
/
ubuntu
/
bmse.net
/
Upload FileeE
HOME
<?php //ini_set('display_errors',1); include('includes/application_includes.php'); $valuelist = array(); /* $zones = $db->getRows('SELECT `id` as `zoneId`, `name_zone` as `zonename` from `bmse_zones` WHERE `status`=1 AND `remove_flag`=1 '); $zonesinfo=array(); if (!empty($zones)){ foreach($zones as $zone) { #Getting cities under zone if ($zone['zoneId']!='' AND $zone['zoneId']!=0) { $citiinfo=array(); $cities = $db->getRows('SELECT `id` as `citiId`, `name` , `zone` as `zoneId` FROM `bmse_expo_cities` WHERE `zone`='.$zone['zoneId'].''); if (!empty($cities)){ foreach($cities as $citi) { $citi['citiId'] = (int)$citi['citiId']; $citi['zoneId'] = (int)$citi['zoneId']; $citiinfo[]=$citi; } } } if (!empty($citiinfo)){ $zone['zoneId'] = (int)$zone['zoneId']; $zone['zonename'] = $zone['zonename']; $zone['cities'] = $citiinfo; $zonesinfo[] = $zone; } } } ArrayDisplay($zonesinfo);*/ # Getting list of upcoming events $query3 = $db->getRows("SELECT `id`, `name` as 'eventname', `city` as 'eventcity', `start_dttm` as 'eventstartdate', `end_dttm` as 'eventenddate' , `expo_hall_id` as `eventhallname`,`eventspotimage`, `peuchase_booth_type` as 'purchaseType',`lectureslot_start_time_sat` as `SatStartTime`, `lectureslot_end_time_sat` as `SatEndTime`,`lectureslot_start_time_sun` as `SunStartTime`, `lectureslot_end_time_sun` as `SunEndTime`, `lectureslot_start_time` as `StartTime`, `lectureslot_end_time` as `EndTime` FROM bmse_expos where status=1 and remove=1 and `end_dttm`>='" . date('Y-m-d h:i:s') . "' order by start_dttm ASC limit 2"); //ArrayDisplay($query3); $rows3 = array(); foreach($query3 as $row3) { //echo 'yeas'; //echo $row3['eventspotimage']; # Getting hall name //echo $row3['eventspotimage']; //echo $row3['id']; //ArrayDisplay($row3); $expohallinfo = $db->getRow('select `name`, `address_line_1`,`zone_id`, `city_new`, `city` as `eventcity`, `state` as `eventstate`, `country` as `eventcountry`, `zip` as `eventzipcode` FROM `bmse_halls` WHERE `id`=' . $row3['eventhallname'] . ''); $row3['eventhallname'] = $expohallinfo['name']; $row3['eventurl'] = SITE_PATH . 'event/eventhome.php?eid=' . $row3['id'] . ''; //echo $row3['eventspotimage']; if ($row3['eventspotimage'] != '' and file_exists(DOCUMENT_ROOT . 'hfm/' . $row3['eventspotimage'])) { $roweventspotimage = SITE_PATH . 'hfm/' . $row3['eventspotimage']; //echo 'yes'; } else { $roweventspotimage= ''; } //echo $roweventspotimage; //echo $row3['eventspotimage']; $expostartdate = date('d', strtotime($row3['eventstartdate'])); $expoenddate = date('d', strtotime($row3['eventenddate'])); $eventDate = date('M j', strtotime($row3['eventstartdate'])).'-'. date('j', strtotime($row3['eventenddate'])); if (date('m', strtotime($row3['eventstartdate'])) == date('m', strtotime($row3['eventenddate']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($row3['eventstartdate'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays += $expoenddate + 1; } $EventTimings = ''; for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($row3['eventstartdate'])), date("d", strtotime($row3['eventstartdate'])) + $i, date("Y", strtotime($row3['eventstartdate']))); $EventTimings .= date('D', $expodates) . ' '; if (date('D', $expodates) === 'Sun') { $EventTimings .= date('g', strtotime($row3['SunStartTime'])); $EventTimings .= ' - '; $EventTimings .= date('g', strtotime($row3['SunEndTime'])); $EventTimings .= ' | '; } else if (date('D', $expodates) === 'Sat') { $EventTimings .= date('g', strtotime($row3['SatStartTime'])); $EventTimings .= ' - '; $EventTimings .= date('g', strtotime($row3['SatEndTime'])); $EventTimings .= ' | '; } else { $EventTimings .= date('g', strtotime($row3['StartTime'])); $EventTimings .= ' - '; $EventTimings .= date('g', strtotime($row3['EndTime'])); $EventTimings .= ' | '; } } //echo $roweventspotimage; $rows3['id'] = (int) $row3['id']; $rows3['regionId'] = (int) $expohallinfo['zone_id']; $rows3['cityId'] = (int) $expohallinfo['city_new']; $rows3['zoneId'] = (int) $expohallinfo['zone_id']; $rows3['title'] = $row3['eventname']; $rows3['place'] = $row3['eventhallname']; $rows3['addess'] = $expohallinfo['address_line_1']; $rows3['city'] = $expohallinfo['eventcity']; $rows3['state'] = $expohallinfo['eventstate']; $rows3['zip'] = $expohallinfo['eventzipcode']; $rows3['startDate'] = $row3['eventstartdate']; $rows3['endDate'] = $row3['eventenddate']; $rows3['eventTimings'] = substr($EventTimings, 0, strlen($EventTimings) - 3); $rows3['SaturdayExpoStartTime'] = $row3['SatStartTime']; $rows3['SaturdayExpoEndTime'] = $row3['SatEndTime']; $rows3['SundayExpoStartTime'] = $row3['SunStartTime']; $rows3['SundayExpoEndTime'] = $row3['SunEndTime']; $rows3['spotpicture'] = $roweventspotimage; $rows3['picture'] = $roweventspotimage; $rows3['eventdate']=$eventDate; # getting tickets count $ticketsCount = getExpoTicketsCount($row3['id']); if ($ticketsCount > 1) { $rows3['buyTicketURL'] = SITE_PATH . 'event/vendor_tickets.php?eid=' . $row3['id'] . ''; } else { $expoTicketInfoval = getexpoTicketInfoval($row3['id']); $rows3['buyTicketURL'] = SITE_PATH . 'event/ticket_details.php?eid=' . $expoTicketInfoval['expo_id'] . '&product_id='.$expoTicketInfoval['id'].'&vendor_id=""&workshopid=""'; } //$rows3['buyTicketURL'] = SITE_PATH . 'event/vendor_tickets.php?eid=' . $row3['id'] . ''; if ($row3['purchaseType'] == 1) { $rows3['buyBoothURL'] = SITE_PATH . 'floorplan/index.php?eid=' . $row3['id'] . ''; $rows3['purchaseType'] = 'online'; } else { $rows3['buyBoothURL'] = SITE_PATH . '#!/exhibitor/join'; $rows3['purchaseType'] = 'offline'; } $rows3['eventurl'] = SITE_PATH . 'event/eventhome.php?eid=' . $row3['id'] . ''; //ArrayDisplay($rows3); $upcomingevents[] = $rows3; } //ArrayDisplay($_POST); # Getting list of all events // die(date('Y-m-d 00:00:00')); # filtering events # Collapse view all $qery=''; if (isset($_REQUEST['cv']) AND $_REQUEST['cv']=='yes') { $qery.= ' limit 0, 8 '; } # Dates sorting $orderby=''; if (isset($_REQUEST['date']) AND $_REQUEST['date']==2) { $orderby.=' order by `start_dttm` DESC '; } else if (isset($_REQUEST['date']) AND $_REQUEST['date']==3) { $orderby.=' order by `end_dttm` ASC '; } else if (isset($_REQUEST['date']) AND $_REQUEST['date']==4) { $orderby.=' order by `end_dttm` DESC '; } else { $orderby.='order by `start_dttm` ASC'; } # City filtering $search=''; if (isset($_REQUEST['city']) AND $_REQUEST['city']!='' AND $_REQUEST['city']!='All-Keep Me Updated on Every Event') { $search.=' and `city` like "%'.$_REQUEST['city'].'%" '; } $query13 = $db->getRows("SELECT `id`, `name` as 'eventname', `city` as 'eventcity', `state` as `eventstate`, `country` as `eventcountry`, `zip` as `eventzipcode`, DATE(`start_dttm`) as 'eventstartdate', DATE(`end_dttm`) as 'eventenddate' , `expo_hall_id` as `eventhallname`,`eventspotimage` , `peuchase_booth_type` as 'purchaseType',lectureslot_start_time_sat as SatStartTime, lectureslot_end_time_sat as SatEndTime,lectureslot_start_time_sun as SunStartTime, lectureslot_end_time_sun as SunEndTime, `lectureslot_start_time` as `StartTime`, `lectureslot_end_time` as `EndTime` FROM bmse_expos where status=1 and remove=1 and `end_dttm`>='" . date('Y-m-d h:i:s') . "' ".$search." ".$orderby." ".$qery." "); $rows13 = array(); $allevents = array(); foreach ($query13 as $row13) { # Getting hall name $expohallinfo = $db->getRow('select `name`, `address_line_1`,`city_new`, `zone_id`, `city` as `eventcity`, `state` as `eventstate`, `country` as `eventcountry`, `zip` as `eventzipcode` FROM `bmse_halls` WHERE `id`=' . $row13['eventhallname'] . ''); $row13['eventhallname'] = $expohallinfo['name']; $row13['eventurl'] = SITE_PATH . 'event/eventhome.php?eid=' . $row3['id'] . ''; if ($row13['eventspotimage'] != '' and file_exists(DOCUMENT_ROOT . 'hfm/' . $row13['eventspotimage'])) { $row13['eventspotimage'] = SITE_PATH . 'hfm/' . $row13['eventspotimage']; } else { $row13['eventspotimage'] = ''; } # Getting citi id if ($row13['eventcity']) { $citiinfo = $db->getRow('SELECT `id`, `name` FROM `bmse_expo_cities` WHERE `name`="' . $row13['eventcity'] . '"'); } $expostartdate = date('d', strtotime($row13['eventstartdate'])); $expoenddate = date('d', strtotime($row13['eventenddate'])); $eventDate = date('M j', strtotime($row13['eventstartdate'])).'-'. date('j', strtotime($row13['eventenddate'])); if (date('m', strtotime($row13['eventstartdate'])) == date('m', strtotime($row13['eventenddate']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($row13['eventstartdate'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays += $expoenddate + 1; } $EventTimings = ''; for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($row13['eventstartdate'])), date("d", strtotime($row13['eventstartdate'])) + $i, date("Y", strtotime($row13['eventstartdate']))); $EventTimings .= date('D', $expodates) . ' '; if (date('D', $expodates) === 'Sun') { $EventTimings .= date('g', strtotime($row13['SunStartTime'])); $EventTimings .= ' - '; $EventTimings .= date('g', strtotime($row13['SunEndTime'])); $EventTimings .= ' | '; } else if (date('D', $expodates) === 'Sat') { $EventTimings .= date('g', strtotime($row13['SatStartTime'])); $EventTimings .= ' - '; $EventTimings .= date('g', strtotime($row13['SatEndTime'])); $EventTimings .= ' | '; } else { $EventTimings .= date('g', strtotime($row13['StartTime'])); $EventTimings .= ' - '; $EventTimings .= date('g', strtotime($row13['EndTime'])); $EventTimings .= ' | '; } } $rows13['id'] = (int) $row13['id']; //$rows13['regionId'] = (int)$row13['regionId']; //$rows13['city'] = $row13['eventcity']; //$rows13['cityId'] = (int)$citiinfo['id']; $rows13['regionId'] = (int) $expohallinfo['zone_id']; $rows13['cityId'] = (int) $expohallinfo['city_new']; $rows13['zoneId'] = (int) $expohallinfo['zone_id']; $rows13['title'] = $row13['eventname']; $rows13['place'] = $row13['eventhallname']; $rows13['addess'] = $expohallinfo['address_line_1']; $rows13['city'] = $expohallinfo['eventcity']; $rows13['state'] = $expohallinfo['eventstate']; $rows13['zip'] = $expohallinfo['eventzipcode']; $rows13['startDate'] = $row13['eventstartdate']; $rows13['endDate'] = $row13['eventenddate']; $rows13['eventTimings'] = substr($EventTimings, 0, strlen($EventTimings) - 3); $rows13['SaturdayExpoStartTime'] = $row13['SatStartTime']; $rows13['SaturdayExpoEndTime'] = $row13['SatEndTime']; $rows13['SundayExpoStartTime'] = $row13['SunStartTime']; $rows13['SundayExpoEndTime'] = $row13['SunEndTime']; $rows13['eventDate'] = $eventDate; $rows13['picture'] = $row13['eventspotimage']; # getting tickets count $expoticketsCount = getExpoTicketsCount($row13['id']); if ($expoticketsCount > 1) { $rows13['buyTicketURL'] = SITE_PATH . 'event/vendor_tickets.php?eid=' . $row13['id'] . ''; } else { $expoTicketInfoval = getexpoTicketInfoval($row13['id']); $rows13['buyTicketURL'] = SITE_PATH . 'event/ticket_details.php?eid=' . $expoTicketInfoval['expo_id'] . '&product_id='.$expoTicketInfoval['id'].'&vendor_id=""&workshopid=""'; } //$rows13['buyTicketURL'] = SITE_PATH . 'event/vendor_tickets.php?eid=' . $row13['id'] . ''; if ($row13['purchaseType'] == 1) { $rows13['buyBoothURL'] = SITE_PATH . 'floorplan/index.php?eid=' . $row13['id'] . ''; $rows13['purchaseType'] = 'online'; } else { $rows13['buyBoothURL'] = SITE_PATH . '#!/exhibitor/join'; $rows13['purchaseType'] = 'offline'; } $rows13['buyBoothURL'] = SITE_PATH . 'floorplan/index.php?eid=' . $row13['id'] . ''; $rows13['eventurl'] = SITE_PATH . 'event/eventhome.php?eid=' . $row13['id'] . ''; $allevents[] = $rows13; } $smarty->assign('UPCOMING_EVENTS',$upcomingevents); $smarty->assign('ALL_EVENTS', $allevents); $smarty->assign('SELECTEDCITY', $_REQUEST['city']); $smarty->assign('SELECTDATE', $_REQUEST['date']); if($_REQUEST['date']==2){ $smarty->assign('STDATEDESC', 'selected'); } else if($_REQUEST['date']==3){ $smarty->assign('EDDATEASC', 'selected'); } else if($_REQUEST['date']==4){ $smarty->assign('EDDATEDESC', 'selected'); } else { $smarty->assign('STDATEASC', 'selected'); } $smarty->display(TEMPLATE_DOCROOT_PATH.'default/eventsn.tpl'); ?>