- 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:
@@ -21,7 +21,6 @@
|
||||
|
||||
define('AREA', 'customer');
|
||||
require ("./lib/init.php");
|
||||
require ("./lib/class_apsparser.php");
|
||||
$Id = 0;
|
||||
|
||||
if(isset($_GET['id']))$Id = (int)$_GET['id'];
|
||||
|
||||
@@ -23,6 +23,7 @@ define('AREA', 'customer');
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
|
||||
$need_db_sql_data = true;
|
||||
$need_root_db_sql_data = true;
|
||||
require ("./lib/init.php");
|
||||
|
||||
|
||||
@@ -75,7 +75,8 @@ if(!is_null($month)
|
||||
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
||||
AND `month` = '" . $month . "'
|
||||
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]));;
|
||||
$result = $db->query("SELECT
|
||||
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',
|
||||
|
||||
@@ -301,12 +301,12 @@ class ticket
|
||||
}
|
||||
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->FromName = $this->settings['ticket']['noreply_name'];
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->Body = $mail_body;
|
||||
$mail->AddAddress($admin['email'], $admin['firstname'] . ' ' . $admin['name']);
|
||||
$mail->AddAddress($admin['email'], $admin['name']);
|
||||
|
||||
if(!$mail->Send())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user