hjkhghopjkertteerterterterertertrtoirh
bnmbertsurhetertertertertertertertpdf'tdfg
/
home
/
ubuntu
/
bmse.net
/
Upload FileeE
HOME
<?php include_once("includes/application_includes1.php"); include_once("ArrayToXML.php"); if (isset($_REQUEST['ext']) && 'xml' == $_REQUEST['ext']) { $ext = 'xml'; header("Content-Type: text/xml"); $xmlobj = new ArrayToXML(); } else { $ext = 'json'; //default header('Content-type: application/json'); } $site_preferences = $db->getRow('SELECT * FROM bmse_site_preferences'); # Screen2 = Getting all upcoming expos if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 'e') { $expoDetails = $db->getRows('select `id`, `name`, `description`, `expo_logo`, `start_dttm`, `end_dttm`, `city`, `state`, `country`, `zip`, lectureslot_start_time_sun, lectureslot_end_time_sun, lectureslot_start_time_sat, lectureslot_end_time_sat, lectureslot_start_time, lectureslot_end_time, `expo_appfloorplan` from ' . BMSE_EXPOS . ' where start_dttm >="' . date('2014-1-1') . ' 00:00:00" and status=1 and remove=1 and `end_dttm`>"' . date('Y-m-d 00:00:00') . '" order by start_dttm asc '); if (!empty($expoDetails)) { $expoinfo = array(); $expo = array(); $i = 0; foreach ($expoDetails as $expoDetail) { $expostartdate=date('d',strtotime($expoDetail['start_dttm'])); $expoenddate=date('d',strtotime($expoDetail['end_dttm'])); if(date('m',strtotime($expoDetail['start_dttm']))==date('m',strtotime($expoDetail['end_dttm']))){ $expodays=($expoenddate-$expostartdate)+1; }else{ $noofdaysinmonth=date('t',strtotime($expoDetail['start_dttm'])); $expodays=($noofdaysinmonth-$expostartdate); $expodays+=$expoenddate+1; } $EventTimings=' '; for($i=0;$i<$expodays;$i++){ $expodates = mktime(0, 0, 0, date("m",strtotime($expoDetail['start_dttm'])),date("d",strtotime($expoDetail['start_dttm']))+$i, date("Y",strtotime($expoDetail['start_dttm']))); $EventTimings.=date('D',$expodates).' '; if(date('D',$expodates)=='Sun'){ $EventTimings.=date('g:i A',strtotime($expoDetail['lectureslot_start_time_sun'])); $EventTimings.=' to '; $EventTimings.=date('g:i A',strtotime($expoDetail['lectureslot_end_time_sun'])); $EventTimings.=' - '; }else if(date('D',$expodates)=='Sat'){ $EventTimings.=date('g:i A',strtotime($expoDetail['lectureslot_start_time_sat'])); $EventTimings.=' to '; $EventTimings.=date('g:i A',strtotime($expoDetail['lectureslot_end_time_sat'])); $EventTimings.=' - '; }else{ $EventTimings.=date('g:i A',strtotime($expoDetail['lectureslot_start_time'])); $EventTimings.=' to '; $EventTimings.=date('g:i A',strtotime($expoDetail['lectureslot_end_time'])); $EventTimings.=' - '; } } $expo_details = ExpoDetails($expoDetail['id']); $exdate = displayDate($expo_details['start_dttm']) . " - " . displayDate($expo_details['end_dttm']); $exaddress = $expo_details['hall_name'] . ", " . $expo_details['hall_address_line_1'] . ' ' . $expo_details['hall_address_line_2'] . ', ' . $expo_details['city'] . ', ' . $expo_details['hall_state']; $exlogo = SITE_ADMIN_IMAGES_PATH . 'expologos/' . $expoDetail['expo_logo'] . ''; $exappfloorplan = ($expoDetail['expo_appfloorplan']!="")? SITE_ADMIN_IMAGES_PATH.'expofloorplans/'.$expoDetail['expo_appfloorplan']:''; $startdate = date('m-d-Y', strtotime($expo_details['start_dttm'])); $enddate = date('m-d-Y', strtotime($expo_details['end_dttm'])); $expo['id'] = $expoDetail['id']; $expo['name'] = $expoDetail['name']; $expo['description'] = strip_tags($expoDetail['description']); $expo['logo'] = $exlogo; $expo['eventfloorplan'] = $exappfloorplan; $expo['dates'] = $exdate; $expo['expostartdate'] = $startdate; $expo['expoenddate'] = $enddate; $expo['expotime'] = trim(substr($EventTimings, 0, -2)); $expo['address'] = $exaddress; $expo['city'] = $expoDetail['city']; $expo['state'] = $expoDetail['state']; $expo['zip'] = $expoDetail['zip']; if ($ext === 'json') { $expoinfo[] = $expo; } elseif ($ext === 'xml') { $expoinfo['expo_' . $expo['id']] = $expo; } } $allexpos['expos'] = $expoinfo; } //ArrayDisplay($allexpos); if ($ext === 'json') { //$response = json_encode($allexpos); $response = json_encode($allexpos, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($allexpos); $response = $xmlobj; } echo $response; } # Screen4 = Getting Exhibitor's information if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 'b' AND $_REQUEST['d'] != '') { # Checking request- sort by company name if (isset($_REQUEST['srt']) AND $_REQUEST['srt'] == 'cn') { $orderby = 'M.companyname ASC'; } # Checking request- sort by booth number else if (isset($_REQUEST['srt']) AND $_REQUEST['srt'] == 'bn') { $orderby = 'ER.room_number ASC'; } else if (isset($_REQUEST['srt']) AND $_REQUEST['srt'] == 'cd') { $orderby = 'BCS.name ASC'; } # default - order by exhibitor id desc else { $orderby = 'M.id DESC'; } $expoinfo = array(); $expoDetail = $db->getRow("SELECT `id`, `expo_hall_id`, `name`, `description`, `expo_logo`, `start_dttm`, `end_dttm`, `city`, `state`, `country`, `zip`, lectureslot_start_time_sun, lectureslot_end_time_sun, lectureslot_start_time_sat, lectureslot_end_time_sat, lectureslot_start_time, lectureslot_end_time, `expo_appfloorplan` from " . BMSE_EXPOS . " WHERE `id`=" . $_REQUEST['d'] . ""); $hallinfo = $db->getRow("SELECT * FROM " . BMSE_HALLS . " WHERE `id`=" . $expoDetail['expo_hall_id'] . ""); $expostartdate = date('d', strtotime($expoDetail['start_dttm'])); $expoenddate = date('d', strtotime($expoDetail['end_dttm'])); if (date('m', strtotime($expoDetail['start_dttm'])) == date('m', strtotime($expoDetail['end_dttm']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($expoDetail['start_dttm'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays+=$expoenddate + 1; } $EventTimings = ' '; for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($expoDetail['start_dttm'])), date("d", strtotime($expoDetail['start_dttm'])) + $i, date("Y", strtotime($expoDetail['start_dttm']))); $EventTimings.=date('D', $expodates); if (date('D', $expodates) == Sun) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sun'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sun'])); $EventTimings.=' - '; } else if (date('D', $expodates) == Sat) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sat'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sat'])); $EventTimings.=' - '; } else { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time'])); $EventTimings.=' - '; } } $exdate = displayDate($expoDetail['start_dttm']) . " - " . displayDate($expoDetail['end_dttm']); $exaddress = $hallinfo['name'] . ", " . $hallinfo['address_line_1'] . ' ' . $hallinfo['address_line_2'] . ', ' . $hallinfo['city'] . ', ' . $hallinfo['state']; $exlogo = SITE_ADMIN_IMAGES_PATH . 'expologos/' . $expoDetail['expo_logo'] . ''; $exappfloorplan = ($expoDetail['expo_appfloorplan']!="")? SITE_ADMIN_IMAGES_PATH.'expofloorplans/'.$expoDetail['expo_appfloorplan']:''; $startdate = date('m-d-Y', strtotime($expoDetail['start_dttm'])); $enddate = date('m-d-Y', strtotime($expoDetail['end_dttm'])); $expo['id'] = $expoDetail['id']; $expo['name'] = $expoDetail['name']; $expo['description'] = strip_tags($expoDetail['description']); $expo['logo'] = $exlogo; $expo['eventfloorplan'] = $exappfloorplan; $expo['dates'] = $exdate; $expo['expostartdate'] = $startdate; $expo['expoenddate'] = $enddate; $expo['expotime'] = trim(substr($EventTimings, 0, -2)); $expo['address'] = $exaddress; $expo['city'] = $expoDetail['city']; $expo['state'] = $expoDetail['state']; $expo['zip'] = $expoDetail['zip']; $sql = "SELECT ER.expo_id, BC.boothid, M.id as exhibitor_id, M.companyname as company_name, ER.room_number as booth_number, M.city, M.state, M.email, M.website, BC.shortdescription as short_description, BC.longdescription as long_description,BC.booth_logo, M.image_name as exhibitor_image, ER.id as roomid, BCS.name as category FROM bmse_expo_rooms ER LEFT JOIN bmse_booth_configs BC ON ER.id = BC.boothid LEFT JOIN bmse_order_details OD ON ER.id = OD.item_id LEFT JOIN bmse_orders O ON O.id = OD.order_id LEFT JOIN bmse_members M ON M.id = O.member_id LEFT JOIN bmse_categories BCS on M.category_id=BCS.id WHERE ER.expo_id = " . $_REQUEST['d'] . " AND OD.item_type_id =1 AND ER.order_status =2 GROUP BY OD.item_id ORDER BY $orderby"; $booths = $db->getRows($sql); $exhibitors = array(); if (!empty($booths)) { $exhibitor = array(); foreach ($booths as $value) { $boothlogo = ($value['booth_logo'] != '') ? SITE_EXHIBITORADMIN_BOOTH_IMAGE_PATH . $value['booth_logo'] : SITE_ADMIN_IMAGES_SITE_PRE_PATH . $site_preferences['booth_logo']; $website = ($value['website']!="" AND $value['website']=="http://")?'':$value['website']; $exhibitor['mid'] = $value['exhibitor_id']; $exhibitor['rid'] = $value['roomid']; $exhibitor['category'] = $value['category']; $exhibitor['name'] = $value['company_name']; // $exhibitor['email'] = $value['email']; $exhibitor['website'] = $website; $exhibitor['logo'] = $boothlogo; $exhibitor['booth_number'] = $value['booth_number']; $exhibitor['city'] = $value['city']; $exhibitor['state'] = $value['state']; $exhibitor['description'] = strip_tags($value['short_description']); if ($ext === 'json') { $exhibitors[] = $exhibitor; } elseif ($ext === 'xml') { $exhibitors['booth_' . $exhibitor['rid']] = $exhibitor; } } } $expoinfo['expo'] = $expo; $expoinfo['booths'] = $exhibitors; //ArrayDisplay($expoinfo); if ($ext === 'json') { // $response = json_encode($expoinfo); $response = json_encode($expoinfo, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($expoinfo); $response = $xmlobj; } echo $response; } # Screen4 - part = Getting Exhibitor's information using category id if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 'cb' AND $_REQUEST['d'] != '' AND $_REQUEST['cd'] != '') { # Checking request- sort by company name $orderby = 'BCS.name ASC'; $expoinfo = array(); $expoDetail = $db->getRow("SELECT `id`, `expo_hall_id`, `name`, `description`, `expo_logo`, `start_dttm`, `end_dttm`, `city`, `state`, `country`, `zip`, lectureslot_start_time_sun, lectureslot_end_time_sun, lectureslot_start_time_sat, lectureslot_end_time_sat, lectureslot_start_time, lectureslot_end_time, `expo_appfloorplan` from " . BMSE_EXPOS . " WHERE `id`=" . $_REQUEST['d'] . ""); $hallinfo = $db->getRow("SELECT * FROM " . BMSE_HALLS . " WHERE `id`=" . $expoDetail['expo_hall_id'] . ""); $expostartdate = date('d', strtotime($expoDetail['start_dttm'])); $expoenddate = date('d', strtotime($expoDetail['end_dttm'])); if (date('m', strtotime($expoDetail['start_dttm'])) == date('m', strtotime($expoDetail['end_dttm']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($expoDetail['start_dttm'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays+=$expoenddate + 1; } $EventTimings = ' '; for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($expoDetail['start_dttm'])), date("d", strtotime($expoDetail['start_dttm'])) + $i, date("Y", strtotime($expoDetail['start_dttm']))); $EventTimings.=date('D', $expodates); if (date('D', $expodates) == Sun) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sun'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sun'])); $EventTimings.=' - '; } else if (date('D', $expodates) == Sat) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sat'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sat'])); $EventTimings.=' - '; } else { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time'])); $EventTimings.=' - '; } } $exdate = displayDate($expoDetail['start_dttm']) . " - " . displayDate($expoDetail['end_dttm']); $exaddress = $hallinfo['name'] . ", " . $hallinfo['address_line_1'] . ' ' . $hallinfo['address_line_2'] . ', ' . $hallinfo['city'] . ', ' . $hallinfo['state']; $exlogo = SITE_ADMIN_IMAGES_PATH . 'expologos/' . $expoDetail['expo_logo'] . ''; $exappfloorplan = ($expoDetail['expo_appfloorplan']!="")? SITE_ADMIN_IMAGES_PATH.'expofloorplans/'.$expoDetail['expo_appfloorplan']:''; $startdate = date('m-d-Y', strtotime($expoDetail['start_dttm'])); $enddate = date('m-d-Y', strtotime($expoDetail['end_dttm'])); $expo['id'] = $expoDetail['id']; $expo['name'] = $expoDetail['name']; $expo['description'] = strip_tags($expoDetail['description']); $expo['logo'] = $exlogo; $expo['eventfloorplan'] = $exappfloorplan; $expo['dates'] = $exdate; $expo['expostartdate'] = $startdate; $expo['expoenddate'] = $enddate; $expo['expotime'] = trim(substr($EventTimings, 0, -2)); $expo['address'] = $exaddress; $expo['city'] = $expoDetail['city']; $expo['state'] = $expoDetail['state']; $expo['zip'] = $expoDetail['zip']; $sql = "SELECT ER.expo_id, BC.boothid, M.id as exhibitor_id, M.companyname as company_name, ER.room_number as booth_number, M.city, M.state, M.email, M.website, BC.shortdescription as short_description, BC.longdescription as long_description,BC.booth_logo, M.image_name as exhibitor_image, ER.id as roomid, BCS.name as category, BCS.mobileappicon as categoryicon FROM bmse_expo_rooms ER LEFT JOIN bmse_booth_configs BC ON ER.id = BC.boothid LEFT JOIN bmse_order_details OD ON ER.id = OD.item_id LEFT JOIN bmse_orders O ON O.id = OD.order_id LEFT JOIN bmse_members M ON M.id = O.member_id LEFT JOIN bmse_categories BCS on M.category_id=BCS.id WHERE ER.expo_id = " . $_REQUEST['d'] . " AND OD.item_type_id =1 AND ER.order_status =2 AND M.category_id=" . $_REQUEST['cd'] . " GROUP BY OD.item_id ORDER BY $orderby"; $booths = $db->getRows($sql); $exhibitors = array(); if (!empty($booths)) { $exhibitor = array(); foreach ($booths as $value) { $boothlogo = ($value['booth_logo'] != '') ? SITE_EXHIBITORADMIN_BOOTH_IMAGE_PATH . $value['booth_logo'] : SITE_ADMIN_IMAGES_SITE_PRE_PATH . $site_preferences['booth_logo']; $website = ($value['website']!="" AND $value['website']=="http://")?'':$value['website']; $exhibitor['mid'] = $value['exhibitor_id']; $exhibitor['rid'] = $value['roomid']; $exhibitor['category'] = $value['category']; $exhibitor['name'] = $value['company_name']; // $exhibitor['email'] = $value['email']; $exhibitor['website'] = $website; $exhibitor['logo'] = $boothlogo; $exhibitor['categoryicon'] = MALL_SITE_PATH.'mall_administrator/images/mall_categories/'.$value['categoryicon']; $exhibitor['booth_number'] = $value['booth_number']; $exhibitor['city'] = $value['city']; $exhibitor['state'] = $value['state']; $exhibitor['description'] = strip_tags($value['short_description']); if ($ext === 'json') { $exhibitors[] = $exhibitor; } elseif ($ext === 'xml') { $exhibitors['booth_' . $exhibitor['rid']] = $exhibitor; } } } $expoinfo['expo'] = $expo; $expoinfo['booths'] = $exhibitors; //ArrayDisplay($expoinfo); if ($ext === 'json') { // $response = json_encode($expoinfo); $response = json_encode($expoinfo, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($expoinfo); $response = $xmlobj; } echo $response; } # Screen5 = Getting categories list if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 'c') { $categories = $db->getRows("SELECT id, name, mobileappicon FROM `bmse_categories` WHERE `status`=1 AND `remove`=1 ORDER BY `name` ASC"); $noofcategories = array(); if (!empty($categories)) { foreach ($categories as $category) { $category['mobileappicon'] = MALL_SITE_PATH.'mall_administrator/images/mall_categories/'.$category['mobileappicon']; if ($ext === 'json') { $categoryinfo[] = $category; } elseif ($ext === 'xml') { $categoryinfo['category_' . $category['id']] = $category; } } $noofcategories['categories'] = $categoryinfo; } if ($ext === 'json') { // $response = json_encode($expoinfo); $response = json_encode($noofcategories, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($noofcategories); $response = $xmlobj; } echo $response; } # Screen6 = Getting speaker's information if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 's' AND $_REQUEST['d'] != '') { # Checking request- sort by presenter name if (isset($_REQUEST['srt']) AND $_REQUEST['srt'] == 'sn') { $orderby = 'BLS.presenter_name ASC'; } # Checking request- sort by room number else if (isset($_REQUEST['srt']) AND $_REQUEST['srt'] == 'rn') { $orderby = 'ER.room_number ASC'; } # default - order by presenter id desc else { $orderby = 'BM.id DESC'; } $expoinfo = array(); $expoDetail = $db->getRow("SELECT `id`, `expo_hall_id`, `name`, `description`, `expo_logo`, `start_dttm`, `end_dttm`, `city`, `state`, `country`, `zip`, lectureslot_start_time_sun, lectureslot_end_time_sun, lectureslot_start_time_sat, lectureslot_end_time_sat, lectureslot_start_time, lectureslot_end_time , `expo_appfloorplan` from " . BMSE_EXPOS . " WHERE `id`=" . $_REQUEST['d'] . ""); $hallinfo = $db->getRow("SELECT * FROM " . BMSE_HALLS . " WHERE `id`=" . $expoDetail['expo_hall_id'] . ""); $expostartdate = date('d', strtotime($expoDetail['start_dttm'])); $expoenddate = date('d', strtotime($expoDetail['end_dttm'])); if (date('m', strtotime($expoDetail['start_dttm'])) == date('m', strtotime($expoDetail['end_dttm']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($expoDetail['start_dttm'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays+=$expoenddate + 1; } $EventTimings = ' '; for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($expoDetail['start_dttm'])), date("d", strtotime($expoDetail['start_dttm'])) + $i, date("Y", strtotime($expoDetail['start_dttm']))); $EventTimings.=date('D', $expodates); if (date('D', $expodates) == Sun) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sun'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sun'])); $EventTimings.=' - '; } else if (date('D', $expodates) == Sat) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sat'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sat'])); $EventTimings.=' - '; } else { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time'])); $EventTimings.=' - '; } } $exdate = displayDate($expoDetail['start_dttm']) . " - " . displayDate($expoDetail['end_dttm']); $exaddress = $hallinfo['name'] . ", " . $hallinfo['address_line_1'] . ' ' . $hallinfo['address_line_2'] . ', ' . $hallinfo['city'] . ', ' . $hallinfo['state']; $exlogo = SITE_ADMIN_IMAGES_PATH . 'expologos/' . $expoDetail['expo_logo'] . ''; $exappfloorplan = ($expoDetail['expo_appfloorplan']!="")? SITE_ADMIN_IMAGES_PATH.'expofloorplans/'.$expoDetail['expo_appfloorplan']:''; $startdate = date('m-d-Y', strtotime($expoDetail['start_dttm'])); $enddate = date('m-d-Y', strtotime($expoDetail['end_dttm'])); $expo['id'] = $expoDetail['id']; $expo['name'] = $expoDetail['name']; $expo['description'] = strip_tags($expoDetail['description']); $expo['logo'] = $exlogo; $expo['eventfloorplan'] = $exappfloorplan; $expo['dates'] = $exdate; $expo['expostartdate'] = $startdate; $expo['expoenddate'] = $enddate; $expo['expotime'] = trim(substr($EventTimings, 0, -2)); $expo['address'] = $exaddress; $expo['city'] = $expoDetail['city']; $expo['state'] = $expoDetail['state']; $expo['zip'] = $expoDetail['zip']; $sql = "SELECT BE.id as expo_id, BM.id as exhibitor_id, BLS.slot_id, BLS.presenter_name as speaker_name, BLS.title as speaker_title, CONCAT_WS('',DATE_FORMAT(BMLS.slot_date,'%d %b %Y'),' : ',LOWER(DATE_FORMAT(BMLS.lectureslot_start_time,'%h:%i %p')),' - ',LOWER(DATE_FORMAT(BMLS.lectureslot_end_time,'%h:%i %p'))) as presentation_date_time, BMLS.lectureslot_start_time as speaker_presentation_start_time, BMLS.lectureslot_end_time as speaker_presentation_end_time, BMLS.slot_date, BLS.description, ER.room_number, ER.room_name, BMLS.price, BLS.presenter_image FROM bmse_orders O LEFT JOIN bmse_order_details OD ON OD.order_id=O.id LEFT JOIN bmse_members BM ON BM.id = O.member_id LEFT JOIN bmse_expo_lecture_slots BMLS ON BMLS.id = OD.item_id LEFT JOIN bmse_expo_rooms ER ON ER.id = BMLS.room_id LEFT JOIN bmse_lectureslot_configs BLS ON BLS.slot_id = OD.item_id LEFT JOIN bmse_expos BE ON BE.id = BMLS.expo_id WHERE OD.item_type_id =2 AND BMLS.remove = 1 AND BE.id = " . $_REQUEST['d'] . " GROUP BY BLS.slot_id ORDER BY $orderby"; //ORDER BY BMLS.slot_date, BMLS.lectureslot_start_time, ER.room_number $presenterDetails = $db->getRows($sql); $presenters = array(); if (!empty($presenterDetails)) { $presenter = array(); foreach ($presenterDetails as $key => $value) { $room = $value['room_name'] == '' ? $value['room_number'] : html_entity_decode(str_replace($words, $replacements, htmlentities($value['room_name']))); $profileimage = ($value['presenter_image'] != '') ? SITE_EXHIBITORADMIN_BOOTH_PRESENTERS_IMAGE_PATH . $value['presenter_image'] : SITE_ADMIN_IMAGES_SITE_PRE_PATH . $site_preferences['presenter_logo']; $presenter['mid'] = $value['exhibitor_id']; $presenter['sid'] = $value['slot_id']; $presenter['name'] = $value['speaker_name']; $presenter['title'] = $value['speaker_title']; $presenter['room'] = $room; $presenter['date'] = $value['slot_date']; $presenter['startTime'] = $value['speaker_presentation_start_time']; $presenter['endTime'] = $value['speaker_presentation_end_time']; $presenter['description'] = strip_tags($value['description']); $presenter['image'] = $profileimage; if ($ext === 'json') { $presenters[] = $presenter; } elseif ($ext === 'xml') { $presenters['lecture_' . $presenter['sid']] = $presenter; } } } $expoinfo['expo'] = $expo; $expoinfo['Lectures'] = $presenters; //ArrayDisplay($expoinfo); if ($ext === 'json') { $response = json_encode($expoinfo, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($expoinfo); $response = $xmlobj; } echo $response; } #Screen7 - Agenda if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 'agd' AND $_REQUEST['d'] != '') { $expoinfo = array(); $expoDetail = $db->getRow("SELECT `id`, `expo_hall_id`, `name`, `description`, `expo_logo`, `start_dttm`, `end_dttm`, `city`, `state`, `country`, `zip`, lectureslot_start_time_sun, lectureslot_end_time_sun, lectureslot_start_time_sat, lectureslot_end_time_sat, lectureslot_start_time, lectureslot_end_time, `expo_appfloorplan` from " . BMSE_EXPOS . " WHERE `id`=" . $_REQUEST['d'] . ""); $hallinfo = $db->getRow("SELECT * FROM " . BMSE_HALLS . " WHERE `id`=" . $expoDetail['expo_hall_id'] . ""); $expostartdate = date('d', strtotime($expoDetail['start_dttm'])); $expoenddate = date('d', strtotime($expoDetail['end_dttm'])); if (date('m', strtotime($expoDetail['start_dttm'])) == date('m', strtotime($expoDetail['end_dttm']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($expoDetail['start_dttm'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays+=$expoenddate + 1; } $EventTimings = ' '; for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($expoDetail['start_dttm'])), date("d", strtotime($expoDetail['start_dttm'])) + $i, date("Y", strtotime($expoDetail['start_dttm']))); $EventTimings.=date('D', $expodates); if (date('D', $expodates) == Sun) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sun'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sun'])); $EventTimings.=' - '; } else if (date('D', $expodates) == Sat) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sat'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sat'])); $EventTimings.=' - '; } else { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time'])); $EventTimings.=' - '; } } $exdate = displayDate($expoDetail['start_dttm']) . " - " . displayDate($expoDetail['end_dttm']); $exaddress = $hallinfo['name'] . ", " . $hallinfo['address_line_1'] . ' ' . $hallinfo['address_line_2'] . ', ' . $hallinfo['city'] . ', ' . $hallinfo['state']; $exlogo = SITE_ADMIN_IMAGES_PATH . 'expologos/' . $expoDetail['expo_logo'] . ''; $exappfloorplan = ($expoDetail['expo_appfloorplan']!="")? SITE_ADMIN_IMAGES_PATH.'expofloorplans/'.$expoDetail['expo_appfloorplan']:''; $startdate = date('m-d-Y', strtotime($expoDetail['start_dttm'])); $enddate = date('m-d-Y', strtotime($expoDetail['end_dttm'])); $expo['id'] = $expoDetail['id']; $expo['name'] = $expoDetail['name']; $expo['description'] = strip_tags($expoDetail['description']); $expo['logo'] = $exlogo; $expo['eventfloorplan'] = $exappfloorplan; $expo['dates'] = $exdate; $expo['expostartdate'] = $startdate; $expo['expoenddate'] = $enddate; $expo['expotime'] = trim(substr($EventTimings, 0, -2)); $expo['address'] = $exaddress; $expo['city'] = $expoDetail['city']; $expo['state'] = $expoDetail['state']; $expo['zip'] = $expoDetail['zip']; $expostartdate = date('d', strtotime($expoDetail['start_dttm'])); $expoenddate = date('d', strtotime($expoDetail['end_dttm'])); if (date('m', strtotime($expoDetail['start_dttm'])) == date('m', strtotime($expoDetail['end_dttm']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($expoDetail['start_dttm'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays+=$expoenddate + 1; } $dates = array(); for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($expoDetail['start_dttm'])), date("d", strtotime($expoDetail['start_dttm'])) + $i, date("Y", strtotime($expoDetail['start_dttm']))); $dates[] = date('Y-m-d', $expodates); } $lecture_rooms = $db->getRows("SELECT id,room_number,room_name FROM " . BMSE_EXPO_ROOMS . " where expo_id='" . $expoDetail['id'] . "' and type='2' and status='" . ACTIVE . "' and remove='" . ACTIVE . "' ORDER BY room_number ASC"); foreach ($dates as $key => $lecture_dates) { $lectureTime = $db->getRows("SELECT DISTINCT lectureslot_start_time,lectureslot_end_time FROM " . BMSE_EXPO_LECTURE_SLOTS . " where expo_id='" . $expoDetail['id'] . "' and status='" . ACTIVE . "' and remove='" . ACTIVE . "' and slot_date='" . $lecture_dates . "' ORDER BY lectureslot_start_time "); foreach ($lectureTime as $key => $lecture_times) { foreach ($lecture_rooms as $room_num) { $query = 'SELECT BLC.presenter_name ,BLC.paid_workshop,BMLS.id,BLC.workshop_ticket,OD.booth_id,BLC.title ,BM.id as memberid, BLC.presenter_image,BM.companyname,BMLS.description,BLC.slot_id FROM ' . BMSE_EXPO_LECTURE_SLOTS . ' BMLS LEFT JOIN ' . BMSE_LECTURESLOT_CONFIGS . ' BLC on BMLS.id=BLC.slot_id LEFT JOIN ' . BMSE_ORDER_DETAILS . ' OD ON BMLS.id = OD.item_id LEFT JOIN ' . BMSE_ORDERS . ' O ON OD.order_id = O.id LEFT JOIN ' . BMSE_MEMBERS . ' BM ON BM.id=O.member_id WHERE BMLS.lectureslot_start_time="' . $lecture_times['lectureslot_start_time'] . '" AND BMLS.room_id=' . $room_num['id'] . ' AND BMLS.slot_date="' . $lecture_dates . '" '; $query.=' AND BMLS.expo_id=' . $expoDetail['id'] . ' AND BMLS.id IN(SELECT item_id FROM ' . BMSE_ORDERS . ' where item_type_id=' . SEMINAR_HALL . ') ORDER BY BMLS.slot_date '; $slot = $db->getRow($query); if (!empty($slot)) { $slotarray['presenter_name'] = $slot['presenter_name']; $slotarray['title'] = $slot['title']; $slotarray['time'] = date('g:i A', strtotime($lecture_times['lectureslot_start_time'])) . "-" . date('g:i A', strtotime($lecture_times['lectureslot_end_time'])); $slotarray['room_number'] = "Room" . substr($room_num['room_number'], 3); $slotarray['room_name'] = $room_num['room_name']; $db = new Database(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME); $Expo_Speakers[$slot['id']] = $slotarray; if (isset($_REQUEST['day']) && $_REQUEST['day'] == date('l', strtotime($lecture_dates))) { $Day_Speakers[$slot['id']] = $slotarray; } $slotarray['day'] = date('l, M j, Y', strtotime($lecture_dates)); if ($ext === 'json') { $LectureScheduleDataArray[date('l', strtotime($lecture_dates))][] = $slotarray; } elseif ($ext === 'xml') { $LectureScheduleDataArray[date('l', strtotime($lecture_dates))]['lecture_' . $slot['slot_id']] = $slotarray; } $Records++; } } } } $expoinfo['expo'] = $expo; $expoinfo['agenda'] = $LectureScheduleDataArray; if ($ext === 'json') { $response = json_encode($expoinfo, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($expoinfo); $response = $xmlobj; } echo $response; } #Screen8 - Exhibitor view if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 'ev' AND $_REQUEST['d'] != '' AND $_REQUEST['rid'] != '') { $exhibitors = $db->getRow(' SELECT ER.expo_id,ER.special,M.default_booth_special,BC.show_special_description,M.website,M.companyname,M.company_logo,BC.shortdescription,BC.videofilename,BC.videofilename_mp4,BC.videofilename_ogv,BC.longdescription,M.image_name,ER.room_number,BC.booth_logo,BC.title,M.email,M.city,M.state,ER.description,M.image_name,M.name,M.id,O.insert_dttm as orderdate FROM ' . BMSE_EXPO_ROOMS . ' ER LEFT JOIN ' . BMSE_BOOTH_CONFIGS . ' BC ON ER.id = BC.boothid LEFT JOIN ' . BMSE_ORDER_DETAILS . ' OD ON ER.id = OD.item_id LEFT JOIN ' . BMSE_ORDERS . ' O ON O.id = OD.order_id LEFT JOIN ' . BMSE_MEMBERS . ' M ON M.id = O.member_id WHERE ER.expo_id =' . $_REQUEST['d'] . ' AND OD.item_id=' . $_REQUEST['rid'] . ' AND ER.order_status!=0 AND OD.item_type_id=1 ORDER BY companyname ASC' ); $exhibitorslot = $db->getRow(' SELECT BLC.slot_id as workshopid,BMLS.slot_date,BMLS.lectureslot_start_time,BMLS.lectureslot_end_time,BLC.title,BLC.presenter_name,BLC.presenter_image,BLC.description,BER.room_number FROM ' . BMSE_ORDERS . ' O LEFT JOIN ' . BMSE_ORDER_DETAILS . ' OD ON O.id = OD.order_id LEFT JOIN ' . BMSE_EXPO_LECTURE_SLOTS . ' BMLS ON BMLS.id = OD.item_id left join ' . BMSE_EXPO_ROOMS . ' BER on BMLS.room_id=BER.id LEFT JOIN ' . BMSE_LECTURESLOT_CONFIGS . ' BLC ON BLC.slot_id = OD.item_id LEFT JOIN ' . BMSE_EXPOS . ' BE ON BE.id = BMLS.expo_id WHERE O.member_id =' . $exhibitors['id'] . ' AND OD.item_type_id =2 AND BE.id =' . $_REQUEST['d'] . '' ); $exhibitorinfo = array(); # Exhibitor company logo if ($exhibitors['booth_logo'] != '') { $boothlogo = SITE_EXHIBITORADMIN_BOOTH_IMAGE_PATH . $exhibitors['booth_logo']; } else { $boothlogo = SITE_ADMIN_IMAGES_SITE_PRE_PATH . $site_preferences['booth_logo']; } # Exhibitor compnay / name $exhiname = ($exhibitors['companyname'] != '' ? $exhibitors['companyname'] : $exhibitors['name']); if ($exhibitors['show_special_description'] != '') { $showspecial = $exhibitors['show_special_description']; } else if ($exhibitors['default_booth_special'] != '') { $showspecial = $exhibitors['default_booth_special']; } else { $showspecial = 'No Data Available'; } # Exhibitor / Profile image if ($exhibitors['image_name'] != '') { $profileimg = SITE_EXHIBITORADMIN_EXHI_IMAGE_PATH . $exhibitors['image_name']; } else if ($exhibitorslot['presenter_image'] != '') { $profileimg = SITE_EXHIBITORADMIN_BOOTH_PRESENTERS_IMAGE_PATH . $exhibitorslot['presenter_image']; } else { $profileimg = SITE_EXHIBITORADMIN_IMAGE_PATH . 'bmse_default_image.jpg'; } # Exhibitor profile description if ($exhibitors['longdescription'] != '') { $profiledescription = $exhibitors['longdescription']; } else if ($exhibitors['shortdescription'] != '') { $profiledescription = $exhibitors['shortdescription']; } else { $profiledescription = 'No Data Available'; } $website = ($exhibitors['website']!="" AND $exhibitors['website']=="http://")?'':$exhibitors['website']; $exhibitorinfo['booth']['boothlogo'] = $boothlogo; $exhibitorinfo['booth']['booth_number'] = $exhibitors['room_number']; $exhibitorinfo['booth']['name'] = $exhibitors['name']; $exhibitorinfo['booth']['company'] = $exhiname; $exhibitorinfo['booth']['city'] = $exhibitors['city']; $exhibitorinfo['booth']['state'] = $exhibitors['state']; $exhibitorinfo['booth']['website'] = $website; $exhibitorinfo['booth']['showspecial'] = $showspecial; $exhibitorinfo['lecture']['title'] = $exhibitorslot['title']; $exhibitorinfo['lecture']['date'] = $exhibitorslot['slot_date']; $exhibitorinfo['lecture']['time'] = date('g:i a', strtotime($exhibitorslot['lectureslot_start_time'])); $exhibitorinfo['lecture']['room'] = substr($exhibitorslot['room_number'], 3); $exhibitorinfo['profile']['image'] = $profileimg; $exhibitorinfo['profile']['description'] = $profiledescription; if ($ext === 'json') { $response = json_encode($exhibitorinfo, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($exhibitorinfo); $response = $xmlobj; } echo $response; } #Screen8 - Presenter view if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 'pv' AND $_REQUEST['d'] != '' AND $_REQUEST['sid'] != '') { $exhibitorslot = $db->getRow('SELECT BMLC.slot_id as workshopid,BMLS.slot_date,BM.id,BM.name,BMLS.lectureslot_start_time,BMLS.lectureslot_end_time,BMLC.paid_workshop,BMLC.videofilename,BMLC.videofilename_mp4,BMLC.videofilename_ogv,BMLC.workshop_ticket,BMLC.workshop_text,BMLC.title,BMLC.presenter_name,BMLC.presenter_image,BMLC.description,OD.item_type_id,BER.room_number FROM ' . BMSE_ORDER_DETAILS . ' OD LEFT JOIN ' . BMSE_ORDERS . ' O ON O.id = OD.order_id LEFT JOIN ' . BMSE_MEMBERS . ' BM ON BM.id = O.member_id LEFT JOIN ' . BMSE_EXPO_LECTURE_SLOTS . ' BMLS on BMLS.id=OD.item_id LEFT JOIN ' . BMSE_EXPO_ROOMS . ' BER on BMLS.room_id=BER.id LEFT JOIN ' . BMSE_LECTURESLOT_CONFIGS . ' BMLC on BMLC.slot_id=BMLS.id WHERE OD.item_id=' . $_REQUEST['sid'] . ' AND OD.item_type_id=2' ); $exhibitors = $db->getRow('SELECT ER.expo_id,ER.special,M.default_booth_special,BC.show_special_description,M.website,M.companyname,M.company_logo,BC.shortdescription,BC.longdescription,M.image_name,ER.room_number,OD.item_type_id,BC.booth_logo,BC.title,M.email,M.city,M.state,ER.description,M.image_name,M.name,O.insert_dttm as orderdate FROM ' . BMSE_EXPO_ROOMS . ' ER LEFT JOIN ' . BMSE_BOOTH_CONFIGS . ' BC ON ER.id = BC.boothid LEFT JOIN ' . BMSE_ORDER_DETAILS . ' OD ON ER.id = OD.item_id LEFT JOIN ' . BMSE_ORDERS . ' O ON O.id = OD.order_id LEFT JOIN ' . BMSE_MEMBERS . ' M ON M.id = O.member_id WHERE ER.expo_id =' . $_REQUEST['d'] . ' AND M.id=' . $exhibitorslot['id'] . ' AND ER.order_status!=0 AND OD.item_type_id=1 ORDER BY companyname ASC' ); $exhibitorinfo = array(); # Presenter profile image if ($exhibitorslot['presenter_image'] != '') { $speakerimg = SITE_EXHIBITORADMIN_BOOTH_PRESENTERS_IMAGE_PATH . $exhibitorslot['presenter_image']; } else { $speakerimg = SITE_EXHIBITORADMIN_IMAGE_PATH . 'bmse_default_image'; } # presenter compnay / name $exhiname = ($exhibitors['companyname'] != '' ? $exhibitors['companyname'] : $exhibitors['name']); # Exhibitor profile description if ($exhibitors['longdescription'] != '') { $profiledescription = $exhibitors['longdescription']; } else if ($exhibitors['shortdescription'] != '') { $profiledescription = $exhibitors['shortdescription']; } else { $profiledescription = 'No Data Available'; } $website = ($exhibitors['website']!="" AND $exhibitors['website']=="http://")?'':$exhibitors['website']; $exhibitorinfo['presenter']['image'] = $speakerimg; $exhibitorinfo['presenter']['booth_number'] = $exhibitors['room_number']; $exhibitorinfo['presenter']['name'] = $exhibitorslot['presenter_name']; $exhibitorinfo['presenter']['company'] = $exhiname; $exhibitorinfo['presenter']['city'] = $exhibitors['city']; $exhibitorinfo['presenter']['state'] = $exhibitors['state']; $exhibitorinfo['presenter']['website'] = $website; $exhibitorinfo['lecture']['title'] = $exhibitorslot['title']; $exhibitorinfo['lecture']['date'] = date('l', strtotime($exhibitorslot['slot_date'])); $exhibitorinfo['lecture']['time'] = date('g:i a', strtotime($exhibitorslot['lectureslot_start_time'])); $exhibitorinfo['lecture']['room'] = substr($exhibitorslot['room_number'], 3); $exhibitorinfo['lecture']['description'] = $exhibitorslot['description']; if ($ext === 'json') { $response = json_encode($exhibitorinfo, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($exhibitorinfo); $response = $xmlobj; } echo $response; } # Screen - Getting sponsor's information if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 'spd' AND $_REQUEST['d'] != '') { $expoinfo = array(); $expoDetail = $db->getRow("SELECT `id`, `expo_hall_id`, `name`, `description`, `expo_logo`, `start_dttm`, `end_dttm`, `city`, `state`, `country`, `zip`, lectureslot_start_time_sun, lectureslot_end_time_sun, lectureslot_start_time_sat, lectureslot_end_time_sat, lectureslot_start_time, lectureslot_end_time, `expo_appfloorplan` from " . BMSE_EXPOS . " WHERE `id`=" . $_REQUEST['d'] . ""); $hallinfo = $db->getRow("SELECT * FROM " . BMSE_HALLS . " WHERE `id`=" . $expoDetail['expo_hall_id'] . ""); $exdate = displayDate($expoDetail['start_dttm']) . " - " . displayDate($expoDetail['end_dttm']); $exaddress = $hallinfo['name'] . ", " . $hallinfo['address_line_1'] . ' ' . $hallinfo['address_line_2'] . ', ' . $hallinfo['city'] . ', ' . $hallinfo['state']; $expostartdate = date('d', strtotime($expoDetail['start_dttm'])); $expoenddate = date('d', strtotime($expoDetail['end_dttm'])); if (date('m', strtotime($expoDetail['start_dttm'])) == date('m', strtotime($expoDetail['end_dttm']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($expoDetail['start_dttm'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays+=$expoenddate + 1; } $EventTimings = ' '; for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($expoDetail['start_dttm'])), date("d", strtotime($expoDetail['start_dttm'])) + $i, date("Y", strtotime($expoDetail['start_dttm']))); $EventTimings.=date('D', $expodates); if (date('D', $expodates) == Sun) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sun'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sun'])); $EventTimings.=' - '; } else if (date('D', $expodates) == Sat) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sat'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sat'])); $EventTimings.=' - '; } else { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time'])); $EventTimings.=' - '; } } $exlogo = SITE_ADMIN_IMAGES_PATH . 'expologos/' . $expoDetail['expo_logo'] . ''; $exappfloorplan = ($expoDetail['expo_appfloorplan']!="")? SITE_ADMIN_IMAGES_PATH.'expofloorplans/'.$expoDetail['expo_appfloorplan']:''; $startdate = date('m-d-Y', strtotime($expoDetail['start_dttm'])); $enddate = date('m-d-Y', strtotime($expoDetail['end_dttm'])); $expo['id'] = $expoDetail['id']; $expo['name'] = $expoDetail['name']; $expo['description'] = strip_tags($expoDetail['description']); $expo['logo'] = $exlogo; $expo['eventfloorplan'] = $exappfloorplan; $expo['dates'] = $exdate; $expo['expostartdate'] = $startdate; $expo['expoenddate'] = $enddate; $expo['expotime'] = trim(substr($EventTimings, 0, -2)); $expo['address'] = $exaddress; $expo['city'] = $expoDetail['city']; $expo['state'] = $expoDetail['state']; $expo['zip'] = $expoDetail['zip']; $sql = "SELECT BSR.*,BS.sponsor_type FROM bmse_sponsor_requests BSR LEFT JOIN bmse_sponsors BS ON BS.id=BSR.sponsorship WHERE BSR.expo_id = " . $_REQUEST['d'] . " AND BS.remove_flag=1 AND BSR.status=1 AND BSR.remove=1 AND BS.status=1 ORDER BY BSR.name desc"; $sponsorDetails = $db->getRows($sql); $CountryNames = getCountries(); $sponsors = array(); if (!empty($sponsorDetails)) { $sponsor = array(); foreach ($sponsorDetails as $key => $value) { $sponsorimage = $value['sponsor_logo'] != "" ? SITE_ADMIN_IMAGES_SPONSOR_LOGOS_PATH . $value['sponsor_logo'] : SITE_ADMIN_IMAGES_SITE_PRE_PATH . $site_preferences['sponsor_logo']; $sponsor['spid'] = $value['id']; $sponsor['name'] = $value['name']; $sponsor['type'] = $value['sponsor_type']; $sponsor['website'] = $value['website']; $sponsor['city'] = $value['city']; $sponsor['countryname'] = $CountryNames[$value['country']]; $sponsor['phone'] = $value['phone']; $sponsor['image'] = $sponsorimage; if ($ext === 'json') { $sponsors[] = $sponsor; } elseif ($ext === 'xml') { $sponsors['sponsor_' . $sponsor['spid']] = $sponsor; } } } $expoinfo['expo'] = $expo; $expoinfo['sponsors'] = $sponsors; if ($ext === 'json') { $response = json_encode($expoinfo, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($expoinfo); $response = $xmlobj; } echo $response; } # Getting all of the expo, booths and lectures information if (isset($_REQUEST['t']) AND $_REQUEST['t'] == 't' AND $_REQUEST['d'] != '') { $expoinfo = array(); $expoDetail = $db->getRow("SELECT `id`, `expo_hall_id`, `name`, `description`, `expo_logo`, `start_dttm`, `end_dttm`, `city`, `state`, `country`, `zip`, lectureslot_start_time_sun, lectureslot_end_time_sun, lectureslot_start_time_sat, lectureslot_end_time_sat, lectureslot_start_time, lectureslot_end_time, `expo_appfloorplan` from " . BMSE_EXPOS . " WHERE `id`=" . $_REQUEST['d'] . ""); $hallinfo = $db->getRow("SELECT * FROM " . BMSE_HALLS . " WHERE `id`=" . $expoDetail['expo_hall_id'] . ""); $expostartdate = date('d', strtotime($expoDetail['start_dttm'])); $expoenddate = date('d', strtotime($expoDetail['end_dttm'])); if (date('m', strtotime($expoDetail['start_dttm'])) == date('m', strtotime($expoDetail['end_dttm']))) { $expodays = ($expoenddate - $expostartdate) + 1; } else { $noofdaysinmonth = date('t', strtotime($expoDetail['start_dttm'])); $expodays = ($noofdaysinmonth - $expostartdate); $expodays+=$expoenddate + 1; } $EventTimings = ' '; for ($i = 0; $i < $expodays; $i++) { $expodates = mktime(0, 0, 0, date("m", strtotime($expoDetail['start_dttm'])), date("d", strtotime($expoDetail['start_dttm'])) + $i, date("Y", strtotime($expoDetail['start_dttm']))); $EventTimings.=date('D', $expodates); if (date('D', $expodates) == Sun) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sun'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sun'])); $EventTimings.=' - '; } else if (date('D', $expodates) == Sat) { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time_sat'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time_sat'])); $EventTimings.=' - '; } else { $EventTimings.=" " . date('g:i A', strtotime($expoDetail['lectureslot_start_time'])); $EventTimings.=' to '; $EventTimings.=date('g:i A', strtotime($expoDetail['lectureslot_end_time'])); $EventTimings.=' - '; } } $exdate = displayDate($expoDetail['start_dttm']) . " - " . displayDate($expoDetail['end_dttm']); $exaddress = $hallinfo['name'] . ", " . $hallinfo['address_line_1'] . ' ' . $hallinfo['address_line_2'] . ', ' . $hallinfo['city'] . ', ' . $hallinfo['state']; $exlogo = SITE_ADMIN_IMAGES_PATH . 'expologos/' . $expoDetail['expo_logo'] . ''; $exappfloorplan = ($expoDetail['expo_appfloorplan']!="")? SITE_ADMIN_IMAGES_PATH.'expofloorplans/'.$expoDetail['expo_appfloorplan']:''; $startdate = date('m-d-Y', strtotime($expoDetail['start_dttm'])); $enddate = date('m-d-Y', strtotime($expoDetail['end_dttm'])); $expo['id'] = $expoDetail['id']; $expo['name'] = $expoDetail['name']; $expo['description'] = strip_tags($expoDetail['description']); $expo['logo'] = $exlogo; $expo['eventfloorplan'] = $exappfloorplan; $expo['dates'] = $exdate; $expo['expostartdate'] = $startdate; $expo['expoenddate'] = $enddate; $expo['expotime'] = trim(substr($EventTimings, 0, -2)); $expo['address'] = $exaddress; $expo['city'] = $expoDetail['city']; $expo['state'] = $expoDetail['state']; $expo['zip'] = $expoDetail['zip']; $sql = "SELECT ER.expo_id, BC.boothid, M.id as exhibitor_id, M.companyname as company_name, ER.room_number as booth_number, M.city, M.state, M.email, BC.shortdescription as short_description, BC.longdescription as long_description,BC.booth_logo, M.image_name as exhibitor_image FROM bmse_expo_rooms ER LEFT JOIN bmse_booth_configs BC ON ER.id = BC.boothid LEFT JOIN bmse_order_details OD ON ER.id = OD.item_id LEFT JOIN bmse_orders O ON O.id = OD.order_id LEFT JOIN bmse_members M ON M.id = O.member_id WHERE ER.expo_id = " . $_REQUEST['d'] . " AND OD.item_type_id =1 AND ER.order_status =2 GROUP BY OD.item_id ORDER BY ER.room_number ASC"; $booths = $db->getRows($sql); $exhibitors = array(); if (!empty($booths)) { $exhibitor = array(); foreach ($booths as $value) { $boothlogo = SITE_EXHIBITORADMIN_IMAGE_PATH . 'companylogos/' . $booth['company_logo']; $exhibitor['name'] = $value['company_name']; $exhibitor['email'] = $value['email']; $exhibitor['logo'] = $boothlogo; $exhibitor['booth_number'] = $value['booth_number']; $exhibitor['city'] = $value['city']; $exhibitor['state'] = $value['state']; $exhibitor['description'] = strip_tags($value['short_description']); if ($ext === 'json') { $exhibitors[] = $exhibitor; } elseif ($ext === 'xml') { $exhibitors['booth_' . $value['boothid']] = $exhibitor; } } } $sqlnew = "SELECT BE.id as expo_id, BM.id as exhibitor_id, BLS.slot_id, BLS.presenter_name as speaker_name, BLS.title as speaker_title, CONCAT_WS('',DATE_FORMAT(BMLS.slot_date,'%d %b %Y'),' : ',LOWER(DATE_FORMAT(BMLS.lectureslot_start_time,'%h:%i %p')),' - ',LOWER(DATE_FORMAT(BMLS.lectureslot_end_time,'%h:%i %p'))) as presentation_date_time, BMLS.lectureslot_start_time as speaker_presentation_start_time, BMLS.lectureslot_end_time as speaker_presentation_end_time, BMLS.slot_date, BLS.description, ER.room_number, ER.room_name, BMLS.price, BLS.presenter_image FROM bmse_orders O LEFT JOIN bmse_order_details OD ON OD.order_id=O.id LEFT JOIN bmse_members BM ON BM.id = O.member_id LEFT JOIN bmse_expo_lecture_slots BMLS ON BMLS.id = OD.item_id LEFT JOIN bmse_expo_rooms ER ON ER.id = BMLS.room_id LEFT JOIN bmse_lectureslot_configs BLS ON BLS.slot_id = OD.item_id LEFT JOIN bmse_expos BE ON BE.id = BMLS.expo_id WHERE OD.item_type_id =2 AND BMLS.remove = 1 AND BE.id = " . $_REQUEST['d'] . " GROUP BY BLS.slot_id ORDER BY BMLS.slot_date, BMLS.lectureslot_start_time, ER.room_number"; $presenterDetails = $db->getRows($sqlnew); $presenters = array(); if (!empty($presenterDetails)) { $presenter = array(); foreach ($presenterDetails as $key => $value) { $room = $value['room_name'] == '' ? $value['room_number'] : html_entity_decode(str_replace($words, $replacements, htmlentities($value['room_name']))); $profileimage = SITE_EXHIBITORADMIN_BOOTH_PRESENTERS_IMAGE_PATH . $value['presenter_image']; $presenter['name'] = $value['speaker_name']; $presenter['title'] = $value['speaker_title']; $presenter['room'] = $room; $presenter['date'] = $value['slot_date']; $presenter['startTime'] = $value['speaker_presentation_start_time']; $presenter['endTime'] = $value['speaker_presentation_end_time']; $presenter['description'] = strip_tags($value['description']); $presenter['image'] = $profileimage; if ($ext === 'json') { $presenters[] = $presenter; } elseif ($ext === 'xml') { $presenters['lecture_' . $value['slot_id']] = $presenter; } } } $expoinfo['expo'] = $expo; $expoinfo['booths'] = $exhibitors; $expoinfo['Lectures'] = $presenters; if ($ext === 'json') { $response = json_encode($expoinfo, JSON_PRETTY_PRINT); } elseif ($ext === 'xml') { $xmlobj->toXml($expoinfo); $response = $xmlobj; } echo $response; } ?>