<?php 
include("session_start.php");
include("session_check.php");
include("database.php");
include("paginator.class.php");

extract($_GET);
$cat = $_SESSION['cat'];
//echo $cat;
if($cat == "admin")
{
	//echo $cat;
	//echo $_SESSION['username'];
}

 ?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Survey Application</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/page.css">
<link href="css/admincss.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="js/ddsmoothmenu.js">
</script>

<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})



</script>


<script type="text/javascript">

function checkall()
{
	var sb4=document.getElementsByName("subward");
	if(sb4[0].checked==true)
	{
		for(var k1=0; k1<sb4.length; k1++)
		{
			sb4[k1].checked=true;
		}
	}
	if(sb4[0].checked==false)
	{
		for(var k1=0; k1<sb4.length; k1++)
		{
			sb4[k1].checked=false;
		}
	}
}

function showreport()
{
	
	str = document.getElementById("report_ward").value;
		
	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 && xmlhttp.status==200)
		{
		document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
		
		}
	  }
	xmlhttp.open("GET","subward_show.php?q="+str,true);
	xmlhttp.send();
}

function show_alldetails()
{	
	var tree_name=document.getElementById("tree_name").value;
	var ver_name=document.getElementById("ver_name").value;
	var gbh = document.getElementById("gbh").value;
	var height = document.getElementById("height").value;
	var ecological=document.getElementById("ecological").value;
	var economical=document.getElementById("economical").value;
	var flowering_season_from=document.getElementById("flowering_season_from").value;
	var flowering_season_to=document.getElementById("flowering_season_to").value;
	
	
	
		/*for(var k=0; k<sb.length; k++)
		{
			if(sb[k].checked)
			{
			sb1+=sb[k].value+",";
			}
			
		}
		sb2=sb1;*/
		
	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 && xmlhttp.status==200)
			{	
				document.getElementById("txthint").innerHTML=xmlhttp.responseText;
			}
	  }
	  
	xmlhttp.open("GET","tree_wise_search.php?tree_name="+tree_name+"&ver_name="+ver_name+"&gbh="+gbh+"&height="+height+"&ecological="+ecological+"&economical="+economical+"&flowering_season_from="+flowering_season_from+"&flowering_season_to="+flowering_season_to,true);
	xmlhttp.send();
}</script>



</head>

<body class="body">

<div id="wrap" >
  
  
  <div id="top">
    <?php include("header.php"); ?>
    <!--<div id="ban"><table width="1004" align="left"  >
  <tr>
    <td width="234"  align="left"  valign="top" ><img src="images/logoss.jpg" border="0" /></td>
    <td  valign="top" style="padding-top:5px;" width="758"  align="right" ><table align="left" width="707">
  <tr>
    <td width="386" align="left"><div ><a href="#" id="bantext1">REQUEST A DEMO</a></div></td>
    <td width="167" align="left"><div ><a href="#" id="bantext2">DOWNLOADS</a></div></td>
    <td width="138" align="left"><div ><a href="#" id="bantext2">DOWNLOADS</a></div></td>
  </tr>
  <tr>
    <td colspan="3" align="center" class="banquot">Be Smart and Survey Smartly </td>
  </tr>
</table></td>
    
    
  </tr>
</table>
    </div>-->
    
    </div>
    </div>
   <div id="menuholder"><?php include("adminmenu.php"); ?></div>
   <div id="contholder">
   
    
    <!--<div id="nav">
     <ul>
     <li><a href="adminhome.php" id="home_on">HOME</a></li>
        <li><a href="adminproducts.php" id="products_on">PRODUCTS</a></li>
		<li><a href="adminfeatures.php" id="features_on">FEATURES</a></li>
        <li><a href="adminadvantages.php" id="advantages_on">ADVANTAGES</a></li>
        <li><a href="adminhowitworks.php" id="howitworks_on">HOW IT WORKS</a></li>
        <li><a href="adminhelp.php" id="help_on">HELP</a></li>
        <li><a href="admincontactus.php" id="contactus_on">CONTACT US</a></li>
    
    </ul>
    
    </div>-->
    
    
    	<div id="contdata">
    <?php //include("header.php");
