Cleanup and consolidation, signin process updates
This commit is contained in:
parent
ac0225939e
commit
f19434ec0c
@ -65,9 +65,11 @@
|
||||
}
|
||||
|
||||
#vsignature {
|
||||
background-color: rgb(220, 220, 220);
|
||||
|
||||
}
|
||||
#esignature {
|
||||
background-color: rgb(220, 220, 220);
|
||||
|
||||
}
|
||||
#esignature-parent {
|
||||
@ -78,11 +80,11 @@
|
||||
}
|
||||
canvas.jSignature {
|
||||
max-height: 200px !important;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
padding: 0 0 0 0;
|
||||
margin: 0 0 0 0;
|
||||
border: 2px dotted #000;
|
||||
background-color:lightgrey;
|
||||
padding: 0 0 0 0;
|
||||
margin: 0 0 0 0;
|
||||
background-color: rgb(220, 220, 220);
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,13 +101,13 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||
<?php if (basename($_SERVER['PHP_SELF']) == 'signin_display.php'): ?> <meta http-equiv="refresh" content="5; url=index.php" /><?php endif; ?>
|
||||
<?php if (basename($_SERVER['PHP_SELF']) == 'signout.php'): ?><?php if (!empty($_POST['endvisit'])): ?> <meta http-equiv="refresh" content="5; url=index.php" /><?php endif; ?><?php endif; ?>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="css/sticky-footer-navbar.css">
|
||||
<link rel="stylesheet" href="css/all.min.css"/>
|
||||
<link rel="stylesheet" href="css/animate.min.css"/>
|
||||
<link rel="stylesheet" href="css/datatables.min.css" />
|
||||
<link rel="stylesheet" href="css/styles.css"/>
|
||||
<link rel="stylesheet" href="css/tempusdominus-bootstrap-4.min.css"/>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css?v2"/>
|
||||
<link rel="stylesheet" href="css/sticky-footer-navbar.css?v2">
|
||||
<link rel="stylesheet" href="css/all.min.css?v2"/>
|
||||
<link rel="stylesheet" href="css/animate.min.css?v2"/>
|
||||
<link rel="stylesheet" href="css/datatables.min.css?v2" />
|
||||
<link rel="stylesheet" href="css/styles.css?v2"/>
|
||||
<link rel="stylesheet" href="css/tempusdominus-bootstrap-4.min.css?v2"/>
|
||||
<meta name="description" content="<?php echo $transLang['META_DESC']; ?>" />
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/bootstrap.bundle.min.js"></script>
|
||||
|
430
signin.php
430
signin.php
@ -62,14 +62,47 @@
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- START CONTENT -->
|
||||
|
||||
|
||||
<?php
|
||||
// FILTER POSTED DATA
|
||||
$form_data = filter_input_array(INPUT_POST, [
|
||||
'form_data_stage' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_siteid' => (int)FILTER_VALIDATE_INT,
|
||||
'form_data_isvendor' => (int)FILTER_VALIDATE_INT,
|
||||
'form_data_firstname' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_lastname' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_carnum' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_ssanum' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_company' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_contact1' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_contact2' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_workstart' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_workend' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_visittype' => (int)FILTER_VALIDATE_INT,
|
||||
'form_data_escortrequired' => (int)FILTER_VALIDATE_INT,
|
||||
'form_data_v_signature' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_e_signature' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_escortname' => (string)FILTER_SANITIZE_STRING
|
||||
]);
|
||||
// SET INITIAL STAGE
|
||||
if(empty($form_data['form_data_stage'])){
|
||||
$form_data['form_data_stage'] = 'covidack';
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- CONTENT -->
|
||||
|
||||
<?php if($form_data['form_data_stage'] === "covidack"){ ?>
|
||||
|
||||
<!-- START INITIAL STAGE CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="needs-validation" action="signin_0.php" method="post" novalidate>
|
||||
<form name="form-signin" class="needs-validation" method="post" novalidate>
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="form-group form-row">
|
||||
<div class="form-check">
|
||||
@ -114,10 +147,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="siteid" id="siteid" value="<?php echo $siteid; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="signin"><?php echo $transLang['NEXT']; ?></button>
|
||||
<input type="hidden" name="form_data_siteid" id="form_data_siteid" value="<?php echo $siteid; ?>" />
|
||||
<input type="hidden" name="form_data_stage" id="form_data_stage" value="customerorvendor" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="saveBtn"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -142,6 +176,390 @@
|
||||
}, false);
|
||||
})();
|
||||
</script>
|
||||
<!-- END CONTENT -->
|
||||
<!-- END INITIAL STAGE CONTENT -->
|
||||
|
||||
<?php }elseif($form_data['form_data_stage'] === "customerorvendor"){ ?>
|
||||
|
||||
<!-- START CUSTOMERORVENDOR STAGE CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" method="post">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<?php echo $transLang['CUSTOMERVENDOR_DESC']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="btn-group">
|
||||
<input type="radio" class="btn-check btn-lg" name="form_data_isvendor" id="customer-outlined" autocomplete="off" value="0" required>
|
||||
<label class="btn btn-outline-primary btn-lg" for="customer-outlined"><?php echo $transLang['CUSTOMER']; ?></label>
|
||||
<input type="radio" class="btn-check btn-lg" name="form_data_isvendor" id="vendor-outlined" autocomplete="off" value="1" required>
|
||||
<label class="btn btn-outline-primary btn-lg" for="vendor-outlined"><?php echo $transLang['VENDORINFO-VENDORTITLE']; ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="form_data_stage" id="form_data_stage" value="nameandcompany" />
|
||||
<input type="hidden" name="form_data_siteid" id="form_data_siteid" value="<?php echo $form_data['form_data_siteid']; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="saveBtn"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CUSTOMERORVENDOR STAGE CONTENT -->
|
||||
|
||||
<?php }elseif($form_data['form_data_stage'] === "nameandcompany"){ ?>
|
||||
|
||||
<!-- START NAMEANDCOMPANY STAGE CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" method="post">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['NAME']; ?></span>
|
||||
<input type="text" id="form_data_firstname" name="form_data_firstname" class="form-control" placeholder="<?php echo $transLang['FIRST']; ?>" required autofocus>
|
||||
<input type="text" id="form_data_lastname" name="form_data_lastname" class="form-control" placeholder="<?php echo $transLang['LAST']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($SiteInfo->getSite($form_data['form_data_siteid'], $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<div class="row row-cols-2 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['CARNUM']; ?></span>
|
||||
<input type="text" id="form_data_carnum" name="form_data_carnum" class="form-control" placeholder="<?php echo $transLang['CARNUM']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['SSANUM']; ?></span>
|
||||
<input type="text" id="form_data_ssanum" name="form_data_ssanum" class="form-control" placeholder="<?php echo $transLang['SSANUM']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['COMPANY']; ?></span>
|
||||
<input type="text" id="form_data_company" name="form_data_company" class="form-control" placeholder="<?php echo $transLang['COMPANY']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($form_data['form_data_isvendor']===1) { ?>
|
||||
<div class="row row-cols-2 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-CONTACT1']; ?></span>
|
||||
<input type="text" id="form_data_contact1" name="form_data_contact1" class="form-control" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-CONTACT2']; ?></span>
|
||||
<input type="text" id="form_data_contact2" name="form_data_contact2" class="form-control" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" data-bs-toggle="datetimepicker" data-target=".datetimepicker-form_data_workstart"><?php echo $transLang['VENDORINFO-WORKSTART']; ?> <i class="fas fa-clock"></i></span>
|
||||
<input placeholder="" name="form_data_workstart" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-form_data_workstart" id="datetimepicker-form_data_workstart" data-toggle="datetimepicker" data-target=".datetimepicker-form_data_workstart"/>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.datetimepicker-form_data_workstart').datetimepicker({'timeZone': '<?php echo $timezone; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" data-bs-toggle="datetimepicker" data-target=".datetimepicker-form_data_workend"><?php echo $transLang['VENDORINFO-WORKEND']; ?> <i class="fas fa-clock"></i></span>
|
||||
<input placeholder="" name="form_data_workend" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-form_data_workend" id="datetimepicker-form_data_workend" data-toggle="datetimepicker" data-target=".datetimepicker-form_data_workend"/>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.datetimepicker-form_data_workend').datetimepicker({'timeZone': '<?php echo $timezone; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="form_data_stage" id="form_data_stage" value="reasonforvisit" />
|
||||
<input type="hidden" name="form_data_siteid" id="form_data_siteid" value="<?php echo $form_data['form_data_siteid']; ?>" />
|
||||
<input type="hidden" name="form_data_isvendor" id="form_data_isvendor" value="<?php echo $form_data['form_data_isvendor']; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="saveBtn"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END NAMEANDCOMPANY STAGE CONTENT -->
|
||||
|
||||
<?php }elseif($form_data['form_data_stage'] === "reasonforvisit"){ ?>
|
||||
|
||||
<!-- START REASONFORVISIT STAGE CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" method="post">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['REASON']; ?></span>
|
||||
<select class="form-select" id="form_data_visittype" name="form_data_visittype" required>
|
||||
<option value="" selected><?php echo $transLang['SELECTREASON']; ?></option><?php foreach($VisitTypeInfo->getInfoVisitType($form_data['form_data_isvendor'],"%") 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 row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="form_data_stage" id="form_data_stage" value="visitorsignature" />
|
||||
<input type="hidden" name="form_data_siteid" id="form_data_siteid" value="<?php echo $form_data['form_data_siteid']; ?>" />
|
||||
<input type="hidden" name="form_data_isvendor" id="form_data_isvendor" value="<?php echo $form_data['form_data_isvendor']; ?>" />
|
||||
<input type="hidden" name="form_data_firstname" id="form_data_firstname" value="<?php echo $form_data['form_data_firstname']; ?>" />
|
||||
<input type="hidden" name="form_data_lastname" id="form_data_lastname" value="<?php echo $form_data['form_data_lastname']; ?>" />
|
||||
<input type="hidden" name="form_data_carnum" id="form_data_carnum" value="<?php echo $form_data['form_data_carnum']; ?>" />
|
||||
<input type="hidden" name="form_data_ssanum" id="form_data_ssanum" value="<?php echo $form_data['form_data_ssanum']; ?>" />
|
||||
<input type="hidden" name="form_data_company" id="form_data_company" value="<?php echo $form_data['form_data_company']; ?>" />
|
||||
<input type="hidden" name="form_data_contact1" id="form_data_contact1" value="<?php echo $form_data['form_data_contact1']; ?>" />
|
||||
<input type="hidden" name="form_data_contact2" id="form_data_contact2" value="<?php echo $form_data['form_data_contact2']; ?>" />
|
||||
<input type="hidden" name="form_data_workstart" id="form_data_workstart" value="<?php echo $form_data['form_data_workstart']; ?>" />
|
||||
<input type="hidden" name="form_data_workend" id="form_data_workend" value="<?php echo $form_data['form_data_workend']; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="saveBtn"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END REASONFORVISIT STAGE CONTENT -->
|
||||
|
||||
<?php }elseif($form_data['form_data_stage'] === "visitorsignature"){ ?>
|
||||
|
||||
<!-- START VISITORSIGNATURE STAGE CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" method="post">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<h4><?php echo $transLang['VSIGNATURE']; ?>:</h4>
|
||||
<div id="vsignature-parent sigs">
|
||||
<div id="vsignature"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($form_data['form_data_isvendor'] === (int)"0") { ?>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<h4><?php echo $transLang['ESECTION']; ?>?</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="btn-group">
|
||||
<input type="radio" class="btn-check btn-lg" name="form_data_escortrequired" id="no-outlined" autocomplete="off" value="0" required>
|
||||
<label class="btn btn-outline-primary btn-lg" for="no-outlined"><?php echo $transLang['COMMON-NO']; ?></label>
|
||||
<input type="radio" class="btn-check btn-lg" name="form_data_escortrequired" id="yes-outlined" autocomplete="off" value="1" required>
|
||||
<label class="btn btn-outline-primary btn-lg" for="yes-outlined"><?php echo $transLang['COMMON-YES']; ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Init jSignature for Visitor field, onchange store in text field
|
||||
var $vsignature = $("#vsignature").jSignature({ width:"100%", height: 200 });
|
||||
true;
|
||||
$('#vsignature').change(function() {
|
||||
var data = $vsignature.jSignature('getData');
|
||||
$('#form_data_v_signature').val(data);
|
||||
});
|
||||
});
|
||||
$("form").submit(function() {
|
||||
if($('#form_data_v_signature').val() === '') {
|
||||
alert("<?php echo $transLang['SIGNATURE']; ?> <?php echo $transLang['REQUIRED']; ?>");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
</script>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="form_data_stage" id="form_data_stage" value="escortorterms" />
|
||||
<input type="hidden" name="form_data_siteid" id="form_data_siteid" value="<?php echo $form_data['form_data_siteid']; ?>" />
|
||||
<input type="hidden" name="form_data_isvendor" id="form_data_isvendor" value="<?php echo $form_data['form_data_isvendor']; ?>" />
|
||||
<input type="hidden" name="form_data_firstname" id="form_data_firstname" value="<?php echo $form_data['form_data_firstname']; ?>" />
|
||||
<input type="hidden" name="form_data_lastname" id="form_data_lastname" value="<?php echo $form_data['form_data_lastname']; ?>" />
|
||||
<input type="hidden" name="form_data_carnum" id="form_data_carnum" value="<?php echo $form_data['form_data_carnum']; ?>" />
|
||||
<input type="hidden" name="form_data_ssanum" id="form_data_ssanum" value="<?php echo $form_data['form_data_ssanum']; ?>" />
|
||||
<input type="hidden" name="form_data_company" id="form_data_company" value="<?php echo $form_data['form_data_company']; ?>" />
|
||||
<input type="hidden" name="form_data_contact1" id="form_data_contact1" value="<?php echo $form_data['form_data_contact1']; ?>" />
|
||||
<input type="hidden" name="form_data_contact2" id="form_data_contact2" value="<?php echo $form_data['form_data_contact2']; ?>" />
|
||||
<input type="hidden" name="form_data_workstart" id="form_data_workstart" value="<?php echo $form_data['form_data_workstart']; ?>" />
|
||||
<input type="hidden" name="form_data_workend" id="form_data_workend" value="<?php echo $form_data['form_data_workend']; ?>" />
|
||||
<input type="hidden" name="form_data_visittype" id="form_data_visittype" value="<?php echo $form_data['form_data_visittype']; ?>" />
|
||||
<input type="hidden" name="form_data_v_signature" id="form_data_v_signature" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="saveBtn"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END VISITORSIGNATURE STAGE CONTENT -->
|
||||
|
||||
<?php }elseif($form_data['form_data_stage'] === (string)"escortorterms" && $form_data['form_data_escortrequired'] === (int)"1"){ ?>
|
||||
|
||||
<!-- START ESCORTSIGNATURE STAGE CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" method="post">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['ENAME']; ?></span>
|
||||
<input type="text" id="form_data_escortname" name="form_data_escortname" class="form-control" placeholder="<?php echo $transLang['ETAG']; ?>" autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<h4><?php echo $transLang['ESIGNATURE']; ?>:</h4>
|
||||
<div id="esignature-parent sigs">
|
||||
<div id="esignature"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Init jSignature for Escort field, onchange store in text field
|
||||
var $esignature = $("#esignature").jSignature({ width:"100%", height: 200 });
|
||||
true;
|
||||
$('#esignature').change(function() {
|
||||
var data = $esignature.jSignature('getData');
|
||||
$('#form_data_e_signature').val(data);
|
||||
});
|
||||
});
|
||||
$("form").submit(function() {
|
||||
if($('#form_data_e_signature').val() === '') {
|
||||
alert("<?php echo $transLang['SIGNATURE']; ?> <?php echo $transLang['REQUIRED']; ?>");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
</script>
|
||||
<div class="row row-cols-1 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="form_data_stage" id="form_data_stage" value="terms" />
|
||||
<input type="hidden" name="form_data_siteid" id="form_data_siteid" value="<?php echo $form_data['form_data_siteid']; ?>" />
|
||||
<input type="hidden" name="form_data_isvendor" id="form_data_isvendor" value="<?php echo $form_data['form_data_isvendor']; ?>" />
|
||||
<input type="hidden" name="form_data_firstname" id="form_data_firstname" value="<?php echo $form_data['form_data_firstname']; ?>" />
|
||||
<input type="hidden" name="form_data_lastname" id="form_data_lastname" value="<?php echo $form_data['form_data_lastname']; ?>" />
|
||||
<input type="hidden" name="form_data_carnum" id="form_data_carnum" value="<?php echo $form_data['form_data_carnum']; ?>" />
|
||||
<input type="hidden" name="form_data_ssanum" id="form_data_ssanum" value="<?php echo $form_data['form_data_ssanum']; ?>" />
|
||||
<input type="hidden" name="form_data_company" id="form_data_company" value="<?php echo $form_data['form_data_company']; ?>" />
|
||||
<input type="hidden" name="form_data_contact1" id="form_data_contact1" value="<?php echo $form_data['form_data_contact1']; ?>" />
|
||||
<input type="hidden" name="form_data_contact2" id="form_data_contact2" value="<?php echo $form_data['form_data_contact2']; ?>" />
|
||||
<input type="hidden" name="form_data_workstart" id="form_data_workstart" value="<?php echo $form_data['form_data_workstart']; ?>" />
|
||||
<input type="hidden" name="form_data_workend" id="form_data_workend" value="<?php echo $form_data['form_data_workend']; ?>" />
|
||||
<input type="hidden" name="form_data_visittype" id="form_data_visittype" value="<?php echo $form_data['form_data_visittype']; ?>" />
|
||||
<input type="hidden" name="form_data_v_signature" id="form_data_v_signature" value="<?php echo $form_data['form_data_v_signature']; ?>" />
|
||||
<input type="hidden" name="form_data_escortrequired" id="form_data_escortrequired" value="<?php echo $form_data['form_data_escortrequired']; ?>" />
|
||||
<input type="hidden" name="form_data_e_signature" id="form_data_e_signature" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="saveBtn"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END ESCORTSIGNATURE STAGE CONTENT -->
|
||||
|
||||
<?php }elseif(($form_data['form_data_stage'] === (string)"escortorterms" && $form_data['form_data_escortrequired'] === (int)"0") || ($form_data['form_data_stage'] === (string)"escortorterms" && $form_data['form_data_isvendor'] === (int)"1") || $form_data['form_data_stage'] === (string)"terms"){ ?>
|
||||
|
||||
<!-- START TERMS STAGE CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><i class="fas fa-sign-in-alt"></i> <?php echo $transLang['SIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<form name="form-signin" class="form-signin" method="post" action="signin_display.php">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<?php if($SiteInfo->getSite($form_data['form_data_siteid'], $uid, "0", "0")[0]["sites_region"] == "US") { ?>
|
||||
<p><?php echo $transLang['ACKNOWLEDGEMENT']; ?></p>
|
||||
<?php } ?>
|
||||
<p><?php echo $transLang['COVID_ACKNOWLEDGEMENT']; ?><p>
|
||||
<p><?php echo $transLang['GDPR_TEXT']; ?><p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 mb-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<a class="btn btn-outline-secondary btn-block" data-bs-toggle="modal" data-bs-target="#termsModalLong" href="<?php echo $StaticFunctions->getRules(); ?>"><?php echo $transLang['REFERENCE']; ?>: (<?php echo $transLang['ACKNOWLEDGEMENT_DOC_NAME']; ?>)</a>
|
||||
<?php if($form_data['form_data_isvendor'] === (int)"1") { ?>
|
||||
<a class="btn btn-outline-secondary btn-block" data-bs-toggle="modal" data-bs-target="#termsVendorModalLong" href="<?php echo $StaticFunctions->getVendorRules(); ?>"><?php echo $transLang['REFERENCE']; ?>: (<?php echo $transLang['ACKNOWLEDGEMENT_VENDOR_DOC_NAME']; ?>)</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2 mb-4">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="form_data_stage" id="form_data_stage" value="terms" />
|
||||
<input type="hidden" name="form_data_siteid" id="form_data_siteid" value="<?php echo $form_data['form_data_siteid']; ?>" />
|
||||
<input type="hidden" name="form_data_isvendor" id="form_data_isvendor" value="<?php echo $form_data['form_data_isvendor']; ?>" />
|
||||
<input type="hidden" name="form_data_firstname" id="form_data_firstname" value="<?php echo $form_data['form_data_firstname']; ?>" />
|
||||
<input type="hidden" name="form_data_lastname" id="form_data_lastname" value="<?php echo $form_data['form_data_lastname']; ?>" />
|
||||
<input type="hidden" name="form_data_carnum" id="form_data_carnum" value="<?php echo $form_data['form_data_carnum']; ?>" />
|
||||
<input type="hidden" name="form_data_ssanum" id="form_data_ssanum" value="<?php echo $form_data['form_data_ssanum']; ?>" />
|
||||
<input type="hidden" name="form_data_company" id="form_data_company" value="<?php echo $form_data['form_data_company']; ?>" />
|
||||
<input type="hidden" name="form_data_contact1" id="form_data_contact1" value="<?php echo $form_data['form_data_contact1']; ?>" />
|
||||
<input type="hidden" name="form_data_contact2" id="form_data_contact2" value="<?php echo $form_data['form_data_contact2']; ?>" />
|
||||
<input type="hidden" name="form_data_workstart" id="form_data_workstart" value="<?php echo $form_data['form_data_workstart']; ?>" />
|
||||
<input type="hidden" name="form_data_workend" id="form_data_workend" value="<?php echo $form_data['form_data_workend']; ?>" />
|
||||
<input type="hidden" name="form_data_visittype" id="form_data_visittype" value="<?php echo $form_data['form_data_visittype']; ?>" />
|
||||
<input type="hidden" name="form_data_v_signature" id="form_data_v_signature" value="<?php echo $form_data['form_data_v_signature']; ?>" />
|
||||
<input type="hidden" name="form_data_escortrequired" id="form_data_escortrequired" value="<?php echo $form_data['form_data_escortrequired']; ?>" />
|
||||
<input type="hidden" name="form_data_e_signature" id="form_data_e_signature" value="<?php echo $form_data['form_data_e_signature']; ?>" />
|
||||
<input type="hidden" name="form_data_escortname" id="form_data_escortname" value="<?php echo $form_data['form_data_escortname']; ?>" />
|
||||
<a class="btn btn-lg btn-danger" href="index.php"><i class="fas fa-ban"></i> <?php echo $transLang['CANCEL']; ?></a>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="saveBtn"><i class="fas fa-save"></i> <?php echo $transLang['SIGNIN']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END TERMS STAGE CONTENT -->
|
||||
|
||||
<?php }else{ ?>
|
||||
<!-- INVALID STAGE -->
|
||||
<?php } ?>
|
||||
|
||||
<?php }; require_once("inc/footer.inc.php"); ?>
|
||||
|
94
signin_0.php
94
signin_0.php
@ -1,94 +0,0 @@
|
||||
<?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
|
||||
ini_set('session.use_cookies', '1');
|
||||
ini_set('session.use_only_cookies', '1');
|
||||
ini_set('session.cookie_secure', '0');
|
||||
ini_set('session.cookie_httponly', '0');
|
||||
ini_set('session.cookie_samesite', 'Lax');
|
||||
session_save_path('.tmp'); // TEMP
|
||||
session_start(); // START
|
||||
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
|
||||
use App\LobbySIO\Misc\Csrf; // ANTICSRF
|
||||
$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 {
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
//header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false);
|
||||
if (!empty($_GET['a'])) {
|
||||
echo '<pre>' . print_r($_POST, true) . '</pre>';
|
||||
echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful');
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- START CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<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_1.php" method="post">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-2">
|
||||
<div class="col">
|
||||
<?php echo $transLang['CUSTOMERVENDOR_DESC']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="vtype" value="submit" />
|
||||
<button id="customer-submit" type="submit" name="submit" value="0" class="btn btn-success btn-lg" tabindex="-1" role="button"><?php echo $transLang['CUSTOMER']; ?></button>
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<button id="vendor-submit" type="submit" name="submit" value="1" class="btn btn-success btn-lg" tabindex="-1" role="button"><?php echo $transLang['VENDORINFO-VENDORTITLE']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CONTENT -->
|
||||
|
||||
<?php }; require_once("inc/footer.inc.php"); ?>
|
231
signin_1.php
231
signin_1.php
@ -1,231 +0,0 @@
|
||||
<?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
|
||||
ini_set('session.use_cookies', '1');
|
||||
ini_set('session.use_only_cookies', '1');
|
||||
ini_set('session.cookie_secure', '0');
|
||||
ini_set('session.cookie_httponly', '0');
|
||||
ini_set('session.cookie_samesite', 'Lax');
|
||||
session_save_path('.tmp'); // TEMP
|
||||
session_start(); // START
|
||||
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
|
||||
use App\LobbySIO\Misc\Csrf; // ANTICSRF
|
||||
$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 {
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
//header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false);
|
||||
if (!empty($_GET['a'])) {
|
||||
echo '<pre>' . print_r($_POST, true) . '</pre>';
|
||||
echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful');
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
if (empty(filter_input(INPUT_POST, 'submit', FILTER_SANITIZE_STRING))) { $isvendor="0";} else {$isvendor=filter_input(INPUT_POST, 'submit', FILTER_SANITIZE_STRING);};
|
||||
?>
|
||||
|
||||
<?php if ($isvendor==="0") { ?>
|
||||
<!-- START CUSTOMER CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<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_2.php" method="post">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['NAME']; ?></span>
|
||||
<input type="text" id="firstname" name="firstname" class="form-control" placeholder="<?php echo $transLang['FIRST']; ?>" required autofocus>
|
||||
<input type="text" id="lastname" name="lastname" class="form-control" placeholder="<?php echo $transLang['LAST']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['CARNUM']; ?></span>
|
||||
<input type="text" id="company" name="carnum" class="form-control" placeholder="<?php echo $transLang['CARNUM']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['SSANUM']; ?></span>
|
||||
<input type="text" id="company" name="ssanum" class="form-control" placeholder="<?php echo $transLang['SSANUM']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['COMPANY']; ?></span>
|
||||
<input type="text" id="company" name="company" class="form-control" placeholder="<?php echo $transLang['COMPANY']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="isvendor" id="isvendor" value="<?php echo $isvendor; ?>" />
|
||||
<input type="hidden" name="siteid" id="siteid" value="<?php echo $siteid; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="signin"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CUSTOMER CONTENT -->
|
||||
<?php } elseif ($isvendor==="1") { ?>
|
||||
<!-- START VENDOR CONTENT -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<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_2.php" method="post">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['NAME']; ?></span>
|
||||
<input type="text" id="firstname" name="firstname" class="form-control" placeholder="<?php echo $transLang['FIRST']; ?>" required autofocus>
|
||||
<input type="text" id="lastname" name="lastname" class="form-control" placeholder="<?php echo $transLang['LAST']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['CARNUM']; ?></span>
|
||||
<input type="text" id="company" name="carnum" class="form-control" placeholder="<?php echo $transLang['CARNUM']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['SSANUM']; ?></span>
|
||||
<input type="text" id="company" name="ssanum" class="form-control" placeholder="<?php echo $transLang['SSANUM']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['COMPANY']; ?></span>
|
||||
<input type="text" id="company" name="company" class="form-control" placeholder="<?php echo $transLang['COMPANY']; ?>" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-CONTACT1']; ?></span>
|
||||
<input type="text" id="db_vendorinfo_contact1" name="db_vendorinfo_contact1" class="form-control" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['VENDORINFO-CONTACT2']; ?></span>
|
||||
<input type="text" id="db_vendorinfo_contact2" name="db_vendorinfo_contact2" class="form-control" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-2">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" data-bs-toggle="datetimepicker" data-target=".datetimepicker-db_vendorinfo_workstart"><?php echo $transLang['VENDORINFO-WORKSTART']; ?> <i class="fas fa-clock"></i></span>
|
||||
<input placeholder="" name="db_vendorinfo_workstart" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-db_vendorinfo_workstart" id="datetimepicker-db_vendorinfo_workstart" data-toggle="datetimepicker" data-target=".datetimepicker-db_vendorinfo_workstart"/>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.datetimepicker-db_vendorinfo_workstart').datetimepicker({'timeZone': '<?php echo $timezone; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" data-bs-toggle="datetimepicker" data-target=".datetimepicker-db_vendorinfo_workend"><?php echo $transLang['VENDORINFO-WORKEND']; ?> <i class="fas fa-clock"></i></span>
|
||||
<input placeholder="" name="db_vendorinfo_workend" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-db_vendorinfo_workend" id="datetimepicker-db_vendorinfo_workend" data-toggle="datetimepicker" data-target=".datetimepicker-db_vendorinfo_workend"/>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('.datetimepicker-db_vendorinfo_workend').datetimepicker({'timeZone': '<?php echo $timezone; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<input type="hidden" name="isvendor" id="isvendor" value="<?php echo $isvendor; ?>" />
|
||||
<input type="hidden" name="siteid" id="siteid" value="<?php echo $siteid; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="signin"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END VENDOR CONTENT -->
|
||||
<?php }; ?>
|
||||
<?php } else { ?>
|
||||
<!-- START ERROR -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><?php echo $transLang['NOSIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END ERROR -->
|
||||
<?php }; ?>
|
||||
|
||||
<?php }; require_once("inc/footer.inc.php"); ?>
|
129
signin_2.php
129
signin_2.php
@ -1,129 +0,0 @@
|
||||
<?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
|
||||
ini_set('session.use_cookies', '1');
|
||||
ini_set('session.use_only_cookies', '1');
|
||||
ini_set('session.cookie_secure', '0');
|
||||
ini_set('session.cookie_httponly', '0');
|
||||
ini_set('session.cookie_samesite', 'Lax');
|
||||
session_save_path('.tmp'); // TEMP
|
||||
session_start(); // START
|
||||
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
|
||||
use App\LobbySIO\Misc\Csrf; // ANTICSRF
|
||||
$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 {
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
//header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false);
|
||||
if (!empty($_GET['a'])) {
|
||||
echo '<pre>' . print_r($_POST, true) . '</pre>';
|
||||
echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful');
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- START CONTENT -->
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
if (empty(filter_input(INPUT_POST, 'carnum', FILTER_SANITIZE_STRING))) { $carnum="";} else {$carnum=filter_input(INPUT_POST, 'carnum', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'ssanum', FILTER_SANITIZE_STRING))) { $ssanum="";} else {$ssanum=filter_input(INPUT_POST, 'ssanum', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING))) { $firstname="";} else {$firstname=filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING))) { $lastname="";} else {$lastname=filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING))) { $company="";} else {$company=filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'isvendor', FILTER_SANITIZE_STRING))) { $isvendor="0";} else {$isvendor=filter_input(INPUT_POST, 'isvendor', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_contact1', FILTER_SANITIZE_STRING))) { $db_vendorinfo_contact1="";} else {$db_vendorinfo_contact1=filter_input(INPUT_POST, 'db_vendorinfo_contact1', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_contact2', FILTER_SANITIZE_STRING))) { $db_vendorinfo_contact2="";} else {$db_vendorinfo_contact2=filter_input(INPUT_POST, 'db_vendorinfo_contact2', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_workstart', FILTER_SANITIZE_STRING))) { $db_vendorinfo_workstart="";} else {$db_vendorinfo_workstart=filter_input(INPUT_POST, 'db_vendorinfo_workstart', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_workend', FILTER_SANITIZE_STRING))) { $db_vendorinfo_workend="";} else {$db_vendorinfo_workend=filter_input(INPUT_POST, 'db_vendorinfo_workend', FILTER_SANITIZE_STRING);};
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<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">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['REASON']; ?></span>
|
||||
<select class="form-select" id="visit_type" aria-label="Visit Type" name="visit_type" required>
|
||||
<option value="" selected><?php echo $transLang['SELECTREASON']; ?></option><?php foreach($VisitTypeInfo->getInfoVisitType($isvendor,"%") 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 row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<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="isvendor" id="isvendor" value="<?php echo $isvendor; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_contact1" id="db_vendorinfo_contact1" value="<?php echo $db_vendorinfo_contact1; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_contact2" id="db_vendorinfo_contact2" value="<?php echo $db_vendorinfo_contact2; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_workstart" id="db_vendorinfo_workstart" value="<?php echo $db_vendorinfo_workstart; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_workend" id="db_vendorinfo_workend" value="<?php echo $db_vendorinfo_workend; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="signin"><?php echo $transLang['NEXT']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CONTENT -->
|
||||
<?php } else { ?>
|
||||
<!-- START ERROR -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><?php echo $transLang['NOSIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END ERROR -->
|
||||
<?php }; ?>
|
||||
|
||||
<?php }; require_once("inc/footer.inc.php"); ?>
|
179
signin_3.php
179
signin_3.php
@ -1,179 +0,0 @@
|
||||
<?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
|
||||
ini_set('session.use_cookies', '1');
|
||||
ini_set('session.use_only_cookies', '1');
|
||||
ini_set('session.cookie_secure', '0');
|
||||
ini_set('session.cookie_httponly', '0');
|
||||
ini_set('session.cookie_samesite', 'Lax');
|
||||
session_save_path('.tmp'); // TEMP
|
||||
session_start(); // START
|
||||
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
|
||||
use App\LobbySIO\Misc\Csrf; // ANTICSRF
|
||||
$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 {
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
//header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false);
|
||||
if (!empty($_GET['a'])) {
|
||||
echo '<pre>' . print_r($_POST, true) . '</pre>';
|
||||
echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful');
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- START CONTENT -->
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
if (empty(filter_input(INPUT_POST, 'carnum', FILTER_SANITIZE_STRING))) { $carnum="";} else {$carnum=filter_input(INPUT_POST, 'carnum', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'ssanum', FILTER_SANITIZE_STRING))) { $ssanum="";} else {$ssanum=filter_input(INPUT_POST, 'ssanum', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING))) { $firstname="";} else {$firstname=filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING))) { $lastname="";} else {$lastname=filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING))) { $company="";} else {$company=filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'visit_type', FILTER_SANITIZE_STRING))) { $visit_type="";} else {$visit_type=filter_input(INPUT_POST, 'visit_type', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'isvendor', FILTER_SANITIZE_STRING))) { $isvendor="0";} else {$isvendor=filter_input(INPUT_POST, 'isvendor', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_contact1', FILTER_SANITIZE_STRING))) { $db_vendorinfo_contact1="";} else {$db_vendorinfo_contact1=filter_input(INPUT_POST, 'db_vendorinfo_contact1', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_contact2', FILTER_SANITIZE_STRING))) { $db_vendorinfo_contact2="";} else {$db_vendorinfo_contact2=filter_input(INPUT_POST, 'db_vendorinfo_contact2', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_workstart', FILTER_SANITIZE_STRING))) { $db_vendorinfo_workstart="";} else {$db_vendorinfo_workstart=filter_input(INPUT_POST, 'db_vendorinfo_workstart', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_workend', FILTER_SANITIZE_STRING))) { $db_vendorinfo_workend="";} else {$db_vendorinfo_workend=filter_input(INPUT_POST, 'db_vendorinfo_workend', FILTER_SANITIZE_STRING);};
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<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">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<?php if ($isvendor==="0") { ?>
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="accordion-item">
|
||||
<h5 class="accordion-header" id="headingOne">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne"><?php echo $transLang['ESECTION']; ?></button>
|
||||
</h5>
|
||||
<div id="collapseOne" class="accordion-collapse collapse" data-bs-parent="#accordionExample">
|
||||
<div class="accordion-body">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><?php echo $transLang['ENAME']; ?></span>
|
||||
<input type="text" id="escort" name="escort" class="form-control" placeholder="<?php echo $transLang['ETAG']; ?>" autofocus>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4><?php echo $transLang['ESIGNATURE']; ?>:</h4>
|
||||
<div id="esignature-parent sigs">
|
||||
<div id="esignature"></div>
|
||||
</div>
|
||||
<input type="hidden" name="e_signature" id="e_signature"></input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }; ?>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h4><?php echo $transLang['VSIGNATURE']; ?>:</h4>
|
||||
<div id="vsignature-parent sigs">
|
||||
<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; ?>" />
|
||||
<input type="hidden" name="isvendor" id="isvendor" value="<?php echo $isvendor; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_contact1" id="db_vendorinfo_contact1" value="<?php echo $db_vendorinfo_contact1; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_contact2" id="db_vendorinfo_contact2" value="<?php echo $db_vendorinfo_contact2; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_workstart" id="db_vendorinfo_workstart" value="<?php echo $db_vendorinfo_workstart; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_workend" id="db_vendorinfo_workend" value="<?php echo $db_vendorinfo_workend; ?>" />
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="signin"><?php echo $transLang['NEXT']; ?></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({ width:600, height: 200 });
|
||||
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({ width:600, height: 200 });
|
||||
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>
|
||||
<!-- END CONTENT -->
|
||||
<?php } else { ?>
|
||||
<!-- START ERROR -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><?php echo $transLang['NOSIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END ERROR -->
|
||||
<?php }; ?>
|
||||
|
||||
<?php }; require_once("inc/footer.inc.php"); ?>
|
172
signin_4.php
172
signin_4.php
@ -1,172 +0,0 @@
|
||||
<?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
|
||||
ini_set('session.use_cookies', '1');
|
||||
ini_set('session.use_only_cookies', '1');
|
||||
ini_set('session.cookie_secure', '0');
|
||||
ini_set('session.cookie_httponly', '0');
|
||||
ini_set('session.cookie_samesite', 'Lax');
|
||||
session_save_path('.tmp'); // TEMP
|
||||
session_start(); // START
|
||||
require_once __DIR__ . '/autoload.php'; // AUTOLOAD
|
||||
use App\LobbySIO\Misc\Csrf; // ANTICSRF
|
||||
$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 {
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
//header("Content-Security-Policy: script-src 'self' 'unsafe-inline'; script-src-elem 'self'; script-src-attr 'self'; style-src 'self'; style-src-elem 'self'; style-src-attr 'self'; img-src 'self'; connect-src 'self'; frame-src 'self'; font-src 'self'; media-src 'self'; object-src 'self'; manifest-src 'self'; worker-src 'self'; prefetch-src 'self'; form-action 'self'; frame-ancestors 'self'; default-src 'self'", false);
|
||||
if (!empty($_GET['a'])) {
|
||||
echo '<pre>' . print_r($_POST, true) . '</pre>';
|
||||
echo 'Verification has been : ' . (Csrf::verifyToken('home') ? 'successful' : 'unsuccessful');
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- START CONTENT -->
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
if (empty(filter_input(INPUT_POST, 'carnum', FILTER_SANITIZE_STRING))) { $carnum="";} else {$carnum=filter_input(INPUT_POST, 'carnum', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'ssanum', FILTER_SANITIZE_STRING))) { $ssanum="";} else {$ssanum=filter_input(INPUT_POST, 'ssanum', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING))) { $firstname="";} else {$firstname=filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING))) { $lastname="";} else {$lastname=filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING))) { $company="";} else {$company=filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'visit_type', FILTER_SANITIZE_STRING))) { $visit_type="";} else {$visit_type=filter_input(INPUT_POST, 'visit_type', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'v_signature', FILTER_SANITIZE_STRING))) { $v_signature="";} else {$v_signature=filter_input(INPUT_POST, 'v_signature', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'e_signature', FILTER_SANITIZE_STRING))) { $e_signature="";} else {$e_signature=filter_input(INPUT_POST, 'e_signature', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'escort', FILTER_SANITIZE_STRING))) { $escort="";} else {$escort=filter_input(INPUT_POST, 'escort', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'isvendor', FILTER_SANITIZE_STRING))) { $isvendor="0";} else {$isvendor=filter_input(INPUT_POST, 'isvendor', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_contact1', FILTER_SANITIZE_STRING))) { $db_vendorinfo_contact1="";} else {$db_vendorinfo_contact1=filter_input(INPUT_POST, 'db_vendorinfo_contact1', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_contact2', FILTER_SANITIZE_STRING))) { $db_vendorinfo_contact2="";} else {$db_vendorinfo_contact2=filter_input(INPUT_POST, 'db_vendorinfo_contact2', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_workstart', FILTER_SANITIZE_STRING))) { $db_vendorinfo_workstart="";} else {$db_vendorinfo_workstart=filter_input(INPUT_POST, 'db_vendorinfo_workstart', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_workend', FILTER_SANITIZE_STRING))) { $db_vendorinfo_workend="";} else {$db_vendorinfo_workend=filter_input(INPUT_POST, 'db_vendorinfo_workend', FILTER_SANITIZE_STRING);};
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<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">
|
||||
<?php echo Csrf::getInputToken('home') ?>
|
||||
<div class="row row-cols-1">
|
||||
<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") { ?>
|
||||
<p><?php echo $transLang['ACKNOWLEDGEMENT']; ?></p>
|
||||
<?php } ?>
|
||||
<p><?php echo $transLang['COVID_ACKNOWLEDGEMENT']; ?><p>
|
||||
<p><?php echo $transLang['GDPR_TEXT']; ?><p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<a class="btn btn-outline-secondary btn-block" data-bs-toggle="modal" data-bs-target="#termsModalLong" href="<?php echo $StaticFunctions->getRules(); ?>"><?php echo $transLang['REFERENCE']; ?>: (<?php echo $transLang['ACKNOWLEDGEMENT_DOC_NAME']; ?>)</a>
|
||||
<?php if($isvendor==="1") { ?>
|
||||
<a class="btn btn-outline-secondary btn-block" data-bs-toggle="modal" data-bs-target="#termsVendorModalLong" href="<?php echo $StaticFunctions->getVendorRules(); ?>"><?php echo $transLang['REFERENCE']; ?>: (<?php echo $transLang['ACKNOWLEDGEMENT_VENDOR_DOC_NAME']; ?>)</a>
|
||||
<?php }; ?>
|
||||
<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; ?>" />
|
||||
<input type="hidden" name="isvendor" id="isvendor" value="<?php echo $isvendor; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_contact1" id="db_vendorinfo_contact1" value="<?php echo $db_vendorinfo_contact1; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_contact2" id="db_vendorinfo_contact2" value="<?php echo $db_vendorinfo_contact2; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_workstart" id="db_vendorinfo_workstart" value="<?php echo $db_vendorinfo_workstart; ?>" />
|
||||
<input type="hidden" name="db_vendorinfo_workend" id="db_vendorinfo_workend" value="<?php echo $db_vendorinfo_workend; ?>" />
|
||||
<a class="btn btn-lg btn-danger" href="index.php"><i class="fas fa-ban"></i> <?php echo $transLang['CANCEL']; ?></a>
|
||||
<button type="submit" id="saveBtn" class="btn btn-lg btn-success" name="signin"><?php echo $transLang['SIGNIN']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CONTENT -->
|
||||
<!-- START TERMS MODAL -->
|
||||
<div class="modal fade" id="termsModalLong" tabindex="-1" role="dialog">
|
||||
<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="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<object type="application/pdf" data="<?php echo $StaticFunctions->getRules(); ?>" width="700" height="600">_</object>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END TERMS MODAL -->
|
||||
<!-- START TERMS MODAL -->
|
||||
<div class="modal fade" id="termsVendorModalLong" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="termsVendorModalLongTitle"><?php echo $transLang['TERMSTITLE']; ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<object type="application/pdf" data="<?php echo $StaticFunctions->getVendorRules(); ?>" width="700" height="600">_</object>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END TERMS MODAL -->
|
||||
<?php } else { ?>
|
||||
<!-- START ERROR -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<h2><?php echo $transLang['NOSIGNIN']; ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END ERROR -->
|
||||
<?php }; ?>
|
||||
|
||||
<?php }; require_once("inc/footer.inc.php"); ?>
|
@ -65,20 +65,47 @@
|
||||
|
||||
|
||||
|
||||
<!-- START CONTENT -->
|
||||
<?php if (!empty($_POST)) { // PROCESS POST
|
||||
if (empty(filter_input(INPUT_POST, 'carnum', FILTER_SANITIZE_STRING))) { $carnum="";} else {$carnum=filter_input(INPUT_POST, 'carnum', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'ssanum', FILTER_SANITIZE_STRING))) { $ssanum="";} else {$ssanum=filter_input(INPUT_POST, 'ssanum', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'isvendor', FILTER_SANITIZE_STRING))) { $isvendor="0";} else {$isvendor=filter_input(INPUT_POST, 'isvendor', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_contact1', FILTER_SANITIZE_STRING))) { $db_vendorinfo_contact1="";} else {$db_vendorinfo_contact1=filter_input(INPUT_POST, 'db_vendorinfo_contact1', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_contact2', FILTER_SANITIZE_STRING))) { $db_vendorinfo_contact2="";} else {$db_vendorinfo_contact2=filter_input(INPUT_POST, 'db_vendorinfo_contact2', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_workstart', FILTER_SANITIZE_STRING))) { $db_vendorinfo_workstart="";} else {$db_vendorinfo_workstart=filter_input(INPUT_POST, 'db_vendorinfo_workstart', FILTER_SANITIZE_STRING);};
|
||||
if (empty(filter_input(INPUT_POST, 'db_vendorinfo_workend', FILTER_SANITIZE_STRING))) { $db_vendorinfo_workend="";} else {$db_vendorinfo_workend=filter_input(INPUT_POST, 'db_vendorinfo_workend', FILTER_SANITIZE_STRING);};
|
||||
$visitid = $VisitActions->newVisit(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'visit_type', FILTER_SANITIZE_STRING), $StaticFunctions->getUTC(), filter_input(INPUT_POST, 'v_signature', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'siteid', FILTER_SANITIZE_STRING), "1", filter_input(INPUT_POST, 'e_signature', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'escort', FILTER_SANITIZE_STRING), $carnum, $ssanum, $isvendor);
|
||||
if ($isvendor == "1") {
|
||||
<?php
|
||||
// FILTER POSTED DATA
|
||||
$form_data = filter_input_array(INPUT_POST, [
|
||||
'form_data_stage' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_siteid' => (int)FILTER_VALIDATE_INT,
|
||||
'form_data_isvendor' => (int)FILTER_VALIDATE_INT,
|
||||
'form_data_firstname' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_lastname' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_carnum' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_ssanum' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_company' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_contact1' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_contact2' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_workstart' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_workend' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_visittype' => (int)FILTER_VALIDATE_INT,
|
||||
'form_data_escortrequired' => (int)FILTER_VALIDATE_INT,
|
||||
'form_data_v_signature' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_e_signature' => (string)FILTER_SANITIZE_STRING,
|
||||
'form_data_escortname' => (string)FILTER_SANITIZE_STRING
|
||||
]);
|
||||
if (empty($form_data['form_data_carnum'])) { $carnum="";} else {$carnum=$form_data['form_data_carnum'];}
|
||||
if (empty($form_data['form_data_ssanum'])) { $ssanum="";} else {$ssanum=$form_data['form_data_ssanum'];}
|
||||
if (empty($form_data['form_data_isvendor'])) { $isvendor="0";} else {$isvendor=$form_data['form_data_isvendor'];}
|
||||
if (empty($form_data['form_data_contact1'])) { $db_vendorinfo_contact1="";} else {$db_vendorinfo_contact1=$form_data['form_data_contact1'];}
|
||||
if (empty($form_data['form_data_contact2'])) { $db_vendorinfo_contact2="";} else {$db_vendorinfo_contact2=$form_data['form_data_contact2'];}
|
||||
if (empty($form_data['form_data_workstart'])) { $db_vendorinfo_workstart="";} else {$db_vendorinfo_workstart=$form_data['form_data_workstart'];}
|
||||
if (empty($form_data['form_data_workend'])) { $db_vendorinfo_workend="";} else {$db_vendorinfo_workend=$form_data['form_data_workend'];}
|
||||
$visitid = $VisitActions->newVisit($form_data['form_data_firstname'], $form_data['form_data_lastname'], $form_data['form_data_company'], $form_data['form_data_visittype'], $StaticFunctions->getUTC(), $form_data['form_data_v_signature'], $form_data['form_data_siteid'], "1", $form_data['form_data_e_signature'], $form_data['form_data_escortname'], $carnum, $ssanum, $isvendor);
|
||||
if($form_data['form_data_isvendor'] === (int)"1") {
|
||||
$vendorid = $VisitActions->setInfoVendorVisitNew($visitid, $db_vendorinfo_contact1, $db_vendorinfo_contact2, $db_vendorinfo_workstart, $db_vendorinfo_workend);
|
||||
};
|
||||
?>
|
||||
}
|
||||
// SET INITIAL STAGE
|
||||
if(!empty($form_data['form_data_stage'])){
|
||||
$form_data['form_data_stage'] = 'readytosubmit';
|
||||
}?>
|
||||
|
||||
<!-- CONTENT -->
|
||||
|
||||
<?php if($form_data['form_data_stage'] === "readytosubmit"){ ?>
|
||||
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
@ -95,7 +122,7 @@ if ($isvendor == "1") {
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $timenow; ?><br><?php echo $transLang[$VisitTypeInfo->getInfoVisitType("%", filter_input(INPUT_POST, 'visit_type', FILTER_SANITIZE_STRING))[0]["visittypes_name"]]; ?></td><td><?php echo filter_input(INPUT_POST, 'company', FILTER_SANITIZE_STRING); ?></td><td><?php echo filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING); ?>, <?php echo filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING); ?><br><img src="<?php echo filter_input(INPUT_POST, 'v_signature', FILTER_SANITIZE_STRING); ?>" width="200" height="50" /></td><td><?php if (!empty(filter_input(INPUT_POST, 'escort', FILTER_SANITIZE_STRING))): echo filter_input(INPUT_POST, 'escort', FILTER_SANITIZE_STRING); endif; ?><br /><?php if (!empty(filter_input(INPUT_POST, 'e_signature', FILTER_SANITIZE_STRING))): ?><img src="<?php echo filter_input(INPUT_POST, 'e_signature', FILTER_SANITIZE_STRING); ?>" width="200" height="50" /><?php endif; ?></td>
|
||||
<td><?php echo $timenow; ?><br><?php echo $transLang[$VisitTypeInfo->getInfoVisitType("%", $form_data['form_data_visittype'])[0]["visittypes_name"]]; ?></td><td><?php echo $form_data['form_data_company']; ?></td><td><?php echo $form_data['form_data_lastname']; ?>, <?php echo $form_data['form_data_firstname']; ?><br><img src="<?php echo $form_data['form_data_v_signature']; ?>" width="200" height="50" /></td><td><?php if (!empty($form_data['form_data_escortname'])): echo $form_data['form_data_escortname']; endif; ?><br /><?php if (!empty($form_data['form_data_e_signature'])): ?><img src="<?php echo $form_data['form_data_e_signature']; ?>" width="200" height="50" /><?php endif; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -103,7 +130,7 @@ if ($isvendor == "1") {
|
||||
</div>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { ?>
|
||||
<?php if($SiteInfo->getSite($form_data['form_data_siteid'], $uid, "0", "0")[0]["sites_region"] == "US") { ?>
|
||||
<p><?php echo $transLang['ACKNOWLEDGEMENT']; ?></p>
|
||||
<?php } ?>
|
||||
<p><?php echo $transLang['GDPR_TEXT']; ?><p>
|
||||
@ -115,7 +142,7 @@ if ($isvendor == "1") {
|
||||
</div>
|
||||
</div>
|
||||
<!-- END CONTENT -->
|
||||
<?php } else { ?>
|
||||
<?php }else{ ?>
|
||||
<!-- START ERROR -->
|
||||
<div class="container">
|
||||
<div class="row row-cols-1">
|
||||
|
Loading…
Reference in New Issue
Block a user