$user) if ($user["table"] == $table) { $res = 1; unset($gecos[$key]); } if ($res) return store_password($id); return 0; } function lock($file) { $nb = 1; $file .= ".lock"; while (file_exists ($file)) { sleep(rand(0, $nb++)); ##echo $file."\n"; } if (!($f = fopen($file, "w"))) return 0; fclose($f); return 1; } function unlock($file) { $file .= ".lock"; if ((file_exists ($file)) && (unlink ($file))) return 1; return 0; } ?>