2
if(!defined('OSTCLIENTINC')) die(_('Kwaheri rafiki!')); //Say bye to our friend..
4
$info=($_POST && $errors)?Format::input($_POST):array(); //on error...use the post data
7
<?if($errors['err']) {?>
8
<p align="center" id="errormessage"><?=$errors['err']?></p>
10
<p align="center" id="infomessage"><?=$msg?></p>
12
<p id="warnmessage"><?=$warn?></p>
15
<div><?= _('Please fill in the form below to open a new ticket.')?></div><br>
16
<form action="open.php" method="POST" enctype="multipart/form-data">
17
<table align="left" cellpadding=2 cellspacing=1 width="90%">
19
<th width="20%"><?= _('Full Name:')?></th>
21
<?if ($thisclient && ($name=$thisclient->getName())) {
23
<input type="hidden" name="name" value="<?=$name?>"><?=$name?>
25
<input type="text" name="name" size="25" value="<?=$info['name']?>">
27
<font class="error">* <?=$errors['name']?></font>
31
<th nowrap ><?= _('Email Address:')?></th>
33
<?if ($thisclient && ($email=$thisclient->getEmail())) {
35
<input type="hidden" name="email" size="25" value="<?=$email?>"><?=$email?>
37
<input type="text" name="email" size="25" value="<?=$info['email']?>">
39
<font class="error">* <?=$errors['email']?></font>
43
<td><?= _('Telephone:')?></td>
44
<td><input type="text" name="phone" size="25" value="<?=$info['phone']?>">
45
Ext <input type="text" name="phone_ext" size="6" value="<?=$info['phone_ext']?>">
46
<font class="error"> <?=$errors['phone']?></font></td>
48
<tr height=2px><td align="left" colspan=2 > </td</tr>
50
<th><?= _('Help Topic:')?></th>
52
<select name="topicId">
53
<option value="" selected >Select One</option>
55
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
56
if($services && db_num_rows($services)) {
57
while (list($topicId,$topic) = db_fetch_row($services)){
58
$selected = ($info['topicId']==$topicId)?'selected':''; ?>
59
<option value="<?=$topicId?>"<?=$selected?>><?=$topic?></option>
63
<option value="0" ><?= _('General Inquiry')?></option>
66
<font class="error">* <?=$errors['topicId']?></font>
70
<th><?= _('Subject:')?></th>
72
<input type="text" name="subject" size="35" value="<?=$info['subject']?>">
73
<font class="error">* <?=$errors['subject']?></font>
77
<th valign="top"><?= _('Message:')?></th>
79
<? if($errors['message']) {?> <font class="error"><b> <?=$errors['message']?></b></font><br/><?}?>
80
<textarea name="message" cols="35" rows="8" wrap="soft" style="width:85%"><?=$info['message']?></textarea></td>
83
if($cfg->allowPriorityChange() ) {
84
$sql='SELECT priority_id,priority_desc FROM '.TICKET_PRIORITY_TABLE.' WHERE ispublic=1 ORDER BY priority_urgency DESC';
85
if(($priorities=db_query($sql)) && db_num_rows($priorities)){ ?>
87
<td><?= _('Priority:')?></td>
91
$info['pri']=$info['pri']?$info['pri']:$cfg->getDefaultPriorityId(); //use system's default priority.
92
while($row=db_fetch_array($priorities)){ ?>
93
<option value="<?=$row['priority_id']?>" <?=$info['pri']==$row['priority_id']?'selected':''?> ><?=$row['priority_desc']?></option>
101
<?if(($cfg->allowOnlineAttachments() && !$cfg->allowAttachmentsOnlogin())
102
|| ($cfg->allowAttachmentsOnlogin() && ($thisclient && $thisclient->isValid()))){
106
<td><?= _('Attachment:')?></td>
108
<input type="file" name="attachment"><font class="error"> <?=$errors['attachment']?></font>
112
<?if($cfg && $cfg->enableCaptcha() && (!$thisclient || !$thisclient->isValid())) {
113
if($_POST && $errors && !$errors['captcha'])
114
$errors['captcha']='Please re-enter the text again';
117
<th valign="top"><?= _('Captcha Text:')?></th>
118
<td><img src="captcha.php" border="0" align="left">
119
<span> <input type="text" name="captcha" size="7" value=""> <i><?= _('Enter the text shown on the image.')?></i></span><br/>
120
<font class="error"> <?=$errors['captcha']?></font>
124
<tr height=2px><td align="left" colspan=2 > </td</tr>
128
<input class="button" type="submit" name="submit_x" value="<?= _('Submit Ticket')?>">
129
<input class="button" type="reset" value="<?= _('Reset')?>">
130
<input class="button" type="button" name="cancel" value="<?= _('Cancel')?>" onClick='window.location.href="index.php"'>