Fixed an issue with adding Australian DIDs to the cart.

This commit is contained in:
sluther
2009-09-17 01:28:54 -07:00
parent 35bb375be3
commit 3e8e4152e3
2 changed files with 22 additions and 0 deletions

View File

@@ -105,6 +105,12 @@ class voip_did_plugin
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;
} 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 {
$station = substr($e164, 4 + strlen($cc));
$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)."
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;
} 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 {
$station = substr($e164, 4 + strlen($cc));
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET
@@ -171,6 +183,12 @@ class voip_did_plugin
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;
} 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 {
$station = substr($e164, 4 + strlen($cc));
$sql = "UPDATE ".AGILE_DB_PREFIX."voip_pool SET