<?php ############################### Online Letter Entry #################################################
     require_once('connection/db.php');
	  require_once('convert_marathi.php');
	 $no=$_GET['no'];
   ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tapal Admin System</title>
<link rel="stylesheet" href="css/style.default.css" type="text/css" />
<link rel="stylesheet" href="css/bootstrap-fileupload.min.css" type="text/css" />
<link rel="stylesheet" href="css/bootstrap-timepicker.min.css" type="text/css" />
<link rel="stylesheet" href="css/responsive-tables.css">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="unicode.js"></script>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/jquery-migrate-1.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.9.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-fileupload.min.js"></script>
<script type="text/javascript" src="js/bootstrap-timepicker.min.js"></script>
<script type="text/javascript" src="js/jquery.uniform.min.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript" src="js/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="js/jquery.autogrow-textarea.js"></script>
<script type="text/javascript" src="js/charCount.js"></script>
<script type="text/javascript" src="js/colorpicker.js"></script>
<script type="text/javascript" src="js/ui.spinner.min.js"></script>
<script type="text/javascript" src="js/chosen.jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/modernizr.min.js"></script>
<script type="text/javascript" src="js/responsive-tables.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
<script type="text/javascript" src="js/forms.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function(){
        // dynamic table
        jQuery('#dyntable').dataTable({
            "sPaginationType": "full_numbers",
            "aaSortingFixed": [[0,'asc']],
            "fnDrawCallback": function(oSettings) {
                jQuery.uniform.update();
            }
        });
        
        jQuery('#dyntable2').dataTable( {
            "bScrollInfinite": true,
            "bScrollCollapse": true,
            "sScrollY": "300px"
        });
        
    });
</script>
<script type="text/javascript" src="js/adduser.js"></script>
</head>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->


<body style="background:white;">

<div class="mainwrapper">
    
   <div class="header">
        <div class="logo">
            <center><font color="white" size="3px;" style="font-weight:bold">पोलीस अधिक्षक कार्यालय,<br> <br> जि.रायगड</font></center>
        </div>
        <div class="headerinner">
            <ul class="headmenu">
                <li class="odd">
                    <ul class="dropdown-menu">
                    </ul>
                </li>
                <li class="right">
                    <div class="userloggedinfo">
                            <ul> 
                                <li><h5><?php echo "Welcome </h5><h4 style=font-weight:bold;>".User."</h4>";?></li>
                            </ul>
                        </div>
                    </div>
                </li>
            </ul><!--headmenu-->
        </div>
    </div>
</div><!--mainwrapper-->
<script type="text/javascript">
    jQuery(document).ready(function() {
        
      // simple chart
		var flash = [[0, 11], [1, 9], [2,12], [3, 8], [4, 7], [5, 3], [6, 1]];
		var html5 = [[0, 5], [1, 4], [2,4], [3, 1], [4, 9], [5, 10], [6, 13]];
      var css3 = [[0, 6], [1, 1], [2,9], [3, 12], [4, 10], [5, 12], [6, 11]];
			
		function showTooltip(x, y, contents) {
			jQuery('<div id="tooltip" class="tooltipflot">' + contents + '</div>').css( {
				position: 'absolute',
				display: 'none',
				top: y + 5,
				left: x + 5
			}).appendTo("body").fadeIn(200);
		}
	
			
		var plot = jQuery.plot(jQuery("#chartplace"),
			   [ { data: flash, label: "Flash(x)", color: "#6fad04"},
              { data: html5, label: "HTML5(x)", color: "#06c"},
              { data: css3, label: "CSS3", color: "#666"} ], {
				   series: {
					   lines: { show: true, fill: true, fillColor: { colors: [ { opacity: 0.05 }, { opacity: 0.15 } ] } },
					   points: { show: true }
				   },
				   legend: { position: 'nw'},
				   grid: { hoverable: true, clickable: true, borderColor: '#666', borderWidth: 2, labelMargin: 10 },
				   yaxis: { min: 0, max: 15 }
				 });
		
		var previousPoint = null;
		jQuery("#chartplace").bind("plothover", function (event, pos, item) {
			jQuery("#x").text(pos.x.toFixed(2));
			jQuery("#y").text(pos.y.toFixed(2));
			
			if(item) {
				if (previousPoint != item.dataIndex) {
					previousPoint = item.dataIndex;
						
					jQuery("#tooltip").remove();
					var x = item.datapoint[0].toFixed(2),
					y = item.datapoint[1].toFixed(2);
						
					showTooltip(item.pageX, item.pageY,
									item.series.label + " of " + x + " = " + y);
				}
			
			} else {
			   jQuery("#tooltip").remove();
			   previousPoint = null;            
			}
		
		});
		
		jQuery("#chartplace").bind("plotclick", function (event, pos, item) {
			if (item) {
				jQuery("#clickdata").text("You clicked point " + item.dataIndex + " in " + item.series.label + ".");
				plot.highlight(item.series, item.datapoint);
			}
		});
    
        
        //datepicker
        jQuery('#datepicker').datepicker();
        
        // tabbed widget
        jQuery('.tabbedwidget').tabs();
        
        
    
    });
