include/client/open.inc.php
<?php
if(!defined('OSTCLIENTINC')) die('Kwaheri rafiki wangu?'); //Say bye to our friend..
$info=($_POST && $errors)?Format:($_POST)(); //on error...use the post data
?>
<?if($errors) {?>
<?=$errors?>
<?}elseif($msg) {?>
<?=$msg?>
<?}elseif($warn) {?>
<?=$warn?>
<?}?>
Please fill in the form below to open a new ticket.
Help Topic:
<?
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
while (list($topicId,$topic) = db_fetch_row($services)){
$selected = ($info==$topicId)?'selected':''; ?>
"<?=$selected?>><?=$topic?>
<?
}?>
* <?=$errors?>
Full Name:
<?if ($thisclient && ($name=$thisclient->getName())) {
?>
"><?=$name?>
<?}else {?>
">
<?}?>
* <?=$errors?>
Email Address:
<?if ($thisclient && ($email=$thisclient->getEmail())) {
?>
"><?=$email?>
<?}else {?>
">
<?}?>
* <?=$errors?>
Account Name:
">
* <?=$errors?>
Paypal/Google Transaction ID:
">
* <?=$errors?>
In-Game Name:
">
* <?=$errors?>
<?
if($cfg->allowPriorityChange() ) {
$sql='SELECT priority_id,priority_desc FROM '.TICKET_PRIORITY_TABLE.' WHERE ispublic=1 ORDER BY priority_urgency DESC';
if(($priorities=db_query($sql)) && db_num_rows($priorities)){ ?>
Priority:
<?
$info=$info?$info:$cfg->getDefaultPriorityId(); //use system's default priority.
while($row=db_fetch_array($priorities)){ ?>
" <?=$info==$row?'selected':''?> ><?=$row?>
<?}?>
<? }
}?>
<?if(($cfg->allowOnlineAttachments() && !$cfg->allowAttachmentsOnlogin())
|| ($cfg->allowAttachmentsOnlogin() && ($thisclient && $thisclient->isValid()))){
?>
Attachment:
<?=$errors?>
<?}?>
open.php
<?php
/*********************************************************************
open.php
New tickets handle.
Peter Rotich
Copyright (c) 2006,2007,2008 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
$Id: $
**********************************************************************/
include('client.inc.php');
define('SOURCE','Web'); //Ticket source.
$inc='open.inc.php'; //default include.
$errors=array();
if($_POST):
if(!$_POST) $errors="required";
if(!$_POST) $errors="required";
if(!$_POST) $errors="required";
endif;
if($_POST):
$_POST="Reward for donation";
$_POST='Name: '.strip_tags($_POST).'\n'.
'Account Name: '.strip_tags($_POST).'\n'.
'Paypal Transaction ID: '.strip_tags($_POST).'\n'.
'In-Game Name: '.strip_tags($_POST);
$_POST=$_POST=0; //Just Making sure we don't accept crap...only topicId is expected.
//Ticket:...checks for errors..
if(($ticket=Ticket:($_POST,$errors,SOURCE))){
$msg='Support ticket request created';
if($thisclient && $thisclient->isValid()) //Logged in...simply view the newly created ticket.
@[deleted]('Location: view.php?id='.$ticket->getExtId());
//Thank the user and promise speedy resolution!
$inc='thankyou.inc.php';
}else{
$errors=$errors?$errors:'Unable to create a ticket. Please correct errors below and try again!';
}
endif;
//page
require(CLIENTINC_DIR.'header.inc.php');
require(CLIENTINC_DIR.$inc);
require(CLIENTINC_DIR.'footer.inc.php');
?>