Initial commit
[2ch-be.git] / dev-test / test / zxc.php
blob4049e3e464162c2345b453edaa080bc001a9b215
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="Shift_JIS">
5 </head>
6 <body>
7 <?php
9 include('../encrypt.php');
11 if (isset($_GET['d']) && isset($_GET['m']) && isset($_GET['r'])) {
12 $d = trim($_GET['d']);
13 $m = trim($_GET['m']);
14 $r = trim($_GET['r']);
16 $m = filter_var($m, FILTER_SANITIZE_STRING);
18 $d = strip_tags(addslashes($d));
19 $m = strip_tags(addslashes($m));
20 $r = strip_tags(addslashes($r));
22 # This is needed if encoding is used
23 #$d = urldecode($d);
24 #$m = urldecode($m);
26 $d = Decrypt($d,KEY);
27 $m = Decrypt($m,KEY);
29 $d = filter_var($d, FILTER_SANITIZE_EMAIL);
30 if (!filter_var($d, FILTER_VALIDATE_EMAIL)) {
31 echo "NG";
32 exit;
35 $fdir = substr($d, 0, 1);
36 $sdir = substr($d, 1, 1);
37 $data = @file(DB_PATH."$fdir/$sdir/$d");
38 $ico = "";
40 if(md5($m."kahitanupo")==trim($data[2])) {
41 if(count($data)>3) {
42 //echo $data[6]."<br>";
43 if($data[6]!=FORGOT) {
44 $mystatus = urldecode($data[6]);
45 //$mystatus = str_replace("\n","<br>",$mystatus);
46 echo $mystatus;
51 if(hash("sha256", $m."kahitanupo")==trim($data[2])) {
52 if(count($data)>3) {
53 //echo $data[6]."<br>";
54 if($data[6]!=FORGOT) {
55 $mystatus = urldecode($data[6]);
56 //$mystatus = str_replace("\n","<br>",$mystatus);
57 echo $mystatus;
62 } else {
63 echo "NG";
67 </body>
68 </html>