</script>
<body>
    <div class="rightpanel" style="margin-Left:0px;width:100%;">
        <div class="maincontent">
            <div class="maincontentinner">
				<div class="widget" style="text-align:center;width:80%;margin-left: auto ;margin-right: auto ;">
					<h4 class="widgettitle">पत्र जोडा</h4>
					<div class="widgetcontent" style="align:centre;">
						<form class="stdform" action="letterentrynew.php" method="post" align="center" name="avakbarnishiol">
							<?php
							$year = date('y');
							//echo $year;
							$r = mysql_query("SHOW TABLE STATUS LIKE 'incoming_letters_transaction' ");
							$row = mysql_fetch_array($r);
							$Auto_increment = $row['Auto_increment'];
							mysql_free_result($r);
							$n2 = str_pad($Auto_increment + 0, 4, 0, STR_PAD_LEFT);
							//echo $n2;
							$n = $year.'-'.$n2;
							//echo "$n";	
							?>
							<table style="width:100%;">
							<tr>
								<td>
									<label>आवक क्रमांक : </label>
								</td>
								<td>	
									<input type="text" name="ltrinwardno" class="input-small" value="<?php echo $n;?>" placeholder="" readonly  style="height:30px;" lang="mr"/>
								</td>
							</tr>
							<tr> 
								<td>
									<label>संदर्भ क्रमांक  : </label>
								</td>
								<td>
									<input type="text" name="refno" class="input-medium" style="height:30px;" placeholder="ref no" />
								</td>
								<td>
									<label>संदर्भ दिनांक : </label>
								</td>
								<td>
									<input type="text" name="refdate" placeholder="dd-mm-yyyy" style="height:30px;"/>
								</td>
							</tr>
							<tr>
								<td>
									<label style="width:120px;">संदर्भ प्राप्त दिनांक : </label>
								</td>
								<td>
									<input  type="text" name="recdate" placeholder="dd-mm-yyyy" style="height:30px;"/>
								</td>
								<td>
									<label>कोणाकडून प्राप्त झाले :  </label>
								</td>
								<td>
									<input type="text" name="sendernm" class="unicode" placeholder="Sender name" style="height:30px;" lang="mr"/>
								</td>
							</tr>
							<tr>
								<td>
									<label>थोडक्यात विषय : </label>
								</td>
								<td>
									<textarea cols="80" rows="2" class="unicode" lang="mr" name="sub"></textarea> 
								</td>
								<td>
									<label> संदर्भाचा प्रकार :  </label>	
								</td>		
								<td>	
								<?php
									$query = "SELECT  * FROM sandharbh_master"; 
									convert_marathi();
									$result = mysql_query ($query);
									echo "<select name=ltrtypec  id=ltrtypec>Dropdown</option><option value=> संदर्भाचा प्रकार </option>";
									while($row = mysql_fetch_array($result))
                                      {
                                       echo"{
												('<option id='".$row['sandhrbh_id']."' value='".$row['sandhrbh_id']."'>".$row['sandharbh_nm']."</option>')
											}";
                                      }
									echo "</select>";
									?>
								</td>
							</tr>
							<tr>
								<td>
									<label>कागदपत्र जोडा :  </label>
								</td>
								<td>
									<div class="fileupload fileupload-new" data-provides="fileupload">
										<div class="input-append">
											<div class="uneditable-input" style="margin-Left:10px;">
												<i class="iconfa-file fileupload-exists"></i>
												<span class="fileupload-preview"></span>
											</div>
											<span class="btn btn-file"><span class="fileupload-new">कागदपत्र निवडा </span>
											<span class="fileupload-exists">बदल करा</span>
											<input type="file" name="path"/></span>
											<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">रद्द करा </a>
										</div>
									</div>
								</td>
								<td>
									<label style="width:110px;">मोबाइल नंबर : </label>
								</td>
								<td>
									<input type="text" style="height:30px;" name="mobno" placeholder="Mobile Number"/>
								</td>
							</tr>
							<tr>
								<td>
                                    <label  for="email">ईमेल आय डी :</label>
								</td>
								<td>
									<input type="text" style="height:30px;" name="email" id="email" class="input-xlarge" /></div>
								</td>
								<td>
									<label style="width:110px;">पत्ता  : </label>
								</td>
								<td>
									<textarea cols="80" rows="2" style="height:60px;" class="unicode" lang="mr" name="add"></textarea>
								</td>
							</tr>
							</table>
							<div>  				 
								<p class="stdformbutton">
									<center> <button class="btn btn-primary" onclick="return validateAvakbarnishiol()">जतन करा </button>
									<button type="reset" class="btn">रद्द करा  </button> </center>
								</p>
							</div>
						</form>
					</div><!--widgetcontent-->
				</div><!--widget-->
				<?phpinclude_once('footer.php');?>
            </div><!--maincontentinner-->
        </div><!--maincontent--> 
    </div><!--rightpanel-->
</div><!--mainwrapper-->
</body>
</html>
