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);
date_default_timezone_set('Asia/Bangkok');
?>
<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 / 1024 / 1024; // in MB
if (FileSize > 2) {
alert('File size exceeds 1 MB');
window.location.href='JavaScript:history.go();';
} else {}
}else{
alert("Please select .jpg and .png file extension.");
window.location.href='JavaScript:history.go();';
}
}
</script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<!-- <link rel="stylesheet" href="assets/css/style.css"> -->
</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="package.php">Package</a> <i class="pe-7s-angle-right"></i> Add Package (TH)</h4>
</div>
<form name="form1" method="post" action="saveadd_package.php" enctype="multipart/form-data">
<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 style="width:50%;">Package Images size 1000 * 1400 px. <a class="text-danger"> File .jpg & .png </a></th>
<th style="width:50%;">Date</th>
</thead>
<tbody>
<tr>
<td>
<div class="form-group">
<input onchange="validateFileType(this)" id="fileUpload" name="filUpload" multiple="multiple" required type="file" />
</div>
</td>
<td>
<input type="text" id="datepicker" name="datepicker" class="form-control" style="width:50%;" required>
</td>
</tr>
</tbody>
</table>
<table class="table table-hover">
<thead>
<th style="width:50%;">Package (TH)</th>
<th style="width:50%;">Sub Title (TH)</th>
</thead>
<tbody>
<tr>
<td><textarea name="pack1" rows="2" class="form-control" required></textarea></td>
<td><textarea name="sub1" rows="2" class="form-control"></textarea></td>
</tr>
</tbody>
</table>
<table class="table table-hover">
<thead>
<th>Blogs (TH)</th>
</thead>
<tbody>
<tr>
<td><div class="form-group"><textarea id="edit" name="blog1"></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='package.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>
</body>
<?php include("assets/include/script.php"); ?>
<?php include "texteditor.php"; ?>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( "#datepicker" ).datepicker();
} );
</script>
</html>
<?php
mysqli_close($objCon);
?>
OHA YOOOO