Initial commit
[2ch-be.git] / dev-test / test / zxc2.php
blobbc2ba624fef115a7bc48f004191de028ce03bc25
1 <?php
3 include('../encrypt.php');
4 header("Content-Type:text/plain");
6 if (isset($_GET['d']) && isset($_GET['m']) && isset($_GET['r'])) {
7 $d = trim($_GET['d']);
8 $m = trim($_GET['m']);
9 $r = trim($_GET['r']);
11 $m = filter_var($m, FILTER_SANITIZE_STRING);
13 $d = strip_tags(addslashes($d));
14 $m = strip_tags(addslashes($m));
15 $r = strip_tags(addslashes($r));
17 # This is needed if encoding is used
18 #$d = urldecode($d);
19 #$m = urldecode($m);
21 $d = Decrypt($d,KEY);
22 $m = Decrypt($m,KEY);
24 $d = filter_var($d, FILTER_SANITIZE_EMAIL);
25 if (!filter_var($d, FILTER_VALIDATE_EMAIL)) {
26 echo "NG";
27 exit;
30 $fdir = substr($d, 0, 1);
31 $sdir = substr($d, 1, 1);
32 $data = @file(DB_PATH."$fdir/$sdir/$d");
33 $ico = "";
35 if(md5($m."kahitanupo")==trim($data[2])) {
36 if(count($data)>3) {
37 //echo $data[6]."<br>";
38 if($data[6]!=FORGOT) {
39 $mystatus = urldecode($data[6]);
40 //$mystatus = str_replace("\n","<br>",$mystatus);
41 #echo $mystatus;
42 echo htmlentities($mystatus, ENT_QUOTES);
47 if(hash("sha256", $m."kahitanupo")==trim($data[2])) {
48 if(count($data)>3) {
49 //echo $data[6]."<br>";
50 if($data[6]!=FORGOT) {
51 $mystatus = urldecode($data[6]);
52 //$mystatus = str_replace("\n","<br>",$mystatus);
53 #echo $mystatus;
54 echo htmlentities($mystatus, ENT_QUOTES);
59 } else {
60 echo "NG";