* adjust the feature.
This commit is contained in:
@@ -35,11 +35,7 @@ class admin extends control
|
||||
/* 首页。*/
|
||||
public function index($tab = 'index')
|
||||
{
|
||||
$header['title'] = $this->lang->admin->index;
|
||||
$position[] = $header['title'];
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->display();
|
||||
$this->locate($this->createLink('admin', 'browseCompany'));
|
||||
}
|
||||
|
||||
/* 公司列表。*/
|
||||
@@ -57,43 +53,4 @@ class admin extends control
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 用户列表。*/
|
||||
public function browseUser($companyID = 0)
|
||||
{
|
||||
if($companyID == 0) $companyID = $this->app->company->id;
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->user->browse;
|
||||
$position[] = $this->lang->admin->user;
|
||||
$position[] = $this->lang->user->browse;
|
||||
|
||||
$users = $this->user->getList($companyID);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('users', $users);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 分组列表。*/
|
||||
public function browseGroup($companyID = 0)
|
||||
{
|
||||
if($companyID == 0) $companyID = $this->app->company->id;
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->group->browse;
|
||||
$position[] = $this->lang->admin->user;
|
||||
$position[] = $this->lang->group->browse;
|
||||
|
||||
$groups = $this->group->getList($companyID);
|
||||
$groupUsers = array();
|
||||
foreach($groups as $group) $groupUsers[$group->id] = $this->group->getUserPairs($group->id);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('groups', $groups);
|
||||
$this->assign('groupUsers', $groupUsers);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,47 +23,39 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div class="yui-d0 yui-t2">
|
||||
<div class="yui-b a-center">
|
||||
<?php include './menu.html.php';?>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->company->browse;?></caption>
|
||||
<tr>
|
||||
<th><?php echo $lang->company->id;?></th>
|
||||
<th><?php echo $lang->company->name;?></th>
|
||||
<th><?php echo $lang->company->phone;?></th>
|
||||
<th><?php echo $lang->company->fax;?></th>
|
||||
<th><?php echo $lang->company->address;?></th>
|
||||
<th><?php echo $lang->company->zipcode;?></th>
|
||||
<th><?php echo $lang->company->website;?></th>
|
||||
<th><?php echo $lang->company->backyard;?></th>
|
||||
<th><?php echo $lang->company->pms;?></th>
|
||||
<th><?php echo $lang->company->guest;?></th>
|
||||
<th><?php echo $lang->action;?></th>
|
||||
</tr>
|
||||
<?php foreach($companies as $company):?>
|
||||
<tr>
|
||||
<td><?php echo $company->id;?></td>
|
||||
<td><?php echo $company->name;?></td>
|
||||
<td><?php echo $company->phone;?></td>
|
||||
<td><?php echo $company->fax;?></td>
|
||||
<td><?php echo $company->address;?></td>
|
||||
<td><?php echo $company->zipcode;?></td>
|
||||
<td><?php echo html::a($company->website, $company->website, '_blank');?></td>
|
||||
<td><?php echo html::a($company->backyard,$company->backyard, '_blank');?></td>
|
||||
<td><?php echo html::a('http://' . $company->pms, $company->pms, '_blank');?></td>
|
||||
<td><?php echo $company->guest;?></td>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('company', 'edit', "companyID=$company->id"), $this->lang->company->edit);?>
|
||||
<?php echo html::a($this->createLink('company', 'delete', "companyID=$company->id"), $this->lang->company->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='table-1'>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->company->id;?></th>
|
||||
<th><?php echo $lang->company->name;?></th>
|
||||
<th><?php echo $lang->company->phone;?></th>
|
||||
<th><?php echo $lang->company->fax;?></th>
|
||||
<th><?php echo $lang->company->address;?></th>
|
||||
<th><?php echo $lang->company->zipcode;?></th>
|
||||
<th><?php echo $lang->company->website;?></th>
|
||||
<th><?php echo $lang->company->backyard;?></th>
|
||||
<th><?php echo $lang->company->pms;?></th>
|
||||
<th><?php echo $lang->company->guest;?></th>
|
||||
<th><?php echo $lang->action;?></th>
|
||||
</tr>
|
||||
<?php foreach($companies as $company):?>
|
||||
<tr>
|
||||
<td class='a-center'><?php echo $company->id;?></td>
|
||||
<td><?php echo $company->name;?></td>
|
||||
<td><?php echo $company->phone;?></td>
|
||||
<td><?php echo $company->fax;?></td>
|
||||
<td><?php echo $company->address;?></td>
|
||||
<td><?php echo $company->zipcode;?></td>
|
||||
<td><?php echo html::a($company->website, $company->website, '_blank');?></td>
|
||||
<td><?php echo html::a($company->backyard,$company->backyard, '_blank');?></td>
|
||||
<td><?php echo html::a('http://' . $company->pms, $company->pms, '_blank');?></td>
|
||||
<td><?php echo $lang->company->guestList[(int)$company->guest];?></td>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('company', 'edit', "companyID=$company->id"), $this->lang->company->edit);?>
|
||||
<?php echo html::a($this->createLink('company', 'delete', "companyID=$company->id"), $this->lang->company->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user