'.implode(', ', $plugins).'
');
}
}
// Check access rights
function check_upgrade_access_rights($current_release, $username, $password)
{
global $conf, $page;
if(!get_magic_quotes_gpc())
{
$username = mysql_real_escape_string($username);
}
if (version_compare($current_release, '1.5.0', '<'))
{
$query = '
SELECT password, status
FROM '.USERS_TABLE.'
WHERE username = "'.$username.'"
;';
}
else
{
$query = '
SELECT u.password, ui.status
FROM '.$conf['users_table'].' AS u
INNER JOIN '.USER_INFOS_TABLE.' AS ui
ON u.'.$conf['user_fields']['id'].'=ui.user_id
WHERE '.$conf['user_fields']['username'].'="'.$username.'"
;';
}
$row = mysql_fetch_assoc(mysql_query($query));
if (!isset($conf['pass_convert']))
{
$conf['pass_convert'] = create_function('$s', 'return md5($s);');
}
if ($row['password'] != $conf['pass_convert']($_POST['password']))
{
array_push($page['errors'], l10n('invalid_pwd'));
}
elseif ($row['status'] != 'admin' and $row['status'] != 'webmaster')
{
array_push($page['errors'], l10n('You do not have access rights to run upgrade'));
}
else
{
define('PHPWG_IN_UPGRADE', true);
}
}
?>