help.verua.ch/include/staff/topic.inc.php

80 lines
3.4 KiB
PHP
Raw Normal View History

2026-01-05 08:46:20 +01:00
<?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 &auml;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 &uuml;berschreibt Abteilungseinstellungen.</td>
</tr>
<tr>
<th width="20%">Hilfethema:</th>
<td><input type="text" name="topic" size=45 value="<?=$info['topic']?>">
&nbsp;<font class="error">*&nbsp;<?=$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&uuml;r dieses Thema. (<i>&Uuml;berschreibt Abteilungseinstellungen</i>)
</td>
</tr>
<tr>
<th>Neue Ticket-Priorit&auml;t:</th>
<td>
<select name="priority_id">
<option value=0>Priorit&auml;t w&auml;hlen</option>
<?
while (list($id,$name) = db_fetch_row($priorities)){
$selected = ($info['priority_id']==$id)?'selected':''; ?>
<option value="<?=$id?>"<?=$selected?>><?=$name?></option>
<?
}?>
</select>&nbsp;<font class="error">*&nbsp;<?=$errors['priority_id']?></font>
</td>
</tr>
<tr>
<th nowrap>Neue Ticket-Abteilung:</th>
<td>
<select name="dept_id">
<option value=0>Abteilung w&auml;hlen</option>
<?
while (list($id,$name) = db_fetch_row($depts)){
$selected = ($info['dept_id']==$id)?'selected':''; ?>
<option value="<?=$id?>"<?=$selected?>>Abteilung <?=$name?></option>
<?
}?>
</select>&nbsp;<font class="error">*&nbsp;<?=$errors['dept_id']?></font>
</td>
</tr>
</table>
<div style="padding-left:220px;">
<input class="button" type="submit" name="submit" value="Best&auml;tigen">
<input class="button" type="reset" name="reset" value="Zur&uuml;cksetzen">
<input class="button" type="button" name="cancel" value="Abbrechen" onClick='window.location.href="admin.php?t=topics"'>
</div>
</form>