Updated the bandwidth / diskspace usage - Incorrect query data resulted in calculation being incomplete or incorrect

This commit is contained in:
Christopher York 2014-10-25 11:27:49 -05:00
parent 3d1bb47f35
commit d5cb11691a
8 changed files with 14 additions and 10 deletions

View file

@ -9,6 +9,10 @@
<h1>WHMCS WebsitePanel Server Module</h1>
<p style="color: #FF0000">DO NOT CONTACT WHMCS FOR SUPPORT WITH THIS MODULE</p>
<h3>Changelog / Updates</h3>
<p>10-25-2014 (v3.0.4)</p>
<ul>
<li>Updated the bandwidth / diskspace usage - Incorrect query data resulted in calculation being incomplete or incorrect</li>
</ul>
<p>2-24-2014 (v3.0.3)</p>
<ul>
<li>Added: WHMCS module log debug calls.

View file

@ -37,7 +37,7 @@ require_once(ROOTDIR. '/modules/servers/websitepanel/enterpriseserver.php');
* @link http://www.websitepanel.net/
* @access public
* @name websitepanel_EnterpriseServer
* @version 3.0.3
* @version 3.0.4
* @package WHMCS
* @final
*/

View file

@ -35,7 +35,7 @@
* @link http://www.websitepanel.net/
* @access public
* @name websitepanel_EnterpriseServer
* @version 3.0.3
* @version 3.0.4
* @package WHMCS
* @final
*/
@ -50,7 +50,7 @@ function websitepanel_addons_config()
{
return array('name' => 'WebsitePanel Addons Automation',
'description' => 'Automates WHMCS product addons with WebsitePanel Addons',
'version' => '3.0.3',
'version' => '3.0.4',
'author' => 'Christopher York');
}

View file

@ -37,7 +37,7 @@ require_once(ROOTDIR. '/modules/servers/websitepanel/enterpriseserver.php');
* @link http://www.websitepanel.net/
* @access public
* @name websitepanel
* @version 3.0.3
* @version 3.0.4
* @package WHMCS
*/

View file

@ -34,7 +34,7 @@
* @link http://www.websitepanel.net/
* @access public
* @name websitepanel
* @version 3.0.3
* @version 3.0.4
* @package WHMCS
*/
@ -48,7 +48,7 @@ function websitepanel_sync_config()
{
return array('name' => 'WebsitePanel Sync Automation',
'description' => 'Syncs WHMCS client details / contact changes with WebsitePanel accounts',
'version' => '3.0.3',
'version' => '3.0.4',
'author' => 'Christopher York');
}

View file

@ -35,7 +35,7 @@
* @link http://www.websitepanel.net/
* @access public
* @name websitepanel_EnterpriseServer
* @version 3.0.3
* @version 3.0.4
* @package WHMCS
* @final
*/

View file

@ -34,7 +34,7 @@
* @link http://www.websitepanel.net/
* @access public
* @name websitepanel
* @version 3.0.3
* @version 3.0.4
* @package WHMCS
*/

View file

@ -38,7 +38,7 @@ require_once(ROOTDIR. '/modules/servers/websitepanel/functions.php');
* @link http://www.websitepanel.net/
* @access public
* @name websitepanel
* @version 3.0.3
* @version 3.0.4
* @package WHMCS
*/
@ -543,7 +543,7 @@ function websitepanel_UsageUpdate($params)
// Query for WebsitePanel user accounts assigned to this server
// Only services that have packages that have "Tick to update diskpace / bandwidth in WHMCS" enabled
$result = full_query("SELECT h.id AS serviceid, h.userid AS userid, h.username AS username, h.regdate AS regdate, p.configoption2 AS configoption2, p.configoption3 AS configoption3, p.configoption6 AS configoption6 FROM `tblhosting` AS h, `tblproducts` AS p WHERE h.server = 17 AND h.packageid = p.id AND p.configoption16 = 'on' AND h.domainstatus IN ('Active', 'Suspended')");
$result = full_query("SELECT h.id AS serviceid, h.userid AS userid, h.username AS username, h.regdate AS regdate, p.configoption2 AS configoption2, p.configoption3 AS configoption3, p.configoption6 AS configoption6 FROM `tblhosting` AS h, `tblproducts` AS p WHERE h.server IN (SELECT `id` FROM `tblservers` WHERE `type` = 'websitepanel') AND h.packageid = p.id AND p.configoption16 = 'on' AND h.domainstatus IN ('Active', 'Suspended')");
while (($row = mysql_fetch_array($result)) != false)
{
// Start processing the users usage