<?php include "layouts/menu.php"; ?>
<style>
    #my_camera{
        width: 320px;
        height: 240px;
        border: 1px solid black;
    }
	</style>
 <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
 <script>
function ddd()
{
var x = document.getElementById("hpdate").value;
document.getElementById("hpdate2").value = x;
}
</script>

<!-- Card - 1 -->
<script>
function tgram1()
{
var x = document.getElementById("n11").value;
var y = document.getElementById("n21").value;
var z = document.getElementById("n31").value;
var u = document.getElementById("n41").value;
var v = document.getElementById("n51").value;
document.getElementById("ggm1").value =(x*1)+(y*1)+(z*1)+(u*1)+(v*1);
}
</script>
<script>
function hpamt1()
{
var x1 = document.getElementById("n11").value;
var x2 = document.getElementById("n21").value;
var x3 = document.getElementById("n31").value;
var x4 = document.getElementById("n41").value;
var x5 = document.getElementById("n51").value;
var y = document.getElementById("pgram").value;
var f = document.getElementById("grate").value;
var z = document.getElementById("lvalue").value;
var a = document.getElementById("pgramo").value;
var z1 = document.getElementById("c11").value;
var z2 = document.getElementById("c21").value;
var z3 = document.getElementById("c31").value;
var z4 = document.getElementById("c41").value;
var z5 = document.getElementById("c51").value;
var it = document.getElementById("intert").value;
var pt = document.getElementById("pinter1").value;


var b1 = (((x1*1)*(z*1)));
var b2 = (((x2*1)*(z*1)));
var b3 = (((x3*1)*(z*1)));
var b4 = (((x4*1)*(z*1)));
var b5 = (((x5*1)*(z*1)));

var bt = (b1*1)+(b2*1)+(b3*1)+(b4*1)+(b5*1);
var xt = (x1*1)+(x2*1)+(x3*1)+(x4*1)+(x5*1); 

var boost1 = document.getElementById("boost1").value;

document.getElementById("hpamtt1").value =Math.floor(((bt*1)+(boost1*1))/10)*10;
document.getElementById("hpamtt21").value =Math.floor(((bt*1)+(boost1*1))/10)*10;
var vg = document.getElementById("hpamtt1").value;
var pros = document.getElementById("pros").value;
var bgt1 = (vg*1)*(pros/100);
document.getElementById("pcharge1").value = Math.ceil(bgt1 / 10) * 10;
var pcharge1 = document.getElementById("pcharge1").value;
add11()
add21()
var sd = document.getElementById("txt21").value;
if (it == 'Yes') {
document.getElementById("hpam1").value =Math.floor(((vg*1)-(sd*1)-(pcharge1*1))/1)*1;
document.getElementById("pinter1").value =(sd*1);
}
else{
document.getElementById("hpam1").value =Math.floor(((vg*1)-(pcharge1*1))/1)*1;	
}
document.getElementById("val1").value =Math.floor((xt*1)*(f*1)/1)*1;
}
</script>



<script>
function pbp1()
{
var x2 = document.getElementById("boost1").value;
var it = document.getElementById("intert").value;
var x4 = document.getElementById("hpamtt21").value;
var xx1 = document.getElementById("hpamtt1").value;
add11()
add21()
var sd = document.getElementById("txt21").value;
var vg = document.getElementById("hpamtt1").value;
var pros = document.getElementById("pros").value;
var bgt1 = (vg*1)*(pros/100);
document.getElementById("pcharge1").value = Math.ceil(bgt1 / 10) * 10;
var x1 = document.getElementById("pcharge1").value;
if (it == 'Yes') {
document.getElementById("pinter1").value =(sd*1);
var x3 = document.getElementById("pinter1").value;
document.getElementById("hpam1").value =Math.floor(((xx1*1)-(x1*1)-(x3*1))/1)*1;
}
else{
document.getElementById("pinter1").value =(0*1);
var x3 = document.getElementById("pinter1").value;
document.getElementById("hpam1").value =Math.floor(((xx1*1)-(x1*1)-(x3*1))/1)*1;
}
document.getElementById("boost1").value =((x4*1)-(xx1*1));

}
</script>




