include ("setting.inc");
$year=date("Y");
$month=date("m");
$day=date("d");
$today = date("Y-m-d",mktime(0,0,0,$month,$day,$year));
if($HTTP_POST_VARS['ename']){
$qua="select * from registration3 where ename='$ename'";
$result=mysql_query($qua);
$numRows = mysql_num_rows($result);
$qua2="select * from registration3 where name='$name'";
$result2=mysql_query($qua2);
$numRows2 = mysql_num_rows($result2);
if($numRows==1||$ename==$adminid) die("
$ename 這個英文姓名已使用!");
else if($numRows2==1) die("$name 您已經報名了。");
else{
$str="insert into registration3 (date,name,ename,pw,dep,dep_e,business,inv,address,email,telphone,mobile,indate6_1,indate6_2,indate6_3,lunch,year,month,day,sendname) values
('$today','$name','$ename','$pw','$dep','$dep_e','$business','$inv','$address','$email','$telphone','$mobile','$indate6_1','$indate6_2','$indate6_3','$lunch','$syear','$smonth','$sday','$sendname')";
mysql_query($str) or die(" 資料庫寫入失敗!
請重新輸入資料一下$contact
");
die (" 【 線上報名完成,謝謝您的使用。 】
");
}
}
if (isset($HTTP_GET_VARS['modify'])){
if (!isset($PHP_AUTH_USER)) {
header("WWW-Authenticate:Basic realm=\"密碼保護\"");
header("HTTP/1.0 401 Unauthorized");
echo '請輸入帳號密碼。';
exit();
}
else { // 驗證密碼是否正確
$query = "select * from registration3 where ename = '$PHP_AUTH_USER' and pw = '$PHP_AUTH_PW' ";
$result = mysql_query($query);
$numRows = mysql_num_rows($result);
if ($numRows != 1) { // 驗證失敗重新要求驗證
header("WWW-Authenticate:Basic realm=\"密碼保護\"");
header("HTTP/1.0 401 Unauthorized");
echo '驗證失敗,請重新輸入帳號密碼。';
exit();
}
$id=$PHP_AUTH_USER;
session_register('id');
header("Location:userdatamodify2.php");
}
}
?>
報名介面
|
2006 MBE Taiwan研討會 |
|
|
|
Copyright (c) 2006 Optical Sciences Center,National Central University. All Rights Reserved.