本文整理汇总了PHP中db_test类的典型用法代码示例。如果您正苦于以下问题:PHP db_test类的具体用法?PHP db_test怎么用?PHP db_test使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了db_test类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getareaauthornum
public function getareaauthornum($cusid, $month)
{
$db = new db_test();
$query = "select count(*) as activecardnum from tb_author\n where fd_author_bdagentid = '{$cusid}'\n and (fd_author_bdagenttime) like '%{$month}%'\n group by fd_author_bdagentid";
// echo $query;
if ($db->execute($query)) {
$arr_money = $db->get_one($query);
}
return $arr_money['activecardnum'];
}
示例2: saveFileid
function saveFileid($dateid, $catid)
{
$dbfile = new db_test();
if ($catid) {
$query = "update tb_upload_category_list set fd_cat_dateid='{$dateid}'\n\t\t\twhere fd_cat_dateid='0' and fd_cat_id in({$catid})";
$dbfile->query($query);
//echo $query;
}
//return $query;
}
示例3: changecoupon
function changecoupon($listid, $no, $type, $money, $couponno, $authorid, $paycardid = null, $memo)
{
$db = new db_test();
switch ($type) {
case "sale":
$query = "insert into tb_couponglide (\n\t\t fd_couponglide_no , fd_couponglide_type , fd_couponglide_addmoney ,\n\t\t fd_couponglide_lessmoney , fd_couponglide_datetime , fd_couponglide_memo ,\n\t\t fd_couponglide_man , fd_couponglide_couponno , fd_couponglide_authorid ,\n\t\t fd_couponglide_paycardid ,fd_couponglide_listid\n\t\t )values(\n\t\t '{$no}' , '{$type}' , '0' , \n\t\t '{$money}' , now() , '{$memo}' , \n\t\t '{$loginstaname}' , '{$couponno}' , '{$authorid}' ,\n\t\t '{$paycardid}' , '{$listid}'\n\t\t )\n\t\t ";
$db->query($query);
break;
case "rebuy":
$query = "insert into tb_couponglide (\n\t\t fd_couponglide_no , fd_couponglide_type , fd_couponglide_addmoney ,\n\t\t fd_couponglide_lessmoney , fd_couponglide_datetime , fd_couponglide_memo ,\n\t\t fd_couponglide_man , fd_couponglide_couponno , fd_couponglide_authorid ,\n\t\t fd_couponglide_paycardid ,fd_couponglide_listid\n\t\t )values(\n\t\t '{$no}' , '{$type}' , '{$money}' , \n\t\t '0' , now() , '{$memo}' , \n\t\t '{$loginstaname}' , '{$couponno}' , '{$authorid}' ,\n\t\t '{$paycardid}' , '{$listid}'\n\t\t )\n\t\t ";
$db->query($query);
break;
case "use":
$query = "insert into tb_couponglide (\n\t\t fd_couponglide_no , fd_couponglide_type , fd_couponglide_addmoney ,\n\t\t fd_couponglide_lessmoney , fd_couponglide_datetime , fd_couponglide_memo ,\n\t\t fd_couponglide_man , fd_couponglide_couponno , fd_couponglide_authorid ,\n\t\t fd_couponglide_paycardid ,fd_couponglide_listid\n\t\t )values(\n\t\t '{$no}' , '{$type}' , '0' , \n\t\t '0' , now() , '{$memo}' , \n\t\t '{$loginstaname}' , '{$couponno}' , '{$authorid}' ,\n\t\t '{$paycardid}' , '{$listid}'\n\t\t )\n\t\t ";
$db->query($query);
break;
}
}
示例4: db_test
<?php
require "../include/common.inc.php";
$db = new db_test();
$gotourl = "app_interface_b.php?listid={$listid}";
switch ($type) {
case "save":
//echo $intfid."aaaaa</br>";
$query = "select * from web_test_interface where fd_interface_appmenuid = 0 and fd_interface_id =" . $intfid;
$db->query($query);
if ($db->nf()) {
$query = "update web_test_interface set fd_interface_appmenuid = {$listid} where fd_interface_id =" . $intfid;
//echo $query;exit;
$db->query($query);
require "../include/alledit.2.php";
Header("Location: {$gotourl}");
} else {
echo "<script>alert('该接口已经被绑定,请查证!');location.href='{$gotourl}'</script>";
}
break;
case "jb":
$query = "update web_test_interface set fd_interface_appmenuid = 0 where fd_interface_id = " . $intfid;
$db->query($query);
require "../include/alledit.2.php";
Header("Location: {$gotourl}");
break;
case "delete":
$query = "delete from web_test_interface where fd_interface_id='{$intfid}'";
$db->query($query);
require "../include/alledit.2.php";
Header("Location: {$gotourl}");
示例5: db_test
<?php
$thismenucode = "2k508";
require "../include/common.inc.php";
$db = new db_test();
$db2 = new db_test();
$db3 = new db_test();
$gotourl = "yewupayset.php";
$t = new Template(".", "keep");
$t->set_file("template", "yewupayset.html");
$t->set_block("template", "BXBK", "BXBKs");
$arr_text = array("编号", "业务类型", "交易规则", "操作");
for ($i = 0; $i < count($arr_text); $i++) {
$theadth .= ' <th>' . $arr_text[$i] . '</th>';
}
$query = "select * from tb_creditcardset";
$arr_creditcset = $db->get_one($query);
if ($arr_creditcset['fd_creditcset_whenpayfee'] = 'post') {
$showname = '通付宝刷卡时';
} else {
$showname = '支金代付款时';
}
$arr_cinput['creditcardset'] = "\n\t还信用卡刷卡金额 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_slotcardmoney'] . "</font></u> 元/笔,\n\t商户刷卡 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_dayslotcard'] . "</font></u> 次/月,\n\t月还款总限额 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_maxmoney'] . "</font></u> 元,\n\t单卡还款次数 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_monthslotcard'] . "</font></u> 次/月,";
if ($arr_creditcset['fd_creditcset_mode'] == 'fix') {
$arr_cinput['creditcardset'] .= "固定手续费 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_fee'] . "</font></u> 元/笔。";
} else {
$arr_cinput['creditcardset'] .= "\n\t最低费率额 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_minfee'] . "</font></u> ,\n\t最高费率额 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_maxfee'] . "</font></u> ,\n\t收取费率 <u><font color='#00CC00'>" . $arr_creditcset['fd_creditcset_sqfee'] . "</font></u> 。";
}
$query = "select * from tb_transfermoneyset where fd_transfermoneyset_tfmgtype = 'tfmg'";
$arr_transfermoneyset = $db->get_one($query);
$arr_cinput['transfermoneyset'] = "\n\t转账刷卡金额 <u><font color='#00CC00'>" . $arr_transfermoneyset['fd_transfermoneyset_slotcardmoney'] . "</font></u> 元/笔,\n\t转账刷卡次数 <u><font color='#00CC00'>" . $arr_transfermoneyset['fd_transfermoneyset_dayslotcardcount'] . "</font></u> 次/日 , \n\t转账月限额 <u><font color='#00CC00'>" . $arr_transfermoneyset['fd_transfermoneyset_datemaxcount'] . "</font></u> 元,\n\t\n\t";
示例6: db_test
<?php
$thismenucode = "6n003";
require "../include/common.inc.php";
$db = new db_test();
$db2 = new db_test();
$db3 = new db_test();
$gourl = "salerreward.php";
if ($money) {
$arr_money = explode("/", $money);
}
switch ($act) {
case "new":
$query = "insert into tb_salerrewards(fd_rewards_selfmoney,fd_rewards_tcsendtime,fd_rewards_allmoney,\n\t\t\t\t\t\t\t\t\t\t fd_rewards_bmonth,fd_rewards_emonth,fd_rewards_sendphonemsg)\n\t values('{$arr_money['0']}','{$tcsendtime}','{$arr_money['1']}','{$bmonth}','{$emonth}','{$sendphonemsg}')";
$db->query($query);
echo "<script>alert('保存成功!');location.href='{$gourl}'</script>";
break;
case "edit":
$query = "update tb_salerrewards set \n\t fd_rewards_selfmoney ='{$arr_money['0']}', fd_rewards_tcsendtime ='{$tcsendtime}',fd_rewards_allmoney ='{$arr_money['1']}',\n\t\t\t fd_rewards_bmonth='{$bmonth}' , fd_rewards_emonth='{$emonth}' ,fd_rewards_sendphonemsg='{$sendphonemsg}'\n\t\t\t where fd_rewards_id = '{$rewardsid}'";
$db->query($query);
echo "<script>alert('修改成功!');location.href='{$gourl}'</script>";
break;
}
$t = new Template(".", "keep");
$t->set_file("template", "salerreward.html");
$query = "select * from tb_salerrewards ";
$db->query($query);
if ($db->nf()) {
$db->next_record();
$rewardsid = $db->f(fd_rewards_id);
$selfmoney = $db->f(fd_rewards_selfmoney);
示例7: header
<?php
require "../include/common.inc.php";
header('Content-Type:text/html;charset=GB2312');
$db = new db_test();
$dbshop = new db_shop();
//left join tb_shopkcquantity on fd_skqy_shopid=fd_shop_id and fd_skqy_procatalogid='$procaid'
$query = "select fd_shop_province from tb_shop \n\t\t\n\t\twhere fd_shop_isstop='0' and fd_shop_state='5' and fd_shop_iswebhidden = 0 ";
$dbshop->query($query);
if ($dbshop->nf()) {
while ($dbshop->next_record()) {
$arr_provincescode[] = $dbshop->f(fd_shop_province);
}
}
$provincescode = implode(",", $arr_provincescode);
$query = "select fd_provinces_code,fd_provinces_name from tb_provinces where fd_provinces_code in({$provincescode})";
$db->query($query);
$i = 1;
if ($db->nf()) {
while ($db->next_record()) {
$provincescode = $db->f(fd_provinces_code);
$provincesname = $db->f(fd_provinces_name);
$showcheck .= '<font style="width:30px;"><input type="checkbox" title="' . $provincesname . '" name="arr_provinces[]" onclick="readmarketingparam(\'' . $procaid . '\')"
value="' . $provincescode . '">' . $provincesname . '</font>';
if ($i % 12 == 0) {
$showcheck .= "<br/>";
}
$i++;
}
}
echo $showcheck;
示例8: header
<?php
header('Content-Type: application/x-www-form-urlencoded');
header('Content-Type: text/html;charset=gb2312');
require "../include/common.inc.php";
require_once '../include/json.php';
$db = new db_test();
$count = 0;
if ($type != 'checkdetail') {
$idwhere = "fd_authorbkcard_authorid='{$listid}'";
} else {
$idwhere = "fd_authorbkcard_paycardid='{$listid}'";
}
$aColumns = array("", "fd_bank_name", "fd_authorbkcard_no", "fd_authorbkcard_cardname", "fd_authorbkcard_ckr", "fd_paycard_key");
$sSearch = u2g($sSearch);
$sWhere = "";
if ($sSearch != "") {
$sWhere = "and (";
for ($i = 1; $i < count($aColumns); $i++) {
$sWhere .= $aColumns[$i] . " LIKE '%" . trim($sSearch) . "%' OR ";
}
$sWhere = substr_replace($sWhere, "", -3);
$sWhere .= ')';
}
/* Individual column filtering */
for ($i = 1; $i < count($aColumns); $i++) {
$b_s = "bSearchable_" . $i;
$s_s = "sSearch_" . $i;
if (${$b_s} == "true" && ${$s_s} != '') {
if ($sWhere == "") {
$sWhere = "AND ";
示例9: db_test
<?php
$thismenucode = "10n004";
require "../include/common.inc.php";
$db = new db_test();
$t = new Template(".", "keep");
$t->set_file("template", "payfeelist.html");
$query = "select sum(fd_payfee_addmoney) as alladdmoney,sum(fd_payfee_lessmoney) as alllessmoney from tb_payfeelist";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$alladdmoney = $db->f(alladdmoney);
$alllessmoney = $db->f(alllessmoney);
$allmoney = $alladdmoney + $alllessmoney;
}
}
$checkall = '<INPUT onclick=CheckAll() type=checkbox class=checkbox value=on name=chkall>';
$arr_text = array("流水编号", "刷卡器设备号", "手续费", "交易方式", "时间");
for ($i = 0; $i < count($arr_text); $i++) {
$theadth .= ' <th>' . $arr_text[$i] . '</th>';
}
$arr_titlename = array("tb_repaymoneyglist" => "贷款还款支付手续费", "tb_creditcardglist" => "信用卡还款支付手续费", "tb_transfermoneyglist" => "转账汇款支付手续费");
$query = "select fd_payfee_tabname from tb_payfeelist group by fd_payfee_tabname";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$arr_tabname[] = $db->f(fd_payfee_tabname);
}
}
for ($i = 0; $i < count($arr_tabname); $i++) {
$key = $arr_tabname[$i];
示例10: header
<?php
header('Content-Type: application/x-www-form-urlencoded');
header('Content-Type: text/html;charset=gb2312');
require "../include/common.inc.php";
require_once '../include/json.php';
require "../function/changekg.php";
$db = new db_test();
$query = "select * from web_orderdetail \n left join web_order on fd_order_id = fd_orderdetail_orderid\n where fd_orderdetail_id='{$id}'";
$db->query($query);
if ($db->nf()) {
$db->next_record();
$state = $db->f(fd_order_state);
}
if ($state > 1) {
echo "0@@" . $query;
exit;
}
$query = "update web_orderdetail set fd_orderdetail_quantity = '{$value}' where fd_orderdetail_id = '{$id}'";
$db->query($query);
echo "1@@" . $value . $query;
示例11: db_test
<?php
$thismenucode = "2n501";
require "../include/common.inc.php";
require "../function/changecouponglide.php";
$db = new db_test();
if ($type == "check") {
$gourl = "tb_creditcard_h_b.php";
$titlename = "信用卡还款支付历史";
} elseif ($type == "error") {
$gourl = "tb_creditcard_error_b.php";
$titlename = "信用卡还款支付异常";
} else {
$gourl = "tb_creditcard_sp_b.php";
$titlename = "信用卡还款支付复核";
$note = "<div style='margin-top:10px; font-size:12px; color:#060'>注意:银联代付还没有完成前,不能提交审核,请先通过代付款申请付款这笔单据!</div>";
}
if ($gotype == "sp") {
$gourl = "tb_creditcard_sp_b.php";
$titlename = "信用卡还款支付异常";
}
$gotourl = $gourl . $tempurl;
require "../include/alledit.1.php";
//,fd_ccglist_sendsms='$sendsms',fd_ccglist_shoucardmemo='$shoucardmemo'
switch ($action) {
case "pass":
//编辑记录
$query = "update tb_creditcardglist set\n\t\tfd_ccglist_state='{$isok}',fd_ccglist_qrdatetime=now(), fd_ccglist_qrman='{$loginstaname}' \n\t\twhere fd_ccglist_id={$listid}";
$db->query($query);
$query1 = "select * from tb_creditcardglist \n\t\t left join tb_paycard on fd_ccglist_paycardid = fd_paycard_id\n\t\t where fd_ccglist_id={$listid} ";
$db->query($query1);
示例12: Template
<?php
$thismenucode = "2002";
require "../include/common.inc.php";
$t = new Template(".", "keep");
$t->set_file("dept_framework", "dept_framework.ihtml");
$db = new db_test();
//$menufile = "menuarryfile.php" ;
//$menuarry = file($menufile);
$num = 0;
$query = "select * from tb_dept order by fd_dept_id asc ";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$deptid = $db->f(fd_dept_id);
$fid = $db->f(fd_dept_fid);
$name = $db->f(fd_dept_name);
$arr_deptid[$num] = $deptid;
$arr_fid[$num] = $fid;
$arr_name[$num] = $name;
//if($fid!=0){
$arr_isunder[$fid] = 1;
//}
$num++;
}
}
for ($i = 0; $i < count($arr_deptid); $i++) {
$a = $arr_deptid[$i];
$arrall[$a][code] = $a;
if (empty($arr_fid[$i])) {
$arrall[$a][fcode] = 0;
示例13: header
<?php
require "../include/common.inc.php";
require "../include/json.php";
header('Content-Type:text/html;charset=utf-8');
$db = new db_test();
$prov = u2g(unescape($prov));
$query = "select fd_china_city as city from tb_china where fd_china_prov = '{$prov}'\n group by fd_china_city order by fd_china_areacode asc";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$arr_city_code = g2u($db->f(city));
$arr_city_name = g2u($db->f(city));
$select[] = array("id" => $arr_city_code, "title" => $arr_city_name);
}
}
if (empty($select)) {
$select[] = array("id" => "", "title" => "");
}
echo json_encode($select);
示例14: db_test
<?php
require "../include/common.inc.php";
$db = new db_test();
if (!empty($listid)) {
$query = "UPDATE tb_paymoneylist SET fd_pymylt_times = " . ($times + 1) . " WHERE fd_pymylt_id = " . $listid;
$db->query($query);
echo 'success';
} else {
echo 'failure';
}
示例15: setUp
function setUp()
{
$this->image =& db_table_factory::instance('test_image');
$this->image_variation =& db_table_factory::instance('test_image_variation');
$this->media =& db_table_factory::instance('test_media');
parent::setUp();
}