134 lines
5.4 KiB
PHP
134 lines
5.4 KiB
PHP
<?php
|
|
if(!defined('OSTCLIENTINC')) die('Kwaheri rafiki!'); //Say bye to our friend..
|
|
|
|
$info=($_POST && $errors)?Format::input($_POST):array(); //on error...use the post data
|
|
?>
|
|
<div>
|
|
<?if($errors['err']) {?>
|
|
<p align="center" id="errormessage"><?=$errors['err']?></p>
|
|
<?}elseif($msg) {?>
|
|
<p align="center" id="infomessage"><?=$msg?></p>
|
|
<?}elseif($warn) {?>
|
|
<p id="warnmessage"><?=$warn?></p>
|
|
<?}?>
|
|
</div>
|
|
<div>Bitte füllen Sie das Formular aus, um ein Ticket zu erstellen.</div><br>
|
|
<form action="open.php" method="POST" enctype="multipart/form-data">
|
|
<table align="left" cellpadding=2 cellspacing=1 width="90%">
|
|
<tr>
|
|
<th width="20%">Vollständiger Name:</th>
|
|
<td>
|
|
<?if ($thisclient && ($name=$thisclient->getName())) {
|
|
?>
|
|
<input type="hidden" name="name" value="<?=$name?>"><?=$name?>
|
|
<?}else {?>
|
|
<input type="text" name="name" size="25" value="<?=$info['name']?>">
|
|
<?}?>
|
|
<font class="error">* <?=$errors['name']?></font>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th nowrap >Email-Adresse:</th>
|
|
<td>
|
|
<?if ($thisclient && ($email=$thisclient->getEmail())) {
|
|
?>
|
|
<input type="hidden" name="email" size="25" value="<?=$email?>"><?=$email?>
|
|
<?}else {?>
|
|
<input type="text" name="email" size="25" value="<?=$info['email']?>">
|
|
<?}?>
|
|
<font class="error">* <?=$errors['email']?></font>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Telefon:</td>
|
|
<td><input type="text" name="phone" size="25" value="<?=$info['phone']?>">
|
|
Durchwahl <input type="text" name="phone_ext" size="6" value="<?=$info['phone_ext']?>">
|
|
<font class="error"> <?=$errors['phone']?></font></td>
|
|
</tr>
|
|
<tr height=2px><td align="left" colspan=2 > </td</tr>
|
|
<tr>
|
|
<th>Thema:</th>
|
|
<td>
|
|
<select name="topicId">
|
|
<option value="" selected >bitte wählen...</option>
|
|
<?
|
|
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
|
|
if($services && db_num_rows($services)) {
|
|
while (list($topicId,$topic) = db_fetch_row($services)){
|
|
$selected = ($info['topicId']==$topicId)?'selected':''; ?>
|
|
<option value="<?=$topicId?>"<?=$selected?>><?=$topic?></option>
|
|
<?
|
|
}
|
|
}else{?>
|
|
<option value="0" >keine Zuordnung</option>
|
|
<?}?>
|
|
</select>
|
|
<font class="error">* <?=$errors['topicId']?></font>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Betreff:</th>
|
|
<td>
|
|
<input type="text" name="subject" size="35" value="<?=$info['subject']?>">
|
|
<font class="error">* <?=$errors['subject']?></font>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th valign="top">Nachricht:</th>
|
|
<td>
|
|
<? if($errors['message']) {?> <font class="error"><b> <?=$errors['message']?></b></font><br/><?}?>
|
|
<textarea name="message" cols="35" rows="8" wrap="soft" style="width:85%"><?=$info['message']?></textarea></td>
|
|
</tr>
|
|
<?
|
|
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)){ ?>
|
|
<tr>
|
|
<td>Priorität:</td>
|
|
<td>
|
|
<select name="pri">
|
|
<?
|
|
$info['pri']=$info['pri']?$info['pri']:$cfg->getDefaultPriorityId(); //use system's default priority.
|
|
while($row=db_fetch_array($priorities)){ ?>
|
|
<option value="<?=$row['priority_id']?>" <?=$info['pri']==$row['priority_id']?'selected':''?> ><?=$row['priority_desc']?></option>
|
|
<?}?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<? }
|
|
}?>
|
|
|
|
<?if(($cfg->allowOnlineAttachments() && !$cfg->allowAttachmentsOnlogin())
|
|
|| ($cfg->allowAttachmentsOnlogin() && ($thisclient && $thisclient->isValid()))){
|
|
|
|
?>
|
|
<tr>
|
|
<td>Anhang:</td>
|
|
<td>
|
|
<input type="file" name="attachment"><font class="error"> <?=$errors['attachment']?></font>
|
|
</td>
|
|
</tr>
|
|
<?}?>
|
|
<?if($cfg && $cfg->enableCaptcha() && (!$thisclient || !$thisclient->isValid())) {
|
|
if($_POST && $errors && !$errors['captcha'])
|
|
$errors['captcha']='Bitte geben Sie den Text erneut ein';
|
|
?>
|
|
<tr>
|
|
<th valign="top">Captcha Text:</th>
|
|
<td><img src="captcha.php" border="0" align="left">
|
|
<span> <input type="text" name="captcha" size="7" value=""> <i>Geben Sie bitte die Zeichen aus dem Bild ein.</i></span><br/>
|
|
<font class="error"> <?=$errors['captcha']?></font>
|
|
</td>
|
|
</tr>
|
|
<?}?>
|
|
<tr height=2px><td align="left" colspan=2 > </td</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>
|
|
<input class="button" type="submit" name="submit_x" value="Ticket senden">
|
|
<input class="button" type="reset" value="Zurücksetzen">
|
|
<input class="button" type="button" name="cancel" value="Abbrechen" onClick='window.location.href="index.php"'>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|