define(PWD_FILE,"/usr/local/www/www.yaddrin.org/data/passwords"); function verify($user,$pwd,$email,$name) { if (($email == '') || ($name == '')) { return 0; } $fd = fopen(PWD_FILE,"r"); flock($fd,1); while ($line = fgets($fd,255)) { ereg("^([^:]+):(.+)$",$line,$output); $pwdenc = crypt($pwd,substr($output[2],0,2)); if (($user == $output[1]) && ($pwdenc == chop($output[2]))) { flock($fd,3); fclose($fd); return 1; } } flock($fd,3); fclose($fd); return 0; } function mark($text,$tomark) { if ($tomark) return "".$text.""; else return $text; } print ("\n"); print ("