public static function getAllImages($imageOfId, $entityId) { $models = Images::model()->findAll('image_of_id=:imageOfId AND entity_id=:entityId', array(':imageOfId' => $imageOfId, ':entityId' => $entityId)); $result = false; $entityName = EntityApi::getTypeById($entityId); foreach ($models as $model) { $result[] = ImageUtils::getImageUrl($entityName, $imageOfId, $model->filename); } return $result; }
public static function getPrimaryImageForUsers($userIds) { $criteria = new CDbCriteria(); $criteria->addInCondition('user_id', $userIds); $models = UserPhotos::model()->findAll($criteria); $result = false; foreach ($models as $model) { $result[$model->user_id] = ImageUtils::getImageUrl('profiles', $model->user_id, $model->image); } return $result; }
public static function getImage($userId) { $model = UserBuilderProfile::model()->find('user_id=:userId', array(':userId' => $userId)); $result = ImageUtils::getDefaultImage('builders'); if ($model && $model->image) { $result = ImageUtils::getImageUrl('builders', $userId, $model->image); } return $result; }
<?php $this->breadcrumbs = array('Project Images' => array('index'), $model->id); $this->menu = array(array('label' => 'List ProjectImages', 'url' => array('index')), array('label' => 'Create ProjectImages', 'url' => array('create')), array('label' => 'Update ProjectImages', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete ProjectImages', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => 'Manage ProjectImages', 'url' => array('admin'))); ?> <h1>View ProjectImages #<?php echo $model->id; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'project.project_name', array('name' => 'image', 'value' => '<img src="' . ImageUtils::getImageUrl('projects', $model->project_id, $model->image) . '" width="100" />', 'type' => 'raw'), 'updated_time', 'updated_by', 'created_time', 'created_by')));
public static function getImage($imageName) { $url = ImageUtils::getImageUrl('feedback', $id = null, $imageName); return $url; }
public static function getPrimaryImageForProjects($projectIds) { $criteria = new CDbCriteria(); $criteria->addInCondition('project_id', $projectIds); $models = ProjectImages::model()->findAll($criteria); $result = false; foreach ($models as $model) { $result[$model->project_id] = ImageUtils::getImageUrl('projects', $model->project_id, $model->image); } return $result; }
if ($agent->user_id == Yii::app()->user->id) { echo '<div style="float:right"><a href="/agent/update" class="red-txt">Edit Profile</a></div>'; } ?> <style type="text/css"> .builders-proj{} .builders-proj td{ padding:5px 0px 0 10px; border:#CCCCCC 1px solid; line-height:30px;} .btn-search{ text-align:center;} </style> <div id="property_search"> <h1 class="heading">Agent Profile</h1> <div class="inner-column"> <div class="left cols1"> <div align="center"> <img src="<?php echo ImageUtils::getImageUrl('agents', $agent->user_id, $agent->image); ?> " alt="" width="223" height="146" /> </div> <div class="white_wrap"> <h2>Agent Information</h2> <div style="padding: 10px;"> <p><b><?php echo $agent->company_name; ?> </b><br /> <?php echo $agentInfo->first_name; ?> <br /> <?php
<script type="text/javascript" src="includes/cufon-yui.js"> </script> <script src="includes/myriad-pro.cufonfonts.js" type="text/javascript"></script> <script type="text/javascript">Cufon.replace('', { fontFamily: 'Myriad Pro Regular', hover: true });</script> <link rel="stylesheet" type="text/css" href="includes/styles.css" /> <?php if ($builder->user_id == Yii::app()->user->id) { echo '<div style="float:right"><a href="/builder/update" class="red-txt">Edit Profile</a></div>'; } ?> <div id="property_search"> <h1 class="heading">Builder Profile</h1> <div class="inner-column"> <div class="left cols1"> <div align="center"> <img src="<?php echo ImageUtils::getImageUrl('builders', $builder->user_id, $builder->image); ?> " alt="" width="223" height="146" /> </div> <div class="white_wrap"> <h2>Builder Information</h2> <div style="padding: 10px;"> <p><b><?php echo $builder->company_name; ?> </b><br /> <?php echo $builderInfo->first_name; ?> <br /> <?php
<script type="text/javascript" src="includes/cufon-yui.js"> </script> <script src="includes/myriad-pro.cufonfonts.js" type="text/javascript"></script> <script type="text/javascript">Cufon.replace('', { fontFamily: 'Myriad Pro Regular', hover: true });</script> <link rel="stylesheet" type="text/css" href="includes/styles.css" /> <?php if ($specialist->user_id == Yii::app()->user->id) { echo '<div style="float:right"><a href="/specialist/update" class="red-txt">Edit Profile</a></div>'; } ?> <div id="property_search"> <h1 class="heading">Specialist Profile</h1> <div class="inner-column"> <div class="left cols1"> <div align="center"> <img src="<?php echo ImageUtils::getImageUrl('specialists', $specialist->user_id, $specialist->image); ?> " alt="" width="223" height="146" /> </div> <div class="white_wrap"> <h2>Specialist Information</h2> <div style="padding: 10px;"> <p><b><?php echo $specialist->company_name; ?> </b><br /> <?php echo $specialistInfo->first_name; ?> <br /> <?php