public function index() { $route = Helpers::routeinfo(); $options = Helpers::options($route); $navs = Helpers::navigation($route, $options); $sub = Helpers::navigation($route, $options, true); $fields = $this->getFields(); $step = (object) ['debug' => $this->debug, 'fields' => $this->fields]; $step->fields["Basic Information"]->conference->list = $this->getEvents(); $step->fields["Basic Information"]->attendance->list = $this->getAttendance(); $step->fields["Badge Details"]->affiliation->list = $this->getAffiliations(); $step->fields["Address"]->state->list = $this->getStates(); $step->fields["Basic Information"]->conference->value = $this->getConference($route, $step->fields["Basic Information"]->conference->list); return view('pages/register', compact('step', 'route', 'options', 'navs', 'sub')); }
public function index() { $route = Helpers::routeinfo(); $route->url = '/contact'; $options = Helpers::options($route); $navs = Helpers::navigation($route, $options); $sub = Helpers::navigation($route, $options, true); $contact = (object) ['venue' => 'Acclaim Events', 'phone' => '(503) 206-5700', 'phone_short' => '5032065700', 'address' => '9860 SW Hall Blvd, Suite D<br>Tigard, OR 97223', 'address_short' => '9860 SW Hall Blvd, Suite D, Tigard, OR 97223', 'facebook' => 'http://www.facebook.com/acclaimeventsllc', 'linkedin' => 'company/acclaim-events-llc', 'place' => 'ChIJE5F6JvIMlVQR05xT-zTHqwk']; $event = (object) []; if (count($route->params) === 1 || $route->uri === 'contact/sponsorship/{year?}/{conference?}') { if (!empty($route->params['contact'])) { $team = DB::table('team_members')->where('first_name', '=', ucwords($route->params['contact']))->take(1)->get(); if (is_array($team) && count($team) === 1) { $team = $team[0]; $options->title = 'Contact ' . $team->first_name; $contact->first_name = $team->first_name; $contact->last_name = $team->last_name; $contact->photo = $team->photo; $contact->linkedin = $team->linkedin; $contact->facebook = null; $contact->phone = null; $contact->address = null; $route->url = '/contact/' . $route->params['contact']; } else { redirect('/contact'); } } elseif ($route->uri === 'contact/sponsorship/{year?}/{conference?}') { $options->title = 'Request Sponsorship Information'; if (!empty($route->params['conference'])) { $conference = $route->params['year'] . '/' . $route->params['conference']; } else { $conference = $route->params['year']; } if (!empty($conference)) { $events = Conference::lookup($conference)->current()->first(); // dd($events); if (is_object($events)) { $event = (object) $events->toArray(); } } } else { redirect('/contact'); } } // dd($route); return view('pages/contact', compact('contact', 'event', 'route', 'options', 'navs', 'sub')); }
protected function conference($route, $event) { $venue = Venue::where('slug', '=', $event->venue_slug)->published()->get(); $venue = !empty($venue[0]) ? (object) $venue[0]->toArray() : null; $options = Helpers::options($route, $event->slug, $event); // dd($options); $navs = Helpers::navigation($route, $options); $sub = Helpers::navigation($route, $options, true); $partners = (object) ['companies' => null, 'text' => null]; if (!empty($event->partners)) { $undo = Helpers::unserialize($event->partners); $companies = Partner::where(function ($query) use($undo) { foreach ($undo['partners'] as $i => $slug) { if ($i === 0) { $query->where('slug', '=', $slug); } else { $query->orWhere('slug', '=', $slug); } } })->published()->orderBy('company')->get(); if (!empty($undo['text'])) { $partners->text = $undo['text']; } if (is_object($companies)) { $partners->companies = []; foreach ($companies as $i => $company) { $partners->companies[] = (object) $company->toArray(); } } } $unfilteredTopics = Topic::where('conference_slug', '=', $event->slug)->published()->get(); $topics = []; foreach ($unfilteredTopics as $topic) { $topics[] = [$topic->title => $topic->text]; } if ((bool) $options->topics_by_alpha === true) { sort($topics); } //dd($topics); $agendasRaw = Agenda::where('conference_slug', '=', $event->slug)->published()->orderBy('timeslot')->orderBy('priority')->get(); $speakerList = []; $agendas = []; if (is_object($agendasRaw)) { foreach ($agendasRaw as $i => $agenda) { $agenda = (object) $agenda->toArray(); list($date, $time) = explode(' ', $agenda->timeslot); if (!empty($agenda->speakers)) { // $agenda->speakers = Helpers::unserialize($agenda->speakers); // dd($agenda->speakers); $agendaSpeakers = explode(',', $agenda->speakers); $agenda->speakers = []; if (is_array($agendaSpeakers)) { foreach ($agendaSpeakers as $s) { @(list($speakerType, $speakerSlug) = @explode('|', $s)); $agenda->speakers[$speakerType][] = $speakerSlug; } // dd($agenda->speakers); } } $agendas[$date][$time][] = $agenda; if (!empty($agenda->speakers)) { $speakersTypes = $agenda->speakers; if (is_array($speakersTypes)) { ksort($speakersTypes); // dd($speakersTypes); foreach ($speakersTypes as $speakers) { $speakerList = array_merge($speakerList, $speakers); } } } } } // dd($agendas); if (count($speakerList) > 0) { $speakers = Speaker::where(function ($query) use($speakerList) { $query->where('slug', '=', array_pop($speakerList)); while (count($speakerList) > 0) { $query->orWhere('slug', '=', array_pop($speakerList)); } })->published()->orderBy('last_name')->get(); $speakers = Helpers::keysByField($speakers, 'slug', function ($value, $key, $field, $array, $toObj) { $value->sessions = []; return $value; }, true); } if ((bool) $options->sponsor_levels === true) { $sponsors = Lookup::lookup('sponsors', ['conference_slug' => $event->slug], ['published' => true, 'sponsorlevels' => true]); } else { $sponsors = Lookup::lookup('sponsors', ['conference_slug' => $event->slug], ['published' => true]); } // dd($options); return view('pages/conference', compact('event', 'venue', 'partners', 'topics', 'agendas', 'speakers', 'sponsors', 'options', 'navs', 'sub')); }
protected function conference($route, $event) { $venue = Venue::where('slug', '=', $event->venue_slug)->published()->get(); $venue = !empty($venue[0]) ? (object) $venue[0]->toArray() : null; $event->options = !empty($event->options) ? Helpers::unserialize($event->options) : []; $options = Helpers::options($route, 'conference', $event->options); $options = (array) $options; foreach ($options as $key => $option) { if (is_string($option) && preg_match("/^([a-z]+):([a-z]+)\$/i", $option)) { list($foo, $bar) = explode(':', $option); $options[$key] = ${$foo}->{$bar}; } } $options = (object) $options; // dd($options); $navs = Helpers::navigation($route, $options); $sub = Helpers::navigation($route, $options, true); $partners = (object) ['companies' => null, 'text' => null]; if (!empty($event->partners)) { $undo = Helpers::unserialize($event->partners); $companies = Partner::where(function ($query) use($undo) { foreach ($undo['partners'] as $i => $slug) { if ($i === 0) { $query->where('slug', '=', $slug); } else { $query->orWhere('slug', '=', $slug); } } })->published()->orderBy('company')->get(); if (!empty($undo['text'])) { $partners->text = $undo['text']; } if (is_object($companies)) { $partners->companies = []; foreach ($companies as $i => $company) { $partners->companies[] = (object) $company->toArray(); } } } $agendasRaw = Agenda::where('conference_id', '=', $event->id)->published()->orderBy('timeslot')->orderBy('priority')->get(); $speakerList = []; $agendas = []; if (is_object($agendasRaw)) { foreach ($agendasRaw as $i => $agenda) { $agenda = (object) $agenda->toArray(); list($date, $time) = explode(' ', $agenda->timeslot); if (!empty($agenda->speakers)) { $agenda->speakers = Helpers::unserialize($agenda->speakers); } $agendas[$date][$time][] = $agenda; if (!empty($agenda->speakers)) { $speakersTypes = $agenda->speakers; if (is_array($speakersTypes)) { ksort($speakersTypes); foreach ($speakersTypes as $speakers) { $speakerList = array_merge($speakerList, $speakers); } } } } } if (count($speakerList) > 0) { $speakers = Speaker::where(function ($query) use($speakerList) { $query->where('slug', '=', array_pop($speakerList)); while (count($speakerList) > 0) { $query->orWhere('slug', '=', array_pop($speakerList)); } })->published()->orderBy('last_name')->get(); $speakers = Helpers::keysByField($speakers, 'slug', function ($value, $key, $field, $array, $toObj) { $value->sessions = []; return $value; }, true); } if ((bool) $options->sponsorlevels === true) { $sponsors = Lookup::lookup('sponsors', ['conference' => $event->id], ['published' => true, 'sponsorlevels' => true]); } else { $sponsors = Lookup::lookup('sponsors', ['conference' => $event->id], ['published' => true]); } // dd($sponsors); return view('pages/conference', compact('event', 'venue', 'partners', 'agendas', 'speakers', 'sponsors', 'options', 'navs', 'sub')); }
function register() { /* $show = [ 'hero' => false, 'active' => false, 'title' => 'Register', ]; $show = $this->get_show_preferences($show); $event = [ 'slug' => 'austin', 'title' => 'Austin IT Strategies Conference', 'start' => '2015-09-15 07:30:00 CDT', 'end' => '2015-09-15 17:00:00 CDT', 'venue' => 'Crown Plaza Austin', 'location' => '6121 North Ih 35, Austin, TX 78752', 'place' => 'ChIJVzSZghjKRIYREyXBujdzq6w', 'directions' => 'http://www.ihg.com/crowneplaza/hotels/us/en/austin/ausgz/hoteldetail?cm_mmc=GoogleMaps-_-cp-_-USEN-_-ausgz#map-directions', ]; $event['date'] = date('F j, Y', strtotime($event['start'])); $events = [ [ 'slug' => 'austin', 'title' => 'Austin IT Strategies Conference', 'city' => 'Austin, TX', 'start' => '2015-09-15 07:30:00 CDT','' ], [ 'slug' => 'san-antonio', 'title' => 'San Antonio IT Strategies Conference', 'city' => 'San Antonio, TX', 'start' => '2016-04-21 07:30:00 CST', ], ]; foreach ($events as $i => $event) { $events[$i]['date'] = date('F j, Y', strtotime($event['start'])); } $data = [ 'show' => $show, 'event' => $event, 'events' => $events, 'nav-sub' => [], ]; return view('pages/register')->withData($data); */ $route = Helpers::routeinfo(); $options = Helpers::options($route); $navs = Helpers::navigation($route, $options); $sub = Helpers::navigation($route, $options, true); $events = DB::table('conferences')->where('start_date', '>', Carbon\Carbon::now())->where('published', '>', '0000-00-00 00:00:00')->orderBy('start_date')->get(); }