-
Notifications
You must be signed in to change notification settings - Fork 0
/
if_get_project.php
35 lines (28 loc) · 904 Bytes
/
if_get_project.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
<?php require_once('config/tank_config.php');
$getjson = file_get_contents('php://input');
$dataarr =json_decode($getjson, true);
$token=$dataarr['token'];
$tab=$dataarr['tab'];
$uid = check_token($token);
if($uid <> 3){
mysql_select_db($database_tankdb, $tankdb);
$query_Recordset_sumtotal = sprintf("SELECT
COUNT(*) as count_prj
FROM tk_project
WHERE project_to_user = %s",
GetSQLValueString($uid, "int")
);
$Recordset_sumtotal = mysql_query($query_Recordset_sumtotal, $tankdb) or die(mysql_error());
$row_Recordset_sumtotal = mysql_fetch_assoc($Recordset_sumtotal);
$my_totalprj=$row_Recordset_sumtotal['count_prj'];
$get_function = project_list( $uid, "project_lastupdate", "DESC", "0", $tab );
$rearr = array(
'summprj'=>$my_totalprj,
'list'=>$get_function
);
$redata = json_encode($rearr);
echo $redata;
} else {
echo 3;
}
?>