Compare commits
12 Commits
v0.16-beta
...
v0.18-beta
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b4dcefd7e | |||
| 658b5ca9bb | |||
| 89f18304d3 | |||
| 454b736647 | |||
| 4b679cc17d | |||
| e81f92a0bf | |||
| 957b50de20 | |||
| 044596271f | |||
| 9745ad620f | |||
| 3083aabb3d | |||
| 34c531b74c | |||
| c4e0fcc8c4 |
@@ -127,7 +127,7 @@
|
||||
<!-- MENU FOR ALL LOGGED IN - BOTTOM END -->
|
||||
</ul>
|
||||
<ul class="navbar-nav mr-sm-2">
|
||||
<li class="nav-item"><a class="nav-link<?php $sname=$SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_name"]; if($sname=="NOSITE") { echo " btn btn-sm btn-outline-warning"; } else { echo " btn btn-sm btn-outline-secondary"; }; ?>" href="#" data-toggle="modal" data-target="#sitetimeModal"><i class="fas fa-map-marker-alt"></i> <?php if ($sname=="NOSITE") {echo $transLang['NOSITE'];} else { echo $sname; } ?></a></li>
|
||||
<li class="nav-item"><a class="nav-link<?php $sname=$SiteInfo->getSite($siteid, "0", "0", "0")[0]["sites_name"]; if($sname=="NOSITE") { echo " btn btn-sm btn-outline-warning"; } else { echo " btn btn-sm btn-outline-secondary"; }; ?>" href="#" data-toggle="modal" data-target="#sitetimeModal"><i class="fas fa-map-marker-alt"></i> <?php if ($sname=="NOSITE") {echo $transLang['NOSITE'];} else { echo $sname; } ?></a></li>
|
||||
<li class="nav-item<?php if ($app_current_pagename==$transLang['LOGOUT']): echo " active"; endif; ?>"><a class="nav-link btn btn-sm btn-outline-danger" href="logout.php"><i class="fas fa-ban"></i> <?php echo $transLang['LOGOUT']; ?></a></li>
|
||||
<?php endif; ?>
|
||||
<form action="changelang.php" method="post" name="changelang" class="changelang">
|
||||
@@ -162,9 +162,8 @@
|
||||
<button class="btn btn-outline-secondary" type="button"><?php echo $transLang['CHOOSE']; ?></button>
|
||||
</div>
|
||||
<select class="custom-select" id="site" aria-label="Site" name="site" required>
|
||||
<option value="<?php if (isset($siteid)) { echo $SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_name"]; } else { echo ""; } ?>" selected><?php if (isset($siteid)) { if ($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_name"]=="NOSITE") {echo $transLang['NOSITE'];} else { echo $SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_name"]; } } else { echo "- - -"; } ?></option>
|
||||
<?php foreach($SiteInfo->getSite("0", $uid, "0", "0") as $row): ?>
|
||||
<option value="<?php echo $row['sites_id']; ?>"><?php if ($row['sites_name']=="NOSITE") {echo $transLang['NOSITE'];} else { echo $row['sites_name']; } ?></option>
|
||||
<option value="<?php echo $row['sites_id']; ?>"<?php if ($row['sites_id']==$siteid) { echo " selected"; } ?>><?php if ($row['sites_name']=="NOSITE") {echo $transLang['NOSITE'];} else { echo $row['sites_name']; } ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input class="btn" type="submit" value="<?php echo $transLang['SAVE']; ?>" />
|
||||
|
||||
12
index.php
12
index.php
@@ -154,7 +154,7 @@
|
||||
<table class="table">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th><?php echo $transLang['TIMEREASON']; ?></th><th><?php echo $transLang['NAME']; ?></th><th><?php echo $transLang['ESCORT']; ?></th><th><?php echo $transLang['VALIDATIONS']; ?></th><th><?php echo $transLang['BADGEINITIALS']; ?></th><th><?php echo $transLang['ACTIONS']; ?></th><th> </th>
|
||||
<th><?php echo $transLang['TIMEREASON']; ?></th><th><?php echo $transLang['NAME']; ?></th><th><?php echo $transLang['ESCORT']; ?></th><th><?php echo $transLang['VALIDATIONS']; ?></th><th><?php echo $transLang['BADGEINITIALS']; ?></th><?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?><th><?php echo $transLang['CARNUM'] . " / " . $transLang['SSANUM']; ?></th><?php }; ?><th><?php echo $transLang['ACTIONS']; ?></th><th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -163,6 +163,8 @@
|
||||
$timein = new DateTime($row['visits_intime'], new DateTimeZone('UTC'));
|
||||
$timein->setTimezone(new DateTimeZone("$timezone"));
|
||||
$timein_disp = $timein->format('Y-m-d H:i:s');
|
||||
if(!empty($row['visits_carnum'])) { $carnum=$row['visits_carnum']; } else { $carnum="";};
|
||||
if(!empty($row['visits_ssanum'])) { $ssanum=$row['visits_ssanum']; } else { $ssanum="";};
|
||||
?>
|
||||
<?php if($row['visits_approved']==2) { ?>
|
||||
<tr class="alert alert-success">
|
||||
@@ -191,6 +193,9 @@
|
||||
<?php }; ?>
|
||||
</td>
|
||||
<td><input type="text" id="badge" name="badge" class="form-control" autofocus disabled value="<?php echo $row['visits_badge']; ?>"> <input type="text" id="initials" name="initials" class="form-control" autofocus disabled value="<?php echo $row['visits_initials']; ?>"></td>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<td><?php echo $carnum; ?> / <?php echo $ssanum; ?></td>
|
||||
<?php }; ?>
|
||||
<td> </td>
|
||||
<td><button type="submit" name="endvisit" value="<?php echo $row['visits_id']; ?>" class="btn btn-warning btn-block"><i class="fas fa-sign-out-alt"></i> <?php echo $transLang['SIGNOUT']; ?></button><br>
|
||||
<div>
|
||||
@@ -212,7 +217,7 @@
|
||||
<option value="<?php echo $row['idtypes_id']; ?>"><?php echo $transLang[$row['idtypes_name']]; ?></option><?php endforeach; ?>
|
||||
</select>
|
||||
<div class="invalid-feedback"><?php echo $transLang['REQUIRED']; ?></div>
|
||||
<input class="form-check-input" type="checkbox" value="1" id="id_checked" name="id_checked">
|
||||
<input class="form-check-input" type="checkbox" value="1" id="id_checked" name="id_checked" required>
|
||||
<label class="form-check-label" for="id_checked"><?php echo $transLang['ID_CHECKED']; ?></label><br>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { ?>
|
||||
<input class="form-check-input" type="checkbox" value="1" id="citizen" name="citizen">
|
||||
@@ -224,6 +229,9 @@
|
||||
<input type="text" id="initials" name="initials" class="form-control<?php if( isset($initials_error) && $initials_error == "1" && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" placeholder="<?php echo $transLang['INITIALS']; ?>" autofocus maxlength="5">
|
||||
<div class="invalid-feedback"><?php echo $transLang['REQUIRED']; ?></div>
|
||||
</td>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<td><?php echo $carnum; ?> / <?php echo $ssanum; ?></td>
|
||||
<?php }; ?>
|
||||
<td>
|
||||
<button type="submit" name="approvevisit" value="<?php echo $visitid; ?>" class="btn btn-success btn-block"><i class="fas fa-thumbs-up"></i> <?php echo $transLang['APPROVE']; ?></button><br /><button type="submit" name="voidvisit" value="<?php echo $visitid; ?>" class="btn btn-danger btn-block" onsubmit="return confirm('<?php echo $transLang['VOID_WARNING']; ?>')"><i class="fas fa-thumbs-down"></i> <?php echo $transLang['VOID']; ?></button>
|
||||
</td>
|
||||
|
||||
16
reports.php
16
reports.php
@@ -133,11 +133,11 @@
|
||||
<?php if ($_POST['reporttype'] == "Default"): ?>
|
||||
<div class="container-fluid">
|
||||
<table id="report" class="table table-striped table-bordered">
|
||||
<thead><tr><th><?php echo $transLang['IN']; ?></th><th><?php echo $transLang['OUT']; ?></th><th><?php echo $transLang['SITE']; ?></th><th><?php echo $transLang['COMPANY']; ?></th><th><?php echo $transLang['REASON']; ?></th><th><?php echo $transLang['NAME']; ?></th><th><?php echo $transLang['ESCORT']; ?></th><th><?php echo $transLang['BADGE']; ?></th><th><?php echo $transLang['INITIALS']; ?></th><?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?><th><?php echo $transLang['CITIZEN']; ?></th><?php }; ?><th><?php echo $transLang['ID_TYPE']; ?></th><th><?php echo $transLang['ID_CHECKED']; ?></th></tr></thead>
|
||||
<thead><tr><th><?php echo $transLang['IN']; ?></th><th><?php echo $transLang['OUT']; ?></th><th><?php echo $transLang['SITE']; ?></th><th><?php echo $transLang['COMPANY']; ?></th><th><?php echo $transLang['REASON']; ?></th><th><?php echo $transLang['NAME']; ?></th><th><?php echo $transLang['ESCORT']; ?></th><th><?php echo $transLang['BADGE']; ?></th><th><?php echo $transLang['INITIALS']; ?></th><?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?><th><?php echo $transLang['CARNUM']; ?></th><th><?php echo $transLang['SSANUM']; ?></th><?php } ?><?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?><th><?php echo $transLang['CITIZEN']; ?></th><?php } ?><th><?php echo $transLang['ID_TYPE']; ?></th><th><?php echo $transLang['ID_CHECKED']; ?></th></tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$approval = "2";
|
||||
if ($_POST['repsite'] == "all") { $selsite="%"; } else { $selsite=$_POST['repsite'];};
|
||||
if ($_POST['repsite'] == "all") { $selsite="%"; } else { $selsite=$_POST['repsite'];}
|
||||
foreach ($VisitInfo->getVisitInfo($selsite, $approval, "%", "%", "%", $_POST['starttime'], $_POST['endtime'], "%", "%") as $row):
|
||||
$timein = new DateTime($row['visits_intime'], new DateTimeZone('UTC'));
|
||||
$timeout = new DateTime($row['visits_outtime'], new DateTimeZone('UTC'));
|
||||
@@ -145,10 +145,12 @@
|
||||
$timeout->setTimezone(new DateTimeZone("$timezone"));
|
||||
$timein_disp = $timein->format('Y-m-d H:i:s');
|
||||
$timeout_disp = $timeout->format('Y-m-d H:i:s');
|
||||
if(!empty($row['visits_carnum'])) { $carnum=$row['visits_carnum']; } else { $carnum="";}
|
||||
if(!empty($row['visits_ssanum'])) { $ssanum=$row['visits_ssanum']; } else { $ssanum="";}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $timein_disp; ?></td>
|
||||
<td><?php if (!empty($row['visits_outtime'])) {echo $timeout_disp; } else {echo $transLang['IN'];}; ?></td>
|
||||
<td><?php if (!empty($row['visits_outtime'])) {echo $timeout_disp; } else {echo $transLang['IN'];} ?></td>
|
||||
<td><?php echo $SiteInfo->getSite($row['visits_site_id'], $uid, "0", "0")[0]["sites_name"]; ?></td>
|
||||
<td><?php echo $row['visits_company']; ?></td>
|
||||
<td><?php echo $transLang[$VisitTypeInfo->getVisitTypeInfo($row['visits_reason'])[0]['visittypes_name']]; ?></td>
|
||||
@@ -156,9 +158,13 @@
|
||||
<td><?php if (!empty($row['visits_escort'])) {echo $row['visits_escort'] . '<br /><img src="' . $row['visits_escort_signature'] . '" width="200" height="50" alt="Escort Signature" />'; } ?></td>
|
||||
<td><?php echo $row['visits_badge']; ?></td>
|
||||
<td><?php echo $row['visits_initials']; ?></td>
|
||||
<?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?> <td><?php if($row['visits_citizen']==1) { echo $transLang['YESYES']; } else { echo $transLang['NONO']; }; ?></td> <?php }; ?>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<td><?php echo $carnum; ?></td>
|
||||
<td><?php echo $ssanum; ?></td>
|
||||
<?php } ?>
|
||||
<?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?> <td><?php if($row['visits_citizen']==1) { echo $transLang['YESYES']; } else { echo $transLang['NONO']; } ?></td> <?php } ?>
|
||||
<td><?php echo $transLang[$IDTypeInfo->getIDTypeInfo($row['visits_id_type'])[0]['idtypes_name']]; ?></td>
|
||||
<td><?php if($row['visits_id_checked']==1) { echo $transLang['YESYES']; } else { echo $transLang['NONO']; }; ?></td>
|
||||
<td><?php if($row['visits_id_checked']==1) { echo $transLang['YESYES']; } else { echo $transLang['NONO']; } ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
||||
114
signin.php
114
signin.php
@@ -56,7 +56,7 @@
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" action="signin_display.php" method="post">
|
||||
<form name="form-signin" class="form-signin" action="signin_2.php" method="post">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="input-group mb-3">
|
||||
@@ -68,6 +68,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['CARNUM']; ?></span>
|
||||
</div>
|
||||
<input type="text" id="company" name="carnum" class="form-control" placeholder="<?php echo $transLang['CARNUM']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['SSANUM']; ?></span>
|
||||
</div>
|
||||
<input type="text" id="company" name="ssanum" class="form-control" placeholder="<?php echo $transLang['SSANUM']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="input-group mb-3">
|
||||
@@ -78,104 +98,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['REASON']; ?></span>
|
||||
</div>
|
||||
<select class="custom-select" id="visit_type" aria-label="Visit Type" name="visit_type" required>
|
||||
<option value="" selected><?php echo $transLang['SELECTREASON']; ?></option><?php foreach($VisitTypeInfo->getVisitTypeInfo("%") as $row): ?>
|
||||
<option value="<?php echo $row['visittypes_id']; ?>"><?php echo $transLang[$row['visittypes_name']]; ?></option><?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h5 class="mb-0"><button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne"><?php echo $transLang['ESECTION']; ?></button></h5>
|
||||
</div>
|
||||
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['ENAME']; ?>:</span>
|
||||
</div>
|
||||
<input type="text" id="escort" name="escort" class="form-control" placeholder="<?php echo $transLang['ETAG']; ?>" autofocus>
|
||||
</div>
|
||||
<h4><?php echo $transLang['ESIGNATURE']; ?>:</h4>
|
||||
<div id="esignature-parent">
|
||||
<div id="esignature"></div>
|
||||
</div>
|
||||
<input type="hidden" name="e_signature" id="e_signature"></input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h4><?php echo $transLang['VSIGNATURE']; ?>:</h4>
|
||||
<div id="vsignature-parent">
|
||||
<div id="vsignature"></div>
|
||||
</div>
|
||||
<input type="hidden" name="v_signature" id="v_signature" required />
|
||||
<input type="hidden" name="siteid" id="siteid" value="<?php echo $siteid; ?>" />
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { echo "<p>" . $transLang['ACKNOWLEDGEMENT'] . "</p>"; } ?>
|
||||
<p><?php echo $transLang['GDPR_TEXT']; ?><p>
|
||||
<p><a class="btn btn-outline-secondary btn-block" data-toggle="modal" data-target="#termsModalLong" href="<?php echo $StaticFunctions->getRules(); ?>"><?php echo $transLang['REFERENCE']; ?>: (<?php echo $transLang['ACKNOWLEDGEMENT_DOC_NAME']; ?>)</a></p>
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success btn-block" name="signin"><?php echo $transLang['SIGNIN']; ?></button>
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success btn-block" name="signin"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- TERMS MODAL START -->
|
||||
<div class="modal fade" id="termsModalLong" tabindex="-1" role="dialog" aria-labelledby="termsModalLongTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="termsModalLongTitle"><?php echo $transLang['TERMSTITLE']; ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="<?php echo $transLang['CLOSE']; ?>">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<object type="application/pdf" data="<?php echo $StaticFunctions->getRules(); ?>" width="700" height="600">_</object>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $transLang['CLOSE']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TERMS MODAL END -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Init jSignature for Escort field ONLY after we uncollapse the escort bootstrap div
|
||||
$('#collapseOne').on('shown.bs.collapse', function () {
|
||||
var $esignature = $("#esignature").jSignature();
|
||||
true
|
||||
$('#esignature').change(function() {
|
||||
var data2 = $esignature.jSignature('getData');
|
||||
$('#e_signature').val(data2);
|
||||
});
|
||||
});
|
||||
// Init jSignature for Visitor field, onchange store in text field
|
||||
var $vsignature = $("#vsignature").jSignature();
|
||||
true
|
||||
$('#vsignature').change(function() {
|
||||
var data = $vsignature.jSignature('getData');
|
||||
$('#v_signature').val(data);
|
||||
});
|
||||
});
|
||||
$("form").submit(function() {
|
||||
if($('#v_signature').val() == '') {
|
||||
alert("<?php echo $transLang['SIGNATURE']; ?> <?php echo $transLang['REQUIRED']; ?>");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- CONTENT END -->
|
||||
<?php }; require_once("inc/footer.inc.php");
|
||||
|
||||
100
signin_2.php
Normal file
100
signin_2.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018 josh.north
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION
|
||||
ini_set('session.gc_probability', 1); // GC RATES
|
||||
ini_set('session.gc_divisor', 100); // TIMES
|
||||
session_save_path('.tmp'); // TEMP
|
||||
session_start(); // START
|
||||
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
|
||||
$StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES
|
||||
$SiteInfo = new \App\LobbySIO\Database\SiteInfo();
|
||||
$Users = new \App\LobbySIO\Database\Users();
|
||||
if (isset($_SESSION['user_id'])) { // LOGGED IN? GET USER OBJECT
|
||||
$session_user = $Users->getUserInfo($_SESSION['user_id'], "1", "0"); }
|
||||
if (isset($session_user)) { // GET UID OR SET TO KIOSK
|
||||
$uid = $session_user["0"]["users_id"];} else { $uid = "2"; }
|
||||
$app_disp_lang = filter_input(INPUT_COOKIE, 'app_disp_lang'); // SETUP LANGUAGE
|
||||
if(!isset($app_disp_lang)) {
|
||||
$app_disp_lang=$StaticFunctions->getDefaultLanguage(); }
|
||||
$siteidcookie = filter_input(INPUT_COOKIE, 'app_site'); // SETUP SITE
|
||||
foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) {
|
||||
$lookup_array[$arr['sites_id']]=1; }
|
||||
if(isset($lookup_array[$siteidcookie])) {
|
||||
$siteid = $siteidcookie; } else { $siteid = "1"; }
|
||||
if(!isset($siteid)) { $siteid="1"; }
|
||||
$Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); // SETUP TRANSLATOR
|
||||
$transLang = $Translate->userLanguage();
|
||||
$VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo();
|
||||
$app_current_pagename = $transLang['SIGNIN']; // PAGE SETUP
|
||||
$app_current_pageicon = '<i class="fas fa-sign-in-alt"></i> ';
|
||||
require_once("inc/header.inc.php");
|
||||
if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS
|
||||
header('Location: index.php'); // ELSE HOME
|
||||
} else { ?>
|
||||
<!-- CONTENT START -->
|
||||
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
if (empty($_POST['carnum'])) { $carnum="";} else {$carnum=$_POST['carnum'];};
|
||||
if (empty($_POST['ssanum'])) { $ssanum="";} else {$ssanum=$_POST['ssanum'];};
|
||||
if (empty($_POST['firstname'])) { $firstname="";} else {$firstname=$_POST['firstname'];};
|
||||
if (empty($_POST['lastname'])) { $lastname="";} else {$lastname=$_POST['lastname'];};
|
||||
if (empty($_POST['company'])) { $company="";} else {$company=$_POST['company'];};
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" action="signin_3.php" method="post">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['REASON']; ?></span>
|
||||
</div>
|
||||
<select class="custom-select" id="visit_type" aria-label="Visit Type" name="visit_type" required>
|
||||
<option value="" selected><?php echo $transLang['SELECTREASON']; ?></option><?php foreach($VisitTypeInfo->getVisitTypeInfo("%") as $row): ?>
|
||||
<option value="<?php echo $row['visittypes_id']; ?>"><?php echo $transLang[$row['visittypes_name']]; ?></option><?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<input type="hidden" name="carnum" id="carnum" value="<?php echo $carnum; ?>" />
|
||||
<input type="hidden" name="ssanum" id="ssanum" value="<?php echo $ssanum; ?>" />
|
||||
<input type="hidden" name="firstname" id="firstname" value="<?php echo $firstname; ?>" />
|
||||
<input type="hidden" name="lastname" id="lastname" value="<?php echo $lastname; ?>" />
|
||||
<input type="hidden" name="company" id="company" value="<?php echo $company; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success btn-block" name="signin"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php } else { // EXIT IF NO POST
|
||||
?>
|
||||
<div class="container">
|
||||
<h2><?php echo $transLang['NOSIGNIN']; ?></h2>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
|
||||
<!-- CONTENT END -->
|
||||
<?php }; require_once("inc/footer.inc.php");
|
||||
144
signin_3.php
Normal file
144
signin_3.php
Normal file
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018 josh.north
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION
|
||||
ini_set('session.gc_probability', 1); // GC RATES
|
||||
ini_set('session.gc_divisor', 100); // TIMES
|
||||
session_save_path('.tmp'); // TEMP
|
||||
session_start(); // START
|
||||
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
|
||||
$StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES
|
||||
$SiteInfo = new \App\LobbySIO\Database\SiteInfo();
|
||||
$Users = new \App\LobbySIO\Database\Users();
|
||||
if (isset($_SESSION['user_id'])) { // LOGGED IN? GET USER OBJECT
|
||||
$session_user = $Users->getUserInfo($_SESSION['user_id'], "1", "0"); }
|
||||
if (isset($session_user)) { // GET UID OR SET TO KIOSK
|
||||
$uid = $session_user["0"]["users_id"];} else { $uid = "2"; }
|
||||
$app_disp_lang = filter_input(INPUT_COOKIE, 'app_disp_lang'); // SETUP LANGUAGE
|
||||
if(!isset($app_disp_lang)) {
|
||||
$app_disp_lang=$StaticFunctions->getDefaultLanguage(); }
|
||||
$siteidcookie = filter_input(INPUT_COOKIE, 'app_site'); // SETUP SITE
|
||||
foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) {
|
||||
$lookup_array[$arr['sites_id']]=1; }
|
||||
if(isset($lookup_array[$siteidcookie])) {
|
||||
$siteid = $siteidcookie; } else { $siteid = "1"; }
|
||||
if(!isset($siteid)) { $siteid="1"; }
|
||||
$Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); // SETUP TRANSLATOR
|
||||
$transLang = $Translate->userLanguage();
|
||||
$VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo();
|
||||
$app_current_pagename = $transLang['SIGNIN']; // PAGE SETUP
|
||||
$app_current_pageicon = '<i class="fas fa-sign-in-alt"></i> ';
|
||||
require_once("inc/header.inc.php");
|
||||
if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS
|
||||
header('Location: index.php'); // ELSE HOME
|
||||
} else { ?>
|
||||
<!-- CONTENT START -->
|
||||
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
if (empty($_POST['carnum'])) { $carnum="";} else {$carnum=$_POST['carnum'];};
|
||||
if (empty($_POST['ssanum'])) { $ssanum="";} else {$ssanum=$_POST['ssanum'];};
|
||||
if (empty($_POST['firstname'])) { $firstname="";} else {$firstname=$_POST['firstname'];};
|
||||
if (empty($_POST['lastname'])) { $lastname="";} else {$lastname=$_POST['lastname'];};
|
||||
if (empty($_POST['company'])) { $company="";} else {$company=$_POST['company'];};
|
||||
if (empty($_POST['visit_type'])) { $visit_type="";} else {$visit_type=$_POST['visit_type'];};
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" action="signin_4.php" method="post">
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h5 class="mb-0"><button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne"><?php echo $transLang['ESECTION']; ?></button></h5>
|
||||
</div>
|
||||
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
|
||||
<div class="card-body">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['ENAME']; ?>:</span>
|
||||
</div>
|
||||
<input type="text" id="escort" name="escort" class="form-control" placeholder="<?php echo $transLang['ETAG']; ?>" autofocus>
|
||||
</div>
|
||||
<h4><?php echo $transLang['ESIGNATURE']; ?>:</h4>
|
||||
<div id="esignature-parent">
|
||||
<div id="esignature"></div>
|
||||
</div>
|
||||
<input type="hidden" name="e_signature" id="e_signature"></input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h4><?php echo $transLang['VSIGNATURE']; ?>:</h4>
|
||||
<div id="vsignature-parent">
|
||||
<div id="vsignature"></div>
|
||||
</div>
|
||||
<input type="hidden" name="v_signature" id="v_signature" required />
|
||||
<input type="hidden" name="siteid" id="siteid" value="<?php echo $siteid; ?>" />
|
||||
<input type="hidden" name="carnum" id="carnum" value="<?php echo $carnum; ?>" />
|
||||
<input type="hidden" name="ssanum" id="ssanum" value="<?php echo $ssanum; ?>" />
|
||||
<input type="hidden" name="firstname" id="firstname" value="<?php echo $firstname; ?>" />
|
||||
<input type="hidden" name="lastname" id="lastname" value="<?php echo $lastname; ?>" />
|
||||
<input type="hidden" name="company" id="company" value="<?php echo $company; ?>" />
|
||||
<input type="hidden" name="visit_type" id="visit_type" value="<?php echo $visit_type; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success btn-block" name="signin"><?php echo $transLang['SIGNIN']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Init jSignature for Escort field ONLY after we uncollapse the escort bootstrap div
|
||||
$('#collapseOne').on('shown.bs.collapse', function () {
|
||||
var $esignature = $("#esignature").jSignature();
|
||||
true
|
||||
$('#esignature').change(function() {
|
||||
var data2 = $esignature.jSignature('getData');
|
||||
$('#e_signature').val(data2);
|
||||
});
|
||||
});
|
||||
// Init jSignature for Visitor field, onchange store in text field
|
||||
var $vsignature = $("#vsignature").jSignature();
|
||||
true
|
||||
$('#vsignature').change(function() {
|
||||
var data = $vsignature.jSignature('getData');
|
||||
$('#v_signature').val(data);
|
||||
});
|
||||
});
|
||||
$("form").submit(function() {
|
||||
if($('#v_signature').val() == '') {
|
||||
alert("<?php echo $transLang['SIGNATURE']; ?> <?php echo $transLang['REQUIRED']; ?>");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
</script>
|
||||
<?php } else { // EXIT IF NO POST
|
||||
?>
|
||||
<div class="container">
|
||||
<h2><?php echo $transLang['NOSIGNIN']; ?></h2>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
|
||||
<!-- CONTENT END -->
|
||||
<?php }; require_once("inc/footer.inc.php");
|
||||
121
signin_4.php
Normal file
121
signin_4.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018 josh.north
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
ini_set('session.gc_maxlifetime', 24*60*60); // MIN SESSION
|
||||
ini_set('session.gc_probability', 1); // GC RATES
|
||||
ini_set('session.gc_divisor', 100); // TIMES
|
||||
session_save_path('.tmp'); // TEMP
|
||||
session_start(); // START
|
||||
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
|
||||
$StaticFunctions = new \App\LobbySIO\Misc\StaticFunctions(); // DEFAULT CLASSES
|
||||
$SiteInfo = new \App\LobbySIO\Database\SiteInfo();
|
||||
$Users = new \App\LobbySIO\Database\Users();
|
||||
if (isset($_SESSION['user_id'])) { // LOGGED IN? GET USER OBJECT
|
||||
$session_user = $Users->getUserInfo($_SESSION['user_id'], "1", "0"); }
|
||||
if (isset($session_user)) { // GET UID OR SET TO KIOSK
|
||||
$uid = $session_user["0"]["users_id"];} else { $uid = "2"; }
|
||||
$app_disp_lang = filter_input(INPUT_COOKIE, 'app_disp_lang'); // SETUP LANGUAGE
|
||||
if(!isset($app_disp_lang)) {
|
||||
$app_disp_lang=$StaticFunctions->getDefaultLanguage(); }
|
||||
$siteidcookie = filter_input(INPUT_COOKIE, 'app_site'); // SETUP SITE
|
||||
foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) {
|
||||
$lookup_array[$arr['sites_id']]=1; }
|
||||
if(isset($lookup_array[$siteidcookie])) {
|
||||
$siteid = $siteidcookie; } else { $siteid = "1"; }
|
||||
if(!isset($siteid)) { $siteid="1"; }
|
||||
$Translate = new \App\LobbySIO\Language\Translate($app_disp_lang); // SETUP TRANSLATOR
|
||||
$transLang = $Translate->userLanguage();
|
||||
$VisitTypeInfo = new \App\LobbySIO\Database\VisitTypeInfo();
|
||||
$app_current_pagename = $transLang['SIGNIN']; // PAGE SETUP
|
||||
$app_current_pageicon = '<i class="fas fa-sign-in-alt"></i> ';
|
||||
require_once("inc/header.inc.php");
|
||||
if ($StaticFunctions->getSessionStatus() == true) { // CHECK STATUS
|
||||
header('Location: index.php'); // ELSE HOME
|
||||
} else { ?>
|
||||
<!-- CONTENT START -->
|
||||
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
if (empty($_POST['carnum'])) { $carnum="";} else {$carnum=$_POST['carnum'];};
|
||||
if (empty($_POST['ssanum'])) { $ssanum="";} else {$ssanum=$_POST['ssanum'];};
|
||||
if (empty($_POST['firstname'])) { $firstname="";} else {$firstname=$_POST['firstname'];};
|
||||
if (empty($_POST['lastname'])) { $lastname="";} else {$lastname=$_POST['lastname'];};
|
||||
if (empty($_POST['company'])) { $company="";} else {$company=$_POST['company'];};
|
||||
if (empty($_POST['visit_type'])) { $visit_type="";} else {$visit_type=$_POST['visit_type'];};
|
||||
if (empty($_POST['v_signature'])) { $v_signature="";} else {$v_signature=$_POST['v_signature'];};
|
||||
if (empty($_POST['e_signature'])) { $e_signature="";} else {$e_signature=$_POST['e_signature'];};
|
||||
if (empty($_POST['escort'])) { $escort="";} else {$escort=$_POST['escort'];};
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" action="signin_display.php" method="post">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<input type="hidden" name="siteid" id="siteid" value="<?php echo $siteid; ?>" />
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { echo "<p>" . $transLang['ACKNOWLEDGEMENT'] . "</p>"; } ?>
|
||||
<p><?php echo $transLang['GDPR_TEXT']; ?><p>
|
||||
<p><a class="btn btn-outline-secondary btn-block" data-toggle="modal" data-target="#termsModalLong" href="<?php echo $StaticFunctions->getRules(); ?>"><?php echo $transLang['REFERENCE']; ?>: (<?php echo $transLang['ACKNOWLEDGEMENT_DOC_NAME']; ?>)</a></p>
|
||||
<input type="hidden" name="siteid" id="siteid" value="<?php echo $siteid; ?>" />
|
||||
<input type="hidden" name="carnum" id="carnum" value="<?php echo $carnum; ?>" />
|
||||
<input type="hidden" name="ssanum" id="ssanum" value="<?php echo $ssanum; ?>" />
|
||||
<input type="hidden" name="firstname" id="firstname" value="<?php echo $firstname; ?>" />
|
||||
<input type="hidden" name="lastname" id="lastname" value="<?php echo $lastname; ?>" />
|
||||
<input type="hidden" name="company" id="company" value="<?php echo $company; ?>" />
|
||||
<input type="hidden" name="visit_type" id="visit_type" value="<?php echo $visit_type; ?>" />
|
||||
<input type="hidden" name="v_signature" id="v_signature" value="<?php echo $v_signature; ?>" />
|
||||
<input type="hidden" name="e_signature" id="e_signature" value="<?php echo $e_signature; ?>" />
|
||||
<input type="hidden" name="escort" id="escort" value="<?php echo $escort; ?>" />
|
||||
<button type="cancel" id="cancel" class="btn btn-lg btn-danger btn-block" name="cancel"><?php echo $transLang['CANCEL']; ?></button>
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success btn-block" name="signin"><?php echo $transLang['SIGNIN']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- TERMS MODAL START -->
|
||||
<div class="modal fade" id="termsModalLong" tabindex="-1" role="dialog" aria-labelledby="termsModalLongTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="termsModalLongTitle"><?php echo $transLang['TERMSTITLE']; ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="<?php echo $transLang['CLOSE']; ?>">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<object type="application/pdf" data="<?php echo $StaticFunctions->getRules(); ?>" width="700" height="600">_</object>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $transLang['CLOSE']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TERMS MODAL END -->
|
||||
<?php } else { // EXIT IF NO POST
|
||||
?>
|
||||
<div class="container">
|
||||
<h2><?php echo $transLang['NOSIGNIN']; ?></h2>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
|
||||
<!-- CONTENT END -->
|
||||
<?php }; require_once("inc/footer.inc.php");
|
||||
@@ -52,7 +52,9 @@
|
||||
<!-- CONTENT START -->
|
||||
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
echo $VisitActions->newVisit($_POST['firstname'], $_POST['lastname'], $_POST['company'], $_POST['visit_type'], $StaticFunctions->getUTC(), $_POST['v_signature'], $_POST['siteid'], "1", $_POST['e_signature'], $_POST['escort']);
|
||||
if (empty($_POST['carnum'])) { $carnum="";} else {$carnum=$_POST['carnum'];};
|
||||
if (empty($_POST['ssanum'])) { $ssanum="";} else {$ssanum=$_POST['ssanum'];};
|
||||
echo $VisitActions->newVisit($_POST['firstname'], $_POST['lastname'], $_POST['company'], $_POST['visit_type'], $StaticFunctions->getUTC(), $_POST['v_signature'], $_POST['siteid'], "1", $_POST['e_signature'], $_POST['escort'], $carnum, $ssanum);
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
@@ -50,11 +50,12 @@ class SiteInfo {
|
||||
if ($offset == "0") { $c_offset = NULL; }
|
||||
else { $c_offset = " OFFSET " . $offset; }
|
||||
$query = "
|
||||
SELECT
|
||||
SELECT DISTINCT
|
||||
" . Registry::DB_PRFX . "sites.id as sites_id,
|
||||
" . Registry::DB_PRFX . "sites.name as sites_name,
|
||||
" . Registry::DB_PRFX . "sites.region as sites_region,
|
||||
" . Registry::DB_PRFX . "sites.timezone as sites_timezone
|
||||
" . Registry::DB_PRFX . "sites.timezone as sites_timezone,
|
||||
" . Registry::DB_PRFX . "users_sites.users_id as users_sites_users_id
|
||||
FROM " . Registry::DB_PRFX . "sites
|
||||
JOIN " . Registry::DB_PRFX . "users_sites ON " . Registry::DB_PRFX . "sites.id=" . Registry::DB_PRFX . "users_sites.sites_id
|
||||
" . $c_where . "
|
||||
|
||||
10
src/Database/VisitActions.php
Executable file → Normal file
10
src/Database/VisitActions.php
Executable file → Normal file
@@ -35,6 +35,7 @@ class VisitActions {
|
||||
";
|
||||
$database = new \App\LobbySIO\Database\Connect();
|
||||
$count = $database->runQuery($query);
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function voidVisit ($visitid, $approved) {
|
||||
@@ -45,6 +46,7 @@ class VisitActions {
|
||||
";
|
||||
$database = new \App\LobbySIO\Database\Connect();
|
||||
$count = $database->runQuery($query);
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function approveVisit ($approvevisit, $id_type, $id_checked, $citizen, $badge, $initials, $approved) {
|
||||
@@ -61,18 +63,20 @@ class VisitActions {
|
||||
";
|
||||
$database = new \App\LobbySIO\Database\Connect();
|
||||
$count = $database->runQuery($query);
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function newVisit ($firstname, $lastname, $company, $reason, $intime, $signature, $siteid, $approved, $escort_signature, $escort) {
|
||||
public function newVisit ($firstname, $lastname, $company, $reason, $intime, $signature, $siteid, $approved, $escort_signature, $escort, $carnum, $ssanum) {
|
||||
$query = "
|
||||
INSERT INTO " . Registry::DB_PRFX . "visits (" . Registry::DB_PRFX . "visits.firstname, " . Registry::DB_PRFX . "visits.lastname,
|
||||
" . Registry::DB_PRFX . "visits.company, " . Registry::DB_PRFX . "visits.reason, " . Registry::DB_PRFX . "visits.intime,
|
||||
" . Registry::DB_PRFX . "visits.signature, " . Registry::DB_PRFX . "visits.site_id, " . Registry::DB_PRFX . "visits.approved,
|
||||
" . Registry::DB_PRFX . "visits.escort_signature, " . Registry::DB_PRFX . "visits.escort)
|
||||
" . Registry::DB_PRFX . "visits.escort_signature, " . Registry::DB_PRFX . "visits.escort, " . Registry::DB_PRFX . "visits.carnum, " . Registry::DB_PRFX . "visits.ssanum)
|
||||
VALUES (\"$firstname\", \"$lastname\", \"$company\", \"$reason\", \"$intime\", \"$signature\", \"$siteid\",
|
||||
\"$approved\", \"$escort_signature\", \"$escort\")
|
||||
\"$approved\", \"$escort_signature\", \"$escort\", \"$carnum\", \"$ssanum\")
|
||||
";
|
||||
$database = new \App\LobbySIO\Database\Connect();
|
||||
$count = $database->runQuery($query);
|
||||
return $count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ class VisitInfo {
|
||||
" . Registry::DB_PRFX . "visits.badge as visits_badge,
|
||||
" . Registry::DB_PRFX . "visits.site_id as visits_site_id,
|
||||
" . Registry::DB_PRFX . "visits.company as visits_company,
|
||||
" . Registry::DB_PRFX . "visits.approved as visits_approved
|
||||
" . Registry::DB_PRFX . "visits.approved as visits_approved,
|
||||
" . Registry::DB_PRFX . "visits.carnum as visits_carnum,
|
||||
" . Registry::DB_PRFX . "visits.ssanum as visits_ssanum
|
||||
FROM " . Registry::DB_PRFX . "visits
|
||||
WHERE " . $cond_siteid . Registry::DB_PRFX . "visits.approved>=\"$approved\" AND " . $cond_outtime . $cond_intime . Registry::DB_PRFX . "visits.id LIKE \"$visitid\"" . $cond_rowsperpage . $cond_offset;
|
||||
$database = new \App\LobbySIO\Database\Connect();
|
||||
|
||||
@@ -15,10 +15,12 @@ ADMIN = 'Administrator'
|
||||
ADMINISTRATION = 'Verwaltung'
|
||||
ALL = 'Alles'
|
||||
APPROVE = 'Genehmigen'
|
||||
APP_NAME = 'Empfangshalle Einloggen / Ausloggen'
|
||||
APP_NAME = 'Einloggen / Ausloggen'
|
||||
BACK = 'Zurückkehren'
|
||||
BADGE = 'Abzeichen-Nummer'
|
||||
BADGEINITIALS = 'Abzeichen-Nummer & Initialen'
|
||||
CANCEL = 'Stornieren'
|
||||
CARNUM = 'Autokennzeichen'
|
||||
CHANGE = 'Wechseln'
|
||||
CHOOSE = 'Wählen'
|
||||
CITIZEN = 'Bürger?'
|
||||
@@ -74,6 +76,7 @@ META_DESC = 'LobbySIO ist eine Touchscreen-kompatible Signatur-Pad / Anmeldeform
|
||||
MIN_PASSWORD_LENGTH = 'Minimale Passwortlänge ist '
|
||||
NAME = 'Vollständiger Name'
|
||||
NEW = 'Neu'
|
||||
NEXT = 'Nächster'
|
||||
NONEAVA = 'Keiner'
|
||||
NOSIGNIN = 'Keine Anmeldung'
|
||||
NOSITE = 'Kein Standort ausgewählt'
|
||||
@@ -114,6 +117,7 @@ SIGNOUT_THANKYOU = 'Danke - Sie wurden erfolgreich abgemeldet.'
|
||||
SINCE = 'seit'
|
||||
SITE = 'Site'
|
||||
SOFTWARE_VERSION = 'Version'
|
||||
SSANUM = 'SSA-Ticketnummer'
|
||||
START = 'Anfang'
|
||||
STATEID = 'Staat ID'
|
||||
TERMSTITLE = 'Unsere Regeln'
|
||||
|
||||
@@ -15,10 +15,12 @@ ADMIN = 'Administrator'
|
||||
ADMINISTRATION = 'Administration'
|
||||
ALL = 'All'
|
||||
APPROVE = 'Approve'
|
||||
APP_NAME = 'Lobby Sign-In/Sign-Out'
|
||||
APP_NAME = 'Sign-In/Sign-Out'
|
||||
BACK = 'Back'
|
||||
BADGE = 'Badge#'
|
||||
BADGEINITIALS = 'Badge & Initials'
|
||||
CANCEL = 'Cancel'
|
||||
CARNUM = 'Car Registration #'
|
||||
CHANGE = 'Change'
|
||||
CHOOSE = 'Choose'
|
||||
CITIZEN = 'Citizen?'
|
||||
@@ -26,9 +28,9 @@ CLOSE = 'Close'
|
||||
COMPANY = 'Company'
|
||||
CONFIRM = 'Confirm'
|
||||
CREATED = 'Created'
|
||||
CUSTSIGNIN = 'Customer Sign In'
|
||||
CUSTSIGNOUT = 'Customer Sign Out'
|
||||
CUST_BANNER = 'Lobby Sign-In/Sign-Out'
|
||||
CUSTSIGNIN = 'Visitor Sign In'
|
||||
CUSTSIGNOUT = 'Visitor Sign Out'
|
||||
CUST_BANNER = 'Visitor Sign-In/Sign-Out'
|
||||
DEFAULT = 'Default'
|
||||
DELETE = 'Delete'
|
||||
DELETE_WARNING = '********* WARNING! ********** Are you SURE you want to DELETE this user AND ALL ASSOCIATED PUNCHES!?!? There is NO UNDO!'
|
||||
@@ -74,6 +76,7 @@ META_DESC = 'LobbySIO is a touchscreen-compatible signature pad/sign-in sheet we
|
||||
MIN_PASSWORD_LENGTH = 'Minimum password length is '
|
||||
NAME = 'Name'
|
||||
NEW = 'New'
|
||||
NEXT = 'Next'
|
||||
NONEAVA = 'None'
|
||||
NOSIGNIN = 'No sign in'
|
||||
NOSITE = 'No Site Selected'
|
||||
@@ -114,6 +117,7 @@ SIGNOUT_THANKYOU = 'Thank you - you have been successfully signed out.'
|
||||
SINCE = 'since'
|
||||
SITE = 'Site'
|
||||
SOFTWARE_VERSION = 'Version'
|
||||
SSANUM = 'SSA Ticket #'
|
||||
START = 'Start'
|
||||
STATEID = 'State ID'
|
||||
TERMSTITLE = 'Our Rules'
|
||||
|
||||
@@ -19,6 +19,8 @@ APP_NAME = 'Lobby de inicio / cierre de sesión'
|
||||
BACK = 'Inicia'
|
||||
BADGE = 'Numero de placa'
|
||||
BADGEINITIALS = 'Numero de placa & Sigla'
|
||||
CANCEL = 'Cancelar'
|
||||
CARNUM = 'Numero de registro del carro'
|
||||
CHANGE = 'Cambiar'
|
||||
CHOOSE = 'Por favor seleccione'
|
||||
CITIZEN = 'Ciudadano de estados unidos?'
|
||||
@@ -74,6 +76,7 @@ META_DESC = 'LobbySIO es una aplicación web compatible con pantalla táctil com
|
||||
MIN_PASSWORD_LENGTH = 'La longitud mínima de la contraseña es '
|
||||
NAME = 'Nombre'
|
||||
NEW = 'Nuevo'
|
||||
NEXT = 'Siguiente'
|
||||
NONEAVA = 'Nada'
|
||||
NOSIGNIN = 'No completó'
|
||||
NOSITE = 'Ningún sitio seleccionado'
|
||||
@@ -114,6 +117,7 @@ SIGNOUT_THANKYOU = 'Gracias, te has desconectado.'
|
||||
SINCE = 'desde'
|
||||
SITE = 'Sitio'
|
||||
SOFTWARE_VERSION = 'Versión del software'
|
||||
SSANUM = 'Número de boleto de la SSA'
|
||||
START = 'Comienzo'
|
||||
STATEID = 'Identificación del estado'
|
||||
TERMSTITLE = 'Nuestras reglas'
|
||||
|
||||
@@ -19,6 +19,8 @@ APP_NAME = 'Vestibule register/se désinscrire'
|
||||
BACK = 'Retour'
|
||||
BADGE = 'Numéro de badge'
|
||||
BADGEINITIALS = 'Numéro de badge & Initiales'
|
||||
CANCEL = 'Annuler'
|
||||
CARNUM = 'Numéro d'immatriculation'
|
||||
CHANGE = 'Changement'
|
||||
CHOOSE = 'Choisir'
|
||||
CITIZEN = 'Citoyen?'
|
||||
@@ -74,6 +76,7 @@ META_DESC = 'LobbySIO est une application Web pour tablette de signature / feuil
|
||||
MIN_PASSWORD_LENGTH = 'La longueur minimale du mot de passe est '
|
||||
NAME = 'Nom complet'
|
||||
NEW = 'Nouveau'
|
||||
NEXT = 'Suivant'
|
||||
NONEAVA = 'Aucun'
|
||||
NOSIGNIN = 'Pas de connexion'
|
||||
NOSITE = 'Aucun site sélectionné'
|
||||
@@ -114,6 +117,7 @@ SIGNOUT_THANKYOU = 'Merci - vous avez été déconnecté avec succès.'
|
||||
SINCE = 'depuis'
|
||||
SITE = 'Site'
|
||||
SOFTWARE_VERSION = 'Version'
|
||||
SSANUM = 'Numéro de billet SSA'
|
||||
START = 'Début'
|
||||
STATEID = 'State ID'
|
||||
TERMSTITLE = 'Nos règles'
|
||||
|
||||
@@ -29,7 +29,7 @@ class StaticFunctions {
|
||||
public function getVersion ($app_disp_lang) {
|
||||
$Translate = new \App\LobbySIO\Language\Translate($app_disp_lang);
|
||||
$transLang = $Translate->userLanguage();
|
||||
echo $transLang['SOFTWARE_VERSION'] . ': lobbysio_v0.16-beta';
|
||||
echo $transLang['SOFTWARE_VERSION'] . ': lobbysio_v0.18-beta';
|
||||
}
|
||||
|
||||
public function getUTC () {
|
||||
|
||||
76
users.php
76
users.php
@@ -51,6 +51,80 @@
|
||||
|
||||
<?php if (isset($session_user)) { if($session_user["0"]["users_usertype"] !== "ADMIN") { header("Location: index.php"); ?><h2 class="content-subhead"><?php echo $transLang['NOT_AUTHORIZED']; ?></h2><?php }; }; ?>
|
||||
|
||||
|
||||
<?php if (!empty($_POST['edituser'])): // NEW SITE
|
||||
$edituser = $Users->getUserInfo($_POST['deleteid'], "0", "0")
|
||||
//$SiteInfo->addSite($_POST['sitename'], $_POST['timezone'], $_POST['region']);
|
||||
//header('Location: ' . $_SERVER['PHP_SELF']);
|
||||
?>
|
||||
|
||||
<!-- USER EDIT START -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<h2><?php echo $app_current_pageicon . $transLang['EDIT_PROFILE']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-inline my-2 my-lg-0" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
|
||||
<fieldset id="editor">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" id="firstname" name="firstname" value="<?php echo $edituser["0"]["users_firstname"]; ?>" required />
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" id="lastname" name="lastname" value="<?php echo $edituser["0"]["users_lastname"]; ?>" required />
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" id="username" name="username" value="<?php echo $edituser["0"]["users_username"]; ?>" required />
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" id="email" name="email" value="<?php echo $edituser["0"]["users_email"]; ?>" />
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<select class="custom-select" id="usertype" aria-label="<?php echo $transLang['ACCESS_LEVEL']; ?>" name="usertype" required>
|
||||
<?php foreach($Users->getUserTypeInfo("%") as $row): ?>
|
||||
<option value="<?php echo $row['usertypes_id']; ?>"<?php if ($row['usertypes_id']==$edituser["0"]["users_usertypeid"]) { echo " selected"; } ?>><?php echo $transLang[$row['usertypes_name']]; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<?php print_r($SiteInfo->getSite("0", "0", "0", "0"));
|
||||
// foreach($SiteInfo->getSite("0", $uid, "0", "0") as $arr) {
|
||||
// $lookup_array[$arr['sites_id']]=1; }
|
||||
// if(isset($lookup_array[$siteidcookie])) {
|
||||
// $siteid = $siteidcookie; } else { $siteid = "1"; }
|
||||
// if(!isset($siteid)) { $siteid="1"; }
|
||||
?>
|
||||
<select id="sitepermissions" name="sitepermissions" class="custom-select" multiple size="5">
|
||||
<?php foreach($SiteInfo->getSite("0", "0", "0", "0") as $row): ?>
|
||||
<option value="<?php echo $row['sites_id']; ?>"<?php if ($row['users_sites_users_id']==$edituser["0"]["users_id"]) { echo " selected"; } ?>><?php echo $row['sites_name']; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<button type="submit" class="form-control btn btn-block btn-primary" value="Submit" name="editusercomplete"><i class="fa fa-user-plus"></i> <?php echo $transLang['SAVE']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
$minpasslength = $StaticFunctions->getMinPass();
|
||||
?>
|
||||
|
||||
<!-- USER EDIT END -->
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php // POST ACTIONS
|
||||
|
||||
if (!empty($_POST['newsite'])): // NEW SITE
|
||||
@@ -126,7 +200,7 @@ if (0 === $row_count): else: $page_count = (int)ceil($row_count / $StaticFunctio
|
||||
<tbody>
|
||||
<?php foreach($Users->getUserInfo("%", $StaticFunctions->getPageRows(), $offset) as $row): ?>
|
||||
<tr>
|
||||
<td><?php echo $row['users_lastname'] . ", " . $row['users_firstname']; ?></td><td><?php echo $row['users_username']; ?></td><td><?php echo $row['users_email']; ?></td><td><?php echo $row['users_created']; ?></td><td><?php echo $transLang[$row['users_usertype']]; ?></td><td><form method="post" onsubmit="return confirm('<?php echo $transLang['DELETE_WARNING']; ?>')"><input type="hidden" id="_METHOD" name="_METHOD" value="DELETE" /><input type="hidden" id="deleteid" name="deleteid" value="<?php echo $row['users_id']; ?>" /><button class="btn btn-danger btn-sm" id="deluser" name="deluser" value="deluser" type="submit" <?php if ($row['users_username'] == "admin"): echo "disabled"; endif; if ($row['users_username'] == "KIOSK"): echo "disabled"; endif; ?>><i class="fa fa-trash"></i> </button></form></td>
|
||||
<td><?php echo $row['users_lastname'] . ", " . $row['users_firstname']; ?></td><td><?php echo $row['users_username']; ?></td><td><?php echo $row['users_email']; ?></td><td><?php echo $row['users_created']; ?></td><td><?php echo $transLang[$row['users_usertype']]; ?></td><td><form method="post" onsubmit="return confirm('<?php echo $transLang['DELETE_WARNING']; ?>')"><input type="hidden" id="_METHOD" name="_METHOD" value="DELETE" /><input type="hidden" id="deleteid" name="deleteid" value="<?php echo $row['users_id']; ?>" /><button class="btn btn-primary btn-sm" id="edituser" name="edituser" value="edituser" type="submit" <?php if ($row['users_username'] == "admin"): echo "disabled"; endif; if ($row['users_username'] == "KIOSK"): echo "disabled"; endif; ?>><i class="fa fa-edit"></i> </button><button class="btn btn-danger btn-sm" id="deluser" name="deluser" value="deluser" type="submit" <?php if ($row['users_username'] == "admin"): echo "disabled"; endif; if ($row['users_username'] == "KIOSK"): echo "disabled"; endif; ?>><i class="fa fa-trash"></i> </button></form></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user