本文整理汇总了PHP中db_test::f方法的典型用法代码示例。如果您正苦于以下问题:PHP db_test::f方法的具体用法?PHP db_test::f怎么用?PHP db_test::f使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_test
的用法示例。
在下文中一共展示了db_test::f方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: oldimgfile
function AutogetFileimg_id($scatid, $id)
{
//global "";
global $g_propic;
$dbfile = new db_test();
$query = "select * from tb_upload_category_list where fd_cat_scatid='{$scatid}' and fd_cat_id = '{$id}'";
$dbfile->query($query);
if ($dbfile->nf()) {
$dbfile->next_record();
$catid = $dbfile->f(fd_cat_id);
$filename = $dbfile->f(fd_cat_name);
$picname = $dbfile->f(fd_cat_url);
$thumrul = $dbfile->f(fd_cat_thumurl);
$display = $dbfile->f(fd_cat_display);
$thumrul = str_replace("../", "", $thumrul);
$vpic = "" . $thumrul;
$returnarray = $vpic . "@@" . $catid;
} else {
$thisclass = new oldimgfile();
//��ʼ����ʵ��
$returnarray = $thisclass->readoldfiles($scatid, $dateid);
}
if ($returnarray == "" and ($scatid == 5 or $scatid == 35)) {
$returnarray = $g_propic . "images/null.jpg@@";
}
return $returnarray;
}
示例2: Template
<?php
$thismenucode = "2k310";
require "../include/common.inc.php";
$db = new db_test();
$gourl = "tb_authoraccount_b.php";
$gotourl = $gourl . $tempurl;
require "../include/alledit.1.php";
$t = new Template(".", "keep");
$t->set_file("template", "authoraccount.html");
$query = "select * from tb_authoraccount left join tb_author on fd_author_id = fd_acc_authorid\n\twhere fd_acc_id = '{$listid}'";
//echo $query;
$db->query($query);
if ($db->nf()) {
$db->next_record();
$authorid = $db->f(fd_author_id);
}
$query = "select * from tb_authoraccount left join tb_author on fd_author_id = fd_acc_authorid\n\twhere fd_acc_authorid = '{$authorid}'";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$authorid = $db->f(fd_author_id);
$truename = $db->f(fd_author_truename);
$money = $db->f(fd_acc_money);
$typename = $db->f(fd_acc_typename) . "账户总额";
$content .= "<tr>\n\t\t\t<th>" . $typename . ":</th>\n\t\t\t<td>{$money} </td>\n\t\t\t</tr>\n\t\t\t";
}
}
$checkall = '<INPUT onclick=CheckAll() type=checkbox class=checkbox value=on name=chkall>';
$arr_text = array("流水编号", "类型", "刷卡器设备号", "变化金额", "交易类型", "时间");
for ($i = 0; $i < count($arr_text); $i++) {
示例3:
<?php
require "../include/common.inc.php";
$db = new db_test();
$db1 = new db_test();
header('Content-Type:text/html;charset=GB2312');
$query = "select fd_ysyfm_money from tb_ysyfmoney \n where fd_ysyfm_type ='{$companytype}' and fd_ysyfm_companyid = '{$companyid}'";
$db->query($query);
if ($db->nf()) {
$db->next_record();
$yfk_show = $db->f(fd_ysyfm_money) + 0;
} else {
$yfk_show = "";
}
echo $yfk_show;
示例4: Template
<?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];
示例5: getnewssaler
function getnewssaler($value)
{
$db = new db_test();
$query = "select fd_saler_truename from web_saler where fd_saler_id='{$value}'";
$db->query($query);
if ($db->nf()) {
$db->next_record();
$salername = $db->f(fd_saler_truename);
return $salername;
}
}
示例6: while
<?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;
示例7: while
header('Content-Type:text/html;charset=GB2312');
$flagcomm = 0;
$query = "select * from tb_salelistdetail where fd_stdetail_seltid = '{$listid}'";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$paycardid = $db->f(fd_stdetail_paycardid);
$productid = $db->f(fd_stdetail_productid);
$saleprice = $db->f(fd_stdetail_price);
$salequantity = $db->f(fd_stdetail_quantity);
$query = "select * from tb_paycardstockquantity \n\t\t where fd_skqy_commid = '{$productid}'";
$db1->query($query);
//查询仓库数量
if ($db1->nf()) {
$db1->next_record();
$storagequantity = $db1->f(fd_skqy_quantity) + 0;
if ($storagequantity < $salequantity) {
//$tmpquantity = $salequantity - $storagequantity;
$returnquantitypaycardid = $returnquantitypaycardid . "“" . $productid . "”当库存数量为:" . $storagequantity . "\n";
$flagcomm = 1;
}
}
$query = "select * from tb_storagecost \n\t\t where fd_sect_commid = '{$productid}'";
$db1->query($query);
//查询平均价格
if ($db1->nf()) {
$db1->next_record();
$storagecost = $db1->f(fd_sect_cost) + 0;
if ($storagecost >= $saleprice) {
//$tmpcost = $storagecost - $saleprice;
$returnpaycardid = $returnpaycardid . "“" . $productid . "”相差单价为:" . $storagecost . "\n";
示例8: Template
<?php
$thismenucode = "2k103";
require "../include/common.inc.php";
$db = new db_test();
$gotourl = "../jxcbasic/tb_customer_b.php";
$actionurl = 'teller.php';
$t = new Template(".", "keep");
$t->set_file("template", "tellerlist.html");
$query = "select fd_cus_name from tb_customer where fd_cus_id='{$listid}'";
$db->query($query);
if ($db->nf()) {
$db->next_record();
$cusname = $db->f(fd_cus_name);
}
$arr_text = array("<INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>\t", "用户名", "用户状态", "操作");
for ($i = 0; $i < count($arr_text); $i++) {
$theadth .= ' <th>' . $arr_text[$i] . '</th>';
}
//显示列表
$t->set_block("template", "prolist", "prolists");
$query = "select * from tb_cus_teller where fd_tel_cusid='{$listid}'";
$count = 0;
//记录数
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$telid = $db->f(fd_tel_id);
$telname = $db->f(fd_tel_name);
$recsts = $db->f(fd_tel_recsts);
if ($recsts == 1) {
示例9: explode
<?php
require "../include/common.inc.php";
header('Content-Type:text/html;charset=GB2312');
$db = new db_test();
if ($procaid != "") {
$arr_tradid = explode(",", $procaid);
for ($i = 0; $i < count($arr_tradid); $i++) {
$arr_procaid[$arr_tradid[$i]] = $arr_tradid[$i];
}
}
$query = "select * from tb_procatalog order by fd_proca_catname";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$id = $db->f(fd_proca_id);
//idºÅ
$name = $db->f(fd_proca_catname);
//µ¥¾Ý±àºÅ
if ($id == $arr_procaid[$id]) {
$checked = "checked";
$otherval .= '<INPUT title=' . $name . ' onclick=\'copyItem("previewItem","previewItem");same(this);\' name=arr_content[] value=' . $id . ' CHECKED type=checkbox>' . $name . '';
} else {
$checked = "";
}
$showcheck .= '<font style="width:120px;"><input type="checkbox" ' . $checked . ' title="' . $id . '" name="arr_content[]" onclick="addPreItem()"
value="' . $name . '">' . $name . '</font>';
}
}
echo $showcheck . '@@' . $otherval;
示例10: Template
<?php
session_start();
require "../include/common.inc.php";
$t = new Template(".", "keep");
$t->set_file("shortcut", "shortcut.html");
$db = new db_test();
$menufile = "../include/menuarryfile.php";
$menuarry = file($menufile);
$query = "select * from web_teller where fd_tel_id = '{$loginuser}' ";
$db->query($query);
if ($db->nf()) {
$db->next_record();
$str_shortcut = $db->f(fd_tel_shortcut);
//用于已经选择的快捷件
//用户快捷菜单
$arr_shortcut = explode("±", $str_shortcut);
for ($i = 0; $i < count($arr_shortcut); $i++) {
$tmpkjcode = $arr_shortcut[$i];
//功能代号
$shortcut_arr[$tmpkjcode] = 1;
//功能代号
}
}
//得出所有的编号和父编号
for ($i = 0; $i < count($menuarry); $i++) {
$temp_arr1 = $menuarry[$i];
$temp_arr2 = explode("±", $temp_arr1);
$tmpcode = $temp_arr2[0];
//代号
$arr_allmenu[$i] = $temp_arr2[0];
示例11: Template
$db->query($query);
require "../include/alledit.2.php";
echo "<script>alert('修改成功!');location.href='{$gourl}'</script>";
break;
}
$t = new Template(".", "keep");
$t->set_file("coupon", "coupon.html");
if (!empty($listid)) {
// 编辑
$query = "select *from tb_coupon where fd_coupon_id ='{$listid}'";
$db->query($query);
if ($db->nf()) {
//判断查询到的记录是否为空
$db->next_record();
//读取记录数据
$arrdata['no'] = $db->f(fd_coupon_no);
//编号
$arrdata['bkntno'] = $db->f(fd_coupon_bkntno);
$arrdata['money'] = $db->f(fd_coupon_money);
$arrdata['active'] = $db->f(fd_coupon_active);
$arrdata['datetime'] = $db->f(fd_coupon_datetime);
$arrdata['memo'] = $db->f(fd_coupon_memo);
$arrdata['limitnum'] = $db->f(fd_coupon_limitnum);
if ($arrdata['active'] == "0") {
$select0 = "checked";
}
if ($arrdata['active'] == "1") {
$select1 = "checked";
}
}
$action = "edit";
示例12: Template
<?php
session_start();
require "../include/common.inc.php";
$t = new Template(".", "keep");
$t->set_file("left", "left.html");
$db = new db_test();
//$menufile = "../include/menuarryfile.php" ;
//$menuarry = file($menufile);
$query = "select * from tb_menu where fd_menu_upcode != '0' order by fd_menu_sno asc";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$menu_code = $db->f(fd_menu_code);
$menu_upcode = $db->f(fd_menu_upcode);
$menu_jpg = $db->f(fd_menu_jpg);
$menu_name = $db->f(fd_menu_name);
$menu_url = $db->f(fd_menu_url);
$menu_hz = $db->f(fd_menu_hz);
if ($menu_jpg == "arrow.jpg") {
$menu_jpg = "";
}
$menuarry[] = $menu_code . "±" . $menu_upcode . "±" . $menu_name . "±" . $menu_jpg . "±" . $menu_url . $menu_hz;
}
}
for ($i = 0; $i < count($menuarry); $i++) {
$temp_arr1 = $menuarry[$i];
$temp_arr2 = explode("±", $temp_arr1);
$a = $temp_arr2[0];
//代号
if ($loginusermenu[$a][item] == 1) {
示例13: json_encode
<?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();
$query = "select * from web_adminlog where fd_log_listid='{$log_shopid}'";
$db->query($query);
$totoalcount = $db->nf() + 0;
if ($db->nf()) {
while ($db->next_record()) {
$zcpeopleid = $db->f(d_log_czpeopleid);
$zcpeople = $db->f(fd_log_czpeole);
$zctime = $db->f(fd_log_cztime);
$czsql = $db->f(fd_log_sql);
$zctype = $db->f(fd_log_cztype);
$zcpeople = "<span id='{$zcpeopleid}'>{$zcpeople}</span>";
$arr_list[] = array($zcpeople, $zctype, $czsql, $zctime, $vmember);
}
} else {
$vmember = "ÔÝÎÞÊý¾Ý";
$arr_list[] = array($zcpeople, $zctype, $czsql, $zctime, g2u($vmember));
}
$returnarray['sEcho'] = intval($sEcho);
$returnarray['iTotalRecords'] = $totoalcount;
$returnarray['iTotalDisplayRecords'] = $totoalcount;
$returnarray['aaData'] = $arr_list;
$returnvalue = json_encode($returnarray);
echo json_encode($returnarray);
示例14: checkdeptid
function checkdeptid($fid)
{
$db1 = new db_test();
$query = "select * from tb_dept where fd_dept_id != '{$fid}'";
$db1->query($query);
if ($db1->nf()) {
$db1->next_record();
$check_id = $db1->f(fd_dept_fid);
checkdeptid($check_id);
}
return $check_id;
}
示例15: trim
$sWhere = "AND ";
} else {
$sWhere .= " AND ";
}
$sWhere .= $aColumns[$i] . " LIKE '%" . trim(${$s_s}) . "%' ";
}
}
$query = "select 1 from tb_paycard \nleft join tb_saler on fd_saler_id = fd_paycard_salerid \nleft join tb_bank on fd_bank_id = fd_paycard_bankid \nleft join tb_author on fd_paycard_authorid=fd_author_id\nwhere 1 {$sWhere} ";
$db->query($query);
$totoalcount = $db->nf() + 0;
$query = "select * from tb_paycard \nleft join tb_saler on fd_saler_id = fd_paycard_salerid\nleft join tb_bank on fd_bank_id = fd_paycard_bankid\nleft join tb_author on fd_paycard_authorid=fd_author_id \nwhere 1 {$sWhere} limit {$iDisplayStart},{$iDisplayLength} ";
$db->query($query);
//echo $query;
if ($db->nf()) {
while ($db->next_record()) {
$vid = $db->f(fd_paycard_id);
//idºÅ
$vno = $db->f(fd_paycard_no);
//idºÅ
$vtruename = g2u($db->f(fd_saler_truename));
$vbankname = g2u($db->f(fd_bank_name));
$vstatus = $db->f(fd_paycard_active);
$vdatetime = $db->f(fd_paycard_datetime);
$visnewcard = $db->f(fd_paycard_isnew);
$vpaycardtype = $db->f(fd_paycard_scope);
$authortruename = g2u($db->f(fd_author_truename));
$authormobile = $db->f(fd_author_mobile);
if ($vstatus == 1) {
$vstatus = "";
} else {
$vstatus = "";