Initial commit
[2ch-be.git] / dev-test / bak / zzzz.php
blob67141fd364272cda4d000dc50392e55a708ed926
1 <html lang="en">
2 <head>
3 <meta charset="Shift_JIS">
4 <title>ƒ�ƒOƒCƒ“</title>
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <meta name="description" content="">
7 <meta name="author" content="">
8 <link rel="stylesheet" type="text/css" href="css/style.css"/>
9 </head>
10 <body>
11 <?php
12 include('config.php');
14 $g = $_GET;
15 if (isset($g['e']) && $g['e'] != '' && isset($g['k']) && $g['k'] != '') {
17 $email = trim($g['e']);
18 $key = trim($g['k']);
20 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
21 $key = filter_var($key, FILTER_SANITIZE_STRING);
23 if (!filter_var($email, FILTER_VALIDATE_EMAIL)){
24 #echo "bad";
25 echo "0";
26 exit;
29 $email = strip_tags(addslashes($g['e']));
30 $key = strip_tags(addslashes($g['k']));
32 $fdir = substr($email, 0, 1);
33 $sdir = substr($email, 1, 1);
34 $data = @file(DB_PATH."$fdir/$sdir/$email");
36 if(count($data)>3){
37 for ($i=0; $i < count($data); $i++) {
38 $data[$i] = trim($data[$i]);
40 $mainkey = md5($data[1].$data[2]);
41 if ($mainkey != $key) {
42 $mainkey = hash("sha256", $data[1].$data[2]);
43 if($mainkey != $key) {
44 #echo "Invalid Link";
45 echo "0";
46 exit;
49 if ($data[4] != 1) {
50 $ico = isset($data[5])?$data[5]:'nida.gif';
51 $writeData = $data[0]."\n".$data[1]."\n".$data[2]."\n0\n1\n".$ico;
52 file_put_contents(DB_PATH."$fdir/$sdir/$email", $writeData);
53 #echo "’ljÁ‚³‚ꂽ1000”N‚̃|ƒCƒ“ƒg";
54 #echo "Done. Confirmed.";
55 echo "1";
56 } else {
57 #echo "Šù‚ÉŠm”F‚³‚ꂽ";
58 echo "0";
60 } else {
61 #echo "ƒ†�[ƒU�[‚Í‘¶�Ý‚µ‚Ü‚¹‚ñ";
62 echo "0";
64 } else {
65 #echo "Error 3";
66 echo "0";
70 </body>
71 </html>