MINI MINI MANI MO

Path : /home/phaetpan/domains/phaetpanya.com/public_html/vibharamadmin/
File Upload :
Current File : /home/phaetpan/domains/phaetpanya.com/public_html/vibharamadmin/add_list.php

<!doctype html>
<?php
	session_start();
	if($_SESSION['admin_id'] == "")
	{
		include("session.php");   
	}    

		include("connect.php");

		$strSQL = "SELECT * FROM admin WHERE admin_id = '".$_SESSION['admin_id']."'";
		$objQuery = mysqli_query($objCon,$strSQL);
		$objResult = mysqli_fetch_array($objQuery,MYSQLI_ASSOC);      
?>
<html>
<head>
<?php include("assets/include/link.php"); ?>
	<script language="JavaScript">  
	function validateFileType(file){
        var fileName = document.getElementById("fileUpload").value;
        var idxDot = fileName.lastIndexOf(".") + 1;
        var extFile = fileName.substr(idxDot, fileName.length).toLowerCase();
        if (extFile=="jpg" || extFile=="jpeg" || extFile=="png"){
            //TO DO
				var FileSize = file.files[0].size / 1024 / 1024; // in MB
		        if (FileSize > 2) {
		            alert('File size exceeds 1 MB');
					window.location.href='JavaScript:history.go();';
         } else {}	
		
        }else{
            alert("Please select .jpg and .png file extension.");
			window.location.href='JavaScript:history.go();';
        }   
    }
	</script>
</head>
<body>
<div class="wrapper">
    
       <?php include("nav-menu.php"); ?> 
        	    	
	<div class="main-panel">
		<?php include("assets/include/account.php"); ?>          
			<div class="content">
				<div class="container-fluid">
					<div class="row">
						<div class="col-md-12">
							<div class="card card-plain">
								<div class="header">
									<h4 class="title"><a href="doctor2.php">Doctor List</a> <i class="pe-7s-angle-right"></i> Add Doctor</h4>
								</div>
								<form name="form1" method="post" action="saveadd_list.php" enctype="multipart/form-data">          
								<input type="hidden" name="admin" value="<?php echo $_SESSION['admin_id'];?>">
									<div class="content table-responsive table-full-width">
										<table class="table table-hover">    
											<thead>
												<th style="width:50%;">Doctor Profile size  250 * 350 px.&nbsp; <a class="text-danger"> File .jpg & .png </a></th>
												<th style="width:50%;">Department</th>
											</thead>
											<tbody>
												<tr>
													<td>
														<div class="form-group">
															<input onchange="validateFileType(this)" id="fileUpload" name="filUpload" multiple required type="file" />   
														</div>
													</td>  
													<td>
														<div class="form-group">
															<select class="form-control" name="depart">
															<?php
																$strSQL3 ="SELECT * FROM department";
																$objQuery3 = mysqli_query($objCon,$strSQL3);
															?>
															<?php
															while($objResult3 = mysqli_fetch_array($objQuery3,MYSQLI_ASSOC))
																{ 
															?>
																<option value="<?php echo $objResult3["depart_id"];?>"><?php echo $objResult3["depart1"];?></option>
															<?php
																}
															?>
															</select>
														 </div>
													</td>
												</tr>
											</tbody>
										</table>
										<table class="table table-hover">    
											<thead>
												<th style="width:50%;">ชื่อ นามสกุล (TH)</th>
												<th style="width:50%;">Full Name (EN)</th>
											</thead>
											<tbody>
												<tr>
													<td><input type="text" class="form-control" name="name1" value="" required></td>  
													<td><input type="text" class="form-control" name="name2" value="" ></td>
												</tr>
											</tbody>
										</table>
                                        
					 	<!--	 <table class="table table-hover">    
											<thead>
												<th style="width:50%;">Full Name (CN)</th>
												<th style="width:50%;">Full Name (JP)</th>
											</thead>
											<tbody>
												<tr>
													<td><input type="text" class="form-control" name="name3" value="" ></td>  
													<td><input type="text" class="form-control" name="name4" value="" ></td>
												</tr>
											</tbody>
										</table>
										<table class="table table-hover">    
											<thead>
												<th style="width:50%;">Full Name (MM)</th>
												<th style="width:50%;">Full Name (ARA)</th>
											</thead>
											<tbody>
												<tr>
													<td><input type="text" class="form-control" name="name5" value="" ></td>  
													<td><input type="text" class="form-control" name="name6" value="" ></td>
												</tr>
											</tbody>
										</table>
										<br><br>
										<table class="table table-hover">    
											<thead>
												<th style="width:50%;">Branch (TH)</th>
												<th style="width:50%;">Branch (EN)</th>
											</thead>
											<tbody>
												<tr>
													<td><input type="text" class="form-control" name="branch1" value="" required></td>  
													<td><input type="text" class="form-control" name="branch2" value="" ></td>
												</tr>
											</tbody>
										</table>
										<table class="table table-hover">    
											<thead>
												<th style="width:50%;">Branch (CN)</th>
												<th style="width:50%;">Branch (JP)</th>
											</thead>
											<tbody>
												<tr>
													<td><input type="text" class="form-control" name="branch3" value="" ></td>  
													<td><input type="text" class="form-control" name="branch4" value="" ></td>
												</tr>
											</tbody>
										</table>
										<table class="table table-hover">    
											<thead>
												<th style="width:50%;">Branch (MM)</th>
												<th style="width:50%;">Branch (ARA)</th>
											</thead>
											<tbody>
												<tr>
													<td><input type="text" class="form-control" name="branch5" value="" ></td>  
													<td><input type="text" class="form-control" name="branch6" value="" ></td>
												</tr>
											</tbody>
										</table> -->
										<table class="table table-hover">    
														<thead>
															<th>Profile (TH)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit" name="blog1"></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Profile (EN)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit2" name="blog2"></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
												<!--	<table class="table table-hover">    
														<thead>
															<th>Profile (CN)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit3" name="blog3"></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Profile (JP)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit4" name="blog4"></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Profile (MM)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit5" name="blog5"></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Profile (ARA)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit6" name="blog6"></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>-->
										<table class="table">    
											<tr>
												<td> 
													<button type="submit" rel="tooltip" class="btn btn-success btn-simple btn-icon">  
														<i class="fa fa-check-square" aria-hidden="true"></i> Save
													</button>
													<button type="button" rel="tooltip" class="btn btn-default btn-sm btn-simple" onclick="window.location.href='about.php'">
														<i class="fa fa-window-close" aria-hidden="true"></i> Cancel
													</button>
												</td>
											</tr>
										</table>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
	</div>
</div>
</body>
<?php include("assets/include/script.php"); ?>
<?php include "texteditor2.php"; ?>
</html>
<?php 
	mysqli_close($objCon);
?>

OHA YOOOO