<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Face Dedection</title>
<style type="text/css">
#apDiv1 {
position: absolute;
width: 500px;
height: 415px;
z-index: 1;
left: 67px;
top: 10px;
}
#apDiv2 {
position: absolute;
width: 344px;
height: 410px;
z-index: 2;
left: 580px;
top: 10px;
}
#apDiv2 table tr td p {
color: #3732FC;
}
#apDiv3 {
position: absolute;
width: 400px;
height: 416px;
z-index: 2;
left: 20px;
top: 280px;
}
#apDiv3 table tr td ul li {
color: #00F;
}
#apDiv3 table tr th {
color: #CCC;
}
#apDiv3 table {
color: #000;
font-size: 12;
}
#apDiv3 table tr th {
font-size: 12px;
}
</style>
<link href="../scambureau/SpryAssets/SpryTooltip.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body,td,th {
color: #000;
font-size: large;
}
#progress #result {
background: green;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 12px;
font-family: arial;
transition: width .3s;
}
.overlay {
width: 100%;
height: 100%;
/*background: rgba(0,0,0,.5);*/
position: absolute;
top: 0;
display:none;
align-items: center;
justify-content: center;
color: #fff;
}
td blockquote{position:relative}
img#progress {
height: auto;
}
.wait{ display:none;align-items: center;justify-content: center; text-align:center;width: 100%;}
#search-result{display:none}
#apDiv4 {
position: absolute;
width: 420px;
height: 212px;
z-index: 3;
top: 1px;
left: 9px;
}
#apDiv4 #form1 table tr td {
font-size: 12px;
}
</style>
<link href="../scambureau/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="../scambureau/SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#apDiv5 {
position: absolute;
width: 350px;
height: 293px;
z-index: 4;
left: 480px;
top: 280px;
}
</style>
<link href="../scambureau/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" media="min-device-height" />
<style type="text/css">
#apDiv6 {
position: absolute;
width: 458px;
height: 378px;
z-index: 1;
left: 483px;
top: 355px;
}
body {
margin-left: 0px;
background-color: #CCC;
}
</style>
<script src="../scambureau/SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../scambureau/SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
</head>
<body bgcolor="#CCCCCC" text="#000000">
<div id="apDiv3">
<table width="200" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><ul>
<ul>
<li style="color: #03C; font-size: 12px;"> PICTURE WINDOW</li>
</ul>
</ul></td>
</tr>
<tr>
<td><blockquote>
<blockquote>
<div class='overlay'><img src="../scambureau/img/ScanProgressFaster.gif"></div>
<pre><img name="target-img" id='target-img' src="../scambureau/Buttons/NoPhoto.gif" width="190" height="210" alt="" style="background-color: #CCCCCC" /></pre>
</blockquote>
</blockquote></td>
</tr>
</table>
<table width="381" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center" valign="bottom" nowrap="nowrap" bgcolor="#CCCCCC" scope="col">
<p class='wait'>PLEASE WAIT !</p>
<input type="button" name="search-result" id="search-result" value="See Report Results" />
<input name="upload" type="button" class="textfieldValidState" id="upload" value="UPLOAD FACE PICTURE" />
<input type="file" name="file-upload" id="file-upload" style='display:none' accept="image/*">
</td>
</tr>
<tr>
<td colspan="2" nowrap="nowrap" bgcolor="#CCCCCC" scope="col"><img src name="progress" id="progress"></td>
</tr>
<tr>
<td colspan="2" align="center" valign="middle"> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
<p> </p>
</div>
<div id="apDiv4">
<div id="apDiv6">
<table width="430" border="1" align="center">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<th colspan="2" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"><em><strong>SCANING PICTURE</strong></em></th>
</tr>
<tr>
<th width="432" rowspan="3" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th width="8" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th width="432" align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
<tr>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
<th align="center" valign="middle" nowrap="nowrap" bgcolor="#FFFFFF"> </th>
</tr>
</table>
</div>
<form id="form1" name="form1" method="post" action="">
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<th scope="col"> </th>
<th width="329" style="color: #F00; font-weight: bold; font-size: 18px;" scope="col">DATA WINDOW</th>
</tr>
<tr>
<th width="78" scope="col"> </th>
<th width="329" align="center" nowrap="nowrap" style="color: #F88; font-size: 12px; font-weight: bold;" scope="col"><span style="font-size: 14px; font-weight: bold; color: #FF4848;"><var>Please Enter Information about the face you are looking for</var></span><var>.</var></th>
</tr>
<tr>
<th align="right" nowrap="nowrap" bgcolor="#CCCCCC">Gender</th>
<td><label for="Gender"></label>
<label for="Gender"></label>
<select name="Gender" id="Gender">
<option value="F">FEMALE</option>
<option value="M">MALE</option>
</select>
<label for="Rece"></label></td>
</tr>
<tr>
<td align="right" nowrap="nowrap"><var>FIRST NAME:</var></td>
<td><span id="sprytextfield1">
<label for="FN"></label>
<input name="FN" type="text" class="textfieldFocusState" id="FN" size="20" maxlength="25" />
<span class="textfieldRequiredMsg">First Name is required.</span></span></td>
</tr>
<tr>
<td align="right"><span style="font-size: 12px"><var></var></span><var>LAST NAME:</var></td>
<td><span id="sprytextfield2">
<label for="LN"></label>
<input name="LN" type="text" class="textfieldFocusState" id="LN" size="20" maxlength="30" />
<span class="textfieldRequiredMsg">Last Name is required.</span></span></td>
</tr>
<tr>
<td align="right" nowrap="nowrap">RACE</td>
<td width="329" id="Rece"><label for="Race"></label>
<select name="Race2" id="Race">
<option value="1" selected="selected">white Cocasian</option>
<option value="2">American Indian or Alaska Native</option>
<option value="3">Asian</option>
<option value="4">Black or African American</option>
<option value="5">Hispanic or Latino</option>
<option value="6">Native Hawaiian or Other Pacific Islander</option>
</select></td>
</tr>
<tr>
<td align="right">COUNTRY</td>
<td><span id="sprytextfield4">
<label for="COUNTRY"></label>
<input name="COUNTRY" type="text" class="textfieldFocusState" id="COUNTRY" size="20" maxlength="30" />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr>
<td align="right"> </td>
<td> </td>
</tr>
<tr>
<td align="right">:</td>
<td><span id="spryselect1">
<label for="PROV"></label>
<span class="selectRequiredMsg">Please select an item.</span></span></td>
</tr>
</table>
</form>
</div>
<area />
<script>
window.onload=function(){
const upload_button= document.querySelector('#upload');
const upload_file= document.querySelector('#file-upload');
const target_image= document.querySelector('#target-img');
const progress=document.querySelector('#progress');
const wait=document.querySelector('.wait');
const search_btn=document.querySelector('#search-result');
//const progress_result=document.querySelector('#result');
const overlay=document.querySelector('.overlay');
upload_button.addEventListener('click',function(){
upload_file.value="";
overlay.style.display='none';
progress.style.display='none';
upload_file.click();
});
search_btn.addEventListener('click',function(){
window.location='/ReportResult.php';
});
upload_file.addEventListener('change',function(){
progress.style.display='flex';
overlay.style.display='flex';
uploadFile(this.files[0]);
})
async function uploadFile(imagefile) {
let formData = new FormData();
formData.append("file", imagefile);
/* const response=await fetch('pic-upload.php', {
method: "POST",
body: formData
});
var data= await response.json();
target_image.src=data.path;*/
let request = new XMLHttpRequest();
request.open('POST', 'pic-upload.php');
request.upload.addEventListener('progress', function(e) {
let percent_completed = (e.loaded / e.total)*100;
});
request.addEventListener('load', function(e) {
let uploaded_image=JSON.parse(request.response)
target_image.src=uploaded_image.path;
progress.src='img/progressbar.gif';
//overlay.style.display='none';
upload_button.style.display='none';
wait.style.display='flex';
setInterval(() => {
wait.style.display='none';
search_btn.style.display='block';
progress.style.display='none';
}, 62000);
});
request.send(formData);
}
}
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
</script>
</body>
</html>