diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php index 386ec5ddf..51f88cbed 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php @@ -83,7 +83,7 @@ class Ticket{ * creates a ticket + first initial reply and fills in the content of it! * for_support_group defines to which support group the ticket has to be forwarded */ - public static function create_Ticket( $title, $content, $category, $author, $real_author, $for_support_group = 0) { + public static function create_Ticket( $title, $content, $category, $author, $real_author, $for_support_group = 0, $extra_info = 0) { //create the new ticket! $ticket = new Ticket(); @@ -92,6 +92,12 @@ class Ticket{ $ticket->create(); $ticket_id = $ticket->getTId(); + //if ingame then add an extra info + if(Helpers::check_if_game_client() && $extra_info != 0){ + $extra_info['Ticket'] = $ticket_id; + Ticket_Info::create_Ticket_Info($extra_info); + } + //write a log entry if ( $author == $real_author){ Ticket_Log::createLogEntry( $ticket_id, $author, 1); @@ -104,6 +110,7 @@ class Ticket{ if($for_support_group){ Ticket::forwardTicket(0, $ticket_id, $for_support_group); } + //send email that new ticket has been created Mail_Handler::send_ticketing_mail($ticket->getAuthor(), $ticket, $content, "NEW", $ticket->getForwardedGroupId()); return $ticket_id; diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_info.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_info.php index 25f07440e..67c33bc41 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_info.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_info.php @@ -1,10 +1,9 @@ setTInfoId($values['TInfoId']); $this->setTicket($values['Ticket']); $this->setShardId($values['ShardId']); $this->setUser_Position($values['UserPosition']); @@ -58,6 +57,8 @@ class Ticket_Log{ $this->setCPU_Mask($values['CpuMask']); $this->setHT($values['HT']); $this->setNel3D($values['NeL3D']); + $this->setUser_Id($values['UserId']); + } //Load with tInfoId @@ -78,11 +79,12 @@ class Ticket_Log{ //create ticket info public function create() { - $query = "INSERT INTO ticket_Info (TInfoId, Ticket, ShardId, UserPosition,ViewPosition, ClientVersion, PatchVersion,ServerTick, ConnectState, LocalAddress, Memory, OS, -Processor, CPUID, CpuMask, HT, NeL3D) VALUES (:id, :ticket, :shardid, :userposition, :viewposition, :clientversion, :patchversion, :servertick, :connectstate, :localaddress, :memory, :os, :processor, :cpuid, :cpu_mask, :ht, :nel3d )"; - $values = Array('id' => $this->getTInfoId(), 'ticket' => $this->getTicket(), 'shardid' => $this->getShardId, 'userposition' => $this->getUser_Position(), 'viewposition' => $this->getView_Position(), 'clientversion' => $this->getClient_Version(), + $dbl = new DBLayer("lib"); + $query = "INSERT INTO ticket_info ( Ticket, ShardId, UserPosition,ViewPosition, ClientVersion, PatchVersion,ServerTick, ConnectState, LocalAddress, Memory, OS, +Processor, CPUID, CpuMask, HT, NeL3D, UserId) VALUES ( :ticket, :shardid, :userposition, :viewposition, :clientversion, :patchversion, :servertick, :connectstate, :localaddress, :memory, :os, :processor, :cpuid, :cpu_mask, :ht, :nel3d, :user_id )"; + $values = Array('ticket' => $this->getTicket(), 'shardid' => $this->getShardId(), 'userposition' => $this->getUser_Position(), 'viewposition' => $this->getView_Position(), 'clientversion' => $this->getClient_Version(), 'patchversion' => $this->getPatch_Version(), 'servertick' => $this->getServer_Tick(), 'connectstate' => $this->getConnect_State(), 'localaddress' => $this->getLocal_Address(), 'memory' => $this->getMemory(), 'os'=> $this->getOS(), 'processor' => $this->getProcessor(), 'cpuid' => $this->getCPUId(), -'cpu_mask' => $this->getCpu_Mask(), 'ht' => $this->getHT(), 'nel3d' => $this->getNel3D()); +'cpu_mask' => $this->getCpu_Mask(), 'ht' => $this->getHT(), 'nel3d' => $this->getNel3D(), 'user_id' => $this->getUser_Id()); $dbl->execute($query, $values); } @@ -158,6 +160,11 @@ Processor, CPUID, CpuMask, HT, NeL3D) VALUES (:id, :ticket, :shardid, :userposit return $this->nel3d; } + public function getUser_Id(){ + return $this->user_id; + } + + ////////////////////////////////////////////Setters//////////////////////////////////////////////////// public function setTInfoId($id){ @@ -229,4 +236,9 @@ Processor, CPUID, CpuMask, HT, NeL3D) VALUES (:id, :ticket, :shardid, :userposit $this->nel3d = $n; } + public function setUser_Id($u){ + $this->user_id = $u; + } + + } \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/createticket.tpl b/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/createticket.tpl index dd19fd291..4445fca39 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/createticket.tpl +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/createticket.tpl @@ -58,6 +58,27 @@ + + + {if $ingame} + + + + + + + + + + + + + + + + + + {/if} diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/create_ticket.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/create_ticket.php index af51c6969..5fce2d9de 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/create_ticket.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/create_ticket.php @@ -18,7 +18,7 @@ function create_ticket(){ }else{ $author= Ticket_User::constr_ExternId($_POST['target_id'])->getTUserId(); } - $ticket_id = Ticket::create_Ticket($title, $content, $category, $author, $_SESSION['ticket_user']->getTUserId()); + $ticket_id = Ticket::create_Ticket($title, $content, $category, $author, $_SESSION['ticket_user']->getTUserId(),0, $_POST); header("Location: index.php?page=show_ticket&id=".$ticket_id); exit; diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/inc/createticket.php b/code/ryzom/tools/server/ryzom_ams/www/html/inc/createticket.php index 4c3dce7b8..40b6610ec 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/inc/createticket.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/inc/createticket.php @@ -25,7 +25,13 @@ function createticket(){ } + if(Helpers::check_if_game_client()){ + //get all additional info, which is needed for adding the extra info page + $result[] = $_GET; + $result['ingame'] = true; + } + //create array of category id & names $catArray = Ticket_Category::getAllCategories(); $result['category'] = Gui_Elements::make_table_with_key_is_id($catArray, Array("getName"), "getTCategoryId" ); diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/sql/DBScheme.png b/code/ryzom/tools/server/ryzom_ams/www/html/sql/DBScheme.png index ce876402b..63cb4c92b 100644 Binary files a/code/ryzom/tools/server/ryzom_ams/www/html/sql/DBScheme.png and b/code/ryzom/tools/server/ryzom_ams/www/html/sql/DBScheme.png differ diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php b/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php index 8f8a7868d..b63f0d4d1 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php @@ -396,14 +396,17 @@ `PatchVersion` VARCHAR(65) NULL , `ServerTick` VARCHAR(40) NULL , `ConnectState` VARCHAR(40) NULL , - `LocalAddress` VARCHAR(60) NULL , + `LocalAddress` VARCHAR(70) NULL , `Memory` VARCHAR(60) NULL , - `OS` VARCHAR(70) NULL , - `Processor` VARCHAR(70) NULL , + `OS` VARCHAR(120) NULL , + `Processor` VARCHAR(120) NULL , `CPUID` VARCHAR(50) NULL , `CpuMask` VARCHAR(50) NULL , - `HT` VARCHAR(65) NULL , - `NeL3D` VARCHAR(70) NULL , + `HT` VARCHAR(35) NULL , + `NeL3D` VARCHAR(120) NULL , + `PlayerName` VARCHAR(45) NULL , + `UserId` INT NULL , + `TimeInGame` VARCHAR(50) NULL , PRIMARY KEY (`TInfoId`) , INDEX `fk_ticket_info_ticket1` (`Ticket` ASC) , CONSTRAINT `fk_ticket_info_ticket1` diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsql.sql b/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsql.sql index 36ec38cae..452a8f1d5 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsql.sql +++ b/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsql.sql @@ -352,12 +352,15 @@ CREATE TABLE IF NOT EXISTS `mydb`.`ticket_info` ( `ConnectState` VARCHAR(40) NULL , `LocalAddress` VARCHAR(60) NULL , `Memory` VARCHAR(60) NULL , - `OS` VARCHAR(70) NULL , - `Processor` VARCHAR(70) NULL , + `OS` VARCHAR(120) NULL , + `Processor` VARCHAR(120) NULL , `CPUID` VARCHAR(50) NULL , `CpuMask` VARCHAR(50) NULL , `HT` VARCHAR(65) NULL , - `NeL3D` VARCHAR(70) NULL , + `NeL3D` VARCHAR(120) NULL , + `PlayerName` VARCHAR(45) NULL , + `UserId` INT NULL , + `TimeInGame` VARCHAR(50) NULL , PRIMARY KEY (`TInfoId`) , INDEX `fk_ticket_info_ticket1` (`Ticket` ASC) , CONSTRAINT `fk_ticket_info_ticket1` diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsystemmodel.mwb b/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsystemmodel.mwb index 42d148d17..29fea1b36 100644 Binary files a/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsystemmodel.mwb and b/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsystemmodel.mwb differ