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 $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++) {
<?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;
<?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];
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; } }
<?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;
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";
<?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) {
<?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;
<?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];
$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";
<?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) {
<?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);
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; }
$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 = "";
<?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);
<?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;
} else { $sWhere .= " AND "; } $sWhere .= $aColumns[$i] . " LIKE '%" . trim(${$s_s}) . "%' "; } } $query = "select * from web_salerrewards where fd_rewards_type = '1'"; //激活奖励机制 $db->query($query); $count = 0; //记录数 $vallquantity = 0; //总价 if ($db->nf()) { while ($db->next_record()) { $cardmoney = $db->f(fd_rewards_upmoney); } } $query = "select * from web_salerrewards where fd_rewards_type = '2'"; //销售奖励 $db->query($query); $count = 0; //记录数 $vallquantity = 0; //总价 if ($db->nf()) { while ($db->next_record()) { $ordermoney = $db->f(fd_rewards_upmoney); } } //开卡数有效记录
<?php require "../include/common.inc.php"; header('Content-Type:text/html;charset=GB2312'); $db = new db_test(); //$showcheck ='<onclick="selectall();" id="selitmes">ȫѡ</a><br>'; if ($param == "fd_provinces_id") { $query = "select * from tb_provinces order by fd_provinces_name "; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $provincesid = $db->f(fd_provinces_id); $provincesname = $db->f(fd_provinces_name); $showcheck .= '<font style="width:120px;"><input type="checkbox" title="' . $provincesid . '" name="arr_content[]" onclick="addPreItem()" value="' . $provincesname . '">' . $provincesname . '</font>'; } } } else { if ($param == "fd_city_id") { $query = "select * from tb_city order by fd_city_name "; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $cityid = $db->f(fd_city_id); $cityname = $db->f(fd_city_name); $showcheck .= '<font style="width:120px;"><input type="checkbox" title="' . $cityid . '" name="arr_content[]" onclick="addPreItem()" value="' . $cityname . '">' . $cityname . '</font>'; } } } else { if ($param == "fd_county_id") {
require "../include/common.inc.php"; $db = new db_test(); $db1 = new db_test(); $returnflag = 0; $query = "select * from tb_salelistdetail where fd_stdetail_seltid = '{$listid}'"; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $productid = $db->f(fd_stdetail_productid); //查找库存数量 $flagquantity = 0; $query = "select * from tb_paycardstockquantity where fd_skqy_commid = '{$productid}' "; $db1->query($query); if ($db1->nf()) { while ($db1->next_record()) { if ($db1->f(fd_skqy_quantity) != 0) { $flagquantity = 1; } } } //查询库存成本价 $query = "select * from tb_storagecost where fd_sect_commid = '{$productid}' "; $db1->query($query); if ($db1->nf()) { $db1->next_record(); $cost = $db1->f(fd_sect_cost); if ($cost == 0 and $flagquantity == 0) { $returnflag = 1; } } else { if ($flagquantity == 0) {
break; } $t = new Template(".", "keep"); $t->set_file("apprules", "apprules.html"); if (empty($id)) { $checked1 = "checked"; $action = "new"; } else { // 编辑 $query = "select * from tb_apprules\n where fd_apprules_id ='{$id}'\n "; $db->query($query); if ($db->nf()) { //判断查询到的记录是否为空 $db->next_record(); //读取记录数据 $no = $db->f(fd_apprules_no); //编号 $title = $db->f(fd_apprules_title); $content = $db->f(fd_apprules_content); $type = $db->f(fd_apprules_type); $action = "edit"; } } $oFCKeditor = new FCKeditor('FCKeditor1'); $oFCKeditor->BasePath = '../FCKeditor/'; $oFCKeditor->ToolbarSet = 'Normal'; $oFCKeditor->Width = '568'; $oFCKeditor->Height = '440'; $oFCKeditor->Value = $content; $fckeditor = $oFCKeditor->CreateHtml(); $t->set_var("no", $no);
if (${$b_s} == "true" && ${$s_s} != '') { if ($sWhere == "") { $sWhere = "AND "; } else { $sWhere .= " AND "; } $sWhere .= $aColumns[$i] . " LIKE '%" . trim(${$s_s}) . "%' "; } } $arr_appmnu = getauthorpaycardmenu(); $nowdate = date("Y-m", time()); $query = "select sum(fd_agpm_paymoney) as paymoney,COUNT(fd_agpm_paycardid) as paycardcount ,\n\t\tfd_agpm_paytype as paytype ,fd_agpm_paycardid as paycardid\n\t\tfrom tb_agentpaymoneylist \n\t\tgroup by fd_agpm_paycardid ,fd_agpm_paytype "; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $paycardid = $db->f(paycardid); $paytype = $db->f(paytype); $arr_data[$paycardid][$paytype]['paymoney'] = $db->f(paymoney); $arr_data[$paycardid][$paytype]['paycardcount'] = $db->f(paycardcount); } } $query = "select\n\t\tgroup_concat(fd_agpm_paytype) as paytype,\n\t\tfd_paycard_newspaydata as newspaydata,\n\t\tsum(fd_agpm_paymoney) as paymoney,\t\n\t\tCOUNT(fd_agpm_paycardid) as paycardcount,\n\t\tfd_paycard_key as paycardkey ,\n\t\tfd_cus_allname as allname ,\n\t\tfd_agpm_paycardid as paycardid,\n\t\tfd_paycard_everymoney as everymoney ,\n\t\tfd_paycard_everycounts as everycounts,\n\t\tfd_paycard_neverymoney as neverymoney,\n\t\tfd_paycard_nallmoney as nallmoney\n\t\tfrom tb_paycard \n\t\tleft join tb_agentpaymoneylist on fd_paycard_id = fd_agpm_paycardid\n\t\tleft join tb_customer on fd_paycard_cusid = fd_cus_id\t\t\t \n\t\t where fd_agpm_payrq='00' and fd_paycard_authorid='{$authorid}' and DATE_FORMAT(fd_agpm_paydate,'%Y-%m')='{$nowdate}' {$sWhere} group by fd_agpm_paycardid "; $db->query($query); $totoalcount = $db->nf() + 0; $count = 0; $query = " {$query} limit {$iDisplayStart},{$iDisplayLength}"; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $paycardid = $db->f(paycardid); $paycardkey = $db->f(paycardkey);
$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); $allmoney = $db->f(fd_rewards_allmoney); $bmonth = $db->f(fd_rewards_bmonth); $emonth = $db->f(fd_rewards_emonth); $tcsendtime = $db->f(fd_rewards_tcsendtime); $sendphonemsg = $db->f(fd_rewards_sendphonemsg); if ($selfmoney != "0") { $money = $selfmoney . "/" . $allmoney; } $act = "edit"; } else { $act = "new"; } for ($i = 1; $i <= 31; $i++) { $arr_month[] = $i;
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; }
<?php header('Content-Type: application/x-www-form-urlencoded'); header('Content-Type: text/html;charset=utf-8'); require "../include/common.inc.php"; require_once '../include/json.php'; $db = new db_test(); $query = "select fd_paycard_salerid,count(*) as counts from tb_paycard group by fd_paycard_salerid "; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $id = $db->f(fd_paycard_salerid); //id号 $arr_membercounts[$id] = g2u($db->f(counts)); } } $aColumns = array("", "a.fd_saler_truename", "a.fd_saler_username", "a.fd_saler_phone", "b.fd_saler_truename", 'a.fd_saler_zjl'); $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;
<?php require "../include/common.inc.php"; header('Content-Type:text/html;charset=GB2312'); $db = new db_test(); $arr_toptradmarkid = explode(",", $toptradmarkid); $query = "select fd_trademark_name,fd_procatrad_id,fd_trademark_id,fd_proca_catname,fd_procatrad_id,fd_proca_id,fd_procatrad_commjs,\n \t\t\t\t\t\t\t fd_procatrad_tradjs,fd_procatrad_commcs from web_conf_procatrademark\n\t left join tb_trademark on fd_trademark_id = fd_procatrad_trademarkid\n\t left join tb_procatalog on fd_proca_id = fd_procatrad_procaid\n where fd_procatrad_procaid in({$procaid}) group by fd_trademark_id"; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $trademarkid = $db->f(fd_trademark_id); $trademarkname = $db->f(fd_trademark_name); for ($i = 0; $i < count($arr_toptradmarkid); $i++) { if ($arr_toptradmarkid[$i] == $trademarkid) { $check = 'checked="true"'; } else { $check = ""; } } $showcheck .= '<div style="width:120px;float:left;"><input type="checkbox" ' . $check . ' title="' . $trademarkid . '" name="arr_count[]" onclick="addPreItem()" value="' . $trademarkname . '">' . $trademarkname . '</div>'; } } echo $showcheck;
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}'"; }
} else { $sWhere .= " AND "; } $sWhere .= $aColumns[$i] . " LIKE '%" . trim(${$s_s}) . "%' "; } } $arr_name = array("2" => "到期前2天提醒", "3" => "到期前3天提醒", "4" => "到期前4天提醒", "5" => "到期前5天提醒", "6" => "到期前6天提醒", "7" => "到期前7天提醒"); $query = "select \n\t\tfd_bank_name,fd_authorbkcard_no,fd_authorbkcard_cardname,fd_authorbkcard_ckr,\n\t\tfd_authorbkcard_creditmoney,fd_authorbkcard_zdr,fd_authorbkcard_hkr,fd_authorbkcard_mxq,\n\t\tfd_authorbkcard_txr,fd_authorbkcard_dqr,fd_paycard_key,fd_authorbkcard_activetime,fd_authorbkcard_datetime\n\t\tfrom tb_authorbkcard \n\t\t left join tb_bank on fd_bank_id = fd_authorbkcard_bankid\n\t\tleft join tb_paycard on fd_paycard_id = fd_authorbkcard_paycardid\t\t\t \n\t\t where {$idwhere} {$sWhere} order by fd_authorbkcard_datetime desc"; $db->query($query); $totoalcount = $db->nf() + 0; $count = 0; $query = " {$query} limit {$iDisplayStart},{$iDisplayLength}"; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $bank_name = g2u($db->f(fd_bank_name)); $paycardkey = $db->f(fd_paycard_key); $cardno = $db->f(fd_authorbkcard_no); $cardname = g2u($db->f(fd_authorbkcard_cardname)); $ckr = g2u($db->f(fd_authorbkcard_ckr)); $creditmoney = $db->f(fd_authorbkcard_creditmoney); $zdr = g2u($db->f(fd_authorbkcard_zdr)); $hkr = g2u($db->f(fd_authorbkcard_hkr)); $mxq = $db->f(fd_authorbkcard_mxq); $txr = $db->f(fd_authorbkcard_txr); $dqr = $db->f(fd_authorbkcard_dqr); $activetime = $db->f(fd_authorbkcard_activetime); $datetime = $db->f(fd_authorbkcard_datetime); $txr = g2u($arr_name[$txr]); if (!$paycardkey) { $paycardkey = "未绑定刷卡器";
<?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;
$username = ""; $password = ""; $zjl = ""; $tjman = ""; $type = ""; $truename = ""; break; } $t = new Template(".", "keep"); $t->set_file("template", "salersp.html"); if ($id != "") { $query = "select * from tb_saler where fd_saler_id = '{$id}'"; $db->query($query); if ($db->nf()) { $db->next_record(); $id = $db->f(fd_saler_id); //id号 $truename = $db->f(fd_saler_truename); //客户id $idcard = $db->f(fd_saler_idcard); $phone = $db->f(fd_saler_phone); $username = $db->f(fd_saler_username); $salerlevel = $db->f(fd_saler_level); } } $query = "select * from tb_salerlevel "; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $arr_salerlevelid[] = $db->f(fd_salerlevel_id); $arr_salerlevelname[] = $db->f(fd_salerlevel_name);