2 include('encrypt.php');
5 if (isset($g['mail']) && !empty($g['mail']) && !empty($g['pass'])) {
7 $email = filter_var($g['mail'], FILTER_SANITIZE_EMAIL
);
8 if (!filter_var($email, FILTER_VALIDATE_EMAIL
)) {
9 //echo "Invalid email";
12 $pass = filter_var($g['pass'], FILTER_SANITIZE_STRING
);
14 $email = strip_tags(addslashes($email));
15 $pass = strip_tags(addslashes($pass));
17 if(!preg_match("/[a-z0-9 \!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\]\^\_\{\}\|\~]{4,32}+/i",$pass)) {
18 //echo "Invalid password!";
21 $fdir = substr($email, 0, 1);
22 $sdir = substr($email, 1, 1);
23 $data = @file
(DB_PATH
."$fdir/$sdir/$email");
26 for ($i=0; $i < count($data); $i++
) {
27 $data[$i] = trim($data[$i]);
29 $inputpass = md5($pass."kahitanupo");
30 if ($inputpass != $data[2]) {
31 $inputpass = hash("sha256", $pass."kahitanupo");
32 if ($inputpass != $data[2]) {
33 echo "–³Œø‚ȃpƒXƒ��[ƒh";
38 if (isset($data[count($data)-1]) && $data[count($data)-1]== FORGOT
) {
39 unset($data[count($data)-1]);
40 $writeData = implode("\n", $data);
41 //$writeData = $data[0]."\n".$data[1]."\n".$data[2]."\n".$data[3]."\n".$data[4]."\n".$data[5]."\n";
42 file_put_contents(DB_PATH
."$fdir/$sdir/$email", $writeData);
44 foreach($_COOKIE as $ky => $vl){
45 setcookie($ky,"",time()-3600);
48 $DMDM = Encrypt($email,KEY
);
49 $MDMD = Encrypt($pass,KEY
);
50 if($_SERVER['SERVER_NAME'] == "be.2ch.net") {
51 setcookie('DMDM',$DMDM,0,'/',".2ch.net"); //
52 setcookie('MDMD',$MDMD,0,'/',".2ch.net"); //
53 } elseif ($_SERVER['SERVER_NAME'] == "be.bbspink.com") {
54 setcookie('DMDM',$DMDM,0,'/',".bbspink.com"); //
55 setcookie('MDMD',$MDMD,0,'/',".bbspink.com"); //
57 //setcookie('DMDM',$DMDM,0,'/',".2ch.net");
58 //setcookie('MDMD',$MDMD,0,'/',".2ch.net");
59 header('location:status.php');
62 echo "ƒ†�[ƒU�[‚Í‘¶�Ý‚µ‚Ü‚¹‚ñ";