|
|
|
@ -964,37 +964,35 @@ function pacrypt ($pw, $pw_db="")
|
|
|
|
|
$password = "";
|
|
|
|
|
$salt = "";
|
|
|
|
|
|
|
|
|
|
if ($CONF['encrypt'] == 'md5crypt')
|
|
|
|
|
{
|
|
|
|
|
if ($CONF['encrypt'] == 'md5crypt') {
|
|
|
|
|
$split_salt = preg_split ('/\$/', $pw_db);
|
|
|
|
|
if (isset ($split_salt[2])) $salt = $split_salt[2];
|
|
|
|
|
|
|
|
|
|
if (isset ($split_salt[2])) {
|
|
|
|
|
$salt = $split_salt[2];
|
|
|
|
|
}
|
|
|
|
|
$password = md5crypt ($pw, $salt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($CONF['encrypt'] == 'system')
|
|
|
|
|
{
|
|
|
|
|
if (ereg ("\$1\$", $pw_db))
|
|
|
|
|
{
|
|
|
|
|
if($CONF['encrypt'] == 'md5') {
|
|
|
|
|
$password = md5($pw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($CONF['encrypt'] == 'system') {
|
|
|
|
|
if (ereg ("\$1\$", $pw_db)) {
|
|
|
|
|
$split_salt = preg_split ('/\$/', $pw_db);
|
|
|
|
|
$salt = $split_salt[2];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (strlen($pw_db) == 0)
|
|
|
|
|
{
|
|
|
|
|
else {
|
|
|
|
|
if (strlen($pw_db) == 0) {
|
|
|
|
|
$salt = substr (md5 (mt_rand ()), 0, 2);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
else {
|
|
|
|
|
$salt = substr ($pw_db, 0, 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$password = crypt ($pw, $salt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($CONF['encrypt'] == 'cleartext')
|
|
|
|
|
{
|
|
|
|
|
if ($CONF['encrypt'] == 'cleartext') {
|
|
|
|
|
$password = $pw;
|
|
|
|
|
}
|
|
|
|
|
$password = escape_string ($password);
|
|
|
|
@ -1744,8 +1742,8 @@ function gen_show_status ($show_alias)
|
|
|
|
|
$stat_string .= "; ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// $stat_string .= "<span style='background-color:green'> </span> " .
|
|
|
|
|
// "<span style='background-color:blue'> </span> ";
|
|
|
|
|
// $stat_string .= "<span style='background-color:green'> </span> " .
|
|
|
|
|
// "<span style='background-color:blue'> </span> ";
|
|
|
|
|
return $stat_string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1758,4 +1756,3 @@ $table_log = table_by_key ('log');
|
|
|
|
|
$table_mailbox = table_by_key ('mailbox');
|
|
|
|
|
$table_vacation = table_by_key ('vacation');
|
|
|
|
|
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
|
|
|
|
|
?>
|
|
|
|
|