<?php 
include('dashboard_bdo.php');
require_once('convert_marathi.php');
?>
<html>   
	<head>
		<script type="text/javascript" src="js/adduser.js"></script> 
		
	</head>
		<div class="rightpanel">
			<?php
				$no=$_GET['no'];
				if($no==1)
				{ 		
					#############################################################################
									//code to add Department
					#############################################################################
					?> 
					<ul class="breadcrumbs">
						<li><a href="dashboard_bdo.php"><i class="iconfa-home"></i></a> <span class="separator"></span></li>
						<li><a href="dashboard_bdo.php">Forms</a> <span class="separator"></span></li>
						<li>नवीन विभाग जोडा</li>
					</ul>
					<div class="pageheader">
						<div class="pageicon"><span class="iconfa-pencil"></span></div>
						<div class="pagetitle">
							<h1>नवीन विभाग जोडा </h1>
						</div>
					</div><!--pageheader-->
					<div class="maincontent">
						<div class="maincontentinner">
							<div class="widget">
								<h4 class="widgettitle">नवीन विभाग जोडा </h4>
									<div class="widgetcontent">
										<form class="stdform" action="./connection/addnewdepartment.php" method="post" name="adddept">
											<table>
											<tr>
												<td><label style="width:150px;">विभागाचे नाव टाका   : </label></td>
												<td><span class="field"><input type="text" name="deptnm" class="input-medium unicode" lang="mr" placeholder="विभागाचे नाव टाका " /></span></td>
											</tr>
											<tr>
												<td><label style="width:150px;">डेस्क  जोडणे (y/n)   : </label></td>
												<td><span class="field"><input type="text" name="deptdesk" class="input-medium unicode" lang="mr" placeholder="(y/n)" /></span></td>
											</tr>
											</table>
											<p class="stdformbutton">
												<center>
												<button class="btn btn-primary" name="save" onclick="return validateaddDept()">जतन करा </button>
												<button type="reset" class="btn">रद्द करा </button> </center>
											</p>
										</form>
				
		<?php   } ################################End Of Add Department Code#########################
				else if($no==2)
				{
					#############################################################################
										//code to update Department
					#############################################################################
				?>  
					<ul class="breadcrumbs">
						<li><a href="dashboard_bdo.php"><i class="icon&a-home"></i></a> <span class="separator"></sp!n></li>
						<li><a href="dashboard_bdo.php">Forms</a> <span cla3s="separator"></span></li>
						<li>विभाग अद्यावत करा</li>
					</ul>
					<div class="pageheader">
						<div class="pageicon"><span class="iconfa-pencil"></span></div>
						<div class="pagetitle">
							<h1>विभाग अद्यावत करा</h1>
						</div>
					</div><!--pageheader-->
        
					<div class="maincontent">
						<div class="maincontentinner">
							<div class="widget">
								<h4 class="widgettitle"> विभाग अद्यावत करा </h4>
									<div class="widgetcontent">
										<form class="stdform" action="./connection/addnewdepartment.php" method="post" name="updatedept">
											<table width="40%">
												<tr>
												<td><label>विभाग निवडा : </label></td>
												<td> <span>
												<?php
													convert_marathi();
													$query = "SELECT  * FROM department_master";						     
													$result = mysql_query ($query);
													echo "<select name='deptid' >Dropdown</option><option value=>विभाग निवडा</option>";
													while($row = mysql_fetch_array($result))
														{
															echo "<option value=$row[dept_id] class=field unicode lang=mr>".$row[dept_nm]."</option>"; 
														}
													echo "</select>";
												?>
												</span>
												</td>
												</tr>
												<tr>
												<td> 
												<label>विभागाचे नाव टाका   : </label>
												</td>
												<td> 
													<input type="text" name="deptnm" class="input-medium unicode" lang="mr" placeholder="विभागाचे नाव टाका " /></span>
												</td>
												</tr>
												<tr>
													<td><label>डेस्क  जोडणे (y/n): </label></td>
													<td><input type="text" name="deptdesk" class="input-medium unicode" lang="mr" placeholder="(y/n)" /></td>
												</tr>
												
											</table>
											<p class="stdformbutton">
											<center> <button class="btn btn-primary" name="saveup" onclick="return validateupdateDept()">अद्यावात करा</button>
											<button type="reset" class="btn">रद्द करा</button></center>
											</p>
										</form>
					  
		<?php  }
						################################End Of Add Department Code#########################
					   ?>
								</div><!--widgetcontent-->
							</div><!--maincontentinner-->
							<?php include_once('footer.php'); ?>
						</div><!--maincontentinner-->
					</div><!--maincontent-->
				</div><!--rightpanel-->
	</div><!--mainwrapper-->
</body>
</html>
