<div class="page-wrapper">

            <!-- Page Content-->

            <div class="page-content">



                <div class="container-fluid">

                    <!-- Page-Title -->

                    

                    <!-- end page title end breadcrumb -->

                    <div class="row">

                        <div class="col-sm-12">

                            <div class="page-title-box">

                                <div class="float-right">

                                    <ol class="breadcrumb">

                                        <li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>

                                        <li class="breadcrumb-item active">Starter</li>

                                    </ol>

                                </div>

                                <h4 class="page-title"><?php echo $titlewb; ?></h4>

                            </div><!--end page-title-box-->

                        </div><!--end col-->

                    </div>

					<div class="row">

                        <div class="col-sm-12">

							<div class="card">

                                <div class="card-body">

                                    <div class="media">

							

                                               

                                       <?php include('include/appform.php'); ?>

                                    </div><!--end media-->

                                                                          

                                </div><!--end card-body--> 

                            </div><!--end card-->

							

							<div class="progress mb-4">

                              <div class="progress-bar" role="progressbar" style="width: 30%;" aria-valuenow="30" aria-valuemin="0" aria-valuemax="100">30%</div>

                          </div>

							

                            <div class="card">

                                <div class="card-body">

                                    <h4 class="mt-0 header-title">Custom styles</h4>

                                    

                                    </p>

                                     <!--end form-->                                          

                                </div><!--end card-body-->

                            </div><!--end card-->

                        </div><!--end col-->



                        <!--end col-->

                    </div><!--end row-->

				<div class="upload-div">

    <!-- File upload form -->

 	

    <!-- File upload form -->

    <form id="uploadForm" enctype="multipart/form-data">

        <label><?php echo $chooseimage; ?></label>

        <input type="file" name="images[]" id="fileInput" >

		<input type="hidden" name="idtrf" id="idtrf" value="<?php echo($trfnumberfinal->getColumnVal("idtrfdetails")); ?>">

        <input type="submit" name="submit" value="<?php echo $uploadph; ?>"/>

    </form>

	

    <!-- Display upload status -->

    <div id="uploadStatus"></div>

	   

