Пример #1
0
<?php

$this->pageTitle = Yii::app()->name . ' - ' . UsersModule::t("Profile");
$this->breadcrumbs = array(UsersModule::t("Profile"));
$this->menu = array(UsersModule::isAdmin() ? array('label' => UsersModule::t('Manage Users'), 'url' => array('/user/admin')) : array(), array('label' => UsersModule::t('Edit'), 'url' => array('edit')), array('label' => UsersModule::t('Change password'), 'url' => array('changepassword')), array('label' => UsersModule::t('Logout'), 'url' => array('/user/logout')));
?>
<h1><?php 
echo UsersModule::t('Your profile');
?>
</h1>

<?php 
if (Yii::app()->user->hasFlash('profileMessage')) {
    ?>
    <div class="success">
        <?php 
    echo Yii::app()->user->getFlash('profileMessage');
    ?>
    </div>
<?php 
}
?>
<table class="dataGrid">
    <tr>
        <th class="label"><?php 
echo CHtml::encode($model->getAttributeLabel('username'));
?>
</th>
        <td><?php 
echo CHtml::encode($model->username);
?>
Пример #2
0
<?php
$this->breadcrumbs=array(
	Users::t("Users"),
);
?>
<h1><?php echo Users::t("List User"); ?></h1>
<?php if(UsersModule::isAdmin()) {
	?><ul class="actions">
	<li><?php echo CHtml::link(Users::t('Manage User'),Users::url('admin')); ?></li>
	<li><?php echo CHtml::link(Users::t('Manage Profile Field'),Users::url('profileField/admin')); ?></li>
</ul><!-- actions --><?php 
} ?>
<?php $this->widget('zii.components.grid.CGridView', array(
	'dataProvider'=>$dataProvider,
	'columns'=>array(
		array(
			'name' => 'username',
			'type'=>'raw',
			'value' => 'CHtml::link(CHtml::encode($data->username),Users::url("admin/view",array("id"=>$data->id)))',
		),
		array(
			'name' => 'createtime',
			'value' => 'date("d.m.Y H:i:s",$data->createtime)',
		),
		array(
			'name' => 'lastvisit',
			'value' => '(($data->lastvisit)?date("d.m.Y H:i:s",$data->lastvisit):Users::t("Not visited"))',
		),
	),
)); ?>
Пример #3
0
<?php

$this->pageTitle = Yii::app()->name . ' - ' . UsersModule::t("Change Password");
$this->breadcrumbs = array(UsersModule::t("Profile") => array('/user/profile'), UsersModule::t("Change Password"));
$this->menu = array(UsersModule::isAdmin() ? array('label' => UsersModule::t('Manage Users'), 'url' => array('/user/admin')) : array(), array('label' => UsersModule::t('Profile'), 'url' => array('/user/profile')), array('label' => UsersModule::t('Edit'), 'url' => array('edit')), array('label' => UsersModule::t('Logout'), 'url' => array('/user/logout')));
?>

<h1><?php 
echo UsersModule::t("Change password");
?>
</h1>

<div class="form">
    <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'changepassword-form', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>

    <p class="note"><?php 
echo UsersModule::t('Fields with <span class="required">*</span> are required.');
?>
</p>
    <?php 
echo $form->errorSummary($model);
?>

    <div class="row">
        <?php 
echo $form->labelEx($model, 'oldPassword');
?>
        <?php 
echo $form->passwordField($model, 'oldPassword');