本文整理汇总了PHP中DB_test::insert_id方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_test::insert_id方法的具体用法?PHP DB_test::insert_id怎么用?PHP DB_test::insert_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_test
的用法示例。
在下文中一共展示了DB_test::insert_id方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Register
public function Register($phone, $loginPassword)
{
$db = new DB_test();
$query = "SELECT 1 FROM tb_author WHERE fd_author_username = '$phone'";
$db->query($query);
if($db->nf())
{
return 0;
}
else
{
$query = "INSERT INTO tb_author (fd_author_username, fd_author_paypassword, fd_author_mobile, fd_author_regtime, fd_author_datetime, fd_author_isstop, fd_author_state, fd_author_sdcrid, fd_author_auindustryid, fd_author_slotpayfsetid, fd_author_slotscdmsetid, fd_author_bkcardpayfsetid, fd_author_bkcardscdmsetid, fd_author_couponstate, fd_author_memid, fd_author_shopid, fd_author_authortypeid) VALUES( '$phone' ,' $loginPassword', '$phone', now(), now(), 0, 9, 3, 4, 8, 14, 25, 9, 0, 3554, 102, 5)";
$db->query($query);
$authorId = $db->insert_id();
return $authorId;
}
}
示例2: register
public function register()
{
$logger = Logger::getLogger('AuthorInfo');
$retcode = "200";
$arr_message = array("result" => "failure", "message" => "操作出现异常,请稍后再试!");
$arr_body = $this->arr_body;
$phonenumber = trim($arr_body['phonenumber']);
$paypasswd = trim(md5($arr_body['paypasswd']));
$logger->info("开始注册 : phonenumber : (" . $phonenumber . ")");
if ($phonenumber != "" && $arr_body['paypasswd'] != "") {
$legalPasswd = true;
// 目前并没有对密码的合法性进行判断
if ($legalPasswd) {
$db = new DB_test();
$query = "SELECT 1 FROM tb_author WHERE fd_author_username = '{$phonenumber}'";
$db->query($query);
if ($db->nf()) {
$arr_message = array("result" => "failure", "message" => "该手机号已注册过通付宝账户");
} else {
$query = "INSERT INTO tb_author (fd_author_username, fd_author_paypassword, fd_author_mobile, fd_author_regtime, fd_author_datetime, \n\t\t\t\t\t\t\tfd_author_isstop, fd_author_state, fd_author_sdcrid, fd_author_auindustryid, fd_author_slotpayfsetid, \n\t\t\t\t\t\t\tfd_author_slotscdmsetid, fd_author_bkcardpayfsetid, fd_author_bkcardscdmsetid, \n\t\t\t\t\t\t\tfd_author_couponstate, fd_author_memid, fd_author_shopid, fd_author_authortypeid) \n\t\t\t\t\t\t\tVALUES( '{$phonenumber}' ,'{$paypasswd}', '{$phonenumber}', now(), now(), 0, 9, 3, 4, 8, 14, 25, 9, 0, 3554, 102, 5)";
$db->query($query);
$authorid = $db->insert_id();
$arr_message = array("result" => "success", "message" => "恭喜您,注册成功!");
$retcode = "0";
$arr_msg['msgbody']['authorid'] = $authorid;
global $au_token;
$au_token = Security::desencrypt(strtotime(date("Y-m-d H:i:s")), 'E', 'mstongfubao');
}
} else {
$arr_message = array("result" => "failure", "message" => "密码不符合规则!");
}
}
$logger->info("complete register");
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例3: while
//客户id
$suppno = $db->f(fd_stock_suppno);
//客户编号
$suppname = $db->f(fd_stock_suppname);
//客户名称
$now = $db->f(fd_stock_date);
//录单日期
$memo = $db->f(fd_stock_memo);
//备注
$allmoney = $db->f(fd_stock_allmoney);
//备注
$listno = listnumber_update(1);
//保存单据
$query = "INSERT INTO tb_paycardstock(\n \t fd_stock_no , fd_stock_suppid , fd_stock_suppno ,\n \t fd_stock_suppname , fd_stock_date , fd_stock_allmoney,\n \t fd_stock_memo \n )VALUES (\n '{$listno}' , '{$suppid}' , '{$suppno}' ,\n '{$suppname}' , '{$now}' , '{$allmoney}' ,\n '{$memo}' \n )";
$db->query($query);
$oldid = $db->insert_id();
}
if (!empty($oldid)) {
$query = "select * from tb_paycardstockdetail \n where fd_skdetail_stockid = '{$listid}'";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$paycardid = $db->f(fd_skdetail_paycardid);
//商品ID
$proprice = $db->f(fd_skdetail_price);
//价格
$quantity = $db->f(fd_skdetail_quantity);
//商品数量
$promemo = $db->f(fd_skdetail_memo);
//备注
$paycardaccount = $db->f(fd_skdetail_paycardaccount);
示例4: payOrderRq
function payOrderRq()
{
global $weburl;
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$authorid = trim($arr_channelinfo['authorid']);
$paytype = 'orderbuy';
$orderpaytypeid = trim($arr_body['orderpaytypeid']);
$orderprodureid = trim($arr_body['orderprodureid']);
//支付类型id
$ordernum = trim($arr_body['ordernum']);
//充值金额
$orderprice = trim(u2g($arr_body['orderprice']));
//实际支付金额
$ordermoney = trim(u2g($arr_body['ordermoney']));
//订单金额
$ordershaddressid = trim($arr_body['ordershaddressid']);
//手机所属地区
$oredershaddress = trim(u2g($arr_body['oredershaddress']));
//银行卡号
$ordershman = trim(u2g($arr_body['ordershman']));
//银行卡关联id tb_banckcard.fd_bankcard_id
$ordershphone = trim(u2g($arr_body['ordershphone']));
//认证信息
$orderfucardno = trim(u2g($arr_body['orderfucardno']));
//认证信息
$orderfucardbank = trim(u2g($arr_body['orderfucardbank']));
//认证信息
$ordermemo = trim(u2g($arr_body['ordermemo']));
//认证信息
$agentno = trim(u2g($arr_body['agentno']));
//认证信息
$orderpaytype = trim($arr_body['paytype']);
$promoney = trim(u2g($arr_body['promoney']));
//认证信息
$yunmoney = trim(u2g($arr_body['yunmoney']));
//认证信息
$produrename = trim(u2g($arr_body['produrename']));
$bkmoney = $ordermoney;
//promoney+yunmoney
$rechabkcardno = makeorderno("orderglist", "orderlist", "orl");
$arr_bkinfo = BankPayInfo::bankpayorder($authorid, $paycardid, $bkmoney, $orderfucardno);
$bkntno = trim($arr_bkinfo['bkntno']);
$sdcrid = trim($arr_bkinfo['sdcrid']);
if ($agentno != "") {
// $cusid =$this->checkcusagentno($agentno);
$query = "select fd_cus_id as cusid from tb_customer where fd_cus_no = '{$agentno}'";
if ($db->execute($query)) {
$arr_cusinfo = $db->get_one($query);
$cusid = $arr_cusinfo['cusid'];
} else {
$arr_message = array("result" => "failure", "message" => "对不起,您填写的代理商代号错误,请重新填写!");
$retcode = "200";
//反馈状态 0 成功 200 自定义错误
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$arr_msg['msgbody']['bkntno'] = $bkntno;
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
exit;
}
}
$datetime = date("Y-m-d H:i:s");
$date = date("Y-m-d");
//$bkmoney =
$bkorderNumber = trim($arr_bkinfo['bkorderNumber']);
$datadetailArray['fd_orderlist_paytype'] = $paytype;
$datadetailArray['fd_orderlist_no'] = $listno;
$datadetailArray['fd_orderlist_authorid'] = $authorid;
$datadetailArray['fd_orderlist_bkntno'] = $bkntno;
$datadetailArray['fd_orderlist_date'] = $date;
$datadetailArray['fd_orderlist_payrq'] = '01';
//刚请求的交易码状态为01
$datadetailArray['fd_orderlist_bkordernumber'] = $bkorderNumber;
$datadetailArray['fd_orderlist_sdcrid'] = $sdcrid;
$datadetailArray['fd_orderlist_produreid'] = $orderprodureid;
$datadetailArray['fd_orderlist_produrename'] = $produrename;
$datadetailArray['fd_orderlist_cusid'] = $cusid;
//分润代理商
$datadetailArray['fd_orderlist_num'] = $ordernum;
$datadetailArray['fd_orderlist_price'] = $orderprice;
$datadetailArray['fd_orderlist_promoney'] = $promoney;
$datadetailArray['fd_orderlist_yunmoney'] = $yunmoney;
$datadetailArray['fd_orderlist_ordermoney'] = $ordermoney;
$datadetailArray['fd_orderlist_shaddressid'] = $ordershaddressid;
$datadetailArray['fd_orderlist_shaddress'] = $oredershaddress;
$datadetailArray['fd_orderlist_shman'] = $ordershman;
$datadetailArray['fd_orderlist_shphone'] = $ordershphone;
$datadetailArray['fd_orderlist_fucardno'] = $orderfucardno;
$datadetailArray['fd_orderlist_fucardbank'] = $orderfucardbank;
$datadetailArray['fd_orderlist_memo'] = $ordermemo;
$datadetailArray['fd_orderlist_datetime'] = $datetime;
$datadetailArray['fd_orderlist_agentno'] = $agentno;
$db->insert("tb_orderglist", $datadetailArray);
$listid = $db->insert_id();
$arr_message = array("result" => "success", "message" => "请求交易码成功!");
$retcode = "0";
//.........这里部分代码省略.........
示例5: authorMenuCount
public function authorMenuCount()
{
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$appmnuid = $arr_body['appmnuid'];
$authorid = $arr_channelinfo['authorid'];
$query = "select fd_appmnuc_count as count from tb_appmenucout where fd_appmnuc_authorid = '{$authorid}'\n and fd_appmnuc_appmnuid = '{$appmnuid}' ";
$db->query($query);
if ($db->nf()) {
$arr_val = $db->get_one($query);
$count = $arr_val['count'];
$querywhere = " fd_appmnuc_authorid = '{$authorid}'\n and fd_appmnuc_appmnuid = '{$appmnuid}'";
$dateArray['fd_appmnuc_count'] = $count + 1;
$db->update("tb_appmenucout", $dateArray, $querywhere);
} else {
$dateArray['fd_appmnuc_authorid'] = $authorid;
$dateArray['fd_appmnuc_appmnuid'] = $appmnuid;
$dateArray['fd_appmnuc_count'] = $memo;
$db->insert("tb_appmenucout", $dateArray);
}
$listid = $db->insert_id();
//取出刚插入的记录的主关键值的id
$arr_message = array("result" => "success", "message" => "插入数据成功!", "retcode" => "0");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例6: RechaMoneyRq
function RechaMoneyRq()
{
global $weburl;
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$authorid = trim($arr_channelinfo['authorid']);
$paytype = 'qqrecharge';
$paycardid = trim($arr_body['paycardid']);
$paytypeid = trim($arr_body['rechapaytypeid']);
//支付类型id
$rechamoney = trim($arr_body['rechamoney']);
//充值金额
$rechapaymoney = trim(u2g($arr_body['rechapaymoney']));
//实际支付金额
$rechaqq = trim(u2g($arr_body['rechaqq']));
//充值手机号码
$qqhasrechamoney = $this->readQQhasRechamoney($rechaqq);
$allqqremoney = $qqhasrechamoney + $rechamoney;
if ($allqqremoney > 5000) {
$retcode = "200";
$arr_msg['msgbody']['result'] = "failure";
$arr_msg['msgbody']['message'] = "对不起,每个QQ号码每天累计充值Q币数不能大于5000!";
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
$rechaqqprov = trim($arr_body['rechaqqprov']);
//手机所属地区
$rechabkcardno = trim(u2g($arr_body['rechabkcardno']));
//银行卡号
$rechabkcardid = trim($arr_body['rechabkcardid']);
//银行卡关联id tb_banckcard.fd_bankcard_id
$merReserved = trim(u2g($arr_body['merReserved']));
//认证信息
// $current = trim($arr_body['current']); //币种
// $paycardid = trim(GetPayCalcuInfo::readpaycardid($paycardid)); //刷卡器设备号
$arr_paycard = GetPayCalcuInfo::readpaycardid($arr_body['paycardid'], $authorid);
//刷卡器设备号
$paycardid = $arr_paycard['paycardid'];
//刷卡器id
$cusid = trim($arr_paycard['cusid']);
//代理商
$paycardkey = trim($arr_paycard['paycardkey']);
//刷卡器key
//$feebankid = getbankid($shoucardbank); //获得银行id返回string
$onepayfee = $this->readRechacostmoney($rechamoney);
$payfee = $onepayfee * $rechamoney;
//金额也就是数量
$bkmoney = $rechapaymoney;
$arr_bkinfo = BankPayInfo::bankpayorder($authorid, $paycardid, $bkmoney, $rechabkcardno);
$bkntno = trim($arr_bkinfo['bkntno']);
$sdcrid = trim($arr_bkinfo['sdcrid']);
$sdcrpayfee = substr($arr_bkinfo['sdcrpayfee'], 0, -1);
//银联收取明盛浮动费率
$sdcrpayfeemoney = $bkmoney * $sdcrpayfee / 100 > $arr_bkinfo['minsdcrpayfee'] ? $bkmoney * $sdcrpayfee / 100 : $arr_bkinfo['minsdcrpayfee'];
$paydate = date("Y-m-d H:i:s");
$today = date("Ymd");
//$bkmoney =
$bkorderNumber = trim($arr_bkinfo['bkorderNumber']);
$listno = makeorderno("qqrechargelist", "mrclist", "mrc");
$datadetailArray['fd_mrclist_no'] = $listno;
$datadetailArray['fd_mrclist_paycardid'] = $paycardid;
$datadetailArray['fd_mrclist_authorid'] = $authorid;
$datadetailArray['fd_mrclist_bkntno'] = $bkntno;
$datadetailArray['fd_mrclist_paydate'] = $paydate;
$datadetailArray['fd_mrclist_payrq'] = '01';
//刚请求的交易码状态为01
$datadetailArray['fd_mrclist_paytypeid'] = $paytypeid;
//手机充值支付类型 跟paytype 无任何关系
$datadetailArray['fd_mrclist_paytype'] = $paytype;
//业务类型
$datadetailArray['fd_mrclist_bkordernumber'] = $bkorderNumber;
$datadetailArray['fd_mrclist_sdcrpayfeemoney'] = $sdcrpayfeemoney;
$datadetailArray['fd_mrclist_sdcrid'] = $sdcrid;
$datadetailArray['fd_mrclist_rechamoney'] = $rechamoney;
$datadetailArray['fd_mrclist_bkmoney'] = $bkmoney;
$datadetailArray['fd_mrclist_qq'] = $rechaqq;
$datadetailArray['fd_mrclist_paymoney'] = $rechapaymoney;
$datadetailArray['fd_mrclist_payfee'] = $payfee;
$datadetailArray['fd_mrclist_qqprov'] = u2g($rechaqqprov);
$datadetailArray['fd_mrclist_bankcardno'] = $rechabkcardno;
$datadetailArray['fd_mrclist_bankcardid'] = $rechabkcardid;
$datadetailArray['fd_mrclist_bankcardbank'] = $rechabkcardname;
$datadetailArray['fd_mrclist_date'] = $today;
$datadetailArray['fd_mrclist_datetime'] = $paydate;
$datadetailArray['fd_mrclist_cusid'] = $cusid;
$db->insert("tb_qqrechargelist", $datadetailArray);
$listid = $db->insert_id();
//$listid = $db->insert_id();
// $method = 'in';
// $method = u2g($method);
//$gettrue = AgentPayglist :: insertPayglist($this->reqxmlcontext, $bkntno, $listid, $ccgno, $paytype, $method, $arr_feeinfo);
$arr_message = array("result" => "success", "message" => "请求交易码成功!");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$arr_msg['msgbody']['bkntno'] = $bkntno;
//.........这里部分代码省略.........
示例7: VALUES
$gotourl = $gourl . $tempurl;
require "../include/alledit.1.php";
switch ($action) {
case "new":
$paycardaccount_company = $_POST['paycardaccount_company'];
$paycardaccount_accountname = $_POST['paycardaccount_accountname'];
$paycardaccount_accountnum = $_POST['paycardaccount_accountnum'];
$paycardaccount_bank = $_POST['paycardaccount_bank'];
$query = "select * from tb_paycardaccount where fd_paycardaccount_accountnum = '{$paycardaccount_accountnum}'";
$db->query($query);
if ($db->nf()) {
$error = "该账户已存在!请查证!";
} else {
$query = "INSERT INTO tb_paycardaccount(\n\t\t\t fd_paycardaccount_company,fd_paycardaccount_accountname,fd_paycardaccount_accountnum,fd_paycardaccount_bank) VALUES(\n\t\t\t '{$paycardaccount_company}','{$paycardaccount_accountname}','{$paycardaccount_accountnum}','{$paycardaccount_bank}')";
$db->query($query);
$listid = $db->insert_id();
require "../include/alledit.2.php";
Header("Location: {$gotourl}");
}
$action = "";
break;
case "edit":
$paycardaccount_company = $_POST['paycardaccount_company'];
$paycardaccount_accountname = $_POST['paycardaccount_accountname'];
$paycardaccount_accountnum = $_POST['paycardaccount_accountnum'];
$paycardaccount_bank = $_POST['paycardaccount_bank'];
$query = "select * from tb_paycardaccount where fd_paycardaccount_accountnum = '{$paycardaccount_accountnum}' and fd_paycardaccount_id<>'{$listid}'";
$db->query($query);
if ($db->nf()) {
$error = "该账户已存在!请查证!";
} else {
示例8: currentaccount
$lessenmoney = 0;
currentaccount(1, $cusid, $allmoney, $lessenmoney, $ctatmemo, $cactlisttype, $loginstaname, $listid, $listno, $date);
if ($allmoney != 0) {
changemoney(1, $cusid, $allmoney, 0);
//第四位0代表正,1代表负数
}
//生成帐户流水帐
$chgememo = "销售单收取" . $cusname . "客户" . $allmoney . "元";
$chgelisttype = "3";
$cogetype = 0;
//0为收款 , 1为付款
cashglide($accountid, $allmoney, $chgememo, $chgelisttype, $loginstaname, $listid, $listno, $cogetype, $date);
$query = "insert into tb_cus_stock(\n\t fd_stock_no , fd_stock_date ,fd_stock_cusid , fd_stock_cusno,\n\t\t\t\t\tfd_stock_cusname ,\tfd_stock_skfs ,fd_stock_shaddress ,fd_stock_allmoney,\n\t\t\t\t\tfd_stock_allcost ,fd_stock_saleid ,fd_stock_datetime ,fd_stock_state\n\t )values(\n\t '{$listno}' , '{$date}' ,'{$cusid}' , '{$cusno}',\n\t\t\t\t\t'{$cusname}' , '{$skfs}' ,'{$shaddress}'\t , '{$allmoney}',\n \t\t\t\t\t'{$allmoney}' , '{$listid}' , now() , '1'\n\t )";
$db->query($query);
//插入单据资料
$cus_listid = $db->insert_id();
//取出刚插入的记录的主关键值的id
for ($i = 0; $i < count($arr_data); $i++) {
$paycardid = $arr_data[$i]['paycardid'];
$quantity = $arr_data[$i]['quantity'];
$price = $arr_data[$i]['price'];
$productid = $arr_data[$i]['productid'];
updatepaycard($paycardid, $price, $date, $cusid);
$query = "insert into tb_cus_stockdetail(\n\t\t\t\t\t\tfd_skdetail_stockid , fd_skdetail_paycardid , \n\t\t\t\t\t\tfd_skdetail_quantity , fd_skdetail_price , \n\t\t\t\t\t\tfd_skdetail_productid \t\t\t\t\t\n\t\t\t\t\t\t)values(\n\t\t\t\t\t\t'{$cus_listid}' , '{$paycardid}' , \n\t\t\t\t\t\t'{$quantity}' , '{$price}' , \n\t\t\t\t\t\t'{$productid}' \n\t\t\t\t\t\t)";
$db->query($query);
//插入细节表 数据
}
$arr_paycarid = explode(",", $strpaycardid);
foreach ($arr_paycarid as $value1) {
$query = "select * from tb_paycard where fd_paycard_id = '{$value1}'";
$db->query($query);
示例9: authorReg
function authorReg()
{
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$aumobile = trim($arr_body['aumobile']);
$aupassword = trim(md5($arr_body['aupassword']));
$autruename = u2g(trim($arr_body['autruename']));
$auidcard = trim($arr_body['auidcard']);
$auemail = trim($arr_body['auemail']);
$query = "select 1 from tb_author where fd_author_username = '{$aumobile}'";
$db->query($query);
if ($db->nf()) {
$arr_message = array("result" => "failure", "message" => "该手机号码已注册");
$retcode = "200";
//反馈状态 0 成功 200 自定义错误
$havemobile = 1;
} else {
$havemobile = 0;
}
if ($havemobile != 1) {
$query = "insert into tb_author (fd_author_password ,fd_author_mobile ,fd_author_truename,\n\t\t\t\t\t\t\t fd_author_idcard,fd_author_email ,fd_author_username,fd_author_regtime,fd_author_datetime \n\t\t\t\t\t\t\t )values( '{$aupassword}' ,'{$aumobile}','{$autruename}','{$auidcard}','{$auemail}','{$aumobile}',now(),now())";
$db->query($query);
$listid = $db->insert_id();
$sdcrid = 3;
$auindustryid = 4;
$slotpayfsetid = 8;
$slotscdmsetid = 14;
$bkcardpayfsetid = 25;
$bkcardscdmsetid = 9;
$memid = 3554;
$shopid = 102;
$authortypeid = 5;
$query = "update tb_author set \n\t\t\t\t\t fd_author_isstop='0'," . "fd_author_state = '9'," . "fd_author_sdcrid = '{$sdcrid}'," . "fd_author_auindustryid = '{$auindustryid}',\n\t\t fd_author_slotpayfsetid = '{$slotpayfsetid}',\n\t\t fd_author_slotscdmsetid = '{$slotscdmsetid}',\n\t\t\t\t\t fd_author_bkcardpayfsetid='{$bkcardpayfsetid}',\n\t\t\t\t\t fd_author_bkcardscdmsetid='{$bkcardscdmsetid}' ,\n\t\t\t\t\t fd_author_couponstate = 0 ," . "fd_author_memid = '{$memid}'," . "fd_author_shopid = '{$shopid}'," . "fd_author_authortypeid = '{$authortypeid}' \n\t\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t\t where fd_author_id='{$listid}'";
$db->query($query);
$arr_message = array("result" => "success", "message" => "恭喜您,注册成功!");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
}
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例10: while
}
}
switch ($action) {
case "new":
//新增数据
$query = "select * from tb_salelist_tmp where fd_tmpsale_id='{$tmpid}'";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$tmp_paycardid = $db->f(fd_tmpsale_paycardid);
}
}
$query = "insert into tb_salelistbackdetail(\n\t\t\t\t\t\tfd_stdetail_seltid , fd_stdetail_paycardid , fd_stdetail_productid ,\n\t\t\t\t\t\tfd_stdetail_quantity , fd_stdetail_price\n\t\t\t\t\t\t)values(\n\t\t\t\t\t\t'{$listid}' , '{$tmp_paycardid}' , '{$productid}' ,\n\t\t\t\t\t\t'{$quantity}' , '{$price}'\n\t\t\t\t\t\t)";
$db->query($query);
//插入细节表 数据
$stdetail_id = $db->insert_id();
//取出刚插入的记录的主关键值的id
$query = "update tb_salelist_tmp set fd_tmpsale_seltid='{$stdetail_id}',fd_tmpsale_type='saleback' where fd_tmpsale_id='{$tmpid}' ";
$db->query($query);
$arr_tmp_paycardid = explode(",", $tmp_paycardid);
changepaycardstate($arr_tmp_paycardid, '-2');
//修改刷卡器状态
countallsalepaycard($listid, 'tb_salelistback', 'tb_salelistbackdetail');
echo "<script>location.href='jxcsaleback.php?listid={$listid}';</script>";
break;
case "edit":
$query = "select * from tb_salelist_tmp where fd_tmpsale_id='{$tmpid}'";
$db->query($query);
if ($db->nf()) {
while ($db->next_record()) {
$tmp_paycardid = $db->f(fd_tmpsale_paycardid);
示例11: VALUES
<?php
$thismenucode = "7n001";
require "../include/common.inc.php";
//require ("../FCKeditor/fckeditor.php");
$db = new DB_test();
$gourl = "tb_help_b.php";
$gotourl = $gourl . $tempurl;
require "../include/alledit.1.php";
switch ($action) {
case "new":
// $allcontent = $_POST[FCKeditor1];
$query = "INSERT INTO web_help(\n\t fd_help_name,\n\t fd_help_no,\n\t fd_help_contect,\n\t fd_help_type,\n\t fd_help_state,\n\t fd_help_date) VALUES(\n\t '{$name}','{$no}','{$content}','{$type}','{$isuse}','{$date}')";
$db->query($query);
$id = $db->insert_id();
Header("Location: {$gotourl}");
break;
case "edit":
$allcontent = $_POST[FCKeditor1];
/* $query="update web_help set fd_help_name='$name' ,
fd_help_no='$no' ,
fd_help_contect='$allcontent' ,
fd_help_type='$type' ,
fd_help_state='$isuse', fd_help_date='$date' where fd_help_id='$id'";*/
$query = "update web_help set fd_help_name='{$name}' , \n\t fd_help_no='{$no}' ,\n\t fd_help_contect='{$content}' ,\n\t fd_help_type='{$type}' ,\n\t fd_help_state='{$isuse}', fd_help_date='{$date}' where fd_help_id='{$id}'";
$db->query($query);
require "../include/alledit.2.php";
Header("Location: {$gotourl}");
break;
case "delete":
$query = "delete from web_help where fd_help_id='{$id}'";
示例12: couponSale
public function couponSale()
{
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$authorid = $arr_channelinfo['authorid'];
$couponid = trim($arr_body['couponid']);
$paymoney = trim($arr_body['couponmoney']);
//$paycardid = trim(GetPayCalcuInfo::readpaycardid($arr_body['paycardid']));
$arr_paycard = GetPayCalcuInfo::readpaycardid($arr_body['paycardid'], $authorid);
//刷卡器设备号
$paycardid = $arr_paycard['paycardid'];
//刷卡器id
$cusid = trim($arr_paycard['cusid']);
//代理商
$paycardkey = trim($arr_paycard['paycardkey']);
//刷卡器key
$fucardno = trim($arr_body['creditcardno']);
$fubank = trim(u2g($arr_body['creditbank']));
$fucardman = trim(u2g($arr_body['creditcardman']));
$fucardphone = trim(u2g($arr_body['creditcardphone']));
$paytype = 'coupon';
$req_appenv = trim($arr_header['req_appenv']);
// echo "fdf";
$checkbankinfo = $this->checkshoubankinfo($authorid, $req_appenv);
//检测我的银行卡信息有没填写
$arr_feeinfo = GetPayCalcuInfo::readPayFee($authorid, "", $paymoney, "", 5);
//获取手续费信息返回array
if (is_array($arr_feeinfo)) {
$feemoney = $arr_feeinfo['feemoney'];
}
$allmoney = round($paymoney + $feemoney, 2);
$arr_arrive = GetPayCalcuInfo::readarrive($arr_feeinfo['arriveid']);
$paydate = date("Y-m-d H:i:s");
$arrivedate = GetPayCalcuInfo::getfeedate($paydate, $arr_feeinfo['addday']);
$payfeedirct = $arr_feeinfo['defeedirct'];
if ($arr_feeinfo['defeedirct'] == 's') {
$bkmoney = $paymoney;
} else {
$bkmoney = $allmoney;
}
$arr_feeinfo['arrivedate'] = $arrivedate;
$arr_feeinfo['paydate'] = $paydate;
$arr_feeinfo['bkmoney'] = $bkmoney;
$arr_feeinfo['payfeedirct'] = $payfeedirct;
$payfee = $feemoney;
$arr_bkinfo = BankPayInfo::bankpayorder($authorid, $paycardid, $paymoney, $fucardno);
$arr_authorinfo = AuToken::getauthorusername($authorid);
$arr_feeinfo['shoucardno'] = $shoucardno = $arr_authorinfo['shoucardno'];
$arr_feeinfo['shoucardmobile'] = $shoucardmobile = $arr_authorinfo['shoucardmobile'];
$arr_feeinfo['shoucardbank'] = $shoucardbank = $arr_authorinfo['shoucardbank'];
$arr_feeinfo['shoucardman'] = $shoucardman = $arr_authorinfo['shoucardman'];
$bkntno = trim($arr_bkinfo['bkntno']);
$arr_feeinfo['bkordernumber'] = $bkordernumber = $arr_bkinfo['bkorderNumber'];
$arr_feeinfo['bkmoney'] = $bkmoney = $paymoney;
$arr_feeinfo['sdcrid'] = $sdcrid = trim($arr_bkinfo['sdcrid']);
$sdcrpayfee = substr($arr_bkinfo['sdcrpayfee'], 0, -1);
//银联收取明盛浮动费率
$arr_feeinfo['sdcrpayfeemoney'] = $sdcrpayfeemoney = $bkmoney * $sdcrpayfee / 100 > $arr_bkinfo['minsdcrpayfee'] ? $bkmoney * $sdcrpayfee / 100 : $arr_bkinfo['minsdcrpayfee'];
$ccgno = makeorderno("couponsale", "couponsale", "cps");
$query = "insert into tb_couponsale\n\t\t\t\t\t(fd_couponsale_no\t,\tfd_couponsale_bkntno\t,\tfd_couponsale_couponno\t,\n\t\t\t\t\tfd_couponsale_paycardid,fd_couponsale_authorid ,\tfd_couponsale_money,\n\t\t\t\t\tfd_couponsale_rebuy,\tfd_couponsale_state,\t\tfd_couponsale_datetime,\n\t\t fd_couponsale_couponid,\tfd_couponsale_payrq,\t\tfd_couponsale_creditcardno,\n\t\t fd_couponsale_creditcardbank,fd_couponsale_creditcardman,fd_couponsale_creditcardphone," . "fd_couponsale_bkordernumber,fd_couponsale_sdcrid, fd_couponsale_sdcrpayfeemoney," . "fd_couponsale_paymoney , fd_couponsale_payfee , fd_couponsale_bkmoney ," . "fd_couponsale_shoucardno,fd_couponsale_shoucardman,fd_couponsale_shoucardbank," . "fd_couponsale_shoucardmobile\n\t\t )values\n\t\t\t\t\t('{$ccgno}'\t\t\t,\t'{$bkntno}'\t\t\t\t,\t'{$bkorderNumber}',\n\t\t\t\t\t'{$paycardid}'\t\t,\t'{$authorid}'\t\t\t\t,\t'{$paymoney}',\n\t\t\t\t\t'0'\t\t\t\t\t,\t'0'\t\t\t\t\t\t,\t now()\t\t ,\n\t\t\t\t\t'{$couponid}'\t\t\t,\t'01' \t\t\t\t\t, '{$fucardno}',\n\t\t\t\t\t'{$fubank}' , '{$fucardman}' , '{$fucardphone}' , " . "'{$bkordernumber}' , '{$sdcrid}' , '{$sdcrpayfeemoney}'," . "'{$paymoney}' , '{$payfee}' , '{$bkmoney}' ," . "'{$shoucardno}' , '{$shoucardman}' , '{$shoucardbank}' ," . "'{$shoucardmobile}' ) ";
$db->query($query);
$listid = $db->insert_id();
$method = 'in';
$method = u2g($method);
$gettrue = AgentPayglist::insertPayglist($this->reqxmlcontext, $bkntno, $listid, $ccgno, $paytype, $method, $arr_feeinfo);
$arr_message = array("result" => "success", "message" => "获取交易码成功,可以去刷卡支付了!");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$arr_msg['msgbody']['bkntno'] = trim($bkntno);
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例13: payagentOrderRq
function payagentOrderRq()
{
global $weburl;
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$authorid = trim($arr_channelinfo['authorid']);
$agentid = trim($arr_channelinfo['agentid']);
$paytype = 'agentbuy';
$orderprodureid = trim($arr_body['orderprodureid']);
//支付类型id
$ordernum = trim($arr_body['ordernum']);
//充值金额
$orderprice = trim(u2g($arr_body['orderprice']));
//实际支付金额
$ordermoney = trim(u2g($arr_body['ordermoney']));
//订单金额
$orderfucardno = trim(u2g($arr_body['orderfucardno']));
//认证信息
$orderfucardbank = trim(u2g($arr_body['orderfucardbank']));
//认证信息
$ordermemo = trim(u2g($arr_body['ordermemo']));
//认证信息
$agentno = trim(u2g($arr_body['agentno']));
//认证信息
$arr_paycard = GetPayCalcuInfo::readpaycardid($arr_body['paycardid'], $authorid);
//刷卡器设备号
$paycardid = $arr_paycard['paycardid'];
//刷卡器id
$cusid = trim($arr_paycard['cusid']);
//代理商
$ordermemo = "自订刷卡器" . $ordernum;
$bkmoney = $ordermoney;
//promoney+yunmoney
$paymoney = $ordermoney;
$listno = makeorderno("salelist", "selt", "xs");
$arr_bkinfo = BankPayInfo::bankpayorder($authorid, $paycardid, $bkmoney, $orderfucardno);
$bkntno = trim($arr_bkinfo['bkntno']);
$sdcrid = trim($arr_bkinfo['sdcrid']);
$datetime = date("Y-m-d H:i:s");
$date = date("Y-m-d");
$bkorderNumber = trim($arr_bkinfo['bkorderNumber']);
$type = "app";
//自订
$datadetailArray['fd_selt_paytype'] = $paytype;
$datadetailArray['fd_selt_no'] = $listno;
$datadetailArray['fd_selt_authorid'] = $authorid;
$datadetailArray['fd_selt_bkntno'] = $bkntno;
$datadetailArray['fd_selt_date'] = $date;
$datadetailArray['fd_selt_payrq'] = '01';
//刚请求的交易码状态为01
$datadetailArray['fd_selt_bkordernumber'] = $bkorderNumber;
$datadetailArray['fd_selt_sdcrid'] = $sdcrid;
$datadetailArray['fd_selt_produreid'] = $orderprodureid;
$datadetailArray['fd_selt_allquantity'] = $ordernum;
$datadetailArray['fd_selt_saleprice'] = $orderprice;
$datadetailArray['fd_selt_fucardno'] = $orderfucardno;
$datadetailArray['fd_selt_fucardbank'] = $orderfucardbank;
$datadetailArray['fd_selt_memo'] = u2g($ordermemo);
$datadetailArray['fd_selt_datetime'] = $datetime;
$datadetailArray['fd_selt_cusid'] = $agentid;
//代理商id
$datadetailArray['fd_selt_paymoney'] = $paymoney;
//代理商id
$datadetailArray['fd_selt_authorid'] = $authorid;
//代理商id
$datadetailArray['fd_selt_type'] = $type;
$datadetailArray['fd_selt_skfs'] = '5';
//在线支付
$db->insert("tb_salelist", $datadetailArray);
$listid = $db->insert_id();
$arr_message = array("result" => "success", "message" => "请求交易码成功!");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$arr_msg['msgbody']['bkntno'] = $bkntno;
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例14: SuptransferMoneyRq
public function SuptransferMoneyRq()
{
$db = new DB_test();
$arr_header = $this->arr_header;
$arr_body = $this->arr_body;
$arr_channelinfo = $this->arr_channelinfo;
$authorid = trim($arr_channelinfo['authorid']);
$paymoney = trim($arr_body['paymoney']);
$shoucardno = trim($arr_body['shoucardno']);
//收款卡号
$shoucardmobile = trim($arr_body['shoucardmobile']);
//收款人手机
$shoucardman = trim(u2g($arr_body['shoucardman']));
//收款人姓名
$shoucardbank = trim(u2g($arr_body['shoucardbank']));
//收款银行
$fucardno = trim($arr_body['fucardno']);
//付款卡号
$fucardbank = trim(u2g($arr_body['fucardbank']));
//付款银行
$fucardmobile = trim($arr_body['fucardmobile']);
//付款人手机
$fucardman = trim(u2g($arr_body['fucardman']));
//付款人姓名
$current = trim($arr_body['current']);
//币种
//$paycardid = trim(GetPayCalcuInfo::readpaycardid($arr_body['paycardid'])); //刷卡器设备号
$arr_paycard = GetPayCalcuInfo::readpaycardid($arr_body['paycardid'], $authorid);
//刷卡器设备号
$paycardid = $arr_paycard['paycardid'];
//刷卡器id
$cusid = trim($arr_paycard['cusid']);
//代理商
$paycardkey = trim($arr_paycard['paycardkey']);
//刷卡器key
$payfee = trim($arr_body['payfee']);
//authorid
$money = trim($arr_body['money']);
//币种
$shoucardmemo = trim(u2g($arr_body['shoucardmemo']));
//刷卡器设备号
$sendsms = trim($arr_body['sendsms']);
//authorid
$arriveid = trim($arr_body['arriveid']);
//币种
$paytype = 'suptfmg';
$feebankid = getbankid($shoucardbank);
//获得银行id返回string
CheckPayQuota::readPayQuota($authorid, $paycardid, $paytype, $paymoney);
//调用判断额度使用情况
$arr_feeinfo = GetPayCalcuInfo::readPayFee($authorid, $feebankid, $paymoney, $arriveid, 2, $paytype);
//获取手续费信息返回array
if (is_array($arr_feeinfo)) {
$feemoney = $arr_feeinfo['feemoney'];
}
$paydate = date("Y-m-d H:i:s");
$arrivedate = GetPayCalcuInfo::getfeedate($paydate, $arr_feeinfo['addday']);
$allmoney = round($paymoney + $feemoney, 2);
$payfeedirct = $arr_feeinfo['defeedirct'];
if ($arr_feeinfo['defeedirct'] == 's') {
$bkmoney = $paymoney;
} else {
$bkmoney = $allmoney;
}
$arr_feeinfo['arrivedate'] = $arrivedate;
$arr_feeinfo['paydate'] = $paydate;
$arr_feeinfo['bkmoney'] = $bkmoney;
$arr_feeinfo['payfeedirct'] = $payfeedirct;
$arr_bkinfo = BankPayInfo::bankpayorder($authorid, $paycardid, $bkmoney, $fucardno);
$bkntno = trim($arr_bkinfo['bkntno']);
$arr_feeinfo['sdcrid'] = $sdcrid = trim($arr_bkinfo['sdcrid']);
$sdcrpayfee = substr($arr_bkinfo['sdcrpayfee'], 0, -1);
//银联收取明盛浮动费率
$arr_feeinfo['sdcrpayfeemoney'] = $sdcrpayfeemoney = $bkmoney * $sdcrpayfee / 100 > $arr_bkinfo['minsdcrpayfee'] ? $bkmoney * $sdcrpayfee / 100 : $arr_bkinfo['minsdcrpayfee'];
$arr_feeinfo['bkordernumber'] = $bkorderNumber = $arr_bkinfo['bkorderNumber'];
$ccgno = makeorderno("transfermoneyglist", "tfmglist", "tfs");
$query = "insert into tb_transfermoneyglist(\n\t\t\t\t\t\t\tfd_tfmglist_no\t\t\t,fd_tfmglist_paycardid\t\t,fd_tfmglist_authorid\t,\n\t\t\t\t fd_tfmglist_paydate\t\t,fd_tfmglist_shoucardno\t\t,fd_tfmglist_fucardno\t,\n\t\t\t\t fd_tfmglist_bkntno\t\t,fd_tfmglist_payrq ,fd_tfmglist_paytype ,\n\t\t\t\t fd_tfmglist_current\t\t,fd_tfmglist_paymoney\t\t,fd_tfmglist_payfee\t\t ,\n\t\t\t\t fd_tfmglist_money\t\t,fd_tfmglist_shoucardbank ,fd_tfmglist_shoucardman ,\n\t\t\t\t fd_tfmglist_shoucardmobile,fd_tfmglist_fucardbank\t,fd_tfmglist_fucardmobile,\n\t\t\t\t fd_tfmglist_fucardman ,fd_tfmglist_feebankid ,fd_tfmglist_state ,\t\n\t\t\t\t fd_tfmglist_shoucardmemo,fd_tfmglist_sendsms ,fd_tfmglist_arriveid , \t\n\t\t\t\t fd_tfmglist_arrivedate ,fd_tfmglist_payfeedirct ,fd_tfmglist_bkordernumber," . "fd_tfmglist_sdcrid,fd_tfmglist_sdcrpayfeemoney)values\n\t\t\t\t\t\t ('{$ccgno}'\t\t,'{$paycardid}'\t,'{$authorid}'\t\t,\n\t\t\t\t\t\t '{$paydate}'\t\t,'{$shoucardno}'\t,'{$fucardno}'\t\t,\n\t\t\t\t\t\t '{$bkntno}'\t\t,'01'\t\t\t,'{$paytype}'\t\t\t,\n\t\t\t\t\t\t '{$current}'\t\t,'{$paymoney}'\t,'{$feemoney}'\t\t\t,\n\t\t\t\t\t\t '{$allmoney}'\t\t\t,'{$shoucardbank}','{$shoucardman}'\t\t,\n\t\t\t\t\t\t '{$shoucardmobile}','{$fucardbank}'\t,'{$fucardmobile}'\t,\n\t\t\t\t\t\t '{$fucardman}'\t\t,'{$feebankid}'\t,'0'\t\t\t\t,\n\t\t\t\t\t\t '{$shoucardmemo}'\t,'{$feebankid}' ,'{$arriveid}' , " . "'{$arrivedate}' ,'{$payfeedirct}' ,'{$bkorderNumber}' ,'{$sdcrid}' ,'{$sdcrpayfeemoney}' )";
$db->query($query);
$listid = $db->insert_id();
//$listid = $db->insert_id();
$method = 'in';
$method = u2g($method);
$gettrue = AgentPayglist::insertPayglist($this->reqxmlcontext, $bkntno, $listid, $ccgno, $paytype, $method, $arr_feeinfo);
$arr_message = array("result" => "success", "message" => "获取成功!");
$retcode = "0";
//反馈状态 0 成功 200 自定义错误
$arr_msg['msgbody']['result'] = $arr_message['result'];
$arr_msg['msgbody']['message'] = $arr_message['message'];
$arr_msg['msgbody']['bkntno'] = $bkntno;
$arr_msg['msgbody']['feemoney'] = $feemoney;
$returnvalue = array("msgbody" => $arr_msg['msgbody']);
$returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
return $returnval;
}
示例15: getlogid
public static function getlogid($func, $logmem, $authorid, $returnmem)
{
$db = new DB_test();
$query = "insert into tb_log (fd_log_time ,fd_log_func,fd_log_memo,fd_log_authorid,fd_log_returnmemo)" . " values(now() ,'{$func}' ,'{$logmem}','{$authorid}','{$returnmem}')";
$db->query($query);
$G_logid = $db->insert_id();
return true;
}