"; $subject="Christian Guestbook Login Details"; /* Available Vars #email #username #password #website_name #website_address #guestbook_address #guestbook_admin_address */ $body="Dear Christianguestbook.com member,\n\n\t"; $body.="This is an automated email sent due to a login request\n"; $body.="made at http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."\n\n"; $body.="This email address is not monitored. Please do not reply to this email.\n\n"; $body.="Your guestbook information is as follows:\n\n"; $body.="Website Name:\n#website_name\n\n"; $body.="Website Address:\n#website_address\n\n"; $body.="Guestbook Address:\n#guestbook_address\n\n"; $body.="Admin Username:\n#username\n\n"; $body.="Admin Password:\n#password\n\n"; $body.="Guestbook Admin Address:\n#guestbook_admin_address"; global $_POST; global $_SERVER; global $_REQUEST; if(isset($_REQUEST['action'])){ $action=$_REQUEST['action']; }else{ $action='show form'; } send_header(); switch($action){ case 'show form':{ ?>



Search By






Please wait while the database is being searched...
You details were not found in our database. Try again?'; }elseif($possiblesSize>30){ $newHtml.='Too many results were found. Please try a more specific search. Try again?'; }else{ $newHtml.="\\n"; if($matchesSize){ $newHtml.=''; foreach($matchesArr as $userName => $userData){ $newHtml.='\\n'; $newHtml.='\\n'; $newHtml.='\\n'; } } if($possiblesSize){ $newHtml.=''; foreach($possiblesArr as $userName => $userData){ $newHtml.='\\n'; $newHtml.='\\n'; $newHtml.='\\n'; } } $newHtml.="
At least one match has been found in our database. They are as follows:

'.$userData['website_name'].'
'.$userData['website_address'].'
Email my login



Some possible matches have been found in our database. They are as follows:

'.$userData['website_name'].'
'.$userData['website_address'].'
Email my login



\\n"; } ?>



Please wait. An email is being sent to your address...
Your password has been successfully sent to the email address listed as the admin contact."; }else{ $newHtml="Error, email failed to send."; } ?>


\n"; echo "\n"; echo $error."\n"; echo "\n"; send_footer(); die(); } /* returns an array of matches and possibles array['matches']['username']=user_infoArr array['possibles']['username']=user_infoArr */ function search_userDataArr($searchType, $searchVal, $haystackArr){ $resultArr=array(); switch($searchType){ case 'username':{ foreach($haystackArr as $userName => $userDataArry){ $tmpUserName=preg_quote($userName, '/'); if(preg_match('/^'.$tmpUserName.'$/i', $searchVal)){ $resultArr['matches'][$userName]=$userDataArry; }elseif(stristr($userName, $searchVal)){ $resultArr['possibles'][$userName]=$userDataArry; }else{ $tmpSearchVal=strtolower($searchVal); $tmpTarget=strtolower($userName); similar_text($tmpSearchVal, $tmpTarget, &$percent); if($percent>80){ $resultArr['possibles'][$userName]=$userDataArry; } } } break; } default:{ foreach($haystackArr as $userName => $userDataArry){ $tmpValue=preg_quote($userDataArry[$searchType], '/'); if(preg_match('/^'.$tmpValue.'$/i', $searchVal)){ $resultArr['matches'][$userName]=$userDataArry; }elseif(stristr($userDataArry[$searchType], $searchVal)){ $resultArr['possibles'][$userName]=$userDataArry; }else{ $tmpSearchVal=strtolower($searchVal); $tmpTarget=strtolower($userDataArry[$searchType]); similar_text($tmpSearchVal, $tmpTarget, &$percent); if($percent>80){ $resultArr['possibles'][$userName]=$userDataArry; } } } break; } } return $resultArr; } /* Read all the user files and put it into a nice array and set up other variables for each account return array['username'] =>password =>email =>website_name =>website_address =>guestbook_url =>guestbook_admin_url */ function build_user_dataArr(){ global $guestbook_data_filesDir; $userDataArr=array(); $dir=$guestbook_data_filesDir; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if(preg_match('/\.set$/', $file)&&(filesize($dir.'/'.$file)>0)){ $userDataFilePtr=fopen($dir.'/'.$file, 'r'); if($userDataFilePtr){ if(flock($userDataFilePtr, LOCK_EX)){ $contents = fread($userDataFilePtr, filesize($dir.'/'.$file)); //exctract username $fileNameParts=preg_split('/\.set$/', $file); $userName=$fileNameParts[0]; $split_by_lineArr=preg_split('/\n/', $contents); foreach($split_by_lineArr as $index => $line){ $split_by_eq_signArr=preg_split('/\=/', $line, 2); $valueName=trim($split_by_eq_signArr[0]); $value=strip_tags(trim($split_by_eq_signArr[1])); switch($valueName){ case "password":{ $userDataArr[$userName]['password']=$value; break; } case "title":{ $userDataArr[$userName]['website_name']=$value; break; } case "homeurl":{ $userDataArr[$userName]['website_address']=$value; break; } case "masteremail":{ $userDataArr[$userName]['email']=$value; break; } } } flock($userDataFilePtr, LOCK_UN); } fclose($userDataFilePtr); } } } closedir($dh); } } return $userDataArr; } //----header and footer html - send_header() and send_footer() function send_header(){ ?> Password Recovery
 
Terms of Use