<?php
include ('session.php');
include('connection.php');
include('test.php');
//include('lock.php');

$b=$_GET['srno'];

mysqli_query($GLOBALS["___mysqli_ston"], "SET NAMES utf8");
	$my="SELECT * FROM `samiti2` where srno='$b'";
		

$n=mysqli_query($GLOBALS["___mysqli_ston"], $my) or die ("Query Fail:".mysqli_error($GLOBALS["___mysqli_ston"]));
if(mysqli_num_rows($n)>0)
{
while($rw=mysqli_fetch_assoc($n)) 
{
$name=$rw['name'];
$name_eng=$rw['name_eng'];
$samitiname=$rw['samitiname'];
$samitiname_eng=$rw['samitiname_eng'];
$designation=$rw['designation'];
$designation_eng=$rw['designation_eng'];
$contact=$rw['contact'];
$email=$rw['email'];
				}
}


?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="samarth10" >

    <title>SB Admin 2 - Bootstrap Admin Theme</title>
 
    <!-- Bootstrap Core CSS -->
            
    <link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    
    <!-- MetisMenu CSS -->
    <link href="bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">
 
    <!-- Custom CSS -->
     <link href="dist/css/sb-admin-2.css" rel="stylesheet">
 
    <!-- Custom Fonts -->
    <link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> 
   
 
 <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
 
<script src="dist/js/jquery-1.7.1.min.js"></script>
 
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<link rel="stylesheet" href="dist/css/bootstrap-datepicker.css">

<link rel="stylesheet" href="tinybox/style_tiny.css" />
<script type="text/javascript" src="tinybox/tinybox.js"></script>

<script src="dist/js/bootstrap-datepicker.js"></script>
<script src="dist/js/bootstrap-datepicker.min.js"></script>

        <script type="text/javascript" >

$(function()
{
$('#dp1').datepicker();	
	
	});
</script>

<script type="text/javascript" >
  
 function view5(i)
{
//alert(i);


	{  	
  	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
	{

    if (xmlhttp.readyState==4) 
	{
 // alert(xmlhttp.responseText);
      if(xmlhttp.responseText==1)	   {

	 // alert("Inserted Successfully");
       window.location.reload();
		
  }
  	  
  }
  }
//var res="&srno="+srno+"&date="+date+"&option="+option;
	//alert(res);
  xmlhttp.open("GET","disablee.php?srno="+i,true);
  xmlhttp.send(null); 
	 
}
}





function updateq_company(i)
		{
	//		alert(i)
			var Sr=i;
	//		alert(Sr);
														//	var xr=document.getElementById('x'+i).value;
															//alert(xr);
		TINY.box.show({iframe:"updation.php?srno="+i,boxid:'frameless',width:660,height:800,fixed:false,maskid:'bluemask',maskopacity:40,closejs:function(){closeJS()}});	
		
	
		
			}

function see()
{
//alert('hi');
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4)
		 {
		 	
	//alert(xmlhttp.responseText);
		//window.location.href="Update_EmpRecord_Design.php";
				var msg=xmlhttp.responseText;
				document.getElementById('search_res').innerHTML=msg;
		 }
	}

	//		var res ="?uname="+uname;
//alert(res);

		xmlhttp.open("POST", "viewsamiti.php" , true); 
				xmlhttp.send(null); 
		//document.getElementById('submit').disabled=true;
					 	
	}

</script>
<script>


function selectsamiti()
{
			var e = document.getElementById('samitiname_eng');
			var opt = e.options[e.selectedIndex].id;
			document.getElementById('samitiname').selectedIndex = opt;
	
}
</script>

</head>

