public function actionProfile($id) { Yii::beginProfile('account_profile'); $userProfile = UserApi::getUser($id); if (!$userProfile) { throw new CHttpException(404, 'The requested page does not exist.'); } $userProfile = UserApi::getUserProfileDetails($id); $userAddress = DbUtils::getAddress($userProfile->city_id); $userImages = UserPhotosApi::getAllImages($id); $agentAddress = ""; $agentImage = ""; $agentProfile = AgentProfileApi::getAgentDetails($id); if ($agentProfile) { $agentAddress = DbUtils::getAddress($agentProfile->city_id); $agentImage = AgentProfileApi::getImage($id); } $builderAddress = ""; $builderImage = ""; $builderProfile = BuilderProfileApi::getBuilderDetails($id); if ($builderProfile) { $builderAddress = DbUtils::getAddress($builderProfile->city_id); $builderImage = BuilderProfileApi::getImage($id); } $specialistAddress = ""; $specialistImage = ""; $specialistProfile = SpecialistProfileApi::getSpecialistDetails($id); $specialistProjects = ""; if ($specialistProfile) { $specialistAddress = DbUtils::getAddress($specialistProfile->city_id); $specialistImage = SpecialistProfileApi::getImage($id); $specialistProjects = SpecialistApi::getSpecialistProjects($id); } $this->render('profile', array('userProfile' => $userProfile, 'userAddress' => $userAddress, 'userImages' => $userImages, 'agentProfile' => $agentProfile, 'agentAddress' => $agentAddress, 'builderProfile' => $builderProfile, 'builderAddress' => $builderAddress, 'specialistProfile' => $specialistProfile, 'specialistAddress' => $specialistAddress, 'specialistProjects' => $specialistProjects, 'agentImage' => $agentImage, 'builderImage' => $builderImage, 'specialistImage' => $specialistImage)); Yii::endProfile('account_profile'); }
<!--Top Builders Widget--> <div id="tabbed_box_1" class="tabbed_box"> <h2 class="head-tab">Top Builders</h2> <div class="tabbed_area"> <div class="tabs-widget"> <ul id="slider1"> <?php if ($topBuilders) { foreach ($topBuilders as $builder) { $city = GeoCityApi::getCityNameByID($builder['city_id']); $image = BuilderProfileApi::getImage($builder['user_id']); ?> <li><a href="/builder/<?php echo $builder['user_id']; ?> " title="<?php echo $builder['company_name']; ?> "><img src="<?php echo $image; ?> " height="50" width="80"border="0" title="<b><?php echo $builder['company_name']; ?> </b> <br /> <?php echo $city->city; ?> <br /> <br /> <a href='/builder/<?php echo $builder['user_id'];