MINI MINI MANI MO
<!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);
$branch_id = null;
if(isset($_GET['branch_id']))
{
$branch_id = $_GET['branch_id'];
}
$strSQL = "SELECT * FROM branch WHERE branch_id ='".$branch_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="branch.php">Branch Vibharam Hospital</a> <i class="pe-7s-angle-right"></i> Add Image</h4>
</div>
<?php
$strSQL2 ="SELECT a.*, b.*
FROM branch_pic a
LEFT JOIN admin b
ON a.admin_id=b.admin_id
WHERE branch_id ='".$branch_id."'";
$objQuery2 = mysqli_query($objCon,$strSQL2);
?>
<a href="addbranch_pic.php?branch_id=<?php echo $objResult['branch_id'];?>">
<button type="button" rel="tooltip" class="btn btn-info btn-simple btn-icon">
<i class="fa fa-plus-circle"></i> Add Image
</button>
</a>
<table class="table table-hover">
<thead>
<th style="width:60%;">Hospital Images</th>
<th style="width:20%;">Last Modified</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["pic"];?>" alt="image" height="165"/></td>
<td><?php echo $objResult2["username"];?></td>
<td>
<div align="center">
<button type="button" rel="tooltip" class="btn btn-default btn-sm btn-simple" onclick="window.location.href='editbranch_pic.php?pic_id=<?php echo $objResult2['pic_id'];?>&pic=<?php echo $objResult2["pic"];?>'" 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='deletebranch_pic.php?pic_id=<?php echo $objResult2['pic_id'];?>&pic=<?php echo $objResult2["pic"];?>'}">
<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>
<table class="table">
<tr><td> </td></tr>
</table>
</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