<script>
function gwt11()
{
var x1 = document.getElementById("t11").value;
var y1 = document.getElementById("s11").value;
document.getElementById("g11").value =(x1*1)-(y1*1);
nw11();
}
</script>
<script>
function gwt21()
{
var x1 = document.getElementById("t21").value;
var y1 = document.getElementById("s21").value;
document.getElementById("g21").value =(x1*1)-(y1*1);
nw21();
}
</script>
<script>
function gwt31()
{
var x1 = document.getElementById("t31").value;
var y1 = document.getElementById("s31").value;
document.getElementById("g31").value =(x1*1)-(y1*1);
nw31();
}
</script>
<script>
function gwt41()
{
var x1 = document.getElementById("t41").value;
var y1 = document.getElementById("s41").value;
document.getElementById("g41").value =(x1*1)-(y1*1);
nw41();
}
</script>
<script>
function gwt51()
{
var x1 = document.getElementById("t51").value;
var y1 = document.getElementById("s51").value;
document.getElementById("g51").value =(x1*1)-(y1*1);
nw51();
}
</script>
<script>
function nw11()
{
var x1 = document.getElementById("g11").value;
var y1 = document.getElementById("pgram").value;
var z1 = document.getElementById("c11").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;

var q1 = ((x1*1)*((z1)/100));

document.getElementById("n11").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1();
}
</script>
<script>
function nw21()
{
var x1 = document.getElementById("g21").value;
var y1 = document.getElementById("pgram").value;
var z1 = document.getElementById("c21").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
var q1 = ((x1*1)*((z1)/100));
document.getElementById("n21").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1();
}
</script>
<script>
function nw31()
{
var x1 = document.getElementById("g31").value;
var y1 = document.getElementById("pgram").value;
var z1 = document.getElementById("c31").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
var q1 = ((x1*1)*((z1)/100));
document.getElementById("n31").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1();
}
</script>
<script>
function nw41()
{
var x1 = document.getElementById("g41").value;
var y1 = document.getElementById("pgram").value;
var z1 = document.getElementById("c41").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
var q1 = ((x1*1)*((z1)/100));
document.getElementById("n41").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1();
}
</script>
<script>
function nw51()
{
var x1 = document.getElementById("g51").value;
var z1 = document.getElementById("c51").value;
var h1 = document.getElementById("hh").value;
var o1 = document.getElementById("oo").value;
var q1 = ((x1*1)*((z1)/100));
document.getElementById("n51").value =Math.round((q1*1)*100)/100;
tgram1();
hpamt1(); 
}
</script>
<script>
function add11()
{
var x1 = document.getElementById("hpamtt1").value;
var y1 = document.getElementById("intt21").value;
var g = (x1*1)*(y1/100);
document.getElementById("txt21").value =Math.round(g);
//var y = (x*1)/(12);
//document.getElementById("2").value =Math.round(y);
}
</script>
<script>
function add21()
{
var x1 = document.getElementById("hpamtt1").value;
var y1 = document.getElementById("duemnt31").value;
document.getElementById("txt11").value =parseInt((x1*1)/(y1*1));
var x = document.getElementById("txt11").value;
var y = document.getElementById("txt21").value;
document.getElementById("tot1").value =(x*1)+(y*1);
}
</script>


<?php $sch=$_REQUEST['sch'];?>

  <!--  page-wrapper -->
         <div class="right_col" role="main">
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                          <div class="panel-heading">
                   New Registration
                        </div>
                        <div class="panel-body">
                            <div class="row">
                               
                                   <?php		   $qry=mysqli_query($conn, "select * from mcust where mfin='$mfin' order by id DESC");
								   $qry234=mysqli_query($conn, "select * from abc where mfin='$mfin'");
								   $row234 = mysqli_fetch_array($qry234);
								   $pre = $row234['pref'];
								   $def = $row234['def'];
								   $intt = $row234['intt'];
								    $gdays = $row234['gdays'];
								    $intt55 = $intt/12;
								
								   $intt1 = $row234['intt1'];
								   $intt2 = $row234['intt2'];
								   
								   $qry29=mysqli_query($conn, "select * from msch where name='$sch'");
								   $row29 = mysqli_fetch_array($qry29);
								   	$intt5 = $row29['a60'];
						$n=mysqli_num_rows($qry);
						if($n==0)
						{
							$rty = 1;
							$rtyt = 1;
						}
						else
					    {
						$row=mysqli_fetch_array($qry);
						
						$sss = $row['hplt'];
						$hhh = $row['hpl'];
						if(($sss==NULL) || ($pre==NULL)) {
							$sss = $hhh;
						}
							$hpdate5 = $row['hpdate5'];
						$rtyy = $sss + 1;
						$rtyt = $rtyy;
						$rty = $pre."".$rtyy;
						}
