|
|
|
มีปัญหาเลือกกดคลิกจองที่นั่งว่าง พอคลิกแล้วมันไม่เปลี่ยนเป็นไม่ว่างคะ |
|
|
|
|
|
|
|
Code (PHP)
<?php
session_start();
if($_SESSION['id_member'] == "")
{
echo "Please Login!";
exit();
}
if($_SESSION['status'] != "Member")
{
echo "This page for Member only!";
exit();
}
$objConnect = mysql_connect("localhost","root","12345678") or die("Error Connect to Database");
$objDB = mysql_select_db("project");
$strSQL = "SELECT * FROM member WHERE id_member = '".$_SESSION['id_member']."'";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?>
<html>
<font face="Impact" color="black" size="4">ยินดีต้อนรับคุณ<?php echo $objResult["username"];?></font>
<body>
<br>
<table width="350" height="400" border="0" align="left">
<tr>
<td width="300">
<font face="Impact" color="Black" size="7">เมนู</font><br>
<hr size="6" align="left" color="black" width="110px"></hr>
<a href ="editmember.php" style="text-decoration:none"><font face="Impact" color="black" size="3">แก้ไขข้อมูลส่วนตัว</font><br>
<a href ="courseshow.php" style="text-decoration:none"><font face="Impact" color="black" size="3">หลักสูตรและจอง</font><br>
<a href ="teacher_show.php" style="text-decoration:none"><font face="Impact" color="black" size="3">ครูผู้สอน</font><br>
<a href ="PageUpload1.php" style="text-decoration:none"><font face="Impact" color="black" size="3">การชำระเงิน</font><br>
<a href ="logout.php" style="text-decoration:none"><font face="Impact" color="black" size="3">ออกจากระบบ</font><br>
</td>
</table><br>
<html>
<body>
<?php
$objConnect = mysql_connect("localhost","root","12345678") or die("Error Connect to Database");
$objDB = mysql_select_db("project");
$strSQL = "SELECT * FROM course WHERE Id_Course = '".$_GET["Id_Course"]."' ";
echo$Id_Course;
$objQuery = mysql_query($strSQL);
$objResult = mysql_fetch_array($objQuery);
if(!$objResult)
{
echo "Not found Id_Course=".$_GET["Id_Course"];
}
else
{
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" media="all" type="text/css" href="jquery-ui.css" />
<link rel="stylesheet" media="all" type="text/css" href="jquery-ui-timepicker-addon.css" />
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="jquery-ui-sliderAccess.js"></script>
<font face="">
</head>
<br>
<form name="form1" method="post" action="save_booking.php">
<p>* ลายละเอียดหลักสูตรที่ลูกค้าเลือก</p>
<table width="700" border="1" bordercolor="#FFFF66">
<center>
<tr bgcolor="#FFFF66">
<th width="160"> <div align="center">รหัสวิชา </div></th>
<th width="160"> <div align="center">ชื่อหลักสูตร </div></th>
<th width="150"> <div align="center">ชั่วโมงหลักสูตร </div></th>
<th width="150"> <div align="center">ราคาหลักสูตร </div></th>
</tr>
<br><br>
<tr>
<td><center><input center name="Id_Course" value="<?php echo $objResult['Id_Course'];?>" readonly/></td>
<td><center><input name="Name_Course" value="<?php echo $objResult['Name_Course'];?>" readonly/></td>
<td><center><input name="Hours_Course" value="<?php echo $objResult['Hours_Course'];?>" readonly/></td>
<td><center><input name="Price_Course" value="<?php echo $objResult['Price_Course'];?>" readonly/></td>
</tr>
</body>
</table>
<br>
<?php
$objConnect = mysql_connect("localhost","root","12345678") or die("Error Connect to Database");
$objDB = mysql_select_db("project");
$strSQL = "SELECT * FROM member WHERE id_member = '".$_SESSION['id_member']."' ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery)
?>
<form name="form1" method="post" action="save_booking.php">
<p>* ข้อมูลลูกค้า</p>
<table width="500" border="1" bordercolor="#FFFF66">
<center>
<tr bgcolor="#FFFF66">
<th width="100"> <div align="center">ชื่อ </div></th>
<th width="100"> <div align="center">นามสกุล </div></th>
</tr>
</center>
<tr>
<td><center><input name="firstname" value="<?php echo $objResult["firstname"];?>" readonly/> </td>
<td><center><input name="lastname" value="<?php echo $objResult["lastname"];?>" readonly/> </td>
</tr>
</table>
<table center width="600" border="0" bordercolor="#FFFF66">
<tbody>
<tr>
<td><font color="white"> Date</td>
<script type="text/javascript">
$(function(){
var startDateTextBox = $('#dateInput');
var endDateTextBox = $('#dateEnd');
startDateTextBox.datepicker({
dateFormat: 'dd-mm-yy',
onClose: function(dateText, inst) {
if (endDateTextBox.val() != '') {
var testStartDate = startDateTextBox.datetimepicker('getDate');
var testEndDate = endDateTextBox.datetimepicker('getDate');
if (testStartDate > testEndDate)
endDateTextBox.datetimepicker('setDate', testStartDate);
}
else {
endDateTextBox.val(dateText);
}
},
onSelect: function (selectedDateTime){
endDateTextBox.datetimepicker('option', 'minDate', startDateTextBox.datetimepicker('getDate') );
}
});
endDateTextBox.datepicker({
dateFormat: 'dd-mm-yy',
onClose: function(dateText, inst) {
if (startDateTextBox.val() != '') {
var testStartDate = startDateTextBox.datetimepicker('getDate');
var testEndDate = endDateTextBox.datetimepicker('getDate');
if (testStartDate > testEndDate)
startDateTextBox.datetimepicker('setDate', testEndDate);
}
else {
startDateTextBox.val(dateText);
}
},
onSelect: function (selectedDateTime){
startDateTextBox.datetimepicker('option', 'maxDate', endDateTextBox.datetimepicker('getDate') );
}
});
});
</script>
<br>
**กรูณาลือกวันและเวลาที่จะเรียน<br>
<br>
<td>
<tr>
<br>
<img src = "icon_Calender.png"width="60" height="60">
<tr>วันที่เรียน : <input type="text" name="dateInput" id="dateInput" value="" /></tr>
และ : <input type="text" name="dateEnd" id="dateEnd" value="" Placeholder="สำหรับผู้เลือกเรียน 2 วันเท่านั้น !!!!" required>
<br>
<td>
<tr>
<br><br><br>
<center><img src = "icontime.png"width="60" height="60"><br><br>
<select class="form-control" id="time_booking" name="time_booking">
<option value="09:00-12:00">09:00-12:00 (ช่วงเช้า)</option>
<option value="13:00-16:00">13:00-16:00 (ช่วงบ่าย)</option>
</select>
<center>
</body>
</td>
</tr>
</td>
</tr>
</tbody>
</table>
</table>
<?php
$objConnect = mysql_connect("localhost","root","12345678") or die("Error Connect to Database");
$objDB = mysql_select_db("project");
$strSQL = "SELECT * FROM course";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
<html>
<body>
<SCRIPT LANGUAGE="JavaScript">
function drop(item){
//alert(item.text);
if(item.text="Free"){
item.text="Full";
}else if(item.text="Full" ){
item.text="Free";
}
}
</SCRIPT>
<center>
<form name="form1" method="post" action="save_booking.php">
<br><br><br>
<table width="1200" border="8" bordercolor="#FFFF66">
<center>
<tr bgcolor="#FFFF66">
<th width="300"> <div align="center">รหัสหลักสูตร </div></th>
<th width="350"> <div align="center">ชื่อหลักสูตร </div></th>
<th width="300"> <div align="center">ชั่วโมงหลักสูตร </div></th>
<th width="150">คนที่ 1<br></div></th>
<th width="150">คนที่ 2<br></div></th>
<th width="150">คนที่ 3<br></div></th>
<th width="150">คนที่ 4<br></div></th>
<th width="130">ช่วงพัก<br></div></th>
<th width="150">คนที่ 5<br></div></th>
<th width="150">คนที่ 6<br></div></th>
<th width="150">คนที่ 7<br></div></th>
<th width="150">คนที่ 8<br></div></th>
</tr>
<?php
while($objResult = mysql_fetch_array($objQuery))
{
?>
<tr>
<td><div align="center"><?php echo $objResult["Id_Course"];?></div></td>
<td><div align="center"><?php echo $objResult["Name_Course"];?></div></td>
<?php
if ($objResult["Hours_Course"]=="3"){
echo "<td bgcolor='#FFCC66'><div align='center'>" . $objResult['Hours_Course'] . "</div></td>";
}
else if ($objResult["Hours_Course"]=="6"){
echo "<td bgcolor='#FFFF99'><div align='center'>" . $objResult['Hours_Course'] . "</div></td>";
}
?>
<td><p><a href="#"><input type="radio" name="people" value="1" >
<?php if ($people["status"]==''){
echo "ว่าง";
}else {
echo "ไม่ว่าง";
}
?>
</p></a></td>
<td><p><a href="#"><input type="radio" name="people" value="2">
<?php if ($people["status"]==''){
echo "ว่าง";
}else {
echo "ไม่ว่าง";
}
?></p></a></td>
<td><p><a href="#"><input type="radio" name="people" value="2">
<?php if ($people["status"]==''){
echo "ว่าง";
}else {
echo "ไม่ว่าง";
}
?></p></a></td>
<td><p><a href="#"><input type="radio" name="people" value="4">
<?php if ($people["status"]==''){
echo "ว่าง";
}else {
echo "ไม่ว่าง";
}
?></p></a></td>
<td><center><p><a href="#"><img src = "iconfood.png"width="50" height="50"></p></a></center></td>
<td><p><a href="#"><input type="radio" name="people2" value="5">
<?php if ($objResult["status"]==''){
echo "ว่าง";
}else {
echo "ไม่ว่าง";
}
?></p></a></td>
<td><p><a href="#"><input type="radio" name="people2" value="6">
<?php if ($objResult["status"]==''){
echo "ว่าง";
}else {
echo "ไม่ว่าง";
}
?></p></a></td>
<td><p><a href="#"><input type="radio" name="people2" value="7">
<?php if ($objResult["status"]==''){
echo "ว่าง";
}else {
echo "ไม่ว่าง";
}
?></p></a></td>
<td><p><a href="#"><input type="radio" name="people2" value="8">
<?php if ($objResult["status"]==''){
echo "ว่าง";
}else {
echo "ไม่ว่าง";
}
?></p></a></td>
</tr>
<?php
}
?>
</table>
<td>
<center><br><input type="submit" name="submit" value="ยืนยัน">
</td>
</form>
<style type="text/css">
<script Language="JavaScript">
function ResetValue()
documet.all.txt_title.value='';
documet.all.txt_comment.value='';
documet.all.dateInput.value='';
}
</style>
<!-- <center> <img src=""> </center>
<style type="text/css">
body
{
background: url('') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>-->
</html>
<?php
}
?>
</html>
|
|
|
|
|
Date :
2016-04-24 19:34:07 |
By :
nat001 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|