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_clinicpic.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);
		
		$clinic_id = null;

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

		$strSQL = "SELECT * FROM clinic WHERE clinic_id ='".$clinic_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="clinic.php">Specialized Clinices</a> <i class="pe-7s-angle-right"></i>Blog</h4>
								</div>
										<?php
											$strSQL2 ="SELECT a.*, b.*
											FROM clinic_pic a  
											LEFT JOIN admin b
											ON a.admin_id=b.admin_id
											WHERE clinic_id ='".$clinic_id."'";
											$objQuery2 = mysqli_query($objCon,$strSQL2);
										?>
										<div class="content table-responsive table-full-width">      
											<a href="add_clinicpic2.php?clinic_id=<?php echo $clinic_id;?>">
												<button type="button" rel="tooltip" class="btn btn-info btn-simple btn-icon">      
													<i class="fa fa-plus-circle"></i> Add Images
												</button>
											</a>
											<table class="table table-hover">    
												<thead>
													<th style="width:60%;">Clinic Images</th>  
													<th style="width:20%;"><div align="center">Last Modified</div></th>      
													<th style="width:20%;"><div align="center">Manage</div></th>
												</thead>
											<?php
											while($objResult2 = mysqli_fetch_array($objQuery2,MYSQLI_ASSOC))
												{ 
											?>
												<tbody>
													<tr>
														<td><img src="../upload_file/<?php echo $objResult2["img"];?>" alt="image" height="150"/></td>  
														<td><div align="center"><?php echo $objResult2["username"];?></div></td>  
														<td>
															<div align="center">
															<button type="button" rel="tooltip" class="btn btn-default btn-sm btn-simple" onclick="window.location.href='edit_clinicpic2.php?pic_id=<?php echo $objResult2['pic_id'];?>'" title="แก้ไขข้อมูล">
																<i class="fa fa-pencil-square" aria-hidden="true"></i> Edit
															</button>
															<a href="JavaScript:if(confirm('Are you sure you want to delete this item ?')==true){window.location='deleteclinicpic.php?pic_id=<?php echo $objResult2['pic_id'];?>&img=<?php echo $objResult2["img"];?>'}">
																<button type="button" rel="tooltip" class="btn btn-danger btn-simple btn-icon" title="ลบข้อมูล">  
																	<i class="fa fa-window-close" aria-hidden="true"></i> Remove 
																</button>
															</a>
															</div>     
														</td>
													</tr>
												</tbody>
											<?php
												}
											?>
											</table>
											<form name="form1" method="post" action="saveedit_clinicblog.php">          
											<input type="hidden" name="clinic_id" value="<?php echo $clinic_id ;?>">     
											<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>Blogs (TH)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit" name="blog1"><?php echo $objResult["blog1"];?></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Blogs (EN)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit2" name="blog2"><?php echo $objResult["blog2"];?></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Blogs (CN)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit3" name="blog3"><?php echo $objResult["blog3"];?></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Blogs (JP)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit4" name="blog4"><?php echo $objResult["blog4"];?></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Blogs (MM)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit5" name="blog5"><?php echo $objResult["blog5"];?></textarea></div>      
																</td>  
															</tr>
														</tbody>
													</table>
													<table class="table table-hover">    
														<thead>
															<th>Blogs (ARA)</th>
														</thead>
														<tbody>
															<tr>
																<td><div class="form-group"><textarea id="edit6" name="blog6"><?php echo $objResult["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='clinic.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>
</div>
</body>
<?php include("assets/include/script.php"); ?>
<?php include "texteditor2.php"; ?>
</html>
<?php 
	mysqli_close($objCon);
?>

OHA YOOOO