Unhandled Error!

Undefined variable: role
Document modules/cms/classes/cms_parser.php
Document type PHP document
Line 80
Exception class Cms_ExecutionException

Code Highlight

																		);
															 
																		if (in_array(get_class($ex), $forward_exception_classes))
																			throw $ex;
															 
																		if ($this->call_stack && strpos($ex->getFile(), "eval()") !== false)
																			throw new Cms_ExecutionException($ex->getMessage(), $this->call_stack, $ex->getLine());
															 
																		throw $ex;
																	}
															 
																	return $parse_result;
																}
														

Call Stack

# Code Document Line
11 Cms_Parser->parse('?><h2>Search For Local Pros</h2> <div> <form method="post" id="form_search"> <select value="" required name="value" id="search_value" > <option value="" disabled selected>What do you need?</option> <?php $skills = Service_Skill::create()->find_all(); ?> <?php foreach ($skills as $skill) { ?> <option <?php if ($value == $skill->name) { echo 'selected '; $role = (object) array('id'=>$skill->id,'name'=>$skill->name); } else { } ?> value="<?= $skill->name ?>" name="no_matter" data-value="<?= $skill->name ?>" /> <?= $skill->name ?></option> <?php } ?> </select> <input type="text" value="<?= $address ?>" required name="address" id="zip_code" placeholder="Enter your ZIP area code" /> <div class="call_to_action"> <input type="submit" value="<?=__('Search')?>" class="btn btn-primary" id="search_providers"> </div> </div> <hr/> <div class="row-fluid" id="work_radius"> <div class="span4"> <a href="javascript:;"><p id="flip" style="color:green;font-weight:bold;"> <?php if(isMobileDevice()){ ?> Show Filters <?php } else { ?> Hide Filters <?php } ?> </p></a> <div id="filters" <?php if(isMobileDevice()) echo "style='display:none;'" ?>> <input type="hidden" id="search_ratings" name="search_ratings" value="<?php echo $search_ratings ?>" /> <strong>Average Customer Review Rating</strong><br /> <input type="checkbox" name="rating[]" class="rating" value="5" <?php if(stristr($search_ratings, '5')) echo "checked"; ?>/><span class="star-rating" style="padding-left:5px"><i class="rating-50" style="font-size:18px"></i></span><br /> <input type="checkbox" name="rating[]" class="rating" value="4" <?php if(stristr($search_ratings, '4')) echo "checked"; ?>/><span class="star-rating" style="padding-left:5px"><i class="rating-40" style="font-size:18px"></i></span><br /> <input type="checkbox" name="rating[]" class="rating" value="3" <?php if(stristr($search_ratings, '3')) echo "checked"; ?>/><span class="star-rating" style="padding-left:5px"><i class="rating-30" style="font-size:18px"></i></span><br /> <input type="checkbox" name="rating[]" class="rating" value="2" <?php if(stristr($search_ratings, '2')) echo "checked"; ?>/><span class="star-rating" style="padding-left:5px"><i class="rating-20" style="font-size:18px"></i></span><br /> <input type="checkbox" name="rating[]" class="rating" value="1" <?php if(stristr($search_ratings, '1')) echo "checked"; ?>/><span class="star-rating" style="padding-left:5px"><i class="rating-10" style="font-size:18px"></i></span><br /> <br /> <strong>Licensed, Insured, Bonded</strong><br /> <input type="checkbox" name="licensed" class="libe" value="Yes" <?php if($licensed) echo 'checked' ?>/> Licensed<br /> <input type="checkbox" name="insured" class="libe" value="Yes" <?php if($insured) echo 'checked' ?>/> Insured<br /> <input type="checkbox" name="bonded" class="libe" value="Yes" <?php if($bonded) echo 'checked' ?>/> Bonded<br /> <br /> <strong>24/7 Emergency Service</strong><br /> <input type="checkbox" name="emergency" class="libe" value="Yes" <?php if($emergency) echo 'checked' ?>/> Emergency Service<br /> <br /> <br /> </div> </div> <div class="span8"> <?php if ($providers and count($providers)): ?> <h4>Results for <?= $value .' near '. $address?></h4> <? foreach ($providers as $provider): //print_r($provider); //exit(); ?> <?php //Displays Business Phone on Desktop View Profile $mainphone = ""; $mainphone = $provider->phone ? $provider->phone : ($provider->phone ? $provider->phone : ($provider->user->phone ? $provider->user->phone : ($provider->user->phone ? $provider->user->phone : false))); //Get Twilio Number & Set as Variable $twilionum = ""; $twilionum = $provider->twilio; //Displays Mobile Phone on Mobile Devices #$mobile = $provider->mobile ? $provider->mobile : ($provider->phone ? $provider->phone : ($provider->user->mobile ? $provider->user->mobile : ($provider->user->phone ? $provider->user->phone : false))); ?> <div class="row well"> <div class="span3 columns"> <div class="avatar" align="center"> <a href="<?= root_url('profile/' . $provider->id) ?>"><img src="<?=Bluebell_Provider::avatar($provider, 230)?>" alt="<?=$provider->business_name?>"></a> </div> <div class="box-raiting" align="center"> <?=$provider->address?> <div class="ratings"> <p class="overall star-rating"> <?=__('Average rating')?>: <i class="rating-<?= $provider->rating*10 ?>"></i> <span> <? if ($provider->rating_num > 0): ?> (<?=__('%s reviews', $provider->rating_num)?>) <? else: ?> (<?=__('No ratings yet')?>) <? endif?> </span> </p> </div> </div> </div> <div class="span5 columns"> <div class="box-description"> <a href="<?=root_url('profile/' . $provider->url_name);?>" class="link-provider"></a> <h4 class="provider-name"> <?=$provider->business_name?> </h4> <h6 class="subheader"> <?=$provider->categories_calculated?> in <?=$provider->city?> </h6> <?php #echo 'emergency' . $provider->emergency; if ($provider->licensed == 'Yes' or $provider->insured == 'Yes' or $provider->bonded == 'Yes' or $provider->emergency == 'Yes') { $icons = array('licensed', 'insured', 'bonded', 'emergency'); ?> <div align="center" class="special_icons"> <?php foreach ($icons as $icon) { if ($provider->{$icon} == 'Yes') { ?> <span class="special_icon"> <img class="spec_icon" src="<?= theme_url('assets/images/icons/' .$icon .'.png') ?>"/><br/> <b><?= ucfirst($icon) ?></b> </span> <?php } } ?> </div> <?php } ?> <div class="clearfix" style="padding-bottom:10px;"></div> <? $description = substr($provider->description, 0, 200); ?> <?=$description .'...';?> <br /> </div> </div> <div class="span4 columns"> <?php if (isMobileDevice() and $twilionum) { ?> <div class="call_to_action"> <a href="tel:<?= $twilionum ?>" class="btn btn-primary-blue btn-large btn-block"><i class="fa fa-phone"></i> <?=__('Call')?></a> </div><p/> <?php } else { ?> <div class="call_to_action" onclick="setEmailProvider(<?=$provider->id?>,'Get a Quote from <?=$provider->business_name?>')"> <a href="javascript:;" class="btn btn-primary-blue btn-large btn-block button_contact_provider"><i class="fa fa-envelope-o"></i> <?=__('Request A Quote')?></a> </div> <?php } ?> <p/> <div class="call_to_action"> <a href="<?= root_url('request/' . $provider->id) ?>" class="btn btn-primary btn-large btn-block" id="schedule_appointment"><i class="fa fa-calendar"></i> <?=__('Schedule Appointment')?></a> </div> <p/> <div class="call_to_action"> <a href="<?= root_url('profile/' . $provider->id) ?>" class="btn btn-primary btn-large btn-block" id="view_profile"><?=__('View Profile')?></a> </div> <p/> </div> </div> <? endforeach?> <? elseif (!is_null($providers)): ?> <h3><center><?= __('Don’t see what you are looking for? Try your search again')?> or <a href="<?=root_url('account/signup')?>">Signup Your Business</a></center></h3> <? endif ?> </div> </form> <div id="popup_contact_provider" class="modal hide fade" tabindex="-1" role="dialog"> <?=form_open(array('id'=>'form_request'))?> <input type="hidden" name="invite_providers[]" id="invite_providers" value=""> <div class="modal-header"> <h3 class="request_business_name"></h3> </div> <div class="modal-body"> <?=$this->display_partial('request:quick_form', array('role'=>$role))?> <label class="checkbox open_request" for="open_request"> <?=form_checkbox('open_request', true, true, 'id="open_request"')?> <?=__('Send this to other %s in %s and let them provide quotes as well', array(Phpr_Inflector::pluralize($value), $address))?> </label> </div> <div class="modal-footer"> <?=form_submit('submit', __('Send request'), 'class="btn btn-primary" id="button_submit_contact_provider"')?> </div> <?=form_close()?> </div> <div id="popup_contact_provider_success" class="modal hide fade" tabindex="-1" role="dialog"> <div class="modal-body"> <?=global_content_block('directory_request_submit', 'Directory request submitted')?> </div> <div class="modal-footer"> <?=form_button('close', __('Close', true), 'class="btn popup-close"')?> </div> </div>', 'CMS page', 'search') modules/cms/classes/cms_controller.php 194
10 Cms_Controller->eval_content(()) modules/cms/classes/cms_controller.php 61
9 Cms_Controller->open(object(Cms_Page), array(0)) controllers/application.php 51
8 Application->on_404(())
7 call_user_func_array(array(2) [0 => object(Application), 1 => 'on_404'], array(0)) framework/modules/phpr/classes/controller.php 118
6 Phpr\Controller->execute_action('on_404', array(0)) framework/modules/phpr/classes/controller.php 76
5 Phpr\Controller->_run('on_404', array(0)) framework/modules/phpr/classes/response.php 75
4 Phpr\Response->open_404(()) framework/modules/phpr/classes/response.php 49
3 Phpr\Response->open('/search') framework/core/init.php 178
2 require_once('/home/handylo/public_html/framework/core/init.php') framework/boot.php 97
1 require_once('/home/handylo/public_html/framework/boot.php') index.php 12