This commit is contained in:
guotao@cnezsoft.com
2011-03-13 01:09:41 +00:00
parent 8c13b1f476
commit d7ede5d7c9
2 changed files with 24 additions and 0 deletions
+4
View File
@@ -21,6 +21,7 @@ class my extends control
{
parent::__construct();
$this->loadModel('user');
$this->loadModel('dept');
$this->my->setMenu();
}
@@ -304,6 +305,9 @@ class my extends control
public function profile()
{
if($this->app->user->account == 'guest') die(js::alert('guest') . js::locate('back'));
$user = $this->user->getById($this->app->user->account);
$deptPath = $this->dept->getParents($user->dept);
$this->view->deptPath = $deptPath;
$this->view->header->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->profile;
$this->view->position[] = $this->lang->my->profile;
$this->view->user = $this->user->getById($this->app->user->id);
+20
View File
@@ -14,6 +14,26 @@
<?php include '../../common/view/tablesorter.html.php';?>
<table align='center' class='table-4'>
<caption><?php echo $lang->my->profile;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->user->dept;?></th>
<td>
<?php
if(empty($deptPath))
{
echo "/";
}
else
{
foreach($deptPath as $key => $dept)
{
if($dept->name) echo $dept->name;
if(isset($deptPath[$key + 1])) echo $lang->arrow;
}
}
?>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->user->account;?></th>
<td><?php echo $user->account;?></td>