First Commit

This commit is contained in:
mark committed 2026-10-19 15:22:52 -07:00
1 parent 5eb9dd037d
commit 2e62c0e60b
11877 files changed
+2035312

No files matched your search

+111
View File
@@ -0,0 +1,111 @@
<?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','System Administrator','Application Administrator','Administration Team','Schedule Team');
if (checkPermission($AllowedUserTypes) != 1) {
echo("<br>\n");
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
include "form.messages.php";
return;
}
// Setup default values on insert
if (array_key_exists('supplier_num',$_GET)) $supplier_num = intval($_GET['supplier_num']);
if (array_key_exists('supplier_num',$_POST)) $supplier_num = intval($_POST['supplier_num']);
if (!isset($supplier_num)) {
echo("<br>\n");
$error_message = "Missing supplier number";
include "form.messages.php";
return;
}
$query = "select * from suppliers " .
"where school_num = $supplier_school_num " .
"and record_num = $supplier_num";
$results = db_query($query);
if (db_num_rows($results) == 0) {
echo("<br>\n");
$error_message = "Invalid supplier number - $query";
include "form.messages.php";
return;
}
$supplier = db_fetch_array($results);
$supplier_name = $supplier['supplier_name'];
if ($naction == 'add') {
$log_time = date("Y-m-d H:i:s",time());
$user_num = intval($_SESSION['UserInfo']['record_num']);
}
?>
<br>
<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 - $supplier_name") ?></td>
</tr>
<tr>
<td colspan='2' align='center'>&nbsp;</td>
</tr>
<tr>
<td width='30%' align='right' valign='top'>Log Time: </td>
<td width='70%' align='left' valign='top'><input type='text' name='log_time' id='log_time' value="<?php echo($log_time) ?>" size='20'></td>
</tr>
<tr>
<td align='right' valign='top'>Log Type: </td>
<td align='left' valign='top'>
<select name='log_type'>
<?php BuildFileList("log_types.txt",$log_type) ?>
</select>
</td>
</tr>
<tr>
<td align='right' valign='top'>Log Status: </td>
<td align='left' valign='top'>
<select name='status'>
<?php BuildFileList("log_status.txt",$status) ?>
</select>
</td>
</tr>
<tr>
<td colspan='2'>&nbsp;</td>
</tr>
<tr>
<td align='right' valign='top'>Title: </td>
<td align='left' valign='top'><input type='log_title' name='log_title' id='log_title' value="<?php echo($log_title) ?>" size='50'></td>
</tr>
<tr>
<td align='right' valign='top'>Log Notes: </td>
<td align='left' valign='top'><textarea name='log_notes' rows='5' cols='60'><?php echo($log_notes) ?></textarea></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) ?>'>
<input type='hidden' name='supplier_num' value='<?php echo($supplier_num) ?>'>
<input type='hidden' name='user_num' value='<?php echo($user_num) ?>'>
<br>
<br>
</td>
</tr>
</table>
</form>