| Server IP : 195.130.67.5 / Your IP : 216.73.216.231 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/msc/sources/ |
Upload File : |
<!-- ###### -->
<h2>@[PAGE_TITLE]</h2>
<?php
global $mCtrl, $docType, $docSubject, $docSender, $docRecipient, $docComments, $butSubmit, $showNewForm, $nextAI;
//var_dump($nextAI);
?>
<script>
$(function() {
// run the currently selected effect
function runEffect() {
// get effect type from
var selectedEffect = 'blind';
// most effect types need no options passed by default
var options = {};
// some effects have required parameters
if ( selectedEffect === "scale" ) {
options = { percent: 0 };
} else if ( selectedEffect === "size" ) {
options = { to: { width: 200, height: 60 } };
}
// run the effect
$( "#effect" ).toggle( selectedEffect, options, 500 );
};
$('#effect').buttonset();
// set effect from select menu value
$( "#button" ).click(function() {
runEffect();
return false;
});
});
</script>
<a href="#" id="button" class="ui-state-default ui-corner-all">Νέα Εγγραφή</a>
<div id="effect" class="ui-widget-content ui-corner-all" style="<?php echo ($showNewForm)? "" : "display: none;" ?> border: solid 1px #808080; background: #EEEEFF; margin: 10px 0px;">
<form name="protocol_form" method="post">
<table>
<tr>
<td colspan="2" align="center" style="font-weight: bold"><h3 class="ui-widget-header ui-corner-all">Καταχώρηση Νέου Πρωτοκόλλου</h3></td>
</tr>
<tr>
<td><b>Αρ.Πρωτ.</b></td>
<td><?php echo $nextAI; ?></td>
</tr>
<tr>
<td width="100">Τύπος:</td>
<td width="500">
<select name="docType">
<option value="1" <?php echo ($docType == 1)? "selected=selected" : "" ?>>Εισερχόμενο</option>
<option value="2" <?php echo ($docType == 2)? "selected=selected" : "" ?>>Εξερχόμενο</option>
</select>
</td>
</tr>
<tr>
<td width="100">Θέμα:</td>
<td width="500"><input type="text" name="docSubject" style="width: 500px" value="<?php echo str_replace("\"", """, $docSubject); ?>"></td>
</tr>
<tr>
<td width="100">Αποστολέας:</td>
<td width="500"><input type="text" name="docSender" style="width: 500px" value="<?php echo str_replace("\"", """, $docSender); ?>"></td>
</tr>
<tr>
<td width="100">Παραλήπτης:</td>
<td width="500"><input type="text" name="docRecipient" style="width: 500px" value="<?php echo str_replace("\"", """, $docRecipient); ?>"></td>
</tr>
<tr>
<td width="100">Παρατηρήσεις:</td>
<td width="500">
<textarea name="docComments" style="width: 500px; height: 80px;"><?php echo trim($docComments, " \r\n\0\x0B\t"); ?></textarea>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" name="butSubmit" value="Καταχώρηση" onclick="return confirm('Θέλετε σίγουρα να καταχωρήσετε στο Πρωτόκολλο;')" >
</td>
</tr>
</table>
</form>
</div>
<?php
$rows = NULL;
$num = 0;
$query = "SELECT * FROM `msc_Applications` WHERE `docType` >= 0 ORDER BY SubmittedOn DESC";
DBUtils::getrows($query, $rows, $num);
if ($num == 0){
?>
<div>
Δεν υπάρχουν εισερχόμενα / εξερχόμενα.
</div>
<?php
}else{
?>
<div>
Υπάρχουν συνολικά <b><?php echo $num; ?></b> εισερχόμενα / εξερχόμενα.
</div>
<style>
.applicationstable {
border-collapse: collapse;
border: solid 1px;
}
.applicationstable th{
border-collapse: collapse;
border: solid 1px;
text-align: center;
font-size: 1.1em;
}
.applicationstable td{
border-collapse: collapse;
border: solid 1px;
}
.applicationstable td a{
display: block;
}
</style>
<table class="applicationstable">
<tr>
<th></th>
<th>Αρ.Πρωτ.</th>
<th>Ημ/νία</th>
<th>Τύπος</th>
<th>Λεπτομέρειες</th>
</tr>
<?php
function getDocType($n){
switch ($n) {
case 0:
return 'Εισερχόμενο<br>(Αίτηση)';
break;
case 1:
return 'Εισερχόμενο';
break;
case 2:
return 'Εξερχόμενο';
break;
default:
return '?';
break;
}
}
while ($row = mysqli_fetch_object($rows)){
//var_dump($row);
Utils::prline("<tr>");
if ($row->docType == 0){
Utils::prline("<td style=\"width: 30px; text-align: center\"><a href=\"report_showapplication.php?id={$row->Id}\"><img src=\"images/open.gif\"></a></td>");
}else{
//Utils::prline("<td style=\"width: 30px; text-align: center\"><a href=\"#showprotocol.php?id={$row->Id}\"><img src=\"images/open.gif\"></a></td>");
Utils::prline("<td></td>");
}
Utils::prline("<td>{$row->Id}</td>");
Utils::prline("<td>{$row->SubmittedOn}</td>");
$docTypeStr = getDocType($row->docType);
Utils::prline("<td>{$docTypeStr}</td>");
if ($row->docType == 0){
Utils::prline("<td><b>Θέμα</b>: OnLine Αίτηση Εγγραφής<br>");
Utils::prline("<b>Αποστολέας</b>: {$row->Surname} {$row->Forname}<br>");
Utils::prline("<b>Παραλήπτης</b>: Γραμματεία ΜΠΣ<br>");
Utils::prline("</td>");
}else{
Utils::prline("<td><b>Θέμα</b>: {$row->docSubject}<br>");
Utils::prline("<b>Αποστολέας</b>: {$row->docSender}<br>");
Utils::prline("<b>Παραλήπτης</b>: {$row->docRecipient}<br>");
$comm = str_replace("\n", "<br>", $row->docComments);
Utils::prline("<b>Παρατηρήσεις</b>: {$comm}</td>");
}
Utils::prline("</tr>");
}
?>
</table>
<?php
}
?>