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'];
}
$logo = null;
if(isset($_GET['logo']))
{
$logo = $_GET['logo'];
}
$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"); ?>
<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 / 512 / 512; // in MB
if (FileSize > 0.512) {
alert('File size exceeds 512 KB');
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="branch.php">Branch Vibharam Hospital</a> <i class="pe-7s-angle-right"></i> Edit Branch</h4>
</div>
<form name="form1" method="post" action="saveedit_branch.php" enctype="multipart/form-data">
<input type="hidden" name="branch_id" value="<?php echo $objResult["branch_id"];?>">
<input type="hidden" name="logo" value="<?php echo $objResult["logo"];?>">
<input type="hidden" name="admin" value="<?php echo $_SESSION['admin_id'];?>">
<div class="content table-responsive table-full-width">
<table class="table table-hover">
<p>Hospital Logo size 350 * 140 px. <a class="text-danger"> File .jpg & .png </a></p>
<div class="form-group">
<img src="../upload_file/<?php echo $objResult["logo"];?>" alt="image" style="width:25%;"/><br><br>
<input onchange="validateFileType(this)" id="fileUpload" name="filUpload" multiple="multiple" type="file"/>
</div>
<thead>
<th style="width:50%;">Hospital</th>
<th style="width:50%;">Address</th>
</thead>
<tbody>
<tr>
<td><input type="text" class="form-control" name="company_1" value="<?php echo $objResult["company_1"];?>"></td>
<td><input type="text" class="form-control" name="address_1" value="<?php echo $objResult["address_1"];?>"></td>
</tr><!--
<tr>
<td>English</td>
<td><input type="text" class="form-control" name="company_2" value="<?php echo $objResult["company_2"];?>"></td>
<td><input type="text" class="form-control" name="address_2" value="<?php echo $objResult["address_2"];?>"></td>
</tr>
<tr>
<td>Chinese</td>
<td><input type="text" class="form-control" name="company_3" value="<?php echo $objResult["company_3"];?>"></td>
<td><input type="text" class="form-control" name="address_3" value="<?php echo $objResult["address_3"];?>"></td>
</tr>
<tr>
<td>Japanese</td>
<td><input type="text" class="form-control" name="company_4" value="<?php echo $objResult["company_4"];?>"></td>
<td><input type="text" class="form-control" name="address_4" value="<?php echo $objResult["address_4"];?>"></td>
</tr>
<tr>
<td>Burmese</td>
<td><input type="text" class="form-control" name="company_5" value="<?php echo $objResult["company_5"];?>"></td>
<td><input type="text" class="form-control" name="address_5" value="<?php echo $objResult["address_5"];?>"></td>
</tr>
<tr>
<td>Arabic</td>
<td><input type="text" class="form-control" name="company_6" value="<?php echo $objResult["company_6"];?>"></td>
<td><input type="text" class="form-control" name="address_6" value="<?php echo $objResult["address_6"];?>"></td>
</tr> -->
</tbody>
</table>
<table class="table">
<tr><td> </td></tr>
</table>
<table class="table table-hover">
<thead>
<th style="width:25%;">Fax.</th>
<th style="width:25%;">Tel.</th>
<th style="width:25%;">E-Mail</th>
<th style="width:25%;">Website</th>
</thead>
<tbody>
<tr>
<td><input type="text" class="form-control" name="fax" value="<?php echo $objResult["fax"];?>"></td>
<td><input type="text" class="form-control" name="tel" value="<?php echo $objResult["tel"];?>"></td>
<td><input type="text" class="form-control" name="mail" value="<?php echo $objResult["mail"];?>"></td>
<td><input type="text" class="form-control" name="website" value="<?php echo $objResult["website"];?>"></td>
</tr>
</tbody>
</table>
<table class="table">
<tr><td> </td></tr>
</table>
<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='branch.php'">
<i class="fa fa-window-close" aria-hidden="true"></i> Cancel
</button><br><br>
</div>
</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