Wallet
This commit is contained in:
@@ -74,6 +74,13 @@ $pathName = '';
|
||||
case WRENCHBOARD_MOBILE_ACTIVEJOB:
|
||||
$pathName = 'activejoblist';
|
||||
break;
|
||||
case WRENCHBOARD_ACCOUNT_WALLETS:
|
||||
$pathName ='getwallets';
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_START_JOBLIST:
|
||||
$pathName="startjoblist";
|
||||
break;
|
||||
|
||||
}
|
||||
return $pathName;
|
||||
@@ -104,7 +111,7 @@ return $pathName;
|
||||
|
||||
curl_close($curl);
|
||||
$response = json_decode($json_response, true);
|
||||
$this->showResult($url, $in, $response);
|
||||
$this->showResult($url, $in, $response);
|
||||
$out = $response;
|
||||
return $response["internal_return"];
|
||||
}
|
||||
@@ -119,6 +126,31 @@ return $pathName;
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>";
|
||||
//$response['result_list']
|
||||
if ( isset($out['result_list']) && is_array($out['result_list']) && count($out['result_list']) > 0 ){
|
||||
$arr = $out['result_list'];
|
||||
$myHeaders = array_keys($arr[0]);
|
||||
|
||||
var_dump( $myHeaders);
|
||||
$tableHead = '<tr>';
|
||||
foreach ($myHeaders as $hd){
|
||||
$tableHead .= "<th>".$hd."</th>";
|
||||
}
|
||||
$tableHead .= '</tr>';
|
||||
|
||||
$tableBody = '';
|
||||
foreach ($arr as $item) {
|
||||
$tableBody .= '<tr>';
|
||||
$backColor ='white';
|
||||
foreach ($myHeaders as $hd){
|
||||
$backColor = ($backColor=='aliceblue')?'white': 'aliceblue';
|
||||
$tableBody .= "<td style='background-color:$backColor'>".$item[$hd]."</td>";
|
||||
}
|
||||
$tableBody .= '</tr>';
|
||||
}
|
||||
|
||||
echo "<table>".$tableHead.$tableBody."</table>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user