3 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
8 $email = urldecode(trim($_GET['un']));
9 if(filter_var($email, FILTER_VALIDATE_EMAIL))
14 define('MDB_PATH', '/home/mdb/');
17 function loggedEmail($email, $directory){
18 $strReplaced = str_replace("@", "-", $email);
19 $firstChar = substr($email, 0, 1);
20 $secondChar = substr($email, 1, 1);
21 $directory = $directory.$firstChar."/".$secondChar."/".$strReplaced."/";
25 function within_str($subject, $lsearch, $rsearch) {
26 $data = strstr($subject, $lsearch);
27 $data = str_replace($lsearch, "", $data);
28 $trim = strstr($data, $rsearch);
30 return(str_replace($trim, "", $data));
33 function notification($directory) {
37 $files = glob("*.dat");
39 throw new Exception("");
41 foreach($files as $filename){
42 $array = file($filename);
44 $checkUnread = within_str($value, "<read>", "</read>");
49 return ($i==0) ? '' : $i;
52 return $e->getMessage();
57 $userDirectory = loggedEmail($email, MDB_PATH);
59 $count = notification($userDirectory);