本文整理汇总了PHP中Table::SQLExec方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::SQLExec方法的具体用法?PHP Table::SQLExec怎么用?PHP Table::SQLExec使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::SQLExec方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Service_Create_TrunkConfig
function Service_Create_TrunkConfig($activation_code)
{
$DBHandle = DbConnect();
$table_instance = new Table();
if (!$DBHandle) {
write_log(LOGFILE_API_CALLBACK, basename(__FILE__) . ' line:' . __LINE__ . " ERROR CONNECT DB");
return array('500', ' ERROR - CONNECT DB ');
}
list($accountnumber, $password) = preg_split("{_}", $activation_code, 2);
$QUERY = "SELECT cc.username, cc.credit, cc.status, cc.id, cc.id_didgroup, cc.tariff, cc.vat, ct.gmtoffset, cc.voicemail_permitted, " . "cc.voicemail_activated, cc_card_group.users_perms, cc.currency " . "FROM cc_card cc LEFT JOIN cc_timezone AS ct ON ct.id = cc.id_timezone LEFT JOIN cc_card_group ON cc_card_group.id=cc.id_group " . "WHERE cc.username = '" . $accountnumber . "' AND cc.uipass = '" . $password . "'";
$res = $DBHandle->Execute($QUERY);
if (!$res) {
return array('400', ' ERROR - AUTHENTICATE CODE');
}
$row[] = $res->fetchRow();
$card_id = $row[0][3];
if (!$card_id || $card_id < 0) {
return array('400', ' ERROR - AUTHENTICATE CODE');
}
$QUERY_IAX = "SELECT iax.id, iax.username, iax.secret, iax.disallow, iax.allow, iax.type, iax.host, iax.context FROM cc_iax_buddies iax WHERE iax.id_cc_card = {$card_id}";
$QUERY_SIP = "SELECT sip.id, sip.username, sip.secret, sip.disallow, sip.allow, sip.type, sip.host, sip.context FROM cc_sip_buddies sip WHERE sip.id_cc_card = {$card_id}";
$iax_data = $table_instance->SQLExec($DBHandle, $QUERY_IAX);
$sip_data = $table_instance->SQLExec($DBHandle, $QUERY_SIP);
//Additonal parameters
$additional_sip = explode("|", SIP_ADDITIONAL_PARAMETERS);
$additional_iax = explode("|", IAX_ADDITIONAL_PARAMETERS);
// SIP
$Config_output = "#PROTOCOL:SIP#\n#SIP-TRUNK-CONFIG-START#\n[trunkname]\n";
$Config_output .= "username=" . $sip_data[0][1] . "\n";
$Config_output .= "type=friend\n";
$Config_output .= "secret=" . $sip_data[0][2] . "\n";
$Config_output .= "host=" . $sip_data[0][6] . "\n";
$Config_output .= "context=" . $sip_data[0][7] . "\n";
$Config_output .= "disallow=all\n";
$Config_output .= "allow=" . SIP_IAX_INFO_ALLOWCODEC . "\n";
if (count($additional_sip) > 0) {
for ($i = 0; $i < count($additional_sip); $i++) {
$Config_output .= trim($additional_sip[$i]) . chr(10);
}
}
$Config_output .= "#SIP-TRUNK-CONFIG-END#\n\n";
// IAX
$Config_output .= "#PROTOCOL:IAX#\n#IAX-TRUNK-CONFIG-START#\n[trunkname]\n";
$Config_output .= "username=" . $iax_data[0][1] . "\n";
$Config_output .= "type=friend\n";
$Config_output .= "secret=" . $iax_data[0][2] . "\n";
$Config_output .= "host=" . $iax_data[0][6] . "\n";
$Config_output .= "context=" . $iax_data[0][7] . "\n";
$Config_output .= "disallow=all\n";
$Config_output .= "allow=" . SIP_IAX_INFO_ALLOWCODEC . "\n";
if (count($additional_iax) > 0) {
for ($i = 0; $i < count($additional_iax); $i++) {
$Config_output .= trim($additional_iax[$i]) . chr(10);
}
}
$Config_output .= "#IAX-TRUNK-CONFIG-END#\n\n";
return array($Config_output, '200 -- Config OK');
}
示例2: agi_confx_title
function agi_confx_title($handle = null)
{
if (empty($handle)) {
$handle = DbConnect();
}
$instance_table = new Table();
$QUERY = "SELECT id, group_title, group_description, SUBSTR(group_title,9,3)+0 AS idorder FROM cc_config_group WHERE group_title like '%agi-conf%' ORDER BY idorder";
$result = $instance_table->SQLExec($handle, $QUERY);
if (is_array($result)) {
$num_cur = count($result);
for ($i = 0; $i < $num_cur; $i++) {
$config_group_id = $result[0][0];
$group_title[] = $result[$i][1];
$description = $result[0][2];
}
}
foreach ($group_title as $value) {
$agi_number[] = (int) substr($value, 8);
}
$len_agi_array = sizeof($agi_number);
$agi_conf_number = $len_agi_array + 1;
for ($i = 1; $i <= $len_agi_array; $i++) {
if ($i != $agi_number[$i - 1]) {
$agi_conf_number = $i;
break;
}
}
$config_group = array();
$config_group[0] = "agi-conf" . $agi_conf_number;
$config_group[1] = $config_group_id;
$config_group[2] = $description;
$config_group[3] = $agi_number[0];
return $config_group;
}
示例3: Status
function Status($security_key, $id)
{
$status = 'null';
$uniqueid = '';
$DBHandle = DbConnect();
$instance_table = new Table();
$QUERY = "SELECT status, uniqueid FROM cc_callback_spool WHERE id='{$id}'";
$callback_data = $instance_table->SQLExec($DBHandle, $QUERY);
if (!is_array($callback_data) || count($callback_data) == 0) {
// FAIL SELECT
write_log(LOG_CALLBACK, basename(__FILE__) . ' line:' . __LINE__ . "[" . date("Y/m/d G:i:s", mktime()) . "] " . " ERROR SELECT -> \n QUERY=" . $QUERY);
sleep(2);
return array($uniqueid, 'result=null', ' ERROR - SELECT DB');
}
$status = $callback_data[0][0];
$uniqueid = $callback_data[0][1];
return array($uniqueid, 'result=' . $status, " - Callback request found {$QUERY}");
}
示例4: gettext
echo gettext("Value");
?>
</th>
<th class="tableBody" style="padding: 2px;" align="center" width="50%"><?php
echo gettext("Description");
?>
</th>
<th class="tableBody" style="padding: 2px;" align="center" width="5%"><?php
echo gettext("Group");
?>
</th>
</tr>
<?php
$instance_table = new Table();
$QUERY = "SELECT config_title, config_key, config_value, config_description FROM cc_config WHERE config_group_title = 'agi-conf" . $config_group[3] . "' ORDER BY id LIMIT 10";
$config = $instance_table->SQLExec($HD_Form->DBHandle, $QUERY);
$i = 0;
foreach ($config as $values) {
$config_title = $values[0];
$config_key = $values[1];
$config_value = $values[2];
$config_description = $values[3];
if ($i % 2 == 0) {
$bgcolor = "bgColor='#FCFBFB'";
} else {
$bgcolor = "bgColor='#F2F2EE'";
}
?>
<tr <?php
echo $bgcolor;
?>
示例5: sleep
$currencies_list = get_currencies();
if (strlen($voucher) > 0) {
if (is_numeric($voucher)) {
sleep(2);
$FG_VOUCHER_TABLE = "cc_voucher";
$FG_VOUCHER_FIELDS = "voucher, credit, activated, tag, currency, expirationdate";
$instance_sub_table = new Table($FG_VOUCHER_TABLE, $FG_VOUCHER_FIELDS);
$FG_TABLE_CLAUSE_VOUCHER = "expirationdate >= CURRENT_TIMESTAMP AND activated='t' AND voucher='{$voucher}'";
$list_voucher = $instance_sub_table->Get_list($HD_Form->DBHandle, $FG_TABLE_CLAUSE_VOUCHER, $order, $sens, null, null, $limite, $current_record);
if ($list_voucher[0][0] == $voucher) {
if (!isset($currencies_list[strtoupper($list_voucher[0][4])][2])) {
$error_msg = '<font face="Arial, Helvetica, sans-serif" size="2" color="red"><b>' . gettext("System Error : the currency table is incomplete!") . '</b></font><br><br>';
} else {
$add_credit = $list_voucher[0][1] * $currencies_list[strtoupper($list_voucher[0][4])][2];
$QUERY = "UPDATE cc_voucher SET activated='f', usedcardnumber='" . $_SESSION["pr_login"] . "', usedate=now() WHERE voucher='" . $voucher . "'";
$result = $instance_sub_table->SQLExec($HD_Form->DBHandle, $QUERY, 0);
$QUERY = "UPDATE cc_card SET credit=credit+'" . $add_credit . "' WHERE username='" . $_SESSION["pr_login"] . "'";
$result = $instance_sub_table->SQLExec($HD_Form->DBHandle, $QUERY, 0);
$error_msg = '<font face="Arial, Helvetica, sans-serif" size="2" color="green"><b>' . gettext("The voucher") . '(' . $voucher . ') ' . gettext("has been used, We added") . ' ' . $add_credit . ' ' . gettext("credit on your account!") . '</b></font><br><br>';
}
} else {
$error_msg = '<font face="Arial, Helvetica, sans-serif" size="2" color="red"><b>' . gettext("This voucher doesn't exist !") . '</b></font><br><br>';
}
} else {
$error_msg = '<font face="Arial, Helvetica, sans-serif" size="2" color="red"><b>' . gettext("The voucher should be a number !") . '</b></font><br><br>';
}
}
if ($id != "" || !is_null($id)) {
$HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
示例6: RANDOM
$context = $A2B->config["callback"]['context_campaign_callback'];
$id_server_group = $A2B->config["callback"]['id_server_group'];
$priority = 1;
$timeout = $A2B->config["callback"]['timeout'] * 1000;
$application = '';
//default callerid
$callerid = '111111111';
$cidgroupid = $phone["id_cid_group"];
if ($A2B->config["database"]['dbtype'] == "postgres") {
$QUERY = "SELECT cid FROM cc_outbound_cid_list WHERE activated = 1 AND outbound_cid_group = {$cidgroupid} ORDER BY RANDOM() LIMIT 1";
} else {
$QUERY = "SELECT cid FROM cc_outbound_cid_list WHERE activated = 1 AND outbound_cid_group = {$cidgroupid} ORDER BY RAND() LIMIT 1";
}
$instance_cid_table = new Table();
echo "QUERY CID : " . $QUERY;
$cidresult = $instance_cid_table->SQLExec($A2B->DBHandle, $QUERY);
if (is_array($cidresult) && count($cidresult) > 0) {
$callerid = $cidresult[0][0];
}
$account = $_SESSION["pr_login"];
$uniqueid = MDP_NUMERIC(5) . '-' . MDP_STRING(7);
$status = 'PENDING';
$server_ip = 'localhost';
$num_attempt = 0;
$variable = "CALLED={$destination}|USERNAME={$phone['8']}|USERID={$phone['6']}|CBID={$uniqueid}|PHONENUMBER_ID=" . $phone['cc_phonenumber_id'] . "|CAMPAIGN_ID=" . $phone['cc_campaign_id'];
$res = $instance_table->Add_table($A2B->DBHandle, "'{$uniqueid}', '{$status}', '{$server_ip}', '{$num_attempt}', '{$channel}', '{$exten}', '{$context}', '{$priority}', '{$variable}', '{$id_server_group}', now(), '{$account}', '{$callerid}', '30000'", "uniqueid, status, server_ip, num_attempt, channel, exten, context, priority, variable, id_server_group, callback_time, account, callerid, timeout", "cc_callback_spool", "id");
if (!$res) {
if ($verbose_level >= 1) {
echo "[Cannot insert the callback request in the spool!]";
}
} else {
示例7: basename
$A2B->load_conf($agi, NULL, 0, $idconfig);
write_log (LOGFILE_CRONT_INVOICE, basename(__FILE__) . ' line:' . __LINE__ . "[#### CRONT BILLING BEGIN ####]");
if (!$A2B->DbConnect()) {
echo "[Cannot connect to the database]\n";
write_log (LOGFILE_CRONT_INVOICE, basename(__FILE__) . ' line:' . __LINE__ . "[Cannot connect to the database]");
exit;
}
$instance_table = new Table();
// CHECK COUNT OF CARD ON WHICH APPLY THE SERVICE
$QUERY = 'SELECT count(*) FROM cc_card';
$result = $instance_table->SQLExec($A2B->DBHandle, $QUERY);
$nb_card = $result[0][0];
$nbpagemax = (ceil($nb_card / $groupcard));
if ($verbose_level >= 1)
echo "===> NB_CARD : $nb_card - NBPAGEMAX:$nbpagemax\n";
if (!($nb_card > 0)) {
if ($verbose_level >= 1)
echo "[No card to run the Invoice Billing Service]\n";
write_log (LOGFILE_CRONT_INVOICE, basename(__FILE__) . ' line:' . __LINE__ . "[No card to run the Invoice Billing service]");
exit ();
}
if ($verbose_level >= 1)
echo ("[Invoice Billing Service analyze cards on which to apply billing]");
示例8: Header
*
*
**/
include_once '../../lib/admin.defines.php';
include_once '../../lib/admin.module.access.php';
if (!has_rights(ACX_DASHBOARD)) {
Header("HTTP/1.0 401 Unauthorized");
Header("Location: PP_error.php?c=accessdenied");
die;
}
$checkdate = date("Y-m-d");
$DBHandle = DbConnect();
$QUERY_COUNT_CALL_ALL = "select terminatecauseid, count(*) from cc_call WHERE starttime >= TIMESTAMP('{$checkdate}') AND starttime <= CURRENT_TIMESTAMP GROUP BY terminatecauseid";
$QUERY_COUNT_CALL_BILL = "SELECT sum(sessiontime), sum(sessionbill), sum(buycost) FROM cc_call WHERE starttime>= TIMESTAMP('{$checkdate}') AND starttime <= CURRENT_TIMESTAMP ;";
$table = new Table('cc_call', '*');
$result = $table->SQLExec($DBHandle, $QUERY_COUNT_CALL_ALL);
$result_count_all = 0;
$result_count_answered = 0;
$result_count_noanswer = 0;
$result_count_cancelled = 0;
$result_count_congested = 0;
$result_count_busy = 0;
$result_count_chanunavail = 0;
foreach ($result as $res_row) {
if ($res_row[0] == 1) {
$result_count_answered = $res_row[1];
}
if ($res_row[0] == 2) {
$result_count_busy = $res_row[1];
}
if ($res_row[0] == 3) {
示例9: DbConnect
include '../lib/epayment/classes/order.php';
include '../lib/epayment/classes/currencies.php';
include '../lib/epayment/includes/general.php';
include '../lib/epayment/includes/html_output.php';
include '../lib/epayment/includes/configure.php';
include '../lib/epayment/includes/loadconfiguration.php';
$DBHandle_max = DbConnect();
$paymentTable = new Table();
if (DB_TYPE == "postgres") {
$NOW_2MIN = " creationdate <= (now() - interval '2 minute') ";
} else {
$NOW_2MIN = " creationdate <= DATE_SUB(NOW(), INTERVAL 2 MINUTE) ";
}
// Status - New 0 ; Proceed 1 ; In Process 2
$QUERY = "SELECT id, agent_id, amount, vat, paymentmethod, cc_owner, cc_number, cc_expires, creationdate, status, cvv, credit_card_type, currency " . " FROM cc_epayment_log_agent " . " WHERE id = " . $transactionID . " AND (status = 0 OR (status = 2 AND {$NOW_2MIN}))";
$transaction_data = $paymentTable->SQLExec($DBHandle_max, $QUERY);
$amount = $transaction_data[0][2];
//Update the Transaction Status to 1
$QUERY = "UPDATE cc_epayment_log_agent SET status = 2 WHERE id = " . $transactionID;
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "- QUERY = {$QUERY}");
$paymentTable->SQLExec($DBHandle_max, $QUERY);
if (!is_array($transaction_data) && count($transaction_data) == 0) {
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "- transactionID={$transactionID}" . " ERROR INVALID TRANSACTION ID PROVIDED, TRANSACTION ID =" . $transactionID);
exit;
} else {
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "- transactionID={$transactionID}" . " EPAYMENT RESPONSE: TRANSACTIONID = " . $transactionID . " FROM " . $transaction_data[0][4] . "; FOR CUSTOMER ID " . $transaction_data[0][1] . "; OF AMOUNT " . $transaction_data[0][2]);
}
$security_verify = true;
$transaction_detail = base64_encode(serialize($_POST));
$currencyObject = new currencies();
$currencies_list = get_currencies();
示例10: DbConnect
<?php
if ($popup_select) {
?>
<input type="hidden" name="popup_select" value="<?php
echo $popup_select;
?>
" />
<?php
}
?>
<td align="left" width="75%">
<?php
$handle = DbConnect();
$instance_table = new Table();
$QUERY = "SELECT code, name FROM cc_iso639 order by code";
$result = $instance_table->SQLExec($handle, $QUERY);
if (is_array($result)) {
$num_cur = count($result);
for ($i = 0; $i < $num_cur; $i++) {
$languages_list[$result[$i][0]] = array(0 => $result[$i][0], 1 => $result[$i][1]);
}
}
?>
<select NAME="languages" size="1" class="form_input_select" onChange="form.submit()">
<?php
foreach ($languages_list as $key => $lang_value) {
?>
<option value='<?php
echo $lang_value[0];
?>
' <?php
示例11: Table
} else {
$confirm_buy_did = 0;
}
} else {
if ($confirm_buy_did != 4) {
$confirm_buy_did = 0;
}
}
if (is_numeric($voip_call) && $confirm_buy_did >= 2 && ($voip_call == 0 || $voip_call == 1 && strpos(substr($destination, strpos($destination, '@')), '.'))) {
$instance_table_did_use = new Table();
$validated = $voip_call == 1 ? 0 : 1;
if ($voip_call == 0) {
$destination = intval($destination) > 0 ? $destination : 'no valid';
}
$QUERY = "INSERT INTO cc_did_destination (activated, id_cc_card, id_cc_did, destination, priority, voip_call, validated) VALUES ('1', '" . $_SESSION["card_id"] . "', '" . $choose_did . "', '" . $destination . "', '1', '" . $voip_call . "', '{$validated}')";
$result = $instance_table_did_use->SQLExec($HD_Form->DBHandle, $QUERY, 0);
if ($confirm_buy_did == 2) {
$QUERY1 = "INSERT INTO cc_charge (id_cc_card, amount, chargetype, id_cc_did) " . "VALUES ('" . $_SESSION["card_id"] . "', '" . $rate . "', '2','" . $choose_did . "')";
$result = $instance_table_did_use->SQLExec($HD_Form->DBHandle, $QUERY1, 0);
$QUERY1 = "UPDATE cc_did set iduser = " . $_SESSION["card_id"] . ",reserved=1 where id = '" . $choose_did . "'";
$result = $instance_table_did_use->SQLExec($HD_Form->DBHandle, $QUERY1, 0);
$QUERY1 = "UPDATE cc_card set credit = credit -" . $rate . " where id = '" . $_SESSION["card_id"] . "'";
$result = $instance_table_did_use->SQLExec($HD_Form->DBHandle, $QUERY1, 0);
$QUERY1 = "UPDATE cc_did_use set releasedate = now() where id_did = '" . $choose_did . "' and activated = 0";
$result = $instance_table_did_use->SQLExec($HD_Form->DBHandle, $QUERY1, 0);
$QUERY1 = "INSERT INTO cc_did_use (activated, id_cc_card, id_did, month_payed) values ('1','" . $_SESSION["card_id"] . "','" . $choose_did . "', 1)";
$result = $instance_table_did_use->SQLExec($HD_Form->DBHandle, $QUERY1, 0);
}
$date = date("D M j G:i:s T Y", time());
$message = "\n\n" . gettext("The following Destinaton for your DID has been added:") . "\n\n";
$message .= "{$QUERY}";
示例12: Execute
"'$calledstation', 1, 1.2000, 1, '1856254697', 0.40000, 0, $cardid, $id_ratecard, $destination) \n";
if (strlen($qry)==0) {
$qry = $c_qry_header.$c_qry_value;
} else {
$qry .= ' , '.$c_qry_value;
}
if (($nb_cdr % $nb_cdr_flush) == 0) {
if ($verbose)
echo "Processing CDR generation for $nb_cdr_flush CDRs \n";
if ($verbose >=3) echo "CDR No=$nb_cdr --> $qry\n";
$A2B -> DBHandle -> Execute('BEGIN;');
$instance_table -> SQLExec ($A2B -> DBHandle, $qry);
$A2B -> DBHandle -> Execute('COMMIT;');
$qry = '';
}
}
}
if (strlen($qry)>0) {
echo "CDR No=$nb_cdr --> $qry\n";
$A2B -> DBHandle -> Execute('BEGIN;');
$instance_table -> SQLExec ($A2B -> DBHandle, $qry);
$A2B -> DBHandle -> Execute('COMMIT;');
}
if ($verbose)
示例13: basename
}
$verbose_level = 0;
$groupcard = 5000;
$A2B = new A2Billing();
$A2B->load_conf($agi, NULL, 0, $idconfig);
write_log(LOGFILE_CRONT_AUTOREFILL, basename(__FILE__) . ' line:' . __LINE__ . "[#### BATCH BEGIN ####]");
if (!$A2B->DbConnect()) {
echo "[Cannot connect to the database]\n";
write_log(LOGFILE_CRONT_AUTOREFILL, basename(__FILE__) . ' line:' . __LINE__ . "[Cannot connect to the database]");
exit;
}
//$A2B -> DBHandle
$instance_table = new Table();
// CHECK NUMBER OF CARD
$QUERY = 'SELECT count(*) FROM cc_card WHERE autorefill=1 AND ((typepaid=0 AND initialbalance>0 AND credit<initialbalance) OR (typepaid=1))';
$result = $instance_table->SQLExec($A2B->DBHandle, $QUERY);
$nb_card = $result[0][0];
$nbpagemax = ceil($nb_card / $groupcard);
if ($verbose_level >= 1) {
echo "===> NB_CARD : {$nb_card} - NBPAGEMAX:{$nbpagemax}\n";
}
if (!($nb_card > 0)) {
if ($verbose_level >= 1) {
echo "[No card to run the Auto Refill]\n";
}
write_log(LOGFILE_CRONT_AUTOREFILL, basename(__FILE__) . ' line:' . __LINE__ . "[No card to run the Auto Refill]");
exit;
}
if ($A2B->config["database"]['dbtype'] == "postgres") {
$UNIX_TIMESTAMP = "date_part('epoch',";
} else {
示例14: Header
**/
include "lib/customer.defines.php";
include "lib/customer.module.access.php";
include "lib/customer.smarty.php";
include "lib/epayment/includes/configure.php";
include "lib/epayment/includes/html_output.php";
include "./lib/epayment/includes/general.php";
if (!has_rights(ACX_ACCESS)) {
Header("HTTP/1.0 401 Unauthorized");
Header("Location: PP_error.php?c=accessdenied");
die;
}
$inst_table = new Table();
$QUERY = "SELECT username, credit, lastname, firstname, address, city, state, country, zipcode, phone, email, fax, lastuse, activated, status, " . "freetimetocall, label, packagetype, billingtype, startday, id_cc_package_offer, cc_card.id, currency,cc_card.useralias,UNIX_TIMESTAMP(cc_card.creationdate) creationdate FROM cc_card " . "LEFT JOIN cc_tariffgroup ON cc_tariffgroup.id=cc_card.tariff LEFT JOIN cc_package_offer ON cc_package_offer.id=cc_tariffgroup.id_cc_package_offer " . "LEFT JOIN cc_card_group ON cc_card_group.id=cc_card.id_group WHERE username = '" . $_SESSION["pr_login"] . "' AND uipass = '" . $_SESSION["pr_password"] . "'";
$DBHandle = DbConnect();
$customer_res = $inst_table->SQLExec($DBHandle, $QUERY);
if (!$customer_res || !is_array($customer_res)) {
echo gettext("Error loading your account information!");
exit;
}
$customer_info = $customer_res[0];
if ($customer_info[14] != "1" && $customer_info[14] != "8") {
Header("HTTP/1.0 401 Unauthorized");
Header("Location: PP_error.php?c=accessdenied");
die;
}
$customer = $_SESSION["pr_login"];
getpost_ifset(array('posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'dsttype', 'sourcetype', 'clidtype', 'channel', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'dst', 'src', 'clid', 'subscribe'));
$currencies_list = get_currencies();
$two_currency = false;
if (!isset($currencies_list[strtoupper($customer_info[22])][2]) || !is_numeric($currencies_list[strtoupper($customer_info[22])][2])) {
示例15: gettext
?>
</th>
<th class="tableBody" style="padding: 2px;" align="center" width="50%"><?php
echo gettext("Description");
?>
</th>
<th class="tableBody" style="padding: 2px;" align="center" width="5%"><?php
echo gettext("Group");
?>
</th>
</tr>
<?php
$DBHandle = DbConnect();
$instance_table = new Table();
$QUERY = "SELECT config_title,config_key,config_value,config_description from cc_config where config_group_id = 11 order by id limit 10";
$config = $instance_table->SQLExec($DBHandle, $QUERY);
$i = 0;
foreach ($config as $values) {
$config_title = $values[0];
$config_key = $values[1];
$config_value = $values[2];
$config_description = $values[3];
if ($i % 2 == 0) {
$bgcolor = "bgColor='#FCFBFB'";
} else {
$bgcolor = "bgColor='#F2F2EE'";
}
?>
<tr <?php
echo $bgcolor;