<body>

    <div id="wrapper">
    
        <div id="page-wrapper">
            <div class="row">
                
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                
                                    <form role="form" action="update_samiti2.php" method="POST" id="yourElem"  enctype="multipart/form-data" class="contact_form">
                                       
                                         <div class="form-group">
                                            <label>Name Marathi:</label>
                                            <input class="form-control" placeholder="Enter Marathi Full Name" id="name" name="name" value="<?php echo  $name;?>" required="required">
                                        </div>
                                        
																																				<div class="form-group">
                                            <label>Name English:</label>
                                            <input class="form-control" placeholder="Enter English Full Name" id="name_eng" name="name_eng" value="<?php echo  $name_eng;?>" required="required">
                                        </div>                                        
                                        
																																				<div class="form-group">
                                             <label>Select Samiti:English</label>

                                          
                                          <select  class="form-control" id="samitiname_eng" name="samitiname_eng" onchange="selectsamiti();" required="required"> 
                                          <option><?php echo  $samitiname_eng;?></option>
                                          <option id='1' value='stai samiti'>Stai Samiti </option>
                                          <option id='2' value='jal vevstapan v swatchata samiti'>jal vevstapan v swatchata samiti</option>
                                          <option id='3' value='shikshan samiti'>Shikshan Samiti</option>
                                          <option id='4' value='arth samiti'>Arth Samiti </option>
                                          <option id='5' value='krushi samiti'>Krushi Samiti</option>
                                          <option id='6' value='pashusavardhan samiti'>Pashusavardhan Samiti </option>
                                          <option id='7' value='bandhkam samiti'>Bandhakam Samiti</option>
                                          <option id='8' value='arogya samiti'>Arogya Samiti</option>
                                          <option id='9' value='mahila v bal kalyan'>Mahila V Balkalyan</option>
                                          <option id='10' value='samajkalyan samiti'>Samajkalyan Samiti</option>
                                          </select>
                                          
                                       </div>                                        
                                        
                                        <div class="form-group">
                                             <!-- <label>Select Samiti:Marathi</label> -->

                                          
                                          <select style="visibility:hidden;" class="form-control" id="samitiname" name="samitiname" required="required"> 
                                          <option><?php echo  $samitiname;?></option>
                                          <option id='1' value='स्थायी समिती'>स्थायी समिती </option>
                                          <option id='2' value='जलव्यवस्थापन व स्वच्छता समिती'>जलव्यवस्थापन व स्वच्छता समिती </option>
                                          <option id='3' value='शिक्षण समिती'>शिक्षण समिती </option>
                                          <option id='4' value='अर्थ समिती'>अर्थ समिती </option>
                                          <option id='5' value='कृषी समिती'>कृषी समिती </option>
                                          <option id='6' value='पशुसंवर्धन समिती'>पशुसंवर्धन समिती </option>
                                          <option id='7' value='बांधकाम समिती'>बांधकाम समिती </option>
                                          <option id='8' value='आरोग्य समिती'>आरोग्य समिती </option>
                                          <option id='9' value='महिला व बाल कल्याण'>महिला व बाल कल्याण </option>
                                          <option id='10' value='समाजकल्याण समिती'>समाजकल्याण समिती </option>
                                          </select>
                                          
                                       </div>
                                                                             
                                       
                                       <div class="form-group">
                                            <label>Designation Marathi:</label>
                                            <input class="form-control" placeholder="Enter Marathi Designation" id="designation" name="designation" value="<?php echo  $designation;?>" required="required">
                                       </div>   
                                       
                                       <div class="form-group">
                                            <label>Designation English:</label>
                                            <input class="form-control" placeholder="Enter English Designation" id="designation_eng" name="designation_eng" value="<?php echo  $name;?>" required="required">
                                       </div>
                                       
                                       
                                       <div class="form-group">
                                            <label>Contact  No:</label>
                                            <input class="form-control" placeholder="Enter Contact No" id="contact" name="contact" value="<?php echo $contact;?>" required="required">
                                       </div>
                                       
                                       <div class="form-group">
                                            <label>Email ID:</label>
                                            <input class="form-control" placeholder="Enter Email Id" id="email" name="email" value="<?php echo $email;?>" required="required">
                                       </div>
                                           
                                    <input type="submit"  name="submit" value="submit">
                                                
                                    </form>

                                </div>
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                            <!-- /.row (nested) -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                      <div id="search_res" style="width:100%;" >                    
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="../bower_components/jquery/dist/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="bower_components/metisMenu/dist/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="dist/js/sb-admin-2.js"></script>

</body>

</html>