require("../config/index.php");
if($action == "forgot_password"){
require("../config/memheader.php");
?>
パスワードの再送手続き
}
elseif($action == "パスワード送信"){
require("../config/memheader.php");
if (!$username){echo "
You forgot to enter your username!
correct this and try again.
";}
else{
$username = str_replace("\\"," ",$username);
$username = trim($username);
$username = str_replace(" ","_",$username);
$username = strtolower($username);
mysql_connect("$mysql_hostname","$mysql_username","$mysql_password");
$result=mysql("$mysql_database","SELECT * FROM $mysql_tablename1 WHERE username='$username' LIMIT 1");
$in_use = mysql_num_rows($result);
while ($row = mysql_fetch_row($result)){
$r_username = "$row[0]";
$r_password = "$row[1]";
$r_contact = "$row[2]";
}
mysql_close();
if($in_use != "0"){
?>
パスワードをあなたのメールボックスに送信しました。
//Send mail
$to = $r_contact;
$subject = 'パスワードの再送';
$subject = mb_convert_encoding($subject, "ISO-2022-JP", "UTF8");
$rep = "$admin_email <$admin_email>";
$body = "パスワード情報をお送りしました。\n\n";
$body .= "ユーザー名:".$r_username."\n";
$body .= "パスワード:".$r_password."\n\n\n";
$body .= $service_name."\n";
$body .= $install_http."/index.php\n\n";
$body .= "ありがとうございました。\n\n";
$body = mb_convert_encoding($body, "JIS", "UTF8");
$headers = "Content-Type: text/html; charset=ISO-2022-JP\n";
$headers .= "From: ".$rep."\n";
mb_send_mail($to, $subject, $body, $headers);
}else{
echo "
ユーザー名 $usernameは見つかりませんでした。
もう一度入力し直して送信ボタンを押して下さい
";
}
}
}
elseif($action == "ログイン"){
if($username == ""){require("../config/memheader.php");echo "
エラー: ユーザー名を入力して下さい!
前のページに戻りもう一度入力して下さい。";}
elseif($password == ""){require("../config/memheader.php");echo "
エラー: パスワードを入力して下さい!
前のページに戻りもう一度入力して下さい。";}
else{
$username = str_replace("\\"," ",$username);
$username = trim($username);
$username = str_replace(" ","_",$username);
$username = strtolower($username);
$password = str_replace("\\"," ",$password);
$password = trim($password);
$password = stripslashes($password);
mysql_connect("$mysql_hostname","$mysql_username","$mysql_password");
$result=mysql("$mysql_database","SELECT * FROM $mysql_tablename1 WHERE username='$username' LIMIT 1");
while ($row = mysql_fetch_row($result)){
$user = "$row[0]";
$pass = "$row[1]";
}
mysql_close();
if($user == "$username" && $pass == "$password" && $password != ""){
setcookie("$cookie_name1","$username",time()+8900,"/",".$cookie_site",0);
setcookie("$cookie_name2","$password",time()+8900,"/",".$cookie_site",0);
header("Refresh:1;url=$install_http/stats/index.php");
require("../config/memheader.php");
echo "
ログイン成功: 認証中・・・・・
$expirenow
ユーザー名、パスワードの認証中です。暫くお待ち下さい。
";
}else{
require("../config/memheader.php");echo "
エラー: ユーザー名とパスワードが一致しません!
前のページに戻りもう一度入力して下さい";
}
}
}else{
require("../config/memheader.php");
?>
メンバーエリアログイン
ユーザー名とパスワードを入力してメンバーエリアにログインして下さい
}
require("../config/memfooter.php");
?>