include("calendar.html"); ?><br />
	<form name="tree_wise" method="post" action="">
	<table border="1"  align="center" width="90%"  bordercolor="#2a4a73">
		<tr>
			<td bgcolor="#a9c1de" class="f"> Tree wise Report </td>
		</tr>
        <tr>
        	<td>
            	<table width="100%">
                <tr>
                	<td> <br /></td>
                </tr>
                <tr>
        			<td>
						<table border="1" cellpadding="2" cellspacing="2" width="90%" align="center" bordercolor="#bcd5e7">
						
						<tr>
							<td>
                    			<table style="margin-top:10px" border="0" width="100%">
            					<tr>
    								<td ><font class="font4">Tree Name :</font> </td>
    								<td align="left"  ><select name="tree_name" id="tree_name" onChange="showreport();" > 
                                    <option value="">Select Scientific Name</option>
                                    <?php
									  $rest = mysql_query("select * from tree_name");
 									  while ($row =@mysql_fetch_object($rest)) 
										{ ?>        
                                    		<option value="<?php echo $row->tid ?>"><?php echo $row->scientific_name ?></option>
										<?php } ?>
                                        </select>
                                    </td>
                                    
                                    <td align="left"><select name="ver_name" id="ver_name" onChange="showreport();" > 
                                    <option value="">Select Vernacular Name</option>
                                    <?php
									  $rest = mysql_query("select * from tree_name");
 									  while ($row =@mysql_fetch_object($rest)) 
										{ ?>        
                                    		<option value="<?php echo $row->tid ?>"><?php echo $row->tree_name ?></option>
										<?php } ?>
                                        </select>
                                    </td>
    							</tr>
                                
                                <tr>
                                <tr>
                                	<td> <font class="font4" >Enter GBH : </font></td>
                                	<td ><input type="text" id="gbh" name="gbh"></input></div></td>
                                </tr>
                                
                                <tr>
                                	<td> <font class="font4">Enter Height : </font></td>
                                	<td ><input type="text" name="height" id="height"></input></td>
                                </tr>
                                                              
                                <tr>
                                	<td> <font class="font4">Flowering Season Wise : </font></td>
                                	<td colspan="2"> <font class="font4" >From : </font><select id="flowering_season_from" name="flowering_season_from">
                                    	<option value="January">January</option>
                                        <option value="February">February</option>
                                        <option value="March">March</option>
                                        <option value="April">April</option>
                                        <option value="May">May</option>
                                        <option value="June">June</option>
                                        <option value="July">July</option>
                                        <option value="August">August</option>
                                        <option value="September">September</option>
                                        <option value="October">October</option>
                                        <option value="November">November</option>
                                        <option value="December">December</option> </select>
                                   <font class="font4">&nbsp;&nbsp; To : </font><select id="flowering_season_to" name="flowering_season_to">
                                    	<option value="January">January</option>
                                        <option value="February">February</option>
                                        <option value="March">March</option>
                                        <option value="April">April</option>
                                        <option value="May">May</option>
                                        <option value="June">June</option>
                                        <option value="July">July</option>
                                        <option value="August">August</option>
                                        <option value="September">September</option>
                                        <option value="October">October</option>
                                        <option value="November">November</option>
                                        <option value="December">December</option>
                                    </td>
                                </tr>
                                
                                                                
                                 
                                <tr>
                                	<td></td>
                                <td ><input type="checkbox" name="ecological" id="ecological"></input>
                               <font class="font4">  Ecologically Important  </font>
                               <input type="checkbox" name="economical" id="economical"></input>
                                <font class="font4">  Economically Important  </font></td>
                                </tr>
                                
                                
                                 	<td  align="left" colspan="2"><input type="button" bgcolor="#a9c1de"  name="search" id="search" value="View Detail Record"  style="text-decoration:none" class="button_c" onClick="show_alldetails();"> </td>
                                </tr>
    							</table>
                    		</td>
        				</tr>
    					
						</table>
            		</td>
				</tr>
                
        		</table>
                 <br />
					<div id="txthint">
                   	</div>
            </td>
        </tr>
		
	</table>
    
</form>
		
	<?php include("footer.php"); ?>	
    
   </div>
    

    	
   </div> 

<!--<div id="footer">Copyright © 2012.Smart Survey All Rights Reserved.Website Designed & Developed by Kalpak Solutions</div>-->





</body>
</html>