|
|
@ -11,6 +11,14 @@ class Ticket{
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////Functions////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*FUNCTION: getStatusArray
|
|
|
|
|
|
|
|
* returns all possible statusses
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static function getStatusArray() {
|
|
|
|
|
|
|
|
return Array("Waiting on user reply","Waiting on support","Waiting on Dev reply","Closed");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*FUNCTION: getEntireTicket
|
|
|
|
/*FUNCTION: getEntireTicket
|
|
|
|
* return all ticket of the given author's id.
|
|
|
|
* return all ticket of the given author's id.
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -54,7 +62,7 @@ class Ticket{
|
|
|
|
public static function create_Ticket( $title, $content, $category, $author) {
|
|
|
|
public static function create_Ticket( $title, $content, $category, $author) {
|
|
|
|
|
|
|
|
|
|
|
|
$ticket = new Ticket();
|
|
|
|
$ticket = new Ticket();
|
|
|
|
$ticket->set($title,0,0,$category,$author);
|
|
|
|
$ticket->set($title,1,0,$category,$author);
|
|
|
|
$ticket->create();
|
|
|
|
$ticket->create();
|
|
|
|
$ticket_id = $ticket->getTId();
|
|
|
|
$ticket_id = $ticket->getTId();
|
|
|
|
Ticket_Reply::createReply($content, $author, $ticket_id);
|
|
|
|
Ticket_Reply::createReply($content, $author, $ticket_id);
|
|
|
@ -128,15 +136,8 @@ class Ticket{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function getStatusText(){
|
|
|
|
public function getStatusText(){
|
|
|
|
$statusId = $this->getStatus();
|
|
|
|
$statusArray = Ticket::getStatusArray();
|
|
|
|
if ($statusId == 0){
|
|
|
|
return $statusArray[$this->getStatus()];
|
|
|
|
return "Waiting on support..";
|
|
|
|
|
|
|
|
}else if($statusId == 1){
|
|
|
|
|
|
|
|
return "Being handled..";
|
|
|
|
|
|
|
|
}else if($statusId == 2){
|
|
|
|
|
|
|
|
return "Closed";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return "Error";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function getCategoryName(){
|
|
|
|
public function getCategoryName(){
|
|
|
|