<?php include "config.php"; ?><!DOCTYPE html>

<!-- saved from url=(0051)http://registration.rmlauexams.in/Registration.aspx -->

<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>Advance College Management System - Developed By MD SOFTWARE - Faizabad</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="./reg_1_files/bootstrap.min.css">
		<link rel="stylesheet" href="./reg_1_files/font-awesome.min.css">
		<!-- page specific plugin styles -->
		<link rel="stylesheet" href="./reg_1_files/jquery-ui.custom.min.css">

    	<link rel="stylesheet" href="./reg_1_files/chosen.min.css">

		<link rel="stylesheet" href="./reg_1_files/datepicker.min.css">

		<link rel="stylesheet" href="./reg_1_files/bootstrap-timepicker.min.css">

		<link rel="stylesheet" href="./reg_1_files/daterangepicker.min.css">

		<link rel="stylesheet" href="./reg_1_files/bootstrap-datetimepicker.min.css">

		<link rel="stylesheet" href="./reg_1_files/colorpicker.min.css">



		<!-- text fonts -->

		<link rel="stylesheet" href="./reg_1_files/fonts.googleapis.com.css">



		<!-- ace styles -->

		<link rel="stylesheet" href="./reg_1_files/ace.min.css" class="ace-main-stylesheet" id="main-ace-style">



		

	</head>



	<body class="no-skin" style="text-transform: uppercase;">



