<?php echo Yii::t('translation', $form->labelEx($model, 'avatar')); ?> <?php echo $form->fileField($model, 'avatar', array()); ?> <span>Only <?php echo Users::$AllowFileAvatar; ?> are allow. Recommended Dimension: 66 px x 65 px</span> <?php if (!$model->isNewRecord && $model->avatar != '') { ?> <p style="text-align: left;padding-left: 170px;"> <img src="<?php echo ImageProcessing::bindImageByModel($model, 100, 100, array('avatar' => 1)); ?> "> <br/> <input type="checkbox" name="delete_current_image" class="delete_current_image"> Delete Current Avatar </p> <script> $('.delete_current_image').click(function() { if ($(this).is(':checked')) { $(this).parent('p').parent('div').find('input:file').hide().val(''); } else $(this).parent('p').parent('div').find('input:file').show(); });
<?php if ($index % 2 == 0) { ?> <div class="grid"> <?php } ?> <?php $cmsFormater = new CmsFormatter(); $mDefaultPhoto = Listing::getDefaultImgListing($data->id); $linkImage = ImageProcessing::bindImageByModel($mDefaultPhoto, '120', '96'); ?> <div class="item"> <div class="image"> <div class="img-box"><img src="<?php echo $linkImage; ?> " alt="image" /></div> <p><a href="#" class="ico-check">Select to Enquire</a></p> <p><a href="javascript:void(0);" data-listing-id="<?php echo $data->id; ?> " class="ico-star shortlist">Shortlist</a></p> </div> <div class="description"> <h3><a href="<?php echo Yii::app()->createAbsoluteUrl('site/listingdetail', array('slug' => $data->slug)); ?> "> <?php
<label class="lb">Avatar :</label> <div class="group-upload"> <?php echo $form->fileField($model, 'avatar', array()); ?> <span>Only <?php echo Users::$AllowFileAvatar; ?> are allow. Recommended Dimension: 66 px x 65 px</span> <?php if (!$model->isNewRecord && $model->avatar != '') { $res = ''; // $file = ROOT."/".Users::$folderUpload."/"."$model->id/".$model->avatar; // if(file_exists($file) && !empty($model->avatar)){ $link = ImageProcessing::bindImageByModel($model, null, null, array('avatar' => 1)); $res = "<a href='{$link}' class='show-image' target='_blank'>{$model->avatar}</a>"; // } ?> <p style="text-align: left;padding-left: 222px;"> <br> <span>Current File: <?php echo $res; ?> </span> </p> <p style="text-align: left;padding-left: 222px;"> <br/> <input type="checkbox" name="delete_current_image" class="delete_current_image"> Delete current avartar </p>
* ------------------------------------------------------------ */ $src = ''; $username = ''; $phone = ''; $srcCompany = ''; $agent_cea = ''; $company = ''; $CEALicenseNo = ''; if (is_numeric($agent_id)) { $mUser = Users::model()->findByPk($agent_id); if ($mUser) { $src = ImageProcessing::bindImageByModel($mUser, 100, 100, array('avatar' => 1)); $username = $mUser->title . ' ' . $mUser->first_name . ' ' . $mUser->last_name; $phone = $mUser->phone; $srcCompany = ImageProcessing::bindImageByModel($mUser, 106, 75, array('agent_company_logo' => 1)); $agent_cea = $mUser->agent_cea; $company = $mUser->agent_company_name; $CEALicenseNo = $mUser->license; } } ?> <h2 class="title-2">Contact Agent</h2> <div class="contact-agent contact-agent-<?php echo $position; ?> clearfix"> <div class="agent-left agent-left-<?php echo $position; ?> ">
*/ public function formatLandLorIdType($model) { if (isset(Users::$aIdType[$model->id_type])) { return Users::$aIdType[$model->id_type]; } return ''; } /** * @Author: ANH DUNG Apr 02, 2014 * @Todo: format upload_employment_pass_passport Tenant at BE * @Param: $model model user */ public function formatEmploymentPassPassport($data) {
<div class="inventory_photo_show"> <ul class="photo-list clearfix"> <?php foreach ($aModelPhoto as $key => $item) { ?> <?php $first = 'first'; $last = 'last'; if ($key != 0) { $first = ''; } if ($key != $countModelPhoto - 1) { $last = ''; } $pathPhoto = ImageProcessing::bindImageByModel($item, 160, 160); $pathPhotoBig = ImageProcessing::bindImageByModel($item, -1, -1); $linkRemove = ''; $CanRemove = $item->user_id == Yii::app()->user->id ? true : false; if ($CanRemove) { $linkRemove = Yii::app()->createAbsoluteUrl('enquiry/ajaxRemoveFileAll', array('id' => $item->id)); } ?> <li class="<?php echo $first . " {$last}"; ?> " > <a href="<?php echo $pathPhotoBig; ?> " class="FancyPhoto" rel='group'> <img src="<?php
} } catch (Exception $e) { // $response['message'] = 'An error has occured.'; $response['message'] = $e->getMessage(); $response['code'] = false; } echo json_encode($response); die; } /** * @Author: ANH DUNG Jul 25, 2014 * @Todo: remove inventory photo * @Param: $id */ public function actionAjaxRemoveFileAll($id) { MyFormat::CheckRequiredLogin(); $model = ProInventoryPhoto::model()->findByPk($id);
echo $form->labelEx($model, 'cover'); ?> <?php echo $form->fileField($model, 'imageFile'); ?> <span class='errorMessage'>( *.jpg , *.gif , *.png )( MaxSize : 3M )(width: 217px,height: 194px)</span> <?php echo Yii::t('translation', $form->error($model, 'imageFile')); ?> </div> <?php if ($action == 'update') { ?> <div class="column" style="width: 98%; padding:15px 0 15px 0;"> <img src="<?php echo ImageProcessing::bindImageByModel($model, 217, 194, 'cover'); ?> " style="width:110px;margin-left: 118px;";/> <!--<img src="<?php echo Yii::app()->createAbsoluteUrl('/upload/admin/module/' . $model->id . '/' . $model->cover); ?> " style="width:110px;margin-left: 118px;";/>--> </div> <?php } ?> <div class="row"> <?php echo Yii::t('translation', $form->labelEx($model, 'status'));
<?php $this->breadcrumbs = array('Module' => array('index'), $model->name); $menus = array(array('label' => 'Module Management', 'url' => array('index')), array('label' => 'Create Module', 'url' => array('create')), array('label' => 'Update Module', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Module', 'url' => array('delete'), 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?'))); $this->menu = ControllerActionsName::createMenusRoles($menus, $actions); ?> <h1>View Module: <?php echo $model->name; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('name', array('name' => 'short_description', 'type' => 'html', 'value' => $model->short_description), array('name' => 'description', 'type' => 'html', 'value' => $model->description), 'status:status', 'order_at', array('name' => 'course_id', 'value' => $model->course->name), array('name' => 'cover', 'type' => 'html', 'value' => CHtml::image(ImageProcessing::bindImageByModel($model, 217, 194, 'cover'))))));
<?php $this->breadcrumbs = array('Saleperson Management' => array('index'), $model->first_name); $model->scenario = 'view_register'; $menus = array(array('label' => 'Saleperson Management', 'url' => array('index')), array('label' => 'Create Saleperson', 'url' => array('create')), array('label' => 'Update Saleperson', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Saleperson', 'url' => array('delete'), 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?'))); $this->menu = ControllerActionsName::createMenusRoles($menus, $actions); ?> <h1>View Saleperson: <?php echo $model->first_name; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('label' => 'Full Name', 'type' => 'FullNameRegisteredUsers', 'value' => $model), array('name' => 'commission_schema_id', 'value' => $model->rCommissionSchema ? $model->rCommissionSchema->name : ''), 'nric_passportno_roc', array('name' => 'phone', 'type' => 'FullPhone', 'value' => $model), 'email_not_login', 'agent_cea', 'license', 'agent_company_name', array('name' => 'agent_company_logo', 'type' => 'html', 'value' => $model->agent_company_logo != '' ? CHtml::image(ImageProcessing::bindImageByModel($model, 106, 75, array('agent_company_logo' => 1))) : ''), array('name' => 'avatar', 'type' => 'html', 'value' => $model->avatar != '' ? CHtml::image(ImageProcessing::bindImageByModel($model, 100, 100, array('avatar' => 1))) : ''), 'address', 'postal_code', array('name' => 'country_id', 'value' => $model->country ? $model->country->area_name : ""), 'is_subscriber:YNStatus', 'status:status', 'gst:YNStatus', 'created_date:datetime', array('name' => 'ProAgentDistrict', 'type' => 'ProAgentDistrict', 'value' => $model), 'phone_click', 'email_click'))); ?> <?php $model->aTierManager = $model->rAgentTierManager; $cmsFormater = new CmsFormatter(); ?> <div class="grid-view"> <label> Tier Manager</label> <table class="materials_table items "> <thead> <tr> <th class="w-20 item_c">#</th> <th class="w-320 item_c">Name</th> <th class="w-320 item_c">NRIC/FIN/PP No</th> <th class="w-100 item_c">Type</th> </tr>