Beispiel #1
0
						}	
						
				}
			}
		}
 }
</script> 
</head>
<body>
<?php 
include "config/connect.php";
include "config/function_db.php";
if ($_REQUEST['id'] != '') {
    $id = $_REQUEST['id'];
    $condition = "id='{$id}'";
    $que = select_condition($table_place, $condition);
    $row = mysql_fetch_array($que);
    $id_place = $row['id'];
    $location = $row['location_name'];
    $address_temple = $row['address'];
}
?>
<div class="valid_box">
  <b>แก้ไขข้อมูลสถานที่สอนสมาธิ</b>
     </div> 
<div class="form">
       <fieldset>
         <form method="get" class="niceform"  name="frm_address">
		 			<input type="hidden" name="id_place" id="id_place" size="54" value="<?php 
echo $id_place;
?>
						}	
		
				}
			}
		} 
}  
</script>
</head>
<body>
<?php 
include "config/connect.php";
include "config/function_db.php";
if ($_REQUEST['id'] != '') {
    $id = $_REQUEST['id'];
    $condition = "id='{$id}'";
    $que = select_condition($table_holiday, $condition);
    $row = mysql_fetch_array($que);
}
?>
<div class="valid_box">
   <b>แก้ไขข้อมูลวันหยุด</b>
</div>
<div class="form">
       <fieldset>
         <form class="niceform" name="frm_add_holiday" onSubmit="">
		 <input type="hidden" name="id_date" id="id_date" size="30" value="<?php 
echo $row['id'];
?>
"/>
                    <dl>
                        <dt><label for="date_begin">วันเริ่มต้น :</label></dt>
Beispiel #3
0
	}  
}
</script> 
</head>
<body bgcolor="#FFFFFF">
<div class="valid_box">
   <b>แก้ไขข้อมูลหัวข้อสมาธิ</b>
</div>
<?php 
include "config/connect.php";
include "config/function_db.php";
include "config/function_gen.php";
if ($_REQUEST['id'] != '') {
    $id = $_REQUEST['id'];
    $condition = "Topic_id='{$id}'";
    $que = select_condition($table_topic, $condition);
    $row = mysql_fetch_array($que);
    $pic = $row['Topic_Content'];
}
?>
<div class="form">
       <fieldset>
        		 <form action="" method="POST" class="niceform" enctype="multipart/form-data" name="frm_add_topic" onSubmit="return check_input();">    
                    <dl>
                        <dt><label for="Book_id">เล่มหนังสือ :</label></dt>
                        <dd>
                            <select name="Book_id" id="Book_id">
								<option value="">- - - เลือกเล่มหนังสือ - - -</option>
                                <option value="1" <?php 
if ($row['Book_id'] == 1) {
    echo "selected";
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php 
include "config/connect.php";
include "config/function_db.php";
$Username = $_GET['Username'];
$condition = "(Username='******')";
$query = select_condition($table_admin, $condition);
$num = mysql_num_rows($query);
if ($num == 0) {
    echo "ชื่อนี้ใช้ได้";
} else {
    echo "<font color=#FF0000>ชื่อผู้ใช้ซ้ำกัน</font>";
}
?>
</body>
</html>
Beispiel #5
0
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php 
include "config/connect.php";
include "config/function_db.php";
$T_username = $_GET['T_username'];
$condition = "(T_username='******')";
$query = select_condition($table_teacher, $condition);
$num = mysql_num_rows($query);
if ($num == 0) {
    echo "ชื่อนี้ใช้ได้";
} else {
    echo "<font color=#FF0000>ชื่อผู้ใช้ซ้ำกัน</font>";
}
?>
</body>
</html>
Beispiel #6
0
             }
         } else {
             if ($type_user == 'teacher') {
                 $Username = $_SESSION['ce'];
                 //echo "11111111111111111111111111111111".$Username;
                 $sqlO2 = "select * from s_admin  ";
                 $queryO2 = mysql_query($sqlO2);
                 $rowO2 = mysql_fetch_array($queryO2);
                 $status_s2 = $rowO2['s_status'];
                 if ($status_s2 == "1") {
                     echo '<SCRIPT language=JavaScript>  alert("ปิดปรับปรุง!! กรุณาลองใหม่ทุก 1 ขั่วโมง...");  </script>';
                     session_destroy();
                     break;
                 }
                 $condition = "(T_username ='******') AND (T_password ='******')";
                 $query = select_condition($type_user, $condition);
                 $row = mysql_fetch_array($query);
                 $name_login = "******" . $row['T_name'] . " " . $row['T_surname'];
                 $_SESSION['s_teacher_id'] = $row['ID'];
                 $_SESSION['s_type'] = $row['T_Type'];
                 $_SESSION['type_user'] = '******';
             }
         }
     }
 }
 $num = mysql_num_rows($query);
 if ($num != '') {
     $_SESSION['user_login'] = $name_login;
     fn_refresh(0, "index.php");
 } else {
     fn_alert("รหัสผ่านไม่ถูกต้อง");