<?php 



							$college=$_GET['college'];

							$CourseType=$_GET['CourseType'];

							$Course=$_GET['Course'];

							$Course_Details=$_GET['Course_Details'];

							$session=$_GET['session'];

							$Student_Type=$_GET['Student_Type'];

							$btnSave=$_GET['btnSave'];?>

                            

                              <?php if($btnSave=="FillForm"){?>

							  

							  <script type="text/javascript">

         <!--

            function Redirect() {

               window.location="reg_form.php?college=<?php echo $college; ?>&session=<?php echo $session; ?>&CourseType=<?php echo $CourseType; ?>&Course=<?php echo $Course; ?>&Course_Details=<?php echo $Course_Details; ?>&Student_Type=<?php echo $Student_Type; ?>&btnSave=<?php echo $btnSave; ?>&college_roll=<?php echo $_GET['college_roll'];?>";

            }

            

            document.write("<h1>You will be redirected to main page in 10 sec.</h1>");

            setTimeout('Redirect()', 1000);

         //-->

      </script>

                      <?php }else{ ?>       

                            

        	<form name="form1" <?php  if($btnSave!="FillForm"){?>action="index.php"<?php } ?> method="get"  class="form-horizontal" role="form">









							

		 <?php

		 if($college!=""){

							

$queryyo = "SELECT * FROM college_info where code='$college'";

$numresultsyo=mysql_query($queryyo);

$resultyo= mysql_query($queryyo) or die("Couldn't execute query");

$a_rowwo = mysql_fetch_row( $resultyo );



?><table width="800" border="0" cellspacing="2" cellpadding="2" align="center">

  <tr>

    

    <td align="center"> <div align="left" style="float:left; width:90px;"><img src="<?php echo $a_rowwo['4']; ?>" height="113" width="126" align="right"></div>

    <div align="center" style="font-family:'Times New Roman', Times, serif; font-size:36px; font-weight:bold; margin:0px; padding:0px; width:860px;"><?php echo $a_rowwo['2']; ?><br>
      <p align="center" style="font:'Times New Roman', Times, serif; font-size:16px;"><?php echo $a_rowwo['3']; ?></p></div>

      </td>

  </tr>

</table><?php } ?>



<div class="main-container" id="main-container">

		 

			<div class="main-content">

				<div class="main-content-inner">

					<div class="breadcrumbs" id="breadcrumbs">

						 



						<ul class="breadcrumb">

							



						

							<li class="active" > Registration Form : </li>

					  </ul><!-- /.breadcrumb -->




						 <!-- /.nav-search -->

					</div>



					<div class="page-content">



                       

                             

                        

						<div class="page-header">

							<a href="index.php"><h1>

								Registration form

								<small>

									

									 Student Course Details

								</small>

							</h1></a>

						</div><!-- /.page-header -->



						<div class="row">

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

								<!-- PAGE CONTENT BEGINS -->

									<div class="form-group">

										

                                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> Select College </label>



								      

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

                            

                            <?php

							

$queryy = "SELECT * FROM college_name";

$numresultsy=mysql_query($queryy);

$resulty= mysql_query($queryy) or die("Couldn't execute query");

?>

<select name="college" id="college"  onchange='this.form.submit()' class="chosen-select form-control"> 



<option value="">Select</option>

      

                                  <?php

while ( $a_roww = mysql_fetch_row( $resulty ) )

 {?>

                  <option

                 <?php 

				 $cn_id=$a_roww[2];

				 if($cn_id==$college){

				  ?>selected<?php } ?>

                  

                   value="<?php echo $a_roww[2];?>" ><?php echo $a_roww[1];?></option>

                  <?php } ?>

                </select>

       

                                     </div>

                                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> Session</label>



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

											 

                                              <?php

							

//$queryy = "SELECT * FROM session order by id DESC limit 1";
$queryy = "SELECT * FROM session where code='$college' order by id DESC";
$numresultsy=mysql_query($queryy);

$resulty= mysql_query($queryy) or die("Couldn't execute query");

?>

                                            <select name="session" required class="chosen-select form-control" onchange='this.form.submit()'>
                                            <option>Select</option>

                                            <?php

while ( $a_roww = mysql_fetch_row( $resulty ) )

 {?>

                  <option

                 <?php 

				 $session2=$a_roww[1];

				 if($session2==$session){

				  ?>selected<?php } ?>

                  

                   value="<?php echo $a_roww[1];?>" ><?php echo $a_roww[1];?></option>

                  <?php } ?>

                </select>

	

	

	</select>

                                            

										</div>

   

                              

										 

										</div>

							 <div class="form-group">

										<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> Course Type</label>



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

											 

                                            <select name="CourseType" title="Select Course Name/ Class" required onchange='this.form.submit()' class="chosen-select form-control">

	<option value="">Select </option>
<?php
$query = "SELECT * FROM ctype where session='$session' and code='$college' ORDER BY id";
$numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
$result = mysql_query($query) or die("Couldn't execute query");
while ( $a_row = mysql_fetch_row( $result ) )

 {?>
          <option value="<?php echo $yiu=$a_row[1]; ?>" <?php if($CourseType==$yiu){ ?> selected<?php } ?> ><?php echo $a_row[2]; ?></option>
<?php } ?>
         



</select>

                                            

										</div>

   <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> Course Name/ Class </label>



								      

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

											<select name="Course" title="Select Course Name/ Class" required onchange='this.form.submit()' class="chosen-select form-control">

                                            

                                            <?php $queryy = "SELECT * FROM course_name where college_id='$college' && ctype='$CourseType' && session='$session' Order by id";

$numresultsy=mysql_query($queryy);

$resulty= mysql_query($queryy) or die("Couldn't execute query");

 ?>

	<option value="">Select</option>

	 <?php

while ( $a_roww = mysql_fetch_row( $resulty ) )

 {?>

                  <option

                 <?php 

				 $Course_id=$a_roww[0];

				 if($Course_id==$Course){

				  ?>selected<?php } ?>

                  

                   value="<?php echo $a_roww[0];?>" ><?php echo $a_roww[1];?></option>

                  <?php } ?>



</select>

                                     </div>

                              

										 

										</div>

                                  

                              

                                <div class="form-group">

										   

                                <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> Year/Semester</label>



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

											<select name="Course_Details" title="Select  Year/Semester" class="chosen-select form-control" required>

	

     <?php $queryy = "SELECT * FROM seme_year where course_name='$Course'  && session='$session' Order by id";

$numresultsy=mysql_query($queryy);

$resulty= mysql_query($queryy) or die("Couldn't execute query");

 ?>

	<option value="">Select</option>

	 <?php

while ( $a_roww = mysql_fetch_row( $resulty ) )

 {?>

                  <option

                 <?php 

				 $Course_Detailss=$a_roww[1];

				 if($Course_Detailss==$Course_Details){

				  ?>selected<?php } ?>

                  

                   value="<?php echo $a_roww[1];?>" ><?php echo $a_roww[1];?></option>

                  <?php } ?>

    

    

</select>

                                           

										</div> <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> Student Type</label>



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

											<select name="Student_Type" required onchange='this.form.submit()' class="chosen-select form-control">

	<option value="">Select</option>

	<option <?php if($Student_Type=='Regular'){

				  ?>selected<?php } ?>>Regular</option>

	<option <?php if($Student_Type=='Private'){

				  ?>selected<?php } ?> value="Private">Private</option>



</select>  

										</div>

									</div>

                                 

									<div class="space-4"></div>

                                      <?php if(($Course_Details!="I")&&($_GET['CourseType']!="")&&($_GET['Course_Details']!="")&&($_GET['college']!="")&&($_GET['session']!="")){ 
									  
									 
									 
									  ?>                          
 <div class="form-group">
										   
                                <label class="col-sm-2 control-label no-padding-right" for="form-field-1">Enter College Roll Number</label>

										<div class="col-sm-4">
											 <?php
$queryy = "SELECT * FROM class2 where Course='$Course' order by college_roll";
$numresultsy=mysql_query($queryy);
$resulty= mysql_query($queryy) or die("Couldn't execute query");
?>
<input type="text" list="college_roll" name="college_roll" autocomplete="off" style="color:#FF0000; font-size:14px" value="<?php echo $_GET['college_roll'];  ?>" onchange='this.form.submit()'/>
<datalist id="college_roll" style="color:#FF0000; font-size:14px">
 

             

               

                <?php

while ( $a_roww = mysql_fetch_array( $resulty ) )

 {
$college_rollx=$a_roww['college_roll'];
$check_exist_qryxox="select * from class2 where college_roll='$college_rollx'";
$run_qryxox=mysql_query($check_exist_qryxox);
$total_foundcxox=mysql_num_rows($run_qryxox);

$rowxox = mysql_fetch_array($run_qryxox, MYSQL_BOTH); 
echo  $college_rollb=$rowxox['college_roll'];
 
 ?>

                <option value="<?php echo $a_roww['college_roll'];?>" style="color:#FF0000; font-size:14px"><?php echo $a_roww['college_roll'];?><?php echo $a_roww['StudentName'];?>/ <?php echo $a_roww['txt_dob'];?></option>

                <?php } ?>

            </datalist> 
                                           
										</div> 
									</div>
	 <?php } ?>		



									<div class="clearfix form-actions">

										<div class="col-md-offset-3 col-md-9">



                                                        <input type="submit" name="btnSave" value="FillForm"  class="btn btn-info" >

											 

										</div>

                                       

									</div>

                                



                                    

									 

							



								 

							</div><!-- /.col -->

						</div><!-- /.row -->

					</div><!-- /.page-content -->

				</div>

			</div><!-- /.main-content -->



			<div class="footer">

				<div class="footer-inner">

					<div class="footer-content">

						<span class="bigger-100">

							<span class="blue bolder">Developed By : MD SOFTWARE - <a href="http://www.mdsoftech.com" target="_blank">www.mdsoftech.com</a></span>

						 

						</span>



						 

						 

					</div>

				</div>

			</div>



			

		</div><!-- /.main-container -->







                    







                 

                	</form><script language="JavaScript"> 
    Webcam.set({ 
        width: 120, 
        height: 150, 
        image_format: 'jpeg', 
        jpeg_quality: 100 

    }); 
   
    Webcam.attach( '#my_camera' ); 
   
    function take_snapshot() { 
        Webcam.snap( function(data_uri) { 
            $(".image-tag").val(data_uri); 
            document.getElementById('results').innerHTML = '<img src="'+data_uri+'"/>'; 
        } ); 
    } 
</script> 

	



<div id="limiterBox" class="limiterBox" style="position: absolute; display: none;"></div><?php } ?></body></html>