mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
ticket showing works outgame, but needs fancyfying :D
--HG-- branch : quitta-gsoc-2013
This commit is contained in:
parent
3790739f49
commit
75b645264d
6 changed files with 41 additions and 24 deletions
|
@ -283,6 +283,11 @@ class Ticket{
|
|||
$statement = $dbl->execute($query, $values);
|
||||
}
|
||||
|
||||
//hasInfo
|
||||
public function hasInfo(){
|
||||
return Ticket_Info::TicketHasInfo($this->getTId());
|
||||
}
|
||||
|
||||
/*FUNCTION: postreply
|
||||
* returns all possible statusses
|
||||
*
|
||||
|
|
|
@ -33,7 +33,15 @@ class Ticket_Info{
|
|||
$ticket_info->create();
|
||||
}
|
||||
|
||||
|
||||
public static function TicketHasInfo($ticket_id) {
|
||||
$dbl = new DBLayer("lib");
|
||||
//check if ticket is already assigned
|
||||
if( $dbl->execute(" SELECT * FROM `ticket_info` WHERE `Ticket` = :ticket_id", array('ticket_id' => $ticket_id) )->rowCount() ){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
||||
|
||||
public function __construct() {
|
||||
|
|
|
@ -36,6 +36,7 @@ function show_ticket(){
|
|||
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
||||
$show_as_admin = true;
|
||||
}
|
||||
|
||||
$entire_ticket = Ticket::getEntireTicket( $result['ticket_id'],$show_as_admin);
|
||||
Ticket_Log::createLogEntry($result['ticket_id'],$_SESSION['ticket_user']->getTUserId(), 3);
|
||||
$result['ticket_tId'] = $entire_ticket['ticket_obj']->getTId();
|
||||
|
@ -66,6 +67,7 @@ function show_ticket(){
|
|||
$result['statusList'] = Ticket::getStatusArray();
|
||||
$result['sGroups'] = Gui_Elements::make_table_with_key_is_id(Support_Group::getAllSupportGroups(), Array("getName"), "getSGroupId" );
|
||||
}
|
||||
$result['hasInfo'] = $target_ticket->hasInfo();
|
||||
return $result;
|
||||
|
||||
}else{
|
||||
|
|
|
@ -9,29 +9,28 @@ function show_ticket_info(){
|
|||
$target_ticket = new Ticket();
|
||||
$target_ticket->load_With_TId($result['ticket_id']);
|
||||
|
||||
if(($target_ticket->getAuthor() == $_SESSION['ticket_user']->getTUserId()) || Ticket_User::isMod($_SESSION['ticket_user'] )){
|
||||
if( $target_ticket->hasInfo() && (($target_ticket->getAuthor() == $_SESSION['ticket_user']->getTUserId()) || Ticket_User::isMod($_SESSION['ticket_user'] ))){
|
||||
$result['ticket_title'] = $target_ticket->getTitle();
|
||||
$result['ticket_author'] = $target_ticket->getAuthor();
|
||||
|
||||
|
||||
$result['shard_id'] = $_GET['ShardId'];
|
||||
$result['user_position'] = $_GET['UserPosition'];
|
||||
$result['view_position'] = $_GET['ViewPosition'];
|
||||
$result['client_version'] = $_GET['ClientVersion'];
|
||||
$result['patch_version'] = $_GET['PatchVersion'];
|
||||
|
||||
|
||||
$result['server_tick'] = $_GET['ServerTick'];
|
||||
$result['connect_state'] = $_GET['ConnectState'];
|
||||
$result['local_address'] = $_GET['LocalAddress'];
|
||||
$result['memory'] = $_GET['Memory'];
|
||||
$result['os'] = $_GET['OS'];
|
||||
$result['processor'] = $_GET['Processor'];
|
||||
$result['cpu_id'] = $_GET['CPUID'];
|
||||
$result['cpu_mask'] = $_GET['CpuMask'];
|
||||
$result['ht'] = $_GET['HT'];
|
||||
|
||||
$result['nel3d'] = $_GET['NeL3D'];
|
||||
$ticket_info = new Ticket_Info();
|
||||
$ticket_info->load_With_Ticket($result['ticket_id']);
|
||||
$result['shard_id'] = $ticket_info->getShardId();
|
||||
$result['user_position'] = $ticket_info->getUser_Position();
|
||||
$result['view_position'] = $ticket_info->getView_Position();
|
||||
$result['client_version'] = $ticket_info->getClient_Version();
|
||||
$result['patch_version'] = $ticket_info->getPatch_Version();
|
||||
$result['server_tick'] = $ticket_info->getServer_Tick();
|
||||
$result['connect_state'] = $ticket_info->getConnect_State();
|
||||
$result['local_address'] = $ticket_info->getLocal_Address();
|
||||
$result['memory'] = $ticket_info->getMemory();
|
||||
$result['os'] = $ticket_info->getOS();
|
||||
$result['processor'] = $ticket_info->getProcessor();
|
||||
$result['cpu_id'] = $ticket_info->getCPUId();
|
||||
$result['cpu_mask'] = $ticket_info->getCPU_Mask();
|
||||
$result['ht'] = $ticket_info->getHT();
|
||||
$result['nel3d'] = $ticket_info->getNel3D();
|
||||
$result['user_id'] = $ticket_info->getUser_Id();
|
||||
|
||||
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
||||
$result['isMod'] = "TRUE";
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
<li class="divider"></li>
|
||||
{if isset($isMod) and $isMod eq "TRUE"}<li><a href="index.php?page=show_ticket_log&id={$ticket_tId}">Show Ticket Log</a></li>{/if}
|
||||
<li><a href="index.php?page=createticket&user_id={$ticket_author}">Send Other Ticket</a></li>
|
||||
<li><a href="index.php?page=show_ticket_info&id={$ticket_tId}">Show ticket Info</a></li>
|
||||
{if $hasInfo}<li><a href="index.php?page=show_ticket_info&id={$ticket_tId}">Show ticket Info</a></li>{/if}
|
||||
<li class="divider"></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<form id="changeTicket" class="form-vertical" method="post" action="index.php">
|
||||
<table class="table table-bordered table-condensed " >
|
||||
<tr>
|
||||
<td><strong>Shard ID: </strong>{$shard_id}</td>
|
||||
<td><img src="img/shard.png" height="40" /><strong> Shard ID: </strong>{$shard_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>User Position: </strong>{$user_position}</td>
|
||||
|
@ -60,7 +60,10 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><strong>nel3d: </strong>{$nel3d}</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>user_id: </strong>{$user_id}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue