本文整理汇总了PHP中A2Billing::DbConnect方法的典型用法代码示例。如果您正苦于以下问题:PHP A2Billing::DbConnect方法的具体用法?PHP A2Billing::DbConnect怎么用?PHP A2Billing::DbConnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类A2Billing
的用法示例。
在下文中一共展示了A2Billing::DbConnect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
define("PID", "/var/run/a2billing/a2billing_subscription_fee_pid.php");
}
// CHECK IF THE CRONT PROCESS IS ALREADY RUNNING
$pH = new ProcessHandler();
if ($pH->isActive()) {
die;
// Already running!
} else {
$pH->activate();
}
$verbose_level = 1;
$groupcard = 5000;
$A2B = new A2Billing();
$A2B->load_conf($agi, NULL, 0, $idconfig);
write_log(LOGFILE_CRONT_SUBSCRIPTIONFEE, basename(__FILE__) . ' line:' . __LINE__ . "[#### BATCH BEGIN ####]");
if (!$A2B->DbConnect()) {
echo "[Cannot connect to the database]\n";
write_log(LOGFILE_CRONT_SUBSCRIPTIONFEE, basename(__FILE__) . ' line:' . __LINE__ . "[Cannot connect to the database]");
exit;
}
$instance_table = new Table();
/*
Pay_Status :
0 : First USE
1 : Billed
2 : Paid
3 : UnPaid
*/
$QUERY = 'SELECT count(*) FROM cc_card INNER JOIN cc_card_subscription ON cc_card.id = cc_card_subscription.id_cc_card INNER JOIN cc_subscription_service ON cc_card_subscription.id_subscription_fee=cc_subscription_service.id' . ' WHERE cc_subscription_service.status=1 AND cc_card_subscription.startdate < NOW() AND (cc_card_subscription.stopdate = "0000-00-00 00:00:00" OR cc_card_subscription.stopdate > NOW())' . ' AND cc_subscription_service.startdate < NOW() AND (cc_subscription_service.stopdate = "0000-00-00 00:00:00" OR cc_subscription_service.stopdate > NOW()) AND cc_card_subscription.paid_status !=3';
$result = $instance_table->SQLExec($A2B->DBHandle, $QUERY);
$nb_card = $result[0][0];
开发者ID:ekamhara,项目名称:BootStrap-A2Billing-custom-templates,代码行数:31,代码来源:a2billing_subscription_fee.php
示例2: define
$A2B = new A2Billing();
$A2B->load_conf($agi);
if (!defined('PID'))
define("PID", $A2B->config["daemon-info"]['pidfile']);
// CHECK IF THE DAEMON IS ALREADY RUNNING
if (ProcessHandler :: isActive())
die("Already running!");
else
ProcessHandler :: activate();
write_log(LOGFILE_API_CALLBACK, basename(__FILE__) . ' line:' . __LINE__ . "[#### CALLBACK BEGIN ####]");
if (!$A2B->DbConnect()) {
echo "[Cannot connect to the database]\n";
write_log(LOGFILE_API_CALLBACK, basename(__FILE__) . ' line:' . __LINE__ . "[Cannot connect to the database]");
exit;
}
if ($A2B->config["database"]['dbtype'] == "postgres")
$UNIX_TIMESTAMP = "date_part('epoch',";
else
$UNIX_TIMESTAMP = "UNIX_TIMESTAMP(";
$instance_table = new Table();
$A2B -> set_instance_table ($instance_table);
while(true)
{