forked from xserve98/xmweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
leftDao.php
48 lines (36 loc) · 1.2 KB
/
leftDao.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
session_start();
header('Content-type: text/json; charset=utf-8');
include_once("include/mysqli.php");
include_once("include/mysqlis.php");
include_once("common/logintu.php");
include_once("include/config.php");
$uid = @$_SESSION["uid"];
$callback = $_GET['callback'];
$md = date("m-d");
//sessionNum($uid,4,$callback);
//$tz_money= $user_num = $user_money = 0; //投注
//投注金额
if($uid && $uid>0){ //已登陆
$sql = "select sum(money) as s from c_bet where uid=$uid and js=0"; //获取帐号未结算
$query = $mysqli->query($sql);
$rs = $query->fetch_array();
$tz_money += $rs['s'];
$sql = "select count(*) as s from k_user_msg where uid=$uid and islook=0"; //未查看消息
$query = $mysqli->query($sql);
$rs = $query->fetch_array();
$user_num = $rs['s'];
$sql = "select money as s,jifen from k_user where uid=$uid limit 1";
$query = $mysqli->query($sql);
$rs = $query->fetch_array();
$user_money = sprintf("%.2f",$rs['s']);
$jifen = $rs['jifen'];
}
unset($mysqlis);
$json['tz_money'] = $tz_money;
$json['user_money'] = $user_money;
$json['jifen'] = $jifen;
$json['user_num'] = $user_num;
echo $callback."(".json_encode($json).");";
exit;
?>