getTUserId(); }else{ //if a mod tries to make a ticket for someone else $author= Ticket_User::constr_ExternId($_POST['target_id'])->getTUserId(); } //create the ticket & return the id of the newly created ticket. $ticket_id = Ticket::create_Ticket($title, $content, $category, $author, unserialize($_SESSION['ticket_user'])->getTUserId(),0, $_POST); //redirect to the new ticket. if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id); }else{ header("Location: ".$WEBPATH."?page=show_ticket&id=".$ticket_id); } exit; }catch (PDOException $e) { //ERROR: LIB DB is not online! print_r($e); exit; header("Location: index.php"); exit; } }else{ //ERROR: permission denied! $_SESSION['error_code'] = "403"; header("Location: index.php?page=error"); exit; } }else{ //ERROR: The form was not filled in correclty header("Location: index.php?page=create_ticket"); exit; } }else{ //ERROR: user is not logged in header("Location: index.php"); exit; } }