</div>

	

	<!-- Gallery view of uploaded images --> 

									<div class="gallery"></div>

									<br>

				 

				<form class="needs-validation" action="standardstep.php" method="post" id="form" name="myForm" novalidate>

									<div class="form-group row">

                                                <label for="validationTooltip01" class="col-sm-3 col-form-label text-right"><?php echo $typearticletitle; ?></label>

                                          <div class="col-sm-8">

                                                    <select class="form-control" name="articletype" id="articletype_change" required="">

                                                      <option value=""  <?php if (!(strcmp("", ($trfnumberfinal->getColumnVal("idarticletype"))))) {echo "selected=\"selected\"";} ?>><?php echo $pleaseselect; ?></option>

                                                      <?php

				if(!empty($rows))

				{

					foreach($rows as $row)

					{

					?>

                                                      <option value="<?php echo $row['idarticletype']; ?>" <?php if (!(strcmp($row['idarticletype'], ($trfnumberfinal->getColumnVal("idarticletype"))))) {echo "selected=\"selected\"";} ?>><?php echo $row['name_articletype']; ?></option>

                                                      <?php

					}

				}

			  ?>

                                            </select>

                                                </div>

                                </div>

										<div class="form-group row">

                                                        <label for="validationTooltip01" class="col-sm-3 col-form-label"><?php echo $descriptiontitle; ?></label>

                                                        <div class="col-sm-8">

                                                            <input type="text" class="form-control" id="validationTooltip01" name="description" placeholder="<?php echo $descriptiontitle; ?>" value="<?php if (isset($_GET["idtrf"])) { echo $sdescription; } ?>" required="">

															

                                                        </div>

										</div>

										

										

										

										<div class="form-group row">

                                                <label for="validationTooltip01" class="col-sm-3 col-form-label text-right"><?php echo $modeltitle; ?></label>

                                          <div class="col-sm-8">

                                                    <select class="form-control" name="model" id="model_change" required="">

                                                    <option value="" <?php if (!(strcmp("", ($trfnumberfinal->getColumnVal("model"))))) {echo "selected=\"selected\"";} ?>><?php echo $pleaseselect; ?></option>



                                                    <?php

                                                    $modelrows = $obj->fetchModel($trfnumberfinal->getColumnVal("idarticletype"));

				if(!empty($modelrows))

				{

					foreach($modelrows as $row)

					{

					?>      

                    <option value="<?php echo $row['idmodelarticle']; ?>" <?php if (!(strcmp($row['idmodelarticle'], ($trfnumberfinal->getColumnVal("model"))))) {echo "selected=\"selected\"";} ?>><?php echo $row['namemodelarticle']; ?></option>

           

                                                      <?php

					}

				}

			  ?>                               

                                            </select>

                                                </div>

                                </div>

										

										

										

										<div class="form-group row">

                                                        <label for="validationTooltip01" class="col-sm-3 col-form-label"><?php echo $rangemeasuretitle; ?></label>

                                                        <div class="col-sm-4">

                                                            <input type="number" min="10" max="50" class="form-control" id="validationTooltip01" name="rangemeasuremin" placeholder="<?php echo $rangemeasuremintitle; ?>" value="<?php if (isset($smeasuremin)) { echo $smeasuremin; } ?>" required="">

															

                                                        </div>

														<div class="col-sm-4">

                                                            <input type="number" min="10" max="50" class="form-control" id="validationTooltip01" name="rangemeasuremax" placeholder="<?php echo $rangemeasuremaxtitle; ?>" value="<?php if (isset($smeasuremax)) { echo $smeasuremax; } ?>" required="">

															

                                                        </div>

										</div>

										

										

								  

								  <div class="form-group row">

                                                <label for="validationTooltip01" class="col-sm-3 col-form-label text-right"><?php echo $articlecharacteristictitle; ?></label>

                                          <div class="col-sm-8">

                                            <select class="form-control" name="articlecharacteristic" id="charact_result">

                                              <option value="" <?php if (!(strcmp("", ($trfnumberfinal->getColumnVal("idarticle_characteristics"))))) {echo "selected=\"selected\"";} ?>><?php echo $pleaseselect; ?></option>

                                              <?php

                                                    $chrows = $obj->fetchCharact($trfnumberfinal->getColumnVal("idarticletype"));

				if(!empty($chrows))

				{

					foreach($chrows as $row)

					{

					?>      

                    <option value="<?php echo $row['idarticlecharacteristic']; ?>" <?php if (!(strcmp($row['idarticlecharacteristic'], ($trfnumberfinal->getColumnVal("idarticle_characteristics"))))) {echo "selected=\"selected\"";} ?>><?php echo $row['name_articlecharacteristic']; ?></option>

           

                                                      <?php

					}

				}

			  ?>              

                                            </select>

                                    </div>

                                </div>

																				<div class="form-group row">

                                                        <label for="registeredmark" class="col-sm-3 col-form-label"><?php echo $registeredmarktitle; ?></label>

                                                        <div class="col-sm-8">

                                                            <input type="text" class="form-control" id="registeredmark" name="registeredmark" placeholder="<?php echo $registeredmarktitle; ?>" value="<?php if (isset($_GET["idtrf"])) { echo $sregisteredmark; } ?>" required>

															

                                                        </div>

										</div>

										

								  <input type="hidden" name="idtrf" id="idtrf" value="<?php echo($trfnumberfinal->getColumnVal("idtrfdetails")); ?>">

								   <input type="hidden" name="formupdtrfdetails" id="formupdtrfdetails" value="Y">

								<br><br>

										<button class="btn btn-gradient-primary" type="submit">Submit form</button>

										<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $nextsteptitle; ?>">

										

										</div>

                                    </form>



				<script>

// country dependent ajax

 $(document).on("change","#articletype_change", function(e){

	e.preventDefault();

		

	var articletype = $("#articletype_change").val();	

		

	$.ajax({

        type: "POST",

        url: "ddown/modelart.php",

		dataType: "json",

        data: "idarticletype="+articletype,

        success: function(response)

        {

			var modelBody = "";

			modelBody = "<option>-- select Model --</option>"

			for(var key in response)

			{

				modelBody += "<option value="+ response[key]['idmodelarticle'] +">"+ response[key]['namemodelarticle'] +"</option>";

				$("#model_change").html(modelBody);

			}		

        }

    });

 });



// state dependent ajax

 $(document).on("change","#articletype_change", function(e){

	e.preventDefault();

		

	var charact = $("#articletype_change").val();	

		

	$.ajax({

        type: "POST",

        url: "ddown/articlecharact.php",

		dataType: "json",

        data: "idarticletype="+charact,

        success: function(response)

		

		{

			var charactBody = "";

			charactBody = "<option>-- select Characteristic --</option>"

			for(var key in response)

			{

				charactBody += "<option value="+ response[key]['idarticlecharacteristic'] +">"+ response[key]['name_articlecharacteristic'] +"</option>";

				$("#charact_result").html(charactBody);

			}		

        }

		

        

    });

 });	

</script>	

                     <!-- end row -->



                </div><!-- container -->



                <!--end footer-->

            </div>