92 lines
2.9 KiB
PHP
92 lines
2.9 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
|
|
// Ensure that only valid user types have access to this module
|
|
$AllowedUserTypes = array('SuperUser');
|
|
if (checkPermission($AllowedUserTypes) != 1) {
|
|
echo("<br>\n");
|
|
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
|
include "form.messages.php";
|
|
return;
|
|
}
|
|
|
|
|
|
// Setup default values on insert
|
|
if ($naction == 'add') {
|
|
$initTableName = $CurrentTable;
|
|
$tarray = initializeTableArray($initTableName);
|
|
extract($tarray, EXTR_OVERWRITE);
|
|
$level = 'System Administrator';
|
|
$display = 'Y';
|
|
}
|
|
|
|
?>
|
|
<br>
|
|
<link href="summernote/summernote-lite.min.css" rel="stylesheet">
|
|
<script language="JavaScript" type="text/javascript" src="summernote/summernote-lite.min.js"></script>
|
|
<script src="summernote/summernote-image-attributes.js"></script>
|
|
<script src="summernote/lang/en-us.js"></script>
|
|
<form method='post' action='/'>
|
|
<?php
|
|
$message_width = $default_form_width;
|
|
include "form.messages.php";
|
|
?>
|
|
<table width='<?php echo($default_form_width) ?>' class='content-table'>
|
|
<tr>
|
|
<td colspan='2' align='center' class='heading'><?php echo($PageTitle) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan='2' align='center'> </td>
|
|
</tr>
|
|
<tr>
|
|
<td width='30%' align='right' valign='top'>Document Title: </td>
|
|
<td width='70%' align='left' valign='top'><input type='text' name='title' id='title' value="<?php echo(str_replace('"',""",$title)) ?>" size='50'></td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right' valign='top'>Category: </td>
|
|
<td align='left' valign='top'>
|
|
<select name='category_num'>
|
|
<?php BuildDBList("help_categories","record_num","category","sequence",$category_num) ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right' valign='top'>Keywords: </td>
|
|
<td align='left' valign='top'><input type='text' name='keywords' id='keywords' value="<?php echo($keywords) ?>" size='50'></td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right' valign='top'>Help Level: </td>
|
|
<td align='left' valign='top'>
|
|
<?php BuildFileRadio("help_levels.txt","level",$level) ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan='2' align='left' valign='top'> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan='2' align='center' valign='top'>
|
|
<br>
|
|
<textarea cols='150' rows='10' id='content' name='content' class='content'><?php echo($content) ?></textarea>
|
|
<?php include "summernote.images.php" ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan='2' align='center'>
|
|
<br>
|
|
<input type='submit' class='btn btn--primary' value="<?php echo($ButtonText) ?>">
|
|
<input type='hidden' name='action' value='<?php echo($action) ?>'>
|
|
<input type='hidden' name='naction' value='<?php echo($next_naction) ?>'>
|
|
<input type='hidden' name='record_num' value='<?php echo($record_num) ?>'>
|
|
<br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|