more fixes for migration to PDO, refs #1287

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-11-06 11:08:48 +01:00
parent 74bb3ccb7e
commit 04012e5fff
3 changed files with 7 additions and 14 deletions

View File

@@ -18,10 +18,6 @@
*/
define('AREA', 'admin');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require ("./lib/init.php");
if ($action == 'logout') {
@@ -71,8 +67,7 @@ if ($page == 'overview') {
SUM(`traffic_used`) AS `traffic_used`,
SUM(`aps_packages_used`) AS `aps_packages_used`
FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = :adminid "));
Database::pexecute($overview_stmt, array('adminid' => $userinfo['adminid']));
$overview = $overview_stmt->fetch(PDO::FETCH_ASSOC);
$overview = Database::pexecute_first($overview_stmt, array('adminid' => $userinfo['adminid']));
$overview['traffic_used'] = round($overview['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
$overview['diskspace_used'] = round($overview['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
@@ -81,8 +76,8 @@ if ($page == 'overview') {
SELECT COUNT(*) AS `number_domains` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = :adminid")
);
Database::pexecute($number_domains_stmt, array('adminid' => $userinfo['adminid']));
$number_domains = $number_domains_stmt->fetch(PDO::FETCH_ASSOC);
$number_domains = Database::pexecute_first($number_domains_stmt, array('adminid' => $userinfo['adminid']));
$overview['number_domains'] = $number_domains['number_domains'];
$phpversion = phpversion();