<?php 
include('dashboard_bdo.php');
require_once('convert_marathi.php');
?>
<html>   
	<head>
	<script type="text/javascript" src="jquery-1.8.3.js"></script> 
		<script type="text/javascript">
		function validate_me()
		{
			var x = document.getElementById('deptnm');
			if(x.value=="")
			{
				alert("कृपया इतर विभागाचे नाव टाका. !!!");
				x.focus();
				return false;
			}
		}
		
		</script> 
		<script type="text/javascript">
	$(document).ready(function() 
	{	

		$("#chkall").click(function() 
		{
			
			if($("#chkall").is(':checked'))
			{
				$(".chkk").each(function()
				{
					$(this).attr('checked',true);
				});
			}
			else
			{
				$(".chkk").each(function()
				{
					$(this).attr('checked',false);
				});
			}
		});
	});
	
    </script>
	</head>
		<div class="rightpanel">
			
			<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/db_sms.php" method="post" name="adddept">
									<table>
									<tr>
										<td><label style="width:150px;">सुचना टाका   : </label></td>
										
											<td><textarea cols="80" rows="3" class="unicode" lang="mr" name="sub"></textarea></td>
									</tr>
									<tr>
									<td><label style="width:150px;">विभाग  : </label></td>
									</tr>
									<tr>
									<td><input type='checkbox' id='chkall' value='222' />&nbsp;&nbsp;All Department&nbsp;&nbsp;</td>
				        <?php 

				        	$i = 2;
							$result = mysql_query("SELECT * FROM department_master");
							while($row = mysql_fetch_array($result))
							{	
								if($i==1)
								{
									echo '<tr>';
								}
								
								echo "<td><input type='checkbox' name='chk[]' class='chkk' id='".$row['dept_id']."' value='".$row['dept_id']."' />&nbsp;&nbsp;".$row['dept_nm']."&nbsp;&nbsp;</td>";
								$i = $i + 1;
								if($i==5)
								{
									echo '</tr>';
									$i = 1;
								}
							}
				        ?>
						</tr>
									</table>
									<p class="stdformbutton">
										<center>
										<button class="btn btn-primary" name="save" onclick="return validate_me()">जतन करा </button>
										<button type="reset" class="btn">रद्द करा </button> </center>
									</p>
								</form>
		
						</div><!--widgetcontent-->
					</div><!--maincontentinner-->
					<?php include_once('footer.php'); ?>
				</div><!--maincontentinner-->
			</div><!--maincontent-->
		</div><!--rightpanel-->
	</div><!--mainwrapper-->
</body>
</html>
