Fixed an issue with adding Australian DIDs to the cart.
This commit is contained in:
parent
35bb375be3
commit
3e8e4152e3
@ -87,6 +87,10 @@ class base_voip_plugin extends base_product_plugin
|
|||||||
$station = substr($e164, 8);
|
$station = substr($e164, 8);
|
||||||
$sql = sqlSelect($db,"voip_pool","*",
|
$sql = sqlSelect($db,"voip_pool","*",
|
||||||
"(date_reserved IS NULL OR date_reserved=0) AND (account_id IS NULL OR account_id=0) AND country_code=$cc AND npa=$npa AND nxx=$nxx AND station=$station");
|
"(date_reserved IS NULL OR date_reserved=0) AND (account_id IS NULL OR account_id=0) AND country_code=$cc AND npa=$npa AND nxx=$nxx AND station=$station");
|
||||||
|
} elseif ($cc == '61') {
|
||||||
|
$station = substr($e164, 12);
|
||||||
|
$sql = sqlSelect($db,"voip_pool","*",
|
||||||
|
"(date_reserved IS NULL OR date_reserved=0) AND (account_id IS NULL OR account_id=0) AND country_code=$cc AND npa=$npa AND nxx=$nxx AND station=$station");
|
||||||
} else {
|
} else {
|
||||||
$station = substr($e164, 4 + strlen($cc));
|
$station = substr($e164, 4 + strlen($cc));
|
||||||
$sql = sqlSelect($db,"voip_pool","*",
|
$sql = sqlSelect($db,"voip_pool","*",
|
||||||
|
@ -105,6 +105,12 @@ class voip_did_plugin
|
|||||||
date_reserved=".time().", account_id=".intval(SESS_ACCOUNT)."
|
date_reserved=".time().", account_id=".intval(SESS_ACCOUNT)."
|
||||||
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND (account_id IS NULL or account_id=0) AND
|
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND (account_id IS NULL or account_id=0) AND
|
||||||
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
||||||
|
} elseif($cc == '61') {
|
||||||
|
$station = substr($e164, 12);
|
||||||
|
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
||||||
|
date_reserved=".time().", account_id=".intval(SESS_ACCOUNT)."
|
||||||
|
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND (account_id IS NULL or account_id=0) AND
|
||||||
|
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
||||||
} else {
|
} else {
|
||||||
$station = substr($e164, 4 + strlen($cc));
|
$station = substr($e164, 4 + strlen($cc));
|
||||||
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
||||||
@ -138,6 +144,12 @@ class voip_did_plugin
|
|||||||
date_reserved=NULL, account_id=".intval($this->account_id)."
|
date_reserved=NULL, account_id=".intval($this->account_id)."
|
||||||
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND
|
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND
|
||||||
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
||||||
|
} elseif($cc == '61') {
|
||||||
|
$station = substr($e164, 12);
|
||||||
|
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
||||||
|
date_reserved=NULL, account_id=".intval($this->account_id)."
|
||||||
|
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND
|
||||||
|
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
||||||
} else {
|
} else {
|
||||||
$station = substr($e164, 4 + strlen($cc));
|
$station = substr($e164, 4 + strlen($cc));
|
||||||
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
||||||
@ -171,6 +183,12 @@ class voip_did_plugin
|
|||||||
date_reserved=NULL, account_id=NULL
|
date_reserved=NULL, account_id=NULL
|
||||||
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND
|
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND
|
||||||
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
||||||
|
} elseif($cc == '61'){
|
||||||
|
$station = substr($e164, 12);
|
||||||
|
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
||||||
|
date_reserved=NULL, account_id=NULL
|
||||||
|
WHERE voip_did_plugin_id=".$voip_did_plugin_id." AND
|
||||||
|
country_code=".$db->qstr($cc)." AND npa=".$db->qstr($npa)." AND nxx=".$db->qstr($nxx)." AND station=".$db->qstr($station)." AND site_id=".DEFAULT_SITE;
|
||||||
} else {
|
} else {
|
||||||
$station = substr($e164, 4 + strlen($cc));
|
$station = substr($e164, 4 + strlen($cc));
|
||||||
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
|
||||||
|
Reference in New Issue
Block a user