3 date_default_timezone_set("Asia/Tokyo");
5 function Encrypt($str, $key = "your_key") {
6 return enc_dec_wkey("encrypt", $str, $key);
8 function Decrypt($str, $key = "your_key") {
9 return enc_dec_wkey("decrypt", $str, $key);
11 function enc_dec_wkey($mode, $str, $key='') {
12 if($key==='') return $str;
13 if($mode=== "decrypt") $str = base64_decode($str);
14 $key = str_replace(chr(32),'',$key);
15 if(strlen($key) < 8) exit('key error');
16 $kl = strlen($key) < 32 ?
strlen($key) : 32;
18 for ($i = 0; $i < $kl; $i++
) $k[$i] = ord($key{$i}) & 0x1F;
20 for($i = 0; $i < strlen($str); $i++
) {
22 $str{$i} = $e & 0xE0 ?
chr($e^
$k[$j]): chr($e);
24 $j = $j == $kl ?
0 : $j;
26 if($mode == "encrypt")
27 return base64_encode($str);
32 function within_str($subject, $lsearch, $rsearch) {
33 $data = strstr($subject, $lsearch);
34 $data = str_replace($lsearch, "", $data);
35 $trim = strstr($data, $rsearch);
37 return(str_replace($trim, "", $data));
40 function loggedEmail($email, $directory){
41 $strReplaced = $email;
42 $firstChar = substr($email, 0, 1);
43 $secondChar = substr($email, 1, 1);
44 $directory = $directory.$firstChar."/".$secondChar."/".$strReplaced."/";
48 $livesitePath = "http" . (isset($_SERVER['HTTPS']) ?
's' : '')."://".$_SERVER['HTTP_HOST']."/";
49 $livesitePath2 = "http" . (isset($_SERVER['HTTPS']) ?
's' : '')."://".$_SERVER['HTTP_HOST'];
50 define('AKEY', "KungAnoAnoLang123456789");
51 define('ADB_PATH', "/home/adb/");
52 define('AFORGOT', "0._{_forgot_}_.0");
54 error_reporting(E_ALL
); ini_set("display_errors", 1);