日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > php >内容正文

php

center.php,mycenter.php

發(fā)布時(shí)間:2025/3/15 php 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 center.php,mycenter.php 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

/**

* Created by PhpStorm.

* User: Administrator

* Date: 2015/8/25

* Time: 15:16

* mycenter.php

* 接口功能:

* 我的

* tshouru 今天收入

* yshouru 昨天收入

* zhichu 支出

* tel 其他聯(lián)系方式

* customer_alias 用戶姓名

* charge 余額

*

* 參數(shù):

* 無

* 成功:

* {"status":1,"info":獲取成功,"content":{"tshouru":300,"yshouru":20,"zhichu":50}}

*

*

* 失敗:

*

*

*

*/

require_once './dbconnect_utf.php';

$token=$_SERVER['HTTP_TOKEN'];

$token=base64_decode($token);

$tokenArr=explode("|",$token);

$uid=$tokenArr[3]?$tokenArr[3]:3433;

$info=getcustomerinfo($uid);

$charge=getcustomercharge($uid);

$yestoday=date('Y-m-d',strtotime('-1 days'));

echo $yestoday;

$tshouru=gettshouru($uid);

$yshouru=gettshouru($uid);

$isshouxin=getinfo($uid);//1:申請(qǐng)中 2:已同意 3:已拒絕 0申請(qǐng)中 1.可以授信

$temp=array("tshouru"=>300.00,"yshouru"=>20.00,"zhichu"=>50.00,"customer_alias"=>$info['customer_alias'],"yaoqingma"=>$info['yaoqinma'],"tel"=>$info['tel'],"charge"=>$charge?$charge:0,"isshouxin"=>$isshouxin);

$date=array("status"=>1,"info"=>"成功","content"=>$temp);

echo json_encode($date);

function getinfo($uid){

$sql=sprintf("select * from credit_apply where apply_uid=%d",$uid);

//echo $sql;

$q=mysql_query($sql);

while($r=mysql_fetch_array($q)){

if($r['status']==1){

$result=0;

break;

}else{

$result=1;

}

}

return $result;

}

function getcustomerinfo($uid){

$sql=sprintf("select * from blog_express_customer where customer_id=%d",$uid);

//echo $sql;

$q=mysql_query($sql);

$r=mysql_fetch_array($q);

return $r;

}

function getcustomercharge($uid){

$sql=sprintf("select * from mall_charge where uid=%d",$uid);

$q=mysql_query($sql);

$r=mysql_fetch_array($q);

return $r['totalnum'];

}

function gettshouru($uid,$nowdate=""){

if($nowdate){

$today_start = strtotime($nowdate." 00:00:00");

$today_end = strtotime($nowdate." 23:59:59");

}else{

$today = date('Y-m-d',time());

$today_start = strtotime($today." 00:00:00");

$today_end = time();

}

$where="and create_time >$today_start and create_time< $today_end ";

$sql="select FROM_UNIXTIME(create_time, '%Y-%m-%d' ) as time,sum(money) as money from mall_count_water where uid=$uid and (come_way=4 or come_way=5 or come_way=1) $where GROUP BY time order by time DESC ";

$q=mysql_query($sql);

$result=mysql_fetch_array($q);

return $result['money'];

}

一鍵復(fù)制

編輯

Web IDE

原始數(shù)據(jù)

按行查看

歷史

總結(jié)

以上是生活随笔為你收集整理的center.php,mycenter.php的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。