more fixes for migration to PDO, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -394,11 +394,11 @@ if ($page == 'customers'
|
|||||||
/*
|
/*
|
||||||
* move old tickets to archive
|
* move old tickets to archive
|
||||||
*/
|
*/
|
||||||
$tickets = ticket::customerHasTickets($db, $id);
|
$tickets = ticket::customerHasTickets($id);
|
||||||
if ($tickets !== false && isset($tickets[0])) {
|
if ($tickets !== false && isset($tickets[0])) {
|
||||||
foreach ($tickets as $ticket) {
|
foreach ($tickets as $ticket) {
|
||||||
$now = time();
|
$now = time();
|
||||||
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$ticket);
|
$mainticket = ticket::getInstanceOf($userinfo, $settings, (int)$ticket);
|
||||||
$mainticket->Set('lastchange', $now, true, true);
|
$mainticket->Set('lastchange', $now, true, true);
|
||||||
$mainticket->Set('lastreplier', '1', true, true);
|
$mainticket->Set('lastreplier', '1', true, true);
|
||||||
$mainticket->Set('status', '3', true, true);
|
$mainticket->Set('status', '3', true, true);
|
||||||
|
|||||||
@@ -18,10 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
define('AREA', 'admin');
|
define('AREA', 'admin');
|
||||||
|
|
||||||
/**
|
|
||||||
* Include our init.php, which manages Sessions, Language etc.
|
|
||||||
*/
|
|
||||||
require ("./lib/init.php");
|
require ("./lib/init.php");
|
||||||
|
|
||||||
if ($action == 'logout') {
|
if ($action == 'logout') {
|
||||||
@@ -71,8 +67,7 @@ if ($page == 'overview') {
|
|||||||
SUM(`traffic_used`) AS `traffic_used`,
|
SUM(`traffic_used`) AS `traffic_used`,
|
||||||
SUM(`aps_packages_used`) AS `aps_packages_used`
|
SUM(`aps_packages_used`) AS `aps_packages_used`
|
||||||
FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = :adminid "));
|
FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = :adminid "));
|
||||||
Database::pexecute($overview_stmt, array('adminid' => $userinfo['adminid']));
|
$overview = Database::pexecute_first($overview_stmt, array('adminid' => $userinfo['adminid']));
|
||||||
$overview = $overview_stmt->fetch(PDO::FETCH_ASSOC);
|
|
||||||
|
|
||||||
$overview['traffic_used'] = round($overview['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
$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']);
|
$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 . "`
|
SELECT COUNT(*) AS `number_domains` FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||||
WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = :adminid")
|
WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = :adminid")
|
||||||
);
|
);
|
||||||
Database::pexecute($number_domains_stmt, array('adminid' => $userinfo['adminid']));
|
$number_domains = Database::pexecute_first($number_domains_stmt, array('adminid' => $userinfo['adminid']));
|
||||||
$number_domains = $number_domains_stmt->fetch(PDO::FETCH_ASSOC);
|
|
||||||
$overview['number_domains'] = $number_domains['number_domains'];
|
$overview['number_domains'] = $number_domains['number_domains'];
|
||||||
|
|
||||||
$phpversion = phpversion();
|
$phpversion = phpversion();
|
||||||
|
|||||||
@@ -148,8 +148,7 @@ if ($page == 'overview') {
|
|||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :id"
|
SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :id"
|
||||||
);
|
);
|
||||||
Database::pexecute($result_stmt, array('id' => $id));
|
$result = Database::pexecute_first($result_stmt, array('id' => $id));
|
||||||
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
|
||||||
|
|
||||||
if ($result['id'] != 0
|
if ($result['id'] != 0
|
||||||
&& $result['id'] == $id
|
&& $result['id'] == $id
|
||||||
@@ -190,8 +189,7 @@ if ($page == 'overview') {
|
|||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :id"
|
SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :id"
|
||||||
);
|
);
|
||||||
Database::pexecute($result_stmt, array('id' => $id));
|
$result = Database::pexecute_first($result_stmt, array('id' => $id));
|
||||||
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
|
||||||
|
|
||||||
if ($result['id'] != 0
|
if ($result['id'] != 0
|
||||||
&& $result['id'] == $id
|
&& $result['id'] == $id
|
||||||
|
|||||||
Reference in New Issue
Block a user