本文整理汇总了PHP中Table::Get_list方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::Get_list方法的具体用法?PHP Table::Get_list怎么用?PHP Table::Get_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::Get_list方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: payment
public function payment($module = '')
{
global $payment, $language, $PHP_SELF;
$instance_sub_table = new Table("cc_payment_methods", "payment_filename");
$DBHandle = DbConnect();
$return = null;
$return = $instance_sub_table->Get_list($DBHandle, $QUERY, 0);
$this->modules = array();
if (is_array($return)) {
foreach ($return as $value) {
array_push($this->modules, $value["payment_filename"]);
}
}
$include_modules = array();
if (!empty($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
$this->selected_module = $module;
$include_modules[] = array('class' => $module, 'file' => $module . '.php');
} else {
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
$include_modules[] = array('class' => $class, 'file' => $value);
}
}
for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
include dirname(__FILE__) . '/../methods/' . $include_modules[$i]['file'];
$GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
}
if (!is_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
$this->form_action_url = $GLOBALS[$module]->form_action_url;
}
$actived_module = $this->selection();
$payment = $actived_module[0]['id'];
}
示例2: currencies
public function currencies()
{
$this->currencies = array();
$currenciesTable = new Table("cc_currencies", " * ");
$DBHandle = DBConnect();
$return = $currenciesTable->Get_list($DBHandle, "", 0);
$this->currencies = array();
foreach ($return as $value) {
$this->currencies[$value['currency']] = array('currency' => $value['currency'], 'name' => $value['name'], 'value' => $value['value'], 'decimal_point' => $value['decimal_point'], 'basecurrency' => $value['basecurrency'], 'decimal_places' => 2);
}
}
示例3: gen_all_agents
function gen_all_agents($dbh, $do_sip, $do_iax, &$err_msg)
{
global $FG_DEBUG;
global $A2B;
$ita = new Table('cc_agent', 'id, login,name');
if ($FG_DEBUG > 1) {
$ita->debug_st = 1;
}
$list_agent = $ita->Get_list($dbh, 'active = true', null, null, null, null);
if (!is_array($list_agent) || count($list_agent) == 0) {
$err_msg .= str_params(_("<p style='color: red'>No active agents found!<br>%1</p>"), array($dbh->ErrorMsg()), 1);
return false;
}
// These are put by default on a non-existing directory!
// This is intentional, since those files contain SIP/IAX passwords.
// they shouldn't be carelessly left in a world-readable dir.
if (isset($A2B->config['webui']['buddy_sip_agent'])) {
$buddy_sip = $A2B->config['webui']['buddy_sip_agent'];
} else {
$buddy_sip = "/tmp/a2billing/additional_sip.%1.conf";
}
if (isset($A2B->config['webui']['buddy_iax_agent'])) {
$buddy_iax = $A2B->config['webui']['buddy_iax_agent'];
} else {
$buddy_iax = "/tmp/a2billing/additional_iax.%1.conf";
}
$succ = 0;
foreach ($list_agent as $ag) {
$hdr_lines = "; Configuration for " . $ag[2] . "\n";
if ($do_sip) {
$fname = str_params($buddy_sip, $ag);
$qclause = str_dbparams($dbh, "name IN (SELECT callerid FROM cc_booth WHERE agentid = %1)", array($ag[0]));
if (gen_userdata($dbh, $fname, 'cc_sip_buddies', $qclause, $err_msg, $hdr_lines)) {
$succ++;
}
}
if ($do_iax) {
$fname = str_params($buddy_iax, $ag);
$qclause = str_dbparams($dbh, "name IN (SELECT callerid FROM cc_booth WHERE agentid = %1)", array($ag[0]));
if (gen_userdata($dbh, $fname, 'cc_iax_buddies', $qclause, $err_msg, $hdr_lines)) {
$succ++;
}
}
}
$co = 0;
if ($do_sip) {
$co += count($list_agent);
}
if ($do_iax) {
$co += count($list_agent);
}
$err_msg .= str_params(_("<p style='color: blue'>Agent config files: %#1 of %#2 files created.</p>"), array($succ, $co), 1);
return true;
}
示例4: init
function init(&$DBHandle)
{
global $list_booths;
global $txt_fill;
global $txt_empty;
global $txt_change;
$itb = new Table("cc_booth", "id, name, agentid");
//$itb->debug_st=1;
$FG_TABLE_CLAUSE = 'def_card_id IS NOT NULL';
//"agentid = ". $DBHandle->Quote($_SESSION["agent_id"]) ." AND cur_card_id IS NULL";
// A booth without default card couldn't ever become active!
$ltb = $itb->Get_list($DBHandle, $FG_TABLE_CLAUSE);
$list_booths = $ltb;
$txt_fill = _("Fill!");
$txt_empty = _("Empty!");
}
示例5: payment
function payment($module = '')
{
global $payment, $language, $PHP_SELF;
$instance_sub_table = new Table("cc_payment_methods", "payment_filename");
$QUERY = " active = 't'";
$DBHandle = DbConnect();
$return = null;
$return = $instance_sub_table->Get_list($DBHandle, $QUERY, 0);
$this->modules = array();
if (is_array($return)) {
foreach ($return as $value) {
array_push($this->modules, $value["payment_filename"]);
}
}
//if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED)) {
//$this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
$include_modules = array();
if (!is_null($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
$this->selected_module = $module;
$include_modules[] = array('class' => $module, 'file' => $module . '.php');
} else {
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
$include_modules[] = array('class' => $class, 'file' => $value);
}
}
for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
include dirname(__FILE__) . '/../methods/' . $include_modules[$i]['file'];
$GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
}
// if there is only one payment method, select it as default because in
// checkout_confirmation.php the $payment variable is being assigned the
// $_POST['payment'] value which will be empty (no radio button selection possible)
if (count($this->modules) == 1 && (!isset($GLOBALS[$payment]) || isset($GLOBALS[$payment]) && !is_object($GLOBALS[$payment]))) {
$payment = $include_modules[0]['class'];
}
if (!is_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
$this->form_action_url = $GLOBALS[$module]->form_action_url;
}
//}
}
示例6: putenv
}
if (DB_TYPE != 'postgres') {
$run_restore = $run_gzip . MYSQL . " -u " . USER . " -p" . PASS;
} else {
$env_var = "PGPASSWORD='" . PASS . "'";
putenv($env_var);
$run_restore = $run_gzip . PSQL . " -d " . DBNAME . " -U " . USER . " -h " . HOST;
}
if ($FG_DEBUG == 1) {
echo $run_restore . "<br>";
}
exec($run_restore);
}
if ($form_action == "download") {
$instance_table_backup = new Table($HD_Form->FG_TABLE_NAME, $HD_Form->FG_QUERY_EDITION);
$list = $instance_table_backup->Get_list($HD_Form->DBHandle, $HD_Form->FG_EDITION_CLAUSE, null, null, null, null, 1, 0);
$path = $list[0][1];
$filename = basename($path);
$len = filesize($path);
header("content-type: application/stream");
header("content-length: " . $len);
header("content-disposition: attachment; filename=" . $filename);
$fp = fopen($path, "r");
fpassthru($fp);
exit;
}
if ($form_action == "upload") {
$uploaddir = BACKUP_PATH . '/';
$uploadfile = $uploaddir . basename($_FILES['databasebackup']['name']);
if (move_uploaded_file($_FILES['databasebackup']['tmp_name'], $uploadfile)) {
$instance_table_backup = new Table($HD_Form->FG_TABLE_NAME, 'id, name, path, creationdate');
示例7: date
} else {
$next_limite_pay_date = date("{$day_startdate}-m-Y", $next_bill_date);
}
$next_bill_date = date("Y-m-d", strtotime("{$next_limite_pay_date} - {$billdaybefor_anniversary} day"));
}
break;
default:
continue;
break;
}
switch ($action) {
case "bill":
//select card
$table_card = new Table('cc_card', '*');
$card_clause = "id = " . $subscription['card_id'];
$result_card = $table_card->Get_list($A2B->DBHandle, $card_clause);
if (!is_array($result_card)) {
break;
} else {
$card = $result_card[0];
}
if ($card['credit'] + $card['typepaid'] * $card['creditlimit'] >= $subscription['fee']) {
// USER HAVE ENOUGH CREDIT TO PAY FOR THE DID
$service_array[$service_id]['totalcardperform']++;
$service_array[$service_id]['totalcredit'] += $subscription['fee'];
$QUERY = "UPDATE cc_card SET credit=credit-'" . $subscription['fee'] . "' WHERE id=" . $card['id'];
$result = $instance_table->SQLExec($A2B->DBHandle, $QUERY, 0);
if ($verbose_level >= 1) {
echo "==> UPDATE CARD QUERY: \t{$QUERY}\n";
}
$QUERY = "INSERT INTO cc_charge (id_cc_card, amount, chargetype, id_cc_card_subscription, charged_status, description) VALUES ('" . $card['id'] . "', '" . $subscription['fee'] . "', '3','" . $subscription['card_subscription_id'] . "',1, '" . $subscription['product_name'] . "')";
开发者ID:ekamhara,项目名称:BootStrap-A2Billing-custom-templates,代码行数:31,代码来源:a2billing_subscription_fee.php
示例8: Table
$list_destination = $instance_table->Get_list($HD_Form->DBHandle, $FG_TABLE_CLAUSE, null, "ASC", null, null, null, null);
$destination = $list_destination[0];
$instance_table = new Table("cc_tariffplan", "id, tariffname");
$FG_TABLE_CLAUSE = "";
$list_tariffname = $instance_table->Get_list($HD_Form->DBHandle, $FG_TABLE_CLAUSE, "tariffname", "ASC", null, null, null, null);
$nb_tariffname = count($list_tariffname);
$instance_table = new Table("cc_trunk", "id_trunk, trunkcode, providerip");
$FG_TABLE_CLAUSE = "";
$list_trunk = $instance_table->Get_list($HD_Form->DBHandle, $FG_TABLE_CLAUSE, "trunkcode", "ASC", null, null, null, null);
$nb_trunk = count($list_trunk);
$instance_table = new Table("cc_outbound_cid_group", "id, group_name");
$FG_TABLE_CLAUSE = "";
$list_cid_group = $instance_table->Get_list($HD_Form->DBHandle, $FG_TABLE_CLAUSE, "group_name", "ASC", null, null, null, null);
$nb_cid_group = count($list_cid_group);
?>
<!-- ** ** ** ** ** Part for the Update ** ** ** ** ** -->
<div class="toggle_hide2show">
<center><a href="#" target="_self" class="toggle_menu"><img class="toggle_hide2show" src="<?php echo KICON_PATH; ?>/toggle_hide2show.png" onmouseover="this.style.cursor='hand';" HEIGHT="16"> <font class="fontstyle_002"><?php echo gettext("BATCH ASSIGNED");?> </font></a></center>
<div class="tohide" style="display:none;">
<center>
<b> <?php echo $HD_Form -> FG_NB_RECORD ?> <?php echo gettext("rates selected!"); ?> <?php echo gettext("Use the options below to batch update the selected rates.");?></b>
<table align="center" border="0" width="65%" cellspacing="1" cellpadding="2">
<form name="assignForm" action="javascript:;" method="post">
<INPUT type="hidden" name="batchupdate" value="1">
<INPUT type="hidden" name="atmenu" value="<?php echo $atmenu?>">
示例9: gettext
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_BILLING)) {
Header("HTTP/1.0 401 Unauthorized");
Header("Location: PP_error.php?c=accessdenied");
die;
}
getpost_ifset(array('id'));
if (empty($id)) {
header("Location: A2B_entity_logrefill.php?atmenu=payment§ion=10");
}
$DBHandle = DbConnect();
$remittance_table = new Table('cc_remittance_request', '*');
$remittance_clause = "id = " . $id;
$remittance_result = $remittance_table->Get_list($DBHandle, $remittance_clause, 0);
$remittance = $remittance_result[0];
if (empty($remittance)) {
header("Location: A2B_entity_remittance_request.php?atmenu=payment§ion=10");
}
// #### HEADER SECTION
$smarty->display('main.tpl');
?>
<br/>
<br/>
<br/>
<table style="width : 80%;" class="editform_table1">
<tr>
<th colspan="2" background="../Public/templates/default/images/background_cells.gif">
<?php
echo gettext("REMITTANCE INFO");
示例10: stripslashes
?>
<?php
echo $FG_TABLE_EDITION[$i][4];
?>
><?php
echo stripslashes($list[0][$i]);
?>
</textarea>
<?php
} elseif (strtoupper($FG_TABLE_EDITION[$i][3]) == strtoupper("SELECT")) {
if ($FG_DEBUG == 1) {
echo "<br> TYPE DE SELECT :" . $FG_TABLE_EDITION[$i][7];
}
if (strtoupper($FG_TABLE_EDITION[$i][7]) == strtoupper("SQL")) {
$instance_sub_table = new Table($FG_TABLE_EDITION[$i][8], $FG_TABLE_EDITION[$i][9]);
$select_list = $instance_sub_table->Get_list($DBHandle, $FG_TABLE_EDITION[$i][10], null, null, null, null, null, null);
if ($FG_DEBUG >= 2) {
echo "<br>";
print_r($select_list);
}
} elseif (strtoupper($FG_TABLE_EDITION[$i][7]) == strtoupper("LIST")) {
$select_list = $FG_TABLE_EDITION[$i][11];
//$select_list_nb = count($select_list);
}
?>
<SELECT class="form_enter" disabled name=<?php
echo $FG_TABLE_EDITION[$i][1];
?>
class="form_enter">
<?php
if (count($select_list) > 0) {
示例11: amount_convert
$conf_clause = "key_val = 'fax'";
$result = $invoice_conf_table->Get_list($DBHandle, $conf_clause, 0);
$fax = $result[0][0];
$conf_clause = "key_val = 'email'";
$result = $invoice_conf_table->Get_list($DBHandle, $conf_clause, 0);
$email = $result[0][0];
$conf_clause = "key_val = 'vat'";
$result = $invoice_conf_table->Get_list($DBHandle, $conf_clause, 0);
$vat_invoice = $result[0][0];
$conf_clause = "key_val = 'display_account'";
$result = $invoice_conf_table->Get_list($DBHandle, $conf_clause, 0);
$display_account = $result[0][0];
//country convert
$table_country = new Table('cc_country', 'countryname');
$country_clause = "countrycode = '" . $card['country'] . "'";
$result = $table_country->Get_list($DBHandle, $country_clause, 0);
$card_country = $result[0][0];
//Currencies check
$curr = $card['currency'];
$currencies_list = get_currencies();
if (!isset($currencies_list[strtoupper($curr)][2]) || !is_numeric($currencies_list[strtoupper($curr)][2])) {
$mycur = 1;
$display_curr = strtoupper(BASE_CURRENCY);
} else {
$mycur = $currencies_list[strtoupper($curr)][2];
$display_curr = strtoupper($curr);
}
function amount_convert($amount)
{
global $mycur;
return $amount / $mycur;
示例12: DbConnect
Header ("Location: PP_error.php?c=accessdenied");
die();
}
getpost_ifset(array('id'));
if (empty($id)) {
header("Location: A2B_entity_log_viewer.php?section=16");
}
$DBHandle = DbConnect();
$log_table = new Table('cc_system_log','*');
$log_clause = "id = ".$id;
$log_result = $log_table -> Get_list($DBHandle, $log_clause, 0);
$log = $log_result[0];
if (empty($log)) {
header("Location: A2B_entity_log_viewer.php?section=16");
}
// #### HEADER SECTION
$smarty->display('main.tpl');
?>
<br/>
<br/>
<br/>
<table style="width : 80%;" class="editform_table1">
<tr>
<th colspan="2" background="../Public/templates/default/images/background_cells.gif">
示例13: FormHandler
include './lib/customer.module.access.php';
include './lib/Form/Class.FormHandler.inc.php';
include './lib/customer.smarty.php';
getpost_ifset(array('key'));
$HD_Form = new FormHandler("cc_card", "User");
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
// HEADER SECTION
$smarty->display('signup_header.tpl');
if (empty($key)) {
$key = null;
}
$result = null;
$instance_sub_table = new Table('cc_card', "username, lastname, firstname, email, uipass, credit, useralias, loginkey, status, id");
$QUERY = "( loginkey = '" . $key . "' )";
$list = $instance_sub_table->Get_list($HD_Form->DBHandle, $QUERY);
if (isset($key) && $list[0][8] != "1") {
if ($A2B->config["signup"]['activated']) {
// Status : 1 - Active
$QUERY = "UPDATE cc_card SET status = 1 WHERE ( status = 2 OR status = 3 ) AND loginkey = '" . $key . "' ";
} else {
// Status : 2 - New
$QUERY = "UPDATE cc_card SET status = 2 WHERE ( status = 2 OR status = 3 ) AND loginkey = '" . $key . "' ";
}
$result = $instance_sub_table->SQLExec($HD_Form->DBHandle, $QUERY, 0);
}
if ($list[0][8] != "1" && isset($result) && $result != null) {
list($username, $lastname, $firstname, $email, $uipass, $credit, $cardalias, $loginkey, $status, $idcard) = $list[0];
if ($FG_DEBUG == 1) {
echo "<br/># {$username}, {$lastname}, {$firstname}, {$email}, {$uipass}, {$credit}, {$cardalias} #<br/>";
}
示例14: if
<?php if(!empty($call['id_ratecard'])){ ?>
<a href="A2B_entity_def_ratecard.php?form_action=ask-edit&id=<?php echo $call['id_ratecard']?>"> <img src="<?php echo Images_Path."/link.png"?>" border="0" title="<?php echo gettext("Link to the used rate")?>" alt="<?php echo gettext("Link to the used rate")?>"></a>
<?php } ?>
</td>
</tr>
<?php
$i++;
}
}
?>
</table>
<?php
$did_destination_table = new Table('cc_did_destination,cc_did ','*');
$did_destination_clause = " cc_did_destination.id_cc_did = cc_did.id and cc_did_destination.id_cc_card = ".$id;
$did_destination_result = $did_destination_table -> Get_list($DBHandle, $did_destination_clause, 0);
$did_destination = $did_destination_result[0];
if(sizeof($did_destination_result)>0 && $did_destination_result[0]!=null) {
?>
<table class="toppage_maintable">
<tr>
<td height="20" align="center">
<font class="toppage_maintable_text">
<?php echo gettext("DIDs & DID Destination"); ?> <br/>
</font>
</td>
</tr>
</table>
<table width="95%" cellspacing="2" cellpadding="2" border="0">
示例15: Table
<TR bgcolor="<?php
echo $FG_TABLE_ALTERNATE_ROW_COLOR[$ligne_number % 2];
?>
" onmouseover="bgColor='#FFDEA6'" onMouseOut="bgColor='<?php
echo $FG_TABLE_ALTERNATE_ROW_COLOR[$ligne_number % 2];
?>
'">
<?php
for ($i = 0; $i < $FG_NB_TABLE_COL; $i++) {
//$FG_TABLE_COL[$i][1];
//$FG_TABLE_COL[]=array ("Name", "name", "20%");
if ($FG_TABLE_COL[$i][6] == "lie") {
$instance_sub_table = new Table($FG_TABLE_COL[$i][7], $FG_TABLE_COL[$i][8]);
$sub_clause = str_replace("%id", $recordset[$i], $FG_TABLE_COL[$i][9]);
$select_list = $instance_sub_table->Get_list($DBHandle, $sub_clause, null, null, null, null, null, null);
$field_list_sun = split(',', $FG_TABLE_COL[$i][8]);
$record_display = $FG_TABLE_COL[$i][10];
for ($l = 1; $l <= count($field_list_sun); $l++) {
$record_display = str_replace("%{$l}", $select_list[0][$l - 1], $record_display);
}
} elseif ($FG_TABLE_COL[$i][6] == "list") {
$select_list = $FG_TABLE_COL[$i][7];
$record_display = $select_list[$recordset[$i]][0];
} else {
$record_display = $recordset[$i];
}
if (is_numeric($FG_TABLE_COL[$i][5]) && strlen($record_display) > $FG_TABLE_COL[$i][5]) {
$record_display = substr($record_display, 0, $FG_TABLE_COL[$i][5] - 3) . "...";
}
?>