function pw_encrypt_password($plain)
{
    $password = '';
    for ($i = 0; $i < 10; $i++) {
        $password .= general_rand();
    }
    $salt = substr(md5($password), 0, 2);
    $password = md5($salt . $plain) . ':' . $salt;
    return $password;
}
 function _log($msg, $suffix = '')
 {
     static $key;
     if (!isset($key) || $key == '') {
         $key = time() . '_' . general_rand(4);
     }
     $file = $this->_logDir . '/' . 'Linkpoint_Debug_' . $suffix . $key . '.log';
     if ($fp = @fopen($file, 'a')) {
         @fwrite($fp, $msg);
         @fclose($fp);
     }
 }