From 35cfb9edd345cfe36cde8f2585d511e356a55818 Mon Sep 17 00:00:00 2001 From: Olu Amey Date: Mon, 13 Feb 2023 14:16:44 -0500 Subject: [PATCH] Wallet --- public/def.php | 135 ++++++++++++++++++++++++++++++++--- public/index.php | 14 ++-- public/startjoblist.php | 2 +- public/wallet.php | 22 ++++++ public/wrenchboard_class.php | 34 ++++++++- 5 files changed, 190 insertions(+), 17 deletions(-) create mode 100644 public/wallet.php diff --git a/public/def.php b/public/def.php index b35a585..8c97f55 100644 --- a/public/def.php +++ b/public/def.php @@ -1,16 +1,50 @@ "; foreach($tArr as $rr){ + $i++; $urlS = $dm.$rr[0].".php"; - echo "22".$urlS ."".$rr[1].""; + echo "$i".$urlS ."".$rr[1].""; } echo ""; diff --git a/public/startjoblist.php b/public/startjoblist.php index a25dd85..f04ee5e 100644 --- a/public/startjoblist.php +++ b/public/startjoblist.php @@ -12,7 +12,7 @@ fclose($myfile); $data = array( "limit" => 10, "page" => "1", - 'action' => WRENCHBOARD_CARDS_GETCARDLIST, + 'action' => WRENCHBOARD_START_JOBLIST, ); $out = array(); $ret = $wrenchboard->wrenchboard_api($data,$out); diff --git a/public/wallet.php b/public/wallet.php new file mode 100644 index 0000000..fdb9426 --- /dev/null +++ b/public/wallet.php @@ -0,0 +1,22 @@ + $member_id , + "sessionid" => $session_id , + 'action'=>WRENCHBOARD_ACCOUNT_WALLETS +); + +$out = array(); +$ret = $wrenchboard->wrenchboard_api($data,$out); + +?> \ No newline at end of file diff --git a/public/wrenchboard_class.php b/public/wrenchboard_class.php index 6dd02f2..7beec6b 100644 --- a/public/wrenchboard_class.php +++ b/public/wrenchboard_class.php @@ -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; "; + //$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 = ''; + foreach ($myHeaders as $hd){ + $tableHead .= "".$hd.""; + } + $tableHead .= ''; + + $tableBody = ''; + foreach ($arr as $item) { + $tableBody .= ''; + $backColor ='white'; + foreach ($myHeaders as $hd){ + $backColor = ($backColor=='aliceblue')?'white': 'aliceblue'; + $tableBody .= "".$item[$hd].""; + } + $tableBody .= ''; + } + + echo "".$tableHead.$tableBody."
"; + } } }