80 lines
3.4 KiB
PHP
80 lines
3.4 KiB
PHP
|
|
<?php
|
||
|
|
if(!defined('OSTADMININC') || !$thisuser->isadmin()) die('Zugriff verweigert');
|
||
|
|
|
||
|
|
$info=($_POST && $errors)?Format::input($_POST):array(); //Re-use the post info on error...savekeyboards.org
|
||
|
|
if($topic && $_REQUEST['a']!='new'){
|
||
|
|
$title='Thema ändern';
|
||
|
|
$action='update';
|
||
|
|
$info=$info?$info:$topic->getInfo();
|
||
|
|
}else {
|
||
|
|
$title='Neues Hilfethema';
|
||
|
|
$action='create';
|
||
|
|
$info['isactive']=isset($info['isactive'])?$info['isactive']:1;
|
||
|
|
}
|
||
|
|
//get the goodies.
|
||
|
|
$depts= db_query('SELECT dept_id,dept_name FROM '.DEPT_TABLE);
|
||
|
|
$priorities= db_query('SELECT priority_id,priority_desc FROM '.TICKET_PRIORITY_TABLE);
|
||
|
|
?>
|
||
|
|
<form action="admin.php?t=topics" method="post">
|
||
|
|
<input type="hidden" name="do" value="<?=$action?>">
|
||
|
|
<input type="hidden" name="a" value="<?=Format::htmlchars($_REQUEST['a'])?>">
|
||
|
|
<input type='hidden' name='t' value='topics'>
|
||
|
|
<input type="hidden" name="topic_id" value="<?=$info['topic_id']?>">
|
||
|
|
<table width="100%" border="0" cellspacing=0 cellpadding=2 class="tform">
|
||
|
|
<tr class="header"><td colspan=2><?=$title?></td></tr>
|
||
|
|
<tr class="subheader">
|
||
|
|
<td colspan=2 >Deaktivieren der automatischen Antwort überschreibt Abteilungseinstellungen.</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th width="20%">Hilfethema:</th>
|
||
|
|
<td><input type="text" name="topic" size=45 value="<?=$info['topic']?>">
|
||
|
|
<font class="error">* <?=$errors['topic']?></font></td>
|
||
|
|
</tr>
|
||
|
|
<tr><th>Themenstatus</th>
|
||
|
|
<td>
|
||
|
|
<input type="radio" name="isactive" value="1" <?=$info['isactive']?'checked':''?> />Aktiv
|
||
|
|
<input type="radio" name="isactive" value="0" <?=!$info['isactive']?'checked':''?> />Inaktiv
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th nowrap>Autom. Antwort:</th>
|
||
|
|
<td>
|
||
|
|
<input type="checkbox" name="noautoresp" value=1 <?=$info['noautoresp']? 'checked': ''?> >
|
||
|
|
<b>Deaktiviert</b> autom. Antworten für dieses Thema. (<i>Überschreibt Abteilungseinstellungen</i>)
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Neue Ticket-Priorität:</th>
|
||
|
|
<td>
|
||
|
|
<select name="priority_id">
|
||
|
|
<option value=0>Priorität wählen</option>
|
||
|
|
<?
|
||
|
|
while (list($id,$name) = db_fetch_row($priorities)){
|
||
|
|
$selected = ($info['priority_id']==$id)?'selected':''; ?>
|
||
|
|
<option value="<?=$id?>"<?=$selected?>><?=$name?></option>
|
||
|
|
<?
|
||
|
|
}?>
|
||
|
|
</select> <font class="error">* <?=$errors['priority_id']?></font>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th nowrap>Neue Ticket-Abteilung:</th>
|
||
|
|
<td>
|
||
|
|
<select name="dept_id">
|
||
|
|
<option value=0>Abteilung wählen</option>
|
||
|
|
<?
|
||
|
|
while (list($id,$name) = db_fetch_row($depts)){
|
||
|
|
$selected = ($info['dept_id']==$id)?'selected':''; ?>
|
||
|
|
<option value="<?=$id?>"<?=$selected?>>Abteilung <?=$name?></option>
|
||
|
|
<?
|
||
|
|
}?>
|
||
|
|
</select> <font class="error">* <?=$errors['dept_id']?></font>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
<div style="padding-left:220px;">
|
||
|
|
<input class="button" type="submit" name="submit" value="Bestätigen">
|
||
|
|
<input class="button" type="reset" name="reset" value="Zurücksetzen">
|
||
|
|
<input class="button" type="button" name="cancel" value="Abbrechen" onClick='window.location.href="admin.php?t=topics"'>
|
||
|
|
</div>
|
||
|
|
</form>
|