show user added, where admins can create a ticket from another user
--HG-- branch : quitta-gsoc-2013hg/feature/sse2
parent
1e4daba4ae
commit
61aebf6b3b
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function show_user(){
|
||||||
|
//if logged in
|
||||||
|
if(WebUsers::isLoggedIn()){
|
||||||
|
|
||||||
|
if(WebUsers::isAdmin()){
|
||||||
|
|
||||||
|
if(isset($_GET['id'])){
|
||||||
|
$result['target_id'] = filter_var($_GET['id'], FILTER_SANITIZE_NUMBER_INT);
|
||||||
|
}else{
|
||||||
|
$result['target_id'] = $_SESSION['id'];
|
||||||
|
}
|
||||||
|
$result['target_name'] = WebUsers::getUsername( $result['target_id']);
|
||||||
|
$result['mail'] = WebUsers::getEmail( $result['target_id']);
|
||||||
|
$info = WebUsers::getInfo($result['target_id']);
|
||||||
|
$result['firstName'] = $info['FirstName'];
|
||||||
|
$result['lastName'] = $info['LastName'];
|
||||||
|
$result['country'] = $info['Country'];
|
||||||
|
$result['gender'] = $info['Gender'];
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
|
||||||
|
}else{
|
||||||
|
//ERROR: No access!
|
||||||
|
$_SESSION['error_code'] = "403";
|
||||||
|
header("Location: index.php?page=error");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//ERROR: not logged in!
|
||||||
|
header("Location: index.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,78 @@
|
|||||||
|
{block name=content}
|
||||||
|
<div class="row-fluid sortable ui-sortable">
|
||||||
|
<div class="box span9">
|
||||||
|
<div class="box-header well" data-original-title="">
|
||||||
|
<h2><i class="icon-user"></i> Profile of {$target_name}</h2>
|
||||||
|
<div class="box-icon">
|
||||||
|
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||||
|
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-content">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<legend>Info</legend>
|
||||||
|
<table class="table table-striped" >
|
||||||
|
<tbody>
|
||||||
|
<tr >
|
||||||
|
<td><strong>Email:</strong></td>
|
||||||
|
<td>{$mail}</td>
|
||||||
|
</tr>
|
||||||
|
{if $firstName neq ""}
|
||||||
|
<tr>
|
||||||
|
<td><strong>Firstname:</strong></td>
|
||||||
|
<td>{$firstName}</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
{if $lastName neq ""}
|
||||||
|
<tr>
|
||||||
|
<td><strong>LastName:</strong></td>
|
||||||
|
<td>{$lastName}</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
{if $country neq ""}
|
||||||
|
<tr>
|
||||||
|
<td><strong>Country:</strong></td>
|
||||||
|
<td>{$country}</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
{if $gender neq 0}
|
||||||
|
<tr>
|
||||||
|
<td><strong>Gender:</strong></td>
|
||||||
|
{if $gender eq 1}
|
||||||
|
<td><strong>♂</strong></td>
|
||||||
|
{else if $gender eq 2}
|
||||||
|
<td><strong>♀</strong></td>
|
||||||
|
{/if}
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span-->
|
||||||
|
|
||||||
|
<div class="box span3">
|
||||||
|
<div class="box-header well" data-original-title="">
|
||||||
|
<h2><i class="icon-th"></i>Actions</h2>
|
||||||
|
<div class="box-icon">
|
||||||
|
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
|
||||||
|
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-content">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button class="btn btn-primary btn-large dropdown-toggle" data-toggle="dropdown">Actions<span class="caret"></span></button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li><a href="index.php?page=settings&id={$target_id}">Edit User</a></li>
|
||||||
|
<li><a href="index.php?page=createticket&user_id={$target_id}">Send Ticket</a></li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span-->
|
||||||
|
</div><!--/row-->
|
||||||
|
{/block}
|
||||||
|
|
Loading…
Reference in New Issue