You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
482 B
31 lines
482 B
5 years ago
|
<?php
|
||
|
header("Access-Control-Allow-Origin: *");
|
||
|
|
||
|
include '/home/yimian/www/settlement/func/functions.php';
|
||
|
|
||
|
if(!isset($_REQUEST['usr'])){
|
||
|
die();
|
||
|
}
|
||
|
|
||
|
$usr = $_REQUEST['usr'];
|
||
|
|
||
|
$conn = db__connect();
|
||
|
$total_arr = db__getData($conn, 'current', "status", "0");
|
||
|
|
||
|
$fin = Array();
|
||
|
|
||
|
foreach($total_arr as $item){
|
||
|
if($item['usr_to'] == $usr || $item['usr_from'] == $usr){
|
||
|
array_push($fin, $item);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
echo json_encode(array(
|
||
|
"code" => 200,
|
||
|
"data" => $fin
|
||
|
));
|
||
|
|
||
|
|
||
|
|