HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
profile.php
Go to the documentation of this file.
1 <?php $this->pageTitle = Yii::app()->name.' - '.UserModule::t("Profile");
2 $this->breadcrumbs = array(
3  UserModule::t("Profile"),
4 );
5 $this->menu = array(
6  array('label' => UserModule::t('Edit'), 'url' => array('edit')),
7  array('label' => UserModule::t('Change password'), 'url' => array('changepassword')),
8  array('label' => UserModule::t('Logout'), 'url' => array('/user/logout')),
9 );
10 ?><h1><?php echo UserModule::t('Your profile'); ?></h1>
11 
12 <?php if (Yii::app()->user->hasFlash('profileMessage')): ?>
13 <div class="success">
14  <?php echo Yii::app()->user->getFlash('profileMessage'); ?>
15 </div>
16 <?php endif; ?>
17 <table class="dataGrid">
18  <tr>
19  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('username')); ?></th>
20  <td><?php echo CHtml::encode($model->username); ?></td>
21  </tr>
22  <?php
23  $profileFields = ProfileField::model()->forOwner()->sort()->findAll();
25  foreach ($profileFields as $field) {
26  //echo "<pre>"; print_r($profile); die();
27  ?>
28  <tr>
29  <th class="label"><?php echo CHtml::encode(UserModule::t($field->title));
30  ?></th>
31  <td><?php echo(($field->widgetView($profile)) ? $field->widgetView($profile) : CHtml::encode((($field->range) ? Profile::range($field->range, $profile->getAttribute($field->varname)) : $profile->getAttribute($field->varname))));
32  ?></td>
33  </tr>
34  <?php
35 
36  }//$profile->getAttribute($field->varname)
37  }
38  ?>
39  <tr>
40  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('email')); ?></th>
41  <td><?php echo CHtml::encode($model->email); ?></td>
42  </tr>
43  <tr>
44  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('create_at')); ?></th>
45  <td><?php echo $model->create_at; ?></td>
46  </tr>
47  <tr>
48  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('lastvisit_at')); ?></th>
49  <td><?php echo $model->lastvisit_at; ?></td>
50  </tr>
51  <tr>
52  <th class="label"><?php echo CHtml::encode($model->getAttributeLabel('status')); ?></th>
53  <td><?php echo CHtml::encode(User::itemAlias("UserStatus", $model->status)); ?></td>
54  </tr>
55 </table>