$hh = $row29['hh'];
$oo = $row29['oo'];

$interm = $row29['interm'];
$pros = $row29['pros'];
$pg = $row29['pgram'];
$gtyp = $row29['details'];
$pg2 = $row29['pgram2'];
$dumn = $row29['edate'];

$inter = $row29['inter'];
$intert = $row29['intert'];
$gdays11 = round(($gdays*($pg/100)),0);

$gdays1 = floor($gdays11/10)*10;
$gdays2 = round(($gdays*($pg2/100)),0);
						?>
						
  

						
  <form role="form" name="form1" id="form1" method="post" action="msave.php" enctype="multipart/form-data">
	<div id="wizard" class="form_wizard wizard_horizontal">
                      <ul class="wizard_steps">
                        <li>
                          <a href="#step-1">
                            <span class="step_no">1</span>
                            <span class="step_descr">
                                              Party Details
                                          </span>
                          </a>
                        </li>
                     
                       
						 <li>
                          <a href="#step-3">
                            <span class="step_no">2</span>
                            <span class="step_descr">
                                             Images
                                          </span>
                          </a>
                        </li>
                      </ul>
                      
                      <div id="step-1">					
  <div class="col-lg-4">
   
		<input type="hidden" class="form-control" id="pgram3" name="pgram3" value="<?php echo $gdays;?>" placeholder="" >
	<input type="hidden" class="form-control" id="pgramo" name="pgramo" value="<?php echo $gdays2;?>" placeholder="" >
	
<input type="hidden" class="form-control" id="intert" name="intert" value="<?php echo $intert;?>" placeholder="" >	
<input type="hidden" class="form-control" id="hh" name="hh" value="<?php echo $hh;?>" placeholder="" >
	<input type="hidden" class="form-control" id="oo" name="oo" value="<?php echo $oo;?>" placeholder="" >
	<input type="hidden" class="form-control" id="pros" name="pros" value="<?php echo $pros;?>" placeholder="" >	
	<input type="hidden" class="form-control" id="pgram" name="pgram" value="<?php echo $gdays1;?>" placeholder="" >
	<input type="hidden" class="form-control" id="pgram2" name="pgram2" value="<?php echo $gdays2;?>" placeholder="" >

      <input type="hidden" class="form-control" id="" name="fin" readonly   value="<?php echo $mfin; ?>" placeholder="" >
<input type="hidden" class="form-control" id="" name="mfin" readonly   value="<?php echo $mfin; ?>" placeholder="" >
  
      <input type="hidden" class="form-control" id="1" name="sch" readonly  value="<?php echo $sch; ?>" placeholder="" onChange="add1()">

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="email"  name="hplt" value="<?php echo $rtyt;?>" placeholder="E.g 1008" >
 <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Customer ID <font color="red">*</font></label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="hpl" name="hpl" value="<?php echo $rtyt;?>"  placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
 <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Phone Number <font color="red">*</font></label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="pno" name="pno" value=""  placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>

  <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Name <font color="red">*</font></label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="name"  onkeyup="autocomp()"  style="text-transform:uppercase" name="name"  value="" placeholder="Name">
 <ul id="dname"></ul>
 <span class="glyphicon glyphicon-user form-control-feedback"></span>
  </div>
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Father's Name</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="fname" name="fname" onkeyup(getUsers1(this)) value="" placeholder="Name">
 <span class="glyphicon glyphicon-user form-control-feedback"></span>
  </div>
  <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Address</label>
 <input style="text-transform:uppercase" type="text" class="form-control" id="address" name="address" value="" placeholder="Line 1">
 <input style="text-transform:uppercase" type="text" class="form-control" id="address1" name="address1" value="" placeholder="Line 2">
 <input style="text-transform:uppercase" type="text" class="form-control" id="address2" name="address2" value="" placeholder="Line 3 + Pincode"> 

  <span class="glyphicon glyphicon-home form-control-feedback"></span>
  </div>

  </div>
  <div class="col-lg-4">
      <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Land Mark</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="lmark" name="lmark" value="" placeholder="">
 <span class="glyphicon glyphicon-home form-control-feedback"></span>
  </div>
  <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >House Phone No</label>
      <input style="text-transform:uppercase" type="text" class="form-control" id="pnoresi" name="pnoresi" value="" placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
  

      <input style="text-transform:uppercase" type="hidden" class="form-control" id="bba" name="bba" value="" placeholder="">

  
  
  	 <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Area <font color="red">*</font></label>
      <select style="text-transform:uppercase" type="text"  class="form-control" id="didd" name="area" value="" placeholder="Area">
