parent
bdbbb393cd
commit
54d71fd26d
@ -0,0 +1,234 @@
|
||||
<?php
|
||||
|
||||
class Ticket_Log{
|
||||
|
||||
private $tInfoId;
|
||||
private $ticket;
|
||||
|
||||
private $shardid;
|
||||
private $user_position;
|
||||
private $view_position;
|
||||
private $client_version;
|
||||
private $patch_version;
|
||||
private $server_tick;
|
||||
private $connect_state;
|
||||
private $local_address;
|
||||
private $memory;
|
||||
private $os;
|
||||
private $processor;
|
||||
private $cpu_id;
|
||||
private $cpu_mask;
|
||||
private $ht;
|
||||
private $nel3d;
|
||||
|
||||
|
||||
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//Creates a log entry
|
||||
public static function createTicketInfo($info_array) {
|
||||
$dbl = new DBLayer("lib");
|
||||
$query = "INSERT INTO ticket_log (Timestamp, Query, Ticket, Author) VALUES (now(), :query, :ticket, :author )";
|
||||
$values = Array('ticket' => $ticket_id, 'author' => $author_id, 'query' => json_encode(array($action,$arg)));
|
||||
$dbl->execute($query, $values);
|
||||
}
|
||||
|
||||
|
||||
//return constructed element based on TLogId
|
||||
public static function constr_TInfoId( $id) {
|
||||
$instance = new self();
|
||||
$instance->setTInfoId($id);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////Methods////////////////////////////////////////////////////
|
||||
|
||||
public function __construct() {
|
||||
}
|
||||
|
||||
//set values
|
||||
public function set($values) {
|
||||
$this->setTInfoId($values['TInfoId']);
|
||||
$this->setTicket($values['Ticket']);
|
||||
$this->setShardId($values['ShardId']);
|
||||
$this->setUser_Position($values['UserPosition']);
|
||||
$this->setView_Position($values['ViewPosition']);
|
||||
|
||||
$this->setClient_Version($values['ClientVersion']);
|
||||
$this->setPatch_Version($values['PatchVersion']);
|
||||
$this->setServer_Tick($values['ServerTick']);
|
||||
$this->setConnect_State($values['ConnectState']);
|
||||
$this->setLocal_Address($values['LocalAddress']);
|
||||
|
||||
$this->setMemory($values['Memory']);
|
||||
$this->setOS($values['OS']);
|
||||
$this->setProcessor($values['Processor']);
|
||||
$this->setCPUId($values['CPUID']);
|
||||
$this->setCPU_Mask($values['CpuMask']);
|
||||
$this->setHT($values['HT']);
|
||||
$this->setNel3D($values['NeL3D']);
|
||||
}
|
||||
|
||||
//Load with tInfoId
|
||||
public function load_With_TInfoId( $id) {
|
||||
$dbl = new DBLayer("lib");
|
||||
$statement = $dbl->execute("SELECT * FROM ticket_info WHERE TInfoId=:id", array('id' => $id));
|
||||
$row = $statement->fetch();
|
||||
$this->set($row);
|
||||
}
|
||||
|
||||
//Load with ticket Id
|
||||
public function load_With_TId( $id) {
|
||||
$dbl = new DBLayer("lib");
|
||||
$statement = $dbl->execute("SELECT * FROM ticket_info WHERE Ticket=:id", array('id' => $id));
|
||||
$row = $statement->fetch();
|
||||
$this->set($row);
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////Getters////////////////////////////////////////////////////
|
||||
|
||||
public function getTInfoId(){
|
||||
return $this->tInfoId;
|
||||
}
|
||||
|
||||
public function getTicket(){
|
||||
return $this->ticket;
|
||||
}
|
||||
|
||||
public function getShardId(){
|
||||
return $this->shardid;
|
||||
}
|
||||
|
||||
public function getUser_Position(){
|
||||
return $this->user_position;
|
||||
}
|
||||
|
||||
public function getView_Position(){
|
||||
return $this->view_position;
|
||||
}
|
||||
|
||||
public function getClient_Version(){
|
||||
return $this->client_version;
|
||||
}
|
||||
|
||||
public function getPatch_Version(){
|
||||
return $this->patch_version;
|
||||
}
|
||||
|
||||
public function getServer_Tick(){
|
||||
return $this->server_tick;
|
||||
}
|
||||
|
||||
public function getConnect_State(){
|
||||
return $this->connect_state;
|
||||
}
|
||||
|
||||
public function getLocal_Address(){
|
||||
return $this->local_address;
|
||||
}
|
||||
|
||||
public function getMemory(){
|
||||
return $this->memory;
|
||||
}
|
||||
|
||||
public function getOS(){
|
||||
return $this->os;
|
||||
}
|
||||
|
||||
public function getProcessor(){
|
||||
return $this->processor;
|
||||
}
|
||||
|
||||
|
||||
public function getCPUId(){
|
||||
return $this->cpu_id;
|
||||
}
|
||||
|
||||
public function getCPU_Mask(){
|
||||
return $this->cpu_mask;
|
||||
}
|
||||
|
||||
public function getHT(){
|
||||
return $this->ht;
|
||||
}
|
||||
|
||||
public function getNel3D(){
|
||||
return $this->nel3d;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
||||
|
||||
public function setTInfoId($id){
|
||||
$this->tInfoId = $id;
|
||||
}
|
||||
|
||||
public function setTicket($t){
|
||||
$this->ticket = $t;
|
||||
}
|
||||
|
||||
public function setShardId($s){
|
||||
$this->shardid = $s;
|
||||
}
|
||||
|
||||
public function setUser_Position($u){
|
||||
$this->user_position = $u;
|
||||
}
|
||||
|
||||
public function setView_Position($v){
|
||||
$this->view_position = $v;
|
||||
}
|
||||
|
||||
public function setClient_Version($c){
|
||||
$this->client_version = $c;
|
||||
}
|
||||
|
||||
public function setPatch_Version($p){
|
||||
$this->patch_version = $p;
|
||||
}
|
||||
|
||||
public function setServer_Tick($s){
|
||||
$this->server_tick = $s;
|
||||
}
|
||||
|
||||
public function setConnect_State($c){
|
||||
$this->connect_state = $c;
|
||||
}
|
||||
|
||||
public function setLocal_Address($l){
|
||||
$this->local_address = $l;
|
||||
}
|
||||
|
||||
public function setMemory($m){
|
||||
$this->memory = $m;
|
||||
}
|
||||
|
||||
public function setOS($o){
|
||||
$this->os = $o;
|
||||
}
|
||||
|
||||
public function setProcessor($p){
|
||||
$this->processor = $p;
|
||||
}
|
||||
|
||||
|
||||
public function setCPUId($c){
|
||||
$this->cpu_id = $c;
|
||||
}
|
||||
|
||||
public function setCPU_Mask($c){
|
||||
$this->cpu_mask = $c;
|
||||
}
|
||||
|
||||
public function setHT($h){
|
||||
$this->ht = $h;
|
||||
}
|
||||
|
||||
public function setNel3D($n){
|
||||
$this->nel3d = $n;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
{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-tag"></i> <a href="index.php?page=show_ticket&id={$ticket_id}">[#{$ticket_id}] {$ticket_title}</a> </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>Additional Info </legend>
|
||||
|
||||
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>User Position: </strong>{$user_position}</td>
|
||||
<tr>
|
||||
<td><strong>View Position: </strong>{$view_position}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>client_version: </strong> {$client_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>patch_version: </strong>{$patch_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>memory: </strong>{$memory}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><strong>server_tick: </strong>{$server_tick}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>connect_state: </strong>{$connect_state}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>local_address: </strong>{$local_address}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>os: </strong>{$os}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>processor: </strong>{$processor}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>cpu_id: </strong>{$cpu_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>cpu_mask: </strong>{$cpu_mask}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>ht: </strong>{$ht}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>nel3d: </strong>{$nel3d}</td>
|
||||
</tr>
|
||||
</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">
|
||||
|
||||
<legend style="margin-bottom:9px;">Actions</legend>
|
||||
<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>
|
||||
{if isset($isMod) and $isMod eq "TRUE"}<li><a href="index.php?page=show_ticket_log&id={$ticket_id}">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&id={$ticket_id}">Show Ticket</a></li>
|
||||
<li class="divider"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--/row-->
|
||||
{/block}
|
||||
|
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
function show_ticket_info(){
|
||||
|
||||
//if logged in
|
||||
if(WebUsers::isLoggedIn() && isset($_GET['id'])){
|
||||
|
||||
$result['ticket_id'] = filter_var($_GET['id'], FILTER_SANITIZE_NUMBER_INT);
|
||||
$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'] )){
|
||||
$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'];
|
||||
|
||||
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
||||
$result['isMod'] = "TRUE";
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 194 KiB |
Binary file not shown.
@ -0,0 +1,97 @@
|
||||
{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-tag"></i> <a href="index.php?page=show_ticket&id={$ticket_id}">[#{$ticket_id}] {$ticket_title}</a> </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>Additional Info </legend>
|
||||
|
||||
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>User Position: </strong>{$user_position}</td>
|
||||
<tr>
|
||||
<td><strong>View Position: </strong>{$view_position}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><strong>client_version: </strong> {$client_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>patch_version: </strong>{$patch_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>memory: </strong>{$memory}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><strong>server_tick: </strong>{$server_tick}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>connect_state: </strong>{$connect_state}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>local_address: </strong>{$local_address}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>os: </strong>{$os}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>processor: </strong>{$processor}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>cpu_id: </strong>{$cpu_id}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>cpu_mask: </strong>{$cpu_mask}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>ht: </strong>{$ht}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>nel3d: </strong>{$nel3d}</td>
|
||||
</tr>
|
||||
</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">
|
||||
|
||||
<legend style="margin-bottom:9px;">Actions</legend>
|
||||
<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>
|
||||
{if isset($isMod) and $isMod eq "TRUE"}<li><a href="index.php?page=show_ticket_log&id={$ticket_id}">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&id={$ticket_id}">Show Ticket</a></li>
|
||||
<li class="divider"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--/row-->
|
||||
{/block}
|
||||
|
Loading…
Reference in New Issue