mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-11 09:49:04 +00:00
ticket showing works outgame, but needs fancyfying :D
This commit is contained in:
parent
155f7be270
commit
b85d2bfbe9
6 changed files with 41 additions and 24 deletions
|
@ -283,6 +283,11 @@ class Ticket{
|
||||||
$statement = $dbl->execute($query, $values);
|
$statement = $dbl->execute($query, $values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//hasInfo
|
||||||
|
public function hasInfo(){
|
||||||
|
return Ticket_Info::TicketHasInfo($this->getTId());
|
||||||
|
}
|
||||||
|
|
||||||
/*FUNCTION: postreply
|
/*FUNCTION: postreply
|
||||||
* returns all possible statusses
|
* returns all possible statusses
|
||||||
*
|
*
|
||||||
|
|
|
@ -33,7 +33,15 @@ class Ticket_Info{
|
||||||
$ticket_info->create();
|
$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////////////////////////////////////////////////////
|
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
|
|
@ -36,6 +36,7 @@ function show_ticket(){
|
||||||
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
||||||
$show_as_admin = true;
|
$show_as_admin = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$entire_ticket = Ticket::getEntireTicket( $result['ticket_id'],$show_as_admin);
|
$entire_ticket = Ticket::getEntireTicket( $result['ticket_id'],$show_as_admin);
|
||||||
Ticket_Log::createLogEntry($result['ticket_id'],$_SESSION['ticket_user']->getTUserId(), 3);
|
Ticket_Log::createLogEntry($result['ticket_id'],$_SESSION['ticket_user']->getTUserId(), 3);
|
||||||
$result['ticket_tId'] = $entire_ticket['ticket_obj']->getTId();
|
$result['ticket_tId'] = $entire_ticket['ticket_obj']->getTId();
|
||||||
|
@ -66,6 +67,7 @@ function show_ticket(){
|
||||||
$result['statusList'] = Ticket::getStatusArray();
|
$result['statusList'] = Ticket::getStatusArray();
|
||||||
$result['sGroups'] = Gui_Elements::make_table_with_key_is_id(Support_Group::getAllSupportGroups(), Array("getName"), "getSGroupId" );
|
$result['sGroups'] = Gui_Elements::make_table_with_key_is_id(Support_Group::getAllSupportGroups(), Array("getName"), "getSGroupId" );
|
||||||
}
|
}
|
||||||
|
$result['hasInfo'] = $target_ticket->hasInfo();
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -9,29 +9,28 @@ function show_ticket_info(){
|
||||||
$target_ticket = new Ticket();
|
$target_ticket = new Ticket();
|
||||||
$target_ticket->load_With_TId($result['ticket_id']);
|
$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_title'] = $target_ticket->getTitle();
|
||||||
$result['ticket_author'] = $target_ticket->getAuthor();
|
$result['ticket_author'] = $target_ticket->getAuthor();
|
||||||
|
|
||||||
|
$ticket_info = new Ticket_Info();
|
||||||
$result['shard_id'] = $_GET['ShardId'];
|
$ticket_info->load_With_Ticket($result['ticket_id']);
|
||||||
$result['user_position'] = $_GET['UserPosition'];
|
$result['shard_id'] = $ticket_info->getShardId();
|
||||||
$result['view_position'] = $_GET['ViewPosition'];
|
$result['user_position'] = $ticket_info->getUser_Position();
|
||||||
$result['client_version'] = $_GET['ClientVersion'];
|
$result['view_position'] = $ticket_info->getView_Position();
|
||||||
$result['patch_version'] = $_GET['PatchVersion'];
|
$result['client_version'] = $ticket_info->getClient_Version();
|
||||||
|
$result['patch_version'] = $ticket_info->getPatch_Version();
|
||||||
|
$result['server_tick'] = $ticket_info->getServer_Tick();
|
||||||
$result['server_tick'] = $_GET['ServerTick'];
|
$result['connect_state'] = $ticket_info->getConnect_State();
|
||||||
$result['connect_state'] = $_GET['ConnectState'];
|
$result['local_address'] = $ticket_info->getLocal_Address();
|
||||||
$result['local_address'] = $_GET['LocalAddress'];
|
$result['memory'] = $ticket_info->getMemory();
|
||||||
$result['memory'] = $_GET['Memory'];
|
$result['os'] = $ticket_info->getOS();
|
||||||
$result['os'] = $_GET['OS'];
|
$result['processor'] = $ticket_info->getProcessor();
|
||||||
$result['processor'] = $_GET['Processor'];
|
$result['cpu_id'] = $ticket_info->getCPUId();
|
||||||
$result['cpu_id'] = $_GET['CPUID'];
|
$result['cpu_mask'] = $ticket_info->getCPU_Mask();
|
||||||
$result['cpu_mask'] = $_GET['CpuMask'];
|
$result['ht'] = $ticket_info->getHT();
|
||||||
$result['ht'] = $_GET['HT'];
|
$result['nel3d'] = $ticket_info->getNel3D();
|
||||||
|
$result['user_id'] = $ticket_info->getUser_Id();
|
||||||
$result['nel3d'] = $_GET['NeL3D'];
|
|
||||||
|
|
||||||
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
||||||
$result['isMod'] = "TRUE";
|
$result['isMod'] = "TRUE";
|
||||||
|
|
|
@ -224,7 +224,7 @@
|
||||||
<li class="divider"></li>
|
<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}
|
{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=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>
|
<li class="divider"></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<form id="changeTicket" class="form-vertical" method="post" action="index.php">
|
<form id="changeTicket" class="form-vertical" method="post" action="index.php">
|
||||||
<table class="table table-bordered table-condensed " >
|
<table class="table table-bordered table-condensed " >
|
||||||
<tr>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>User Position: </strong>{$user_position}</td>
|
<td><strong>User Position: </strong>{$user_position}</td>
|
||||||
|
@ -60,7 +60,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>nel3d: </strong>{$nel3d}</td>
|
<td><strong>nel3d: </strong>{$nel3d}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>user_id: </strong>{$user_id}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue