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; }
<?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;
} 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); while ($db->next_record()) { $paycardid = $db->f(fd_paycard_no); $memo = $db->f(fd_ccglist_memo); $paymode = $db->f(fd_ccglist_arrivemode); $payfee = $db->f(fd_ccglist_payfee); } changeaccountno('in', $payfee, $paycardid, $memo, $paymode, 'tb_creditcardglist', $listid); echo "<script>alert('已成功确定转账!');location.href='{$gotourl}'</script>"; break; default: break; } $t = new Template(".", "keep"); $t->set_file("creditcard_sp", "creditcard_sp.html"); if (!empty($listid)) { $where = "fd_ccglist_id ='{$listid}'";
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; } }
$db1 = new db_test(); 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;
function getallpaymoney() { $db = new db_test(); $query = "select sum(fd_agpm_paymoney) as paymoney\n\t\tfrom tb_agentpaymoneylist \n\t\twhere fd_agpm_payrq='00'"; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $allpaymoney = $db->f(paymoney); } } return $allpaymoney; }
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; }
function getauthormeal($type) { $db = new db_test(); $query = 'select fd_author_' . $type . ',count(fd_author_' . $type . ') as authornum from tb_author group by fd_author_' . $type . ''; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $id = $db->f('fd_author_' . $type . ''); $returnvalue[$id] = $db->f(authornum); } } return $returnvalue; }
function getusemoney($authorid) { $db = new db_test(); $data = date("Y-m-d", time()); $query = "select * from tb_slotcardmoneyreq\n\t\t\tleft join tb_slotcardmoneyset on fd_scdmset_id = fd_pmreq_paymsetid \n\t\t\twhere fd_pmreq_authorid='{$authorid}' and fd_pmreq_state='9' and fd_pmreq_reqdatetime like '{$data}%'"; $db->query($query); if ($db->nf()) { //�жϲ�ѯ���ļ�¼�Ƿ�Ϊ�� while ($db->next_record()) { //��ȡ��¼��� $allreqmoney += $db->f(fd_pmreq_reqmoney); } return $allreqmoney; } else { return "0.00"; } }