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/edit_manu.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);
		
		$menu_id = null;

		if(isset($_GET['menu_id']))
		{
			$menu_id = $_GET['menu_id'];
		}

		$strSQL = "SELECT * FROM home_menu WHERE menu_id ='".$menu_id."'";   
		$objQuery = mysqli_query($objCon,$strSQL);
		$objResult = mysqli_fetch_array($objQuery,MYSQLI_ASSOC);   
?>
<html>
<head>
<?php include("assets/include/link.php"); ?>
</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="home2.php">Menu Vibharam Hospital</a> <i class="pe-7s-angle-right"></i> Edit Menu</h4>
								</div>
								<form name="form1" method="post" action="saveedit_menu.php">      
								<input type="hidden" name="menu_id" value="<?php echo $objResult["menu_id"];?>">   
								<input type="hidden" name="admin" value="<?php echo $_SESSION['admin_id'];?>">
								<?php 
									if($menu_id == 5 || $menu_id == 7 || $menu_id == 8)            
									{
										?>
											<div class="content table-responsive table-full-width">
										<table class="table table-hover" style="width:33%;">    
											<thead>
												<th>Menu (TH)</th>          
											</thead>
											<tbody>
												<tr>
													<td><input type="text" class="form-control" name="menu1" value="<?php echo $objResult["menu1"];?>"></td>  
													<input type="hidden" class="form-control" name="menu2" value="<?php echo $objResult["menu2"];?>">  
													<input type="hidden" class="form-control" name="menu3" value="<?php echo $objResult["menu3"];?>"> 
													<input type="hidden" class="form-control" name="menu4" value="<?php echo $objResult["menu4"];?>"> 
													<input type="hidden" class="form-control" name="menu5" value="<?php echo $objResult["menu5"];?>"> 
													<input type="hidden" class="form-control" name="menu6" value="<?php echo $objResult["menu6"];?>"> 
												</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='home2.php'">
														<i class="fa fa-window-close" aria-hidden="true"></i> Cancel
													</button>
												</td>
											</tr>
										</table>
									</div>
										<?php
									}else{
										?>
										  <div class="content table-responsive table-full-width">
											<table class="table table-hover">    
												<thead>
													<th style="width:33%;">Menu (TH)</th>
													<th style="width:33%;">Menu (EN)</th>
													<th style="width:33%;">Menu (CN)</th>     
												</thead>
												<tbody>
													<tr>
														<td><input type="text" class="form-control" name="menu1" value="<?php echo $objResult["menu1"];?>"></td>  
														<td><input type="text" class="form-control" name="menu2" value="<?php echo $objResult["menu2"];?>"></td>  
														<td><input type="text" class="form-control" name="menu3" value="<?php echo $objResult["menu3"];?>"></td>  
													</tr>
												</tbody>
											</table>
											<table class="table table-hover">    
												<thead>
													<th style="width:33%;">Menu (JP)</th>
													<th style="width:33%;">Menu (MM)</th>
													<th style="width:33%;">Menu (ARA)</th>     
												</thead>
												<tbody>
													<tr>
														<td><input type="text" class="form-control" name="menu4" value="<?php echo $objResult["menu4"];?>"></td>  
														<td><input type="text" class="form-control" name="menu5" value="<?php echo $objResult["menu5"];?>"></td>  
														<td><input type="text" class="form-control" name="menu6" value="<?php echo $objResult["menu6"];?>"></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='home2.php'">
															<i class="fa fa-window-close" aria-hidden="true"></i> Cancel
														</button>
													</td>
												</tr>
											</table>
										</div>
										<?php
									}
									?>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
	</div>
</div>
</body>
<?php include("assets/include/script.php"); ?>
<?php include "texteditor.php"; ?>
</html>
<?php 
	mysqli_close($objCon);
?>

OHA YOOOO