<option></option>
<?php $sql11 = mysqli_query($conn, "select * from msarea order by name asc");
while($row11 = mysqli_fetch_array($sql11)) { ?>
<option><?php echo $row11['name']; ?></option>
<?php } ?>
</select>
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
   <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Date of Birth</label>
      <input style="text-transform:uppercase" type="date" class="form-control" id="inputPassword3" name="dob" value="" placeholder="">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
	 <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Govt ID <font color="red">*</font></label>
      <input readonly type="text" class="form-control"  id="inputPassword3" name="gi1" value="Aadhar" placeholder="">
	  
    <span class="glyphicon glyphicon-plane form-control-feedback"></span>
	
		<input style="text-transform:uppercase" type="text" class="form-control" id="gg1" name="gg1"  value="" placeholder="Govt ID No" >

    </div>
		   
  </div>

  
   <div class="col-lg-4">
   
  
	 
  <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Attachement 1 </label>
      <input style="text-transform:uppercase" type="file" class="form-control" id="inputPassword3" name="upp1" value=""  placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
  
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Attachement 2 </label>
      <input style="text-transform:uppercase" type="file" class="form-control" id="inputPassword3" name="upp2" value=""  placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Attachement 3 </label>
      <input style="text-transform:uppercase" type="file" class="form-control" id="inputPassword3" name="upp3" value=""  placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Attachement 4</label>
      <input style="text-transform:uppercase" type="file" class="form-control" id="inputPassword3" name="upp4" value=""  placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
    <div class="form-group has-success has-feedback">
    <label for="inputPassword3" >Attachement 5 </label>
      <input style="text-transform:uppercase" type="file" class="form-control" id="inputPassword3" name="upp5" value=""  placeholder="Eg: 9876543210">
 <span class="glyphicon glyphicon-phone-alt form-control-feedback"></span>
  </div>
  
</div>
 </div>
 <!--  //////////////////////////// -->
 
         <!-----   card 2   -   -->


<div id="step-3">
  <div class="col-lg-12">
  
 <div id="my_camera"></div>
	<input type=button value="CUSTOMER PHOTO" onClick="take_snapshot()">
	<input type="hidden" name="image" class="image-tag">
    <div id="results" ></div>
	
	<div id="my_camera1"></div>
	<input type=button value="CARD 1 JEWEL" onClick="take_snapshot1()">
	<input type="hidden" name="image1" class="image-tag2">
    <div id="results1" ></div>
	
	
	</div>
</div>

   
</form>
    </div>
   
</div> 
</div>
</div></div>
</div></div></div><?php include "layouts/footer2.php"; ?>
 <script src="vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->

    <!-- NProgress -->
<script type="text/javascript" src="webcamjs/webcam.min.js"></script>

	<!-- Configure a few settings and attach camera -->
	<script language="JavaScript">
		Webcam.set({
			width: 320,
			height: 240,
			image_format: 'jpeg',
			jpeg_quality: 90
		});
		Webcam.attach( '#my_camera' );
	</script>
	
	
	
	<!-- A button for taking snaps -->
	
	<!-- Code to handle taking the snapshot and displaying it locally -->
	<script language="JavaScript">

		function take_snapshot() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				$(".image-tag").val(data_uri);
				document.getElementById('results').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	<script language="JavaScript">

		function take_snapshot2() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				
				document.getElementById('results2').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	
	<script language="JavaScript">

		function take_snapshot1() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				$(".image-tag2").val(data_uri);
				document.getElementById('results1').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	<script language="JavaScript">

		function take_snapshot3() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				document.getElementById('results3').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	<script language="JavaScript">

		function take_snapshot4() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				document.getElementById('results4').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
	<script language="JavaScript">

		function take_snapshot5() {
			
			// take snapshot and get image data
			Webcam.snap( function(data_uri) {
				// display results in page
				document.getElementById('results5').innerHTML = 
					'<img src="'+data_uri+'"/>';
			} );
		}
	</script>
    <script src="vendors/jQuery-Smart-Wizard/js/jquery.smartWizard.js"></script>
    <!-- Custom Theme Scripts -->
    <script src="build/js/custom.min.js"></script>
</body></html>
