voip_prepaid::lowBalance fix, take 2.
This commit is contained in:
parent
d295494489
commit
b33a038019
@ -31,26 +31,31 @@ class voip_prepaid
|
||||
{
|
||||
# e-mail user's once when balance reaches this amount:
|
||||
$this->lowBalance = $rs->fields[0];
|
||||
$this->pinLenth = 10; // up to 10
|
||||
|
||||
# name of this module:
|
||||
$this->module = "voip_prepaid";
|
||||
|
||||
# location of the construct XML file:
|
||||
$this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml";
|
||||
|
||||
# open the construct file for parsing
|
||||
$C_xml = new CORE_xml;
|
||||
$construct = $C_xml->xml_to_array($this->xml_construct);
|
||||
|
||||
$this->method = $construct["construct"]["method"];
|
||||
$this->field = $construct["construct"]["field"];
|
||||
$this->table = $construct["construct"]["table"];
|
||||
$this->module = $construct["construct"]["module"];
|
||||
$this->cache = $construct["construct"]["cache"];
|
||||
$this->order_by = $construct["construct"]["order_by"];
|
||||
$this->limit = $construct["construct"]["limit"];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lowBalance = false;
|
||||
}
|
||||
|
||||
$this->pinLenth = 10; // up to 10
|
||||
|
||||
# name of this module:
|
||||
$this->module = "voip_prepaid";
|
||||
|
||||
# location of the construct XML file:
|
||||
$this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml";
|
||||
|
||||
# open the construct file for parsing
|
||||
$C_xml = new CORE_xml;
|
||||
$construct = $C_xml->xml_to_array($this->xml_construct);
|
||||
|
||||
$this->method = $construct["construct"]["method"];
|
||||
$this->field = $construct["construct"]["field"];
|
||||
$this->table = $construct["construct"]["table"];
|
||||
$this->module = $construct["construct"]["module"];
|
||||
$this->cache = $construct["construct"]["cache"];
|
||||
$this->order_by = $construct["construct"]["order_by"];
|
||||
$this->limit = $construct["construct"]["limit"];
|
||||
}
|
||||
|
||||
/** generate a new pin */
|
||||
@ -78,7 +83,7 @@ class voip_prepaid
|
||||
{
|
||||
include_once(PATH_MODULES.'email_template/email_template.inc.php');
|
||||
|
||||
if ($this->lowBalance)
|
||||
if (defined $this->lowBalance)
|
||||
{
|
||||
// delete expired pins?
|
||||
// $delrs = & $db->Execute(sqlDelete($db,"voip_prepaid"," date_expire <> 0 and date_expire is not null and date_expire > ".time()));
|
||||
|
Reference in New Issue
Block a user