- fixing undefined variables in customer_mysql.php

- fixing "only variables should be passed by reference" warning in customer_traffic.php
- removed unneeded require() in customer_aps.php, refs #6
- added missing field in sql-query in class.ticket.php
This commit is contained in:
Michael Kaufmann (d00p)
2010-02-05 08:36:35 +00:00
parent 8dcade976d
commit 2378d4319c
4 changed files with 5 additions and 4 deletions

View File

@@ -21,7 +21,6 @@
define('AREA', 'customer'); define('AREA', 'customer');
require ("./lib/init.php"); require ("./lib/init.php");
require ("./lib/class_apsparser.php");
$Id = 0; $Id = 0;
if(isset($_GET['id']))$Id = (int)$_GET['id']; if(isset($_GET['id']))$Id = (int)$_GET['id'];

View File

@@ -23,6 +23,7 @@ define('AREA', 'customer');
* Include our init.php, which manages Sessions, Language etc. * Include our init.php, which manages Sessions, Language etc.
*/ */
$need_db_sql_data = true;
$need_root_db_sql_data = true; $need_root_db_sql_data = true;
require ("./lib/init.php"); require ("./lib/init.php");

View File

@@ -75,7 +75,8 @@ if(!is_null($month)
WHERE `customerid`='" . $userinfo['customerid'] . "' WHERE `customerid`='" . $userinfo['customerid'] . "'
AND `month` = '" . $month . "' AND `month` = '" . $month . "'
AND `year` = '" . $year . "'"); AND `year` = '" . $year . "'");
rsort($row = mysql_fetch_row($result)); $row = mysql_fetch_row($result);
rsort($row);
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));; $traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
$result = $db->query("SELECT $result = $db->query("SELECT
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail', SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',

View File

@@ -301,12 +301,12 @@ class ticket
} }
else else
{ {
$admin = $this->db->query_first("SELECT `email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'"); $admin = $this->db->query_first("SELECT `name`, email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'");
$mail->From = $this->settings['ticket']['noreply_email']; $mail->From = $this->settings['ticket']['noreply_email'];
$mail->FromName = $this->settings['ticket']['noreply_name']; $mail->FromName = $this->settings['ticket']['noreply_name'];
$mail->Subject = $mail_subject; $mail->Subject = $mail_subject;
$mail->Body = $mail_body; $mail->Body = $mail_body;
$mail->AddAddress($admin['email'], $admin['firstname'] . ' ' . $admin['name']); $mail->AddAddress($admin['email'], $admin['name']);
if(!$mail->Send()) if(!$mail->Send())
{ {