Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.133.153.232
Current Path : /var/www/html/oums/ |
| Current File : /var/www/html/oums/documents.php |
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="assets/datepicker/grid/js/themes/redmond/jquery-ui.custom.css">
<link rel="stylesheet" type="text/css" media="screen" href="assets/datepicker/grid/js/jqgrid/css/ui.jqgrid.css">
<script src="assets/datepicker/grid/js/jquery.min.js" type="text/javascript"></script>
<script src="assets/datepicker/grid/js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
<script src="js/documents.js" type="text/javascript"></script>
</head>
<body onLoad="load_page();">
<?php include("header.php"); ?>
<div id="page-middle">
<div class="page-container panel panel-primary">
<div class="page-container-head panel-heading">
<div id="page-container-titl" class="pull-left"></div>
<div id="page-container-link" class="pull-right"></div>
<div class="clearfix"></div>
</div>
<div id="page-container-body" class="panel-body">
<div id="page-container-main">
<table style="width:100%;">
<tr>
<td style="width:40%;">
<?php
if ($type_id == 'ADMIN') {
} else {
$user_dept = " inner join masdept_user du on dp.fdeptcode = du.fdeptcode and du.fusercode='$user_id' ";
}
echo "<select class='form-input' id='seldeptcode' onChange='load_grid_data(20,1);'>";
$mysql = "select distinct dp.fdeptcode,dp.fdeptname from masdept dp
inner join documents dc on dp.fdeptcode = dc.fdeptcode
" . $user_dept . "
where fdeptstat='T' and ifnull(dp.fdeleted,'F')<>'T' order by fdeptname";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) == 0) {
echo "<option value='%%'>NONE [CLIENT]</option>";
} elseif (mysqli_num_rows($myres) > 1) {
echo "<option value='%%'>ALL [CLIENTS]</option>";
}
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "<option value='$myrow[fdeptcode]'>$myrow[fdeptname]</option>";
}
echo "</select>";
?>
</td>
<td style="width:30%;">
<select class="form-input" id="seldocstype" onChange="load_grid_data(20,1);" style="width:100%;">
<option value="%">ALL [TYPES]</option>
</select>
</td>
<td style="width:30%;">
<input type="text" id="txtdocsfind" class="form-input" onInput="load_grid_data(20,1);" placeholder="Search documents">
</td>
</tr>
</table>
</div>
<div id="page-container-grid"></div>
<div id="page-container-form" class="form-horizontal">
<div id="lblpagemode" class="page_mode"></div>
<input type="hidden" id="txtpagemode" readonly="readonly" />
<input type="hidden" id="txtdocscode" style="text-align:center; width:auto;" />
<div class="panel panel-primary" style="width:1024px;margin-left:auto;margin-right:auto;">
<div class="panel-heading">Document Details</div>
<div class="panel-body" style="position: relative;">
<div class="form-group">
<label for="" class="col-sm-2 control-label">Client</label>
<div class="col-sm-10">
<?php
echo "<select class='form-input' id='txtdeptcode'>";
if ($type_id == 'ADMIN') {
$mysql = "select * from masdept where fdeptstat='T' and fdeleted<>'T' order by fdeptname";
} elseif ($type_id == 'CHIEF') {
$mysql = "select * from masdept dp
inner join masdept_user du on dp.fdeptcode = du.fdeptcode and du.fusercode='$user_id'
where fdeptstat='T' and fdeleted<>'T' order by fdeptname";
} else {
$mysql = "select * from masdept dp
inner join masdept_user du on dp.fdeptcode = du.fdeptcode and du.fusercode='$user_id'
where fdeptstat='T' and fdeleted<>'T' order by fdeptname";
}
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 1) {
echo "<option value=''>--SELECT--</option>";
}
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "<option value='$myrow[fdeptcode]'>$myrow[fdeptname]</option>";
}
echo "</select>";
?>
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label">Document Date</label>
<div class="col-sm-2">
<input type="text" class="form-control text-center text-uppercase" id="txtdocsdate" maxlength="10" />
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label">Document Type</label>
<div class="col-sm-4">
<?php
echo "<select class='form-input' id='txtdocstype'>";
$mysql = "select * from documents_type where ifnull(fdeleted,'F')<>'T' order by ftypeordr, fdocstype";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 1) {
echo "<option value=''>--SELECT--</option>";
}
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "<option value='$myrow[fdocstype]'>$myrow[fdocstype]</option>";
}
echo "</select>";
?>
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label">Description</label>
<div class="col-sm-10">
<textarea id="txtdocsdesc" class="form-control" rows="4"></textarea>
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label">Upload File</label>
<div class="col-sm-10">
<span style="display: inline-flex; width: 100%;">
<input type="button" id="btndocsfile" class="btn btn-primary" value="Browse" onClick="brow_file_path();" />
<input type="text" id="txtdocsfile" class="form-input" placeholder="File Name..." readonly>
</span>
</div>
<div class="col-sm-2 hidden">
<input type="file" id="fildocsfile" class="form-control" style="width:0px; visibility:hidden;" />
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label">User Access</label>
<div class="col-sm-4">
<?php
echo "<select class='form-input' id='txtusertype'>";
$mysql = "select * from sys_user_type order by fuserordr";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 1) {
echo "<option value=0>ALL USERS</option>";
}
while ($row = mysqli_fetch_assoc($myres)) {
echo "<option value='$row[fusertype]'>$row[ftypedesc]</option>";
}
echo "</select>";
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
|