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_title.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);
		
		$title_id = null;

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

		$strSQL = "SELECT * FROM title WHERE title_id ='".$title_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="title.php">Title Vibharam Hospital</a> <i class="pe-7s-angle-right"></i> Edit Title</h4>
								</div>
								<form name="form1" method="post" action="saveedit_title.php">      
								<input type="hidden" name="title_id" value="<?php echo $objResult["title_id"];?>">   
								<input type="hidden" name="admin" value="<?php echo $_SESSION['admin_id'];?>">
								<?php 
									if($title_id == 6 || $title_id == 8 || $title_id == 9 || $title_id == 12)            
									{
										?>
										<div class="content table-responsive table-full-width">  
										<table class="table table-hover" style="width:50%;">    
											<thead>
												<th>Title (TH)</th>          
											</thead>
											<tbody>
												<tr>
													<td><input type="text" class="form-control" name="title1" value="<?php echo $objResult["title1"];?>"></td>  
													<input type="hidden" class="form-control" name="title2" value="<?php echo $objResult["title2"];?>">  
												</tr>
											</tbody>
										</table>
										<table class="table table-hover"  style="width:50%;">    
												<thead>
													<th>Keyword (TH)</th>  
													
												</thead>
												<tbody>
													<tr>
														<td><textarea name="key1" rows="3" class="form-control"><?php echo $objResult["key1"];?></textarea></td>  
														<input type="hidden" class="form-control" name="key2" value="<?php echo $objResult["key2"];?>">
												</tbody>
											</table>
											<table class="table table-hover"  style="width:50%;">    
												<thead>
													<th>Description (TH)</th>
													   
												</thead>
												<tbody>
													<tr>
														<td><textarea name="des1" rows="3" class="form-control"><?php echo $objResult["des1"];?></textarea></td> 
														<input type="hidden" class="form-control" name="des2" value="<?php echo $objResult["des2"];?>"> 
													</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='title.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:50%;">Title (TH)</th>
													<th style="width:50%;">Title (EN)</th>    
												</thead>
												<tbody>
													<tr>
														<td><input type="text" class="form-control" name="title1" value="<?php echo $objResult["title1"];?>"></td>  
														<td><input type="text" class="form-control" name="title2" value="<?php echo $objResult["title2"];?>"></td>  
													</tr>
												</tbody>
											</table>
											<table class="table table-hover">    
												<thead>
													<th style="width:50%;">Keyword (TH)</th>
													<th style="width:50%;">Keyword (EN)</th>    
												</thead>
												<tbody>
													<tr>
														<td><textarea name="key1" rows="3" class="form-control"><?php echo $objResult["key1"];?></textarea></td>   
														<td><textarea name="key2" rows="3" class="form-control"><?php echo $objResult["key2"];?></textarea></td>    
													</tr>
												</tbody>
											</table>
											<table class="table table-hover">    
												<thead>
													<th style="width:50%;">Description (TH)</th>
													<th style="width:50%;">Description (EN)</th>    
												</thead>
												<tbody>
													<tr>
														<td><textarea name="des1" rows="3" class="form-control"><?php echo $objResult["des1"];?></textarea></td>  
														<td><textarea name="des2" rows="3" class="form-control"><?php echo $objResult["des2"];?></textarea></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='title.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