From 377d924a67db8b64215c590b2a3ba4ba8dd7eef9 Mon Sep 17 00:00:00 2001 From: Olu Amey Date: Sun, 12 Feb 2023 21:19:40 -0500 Subject: [PATCH] New functions --- public/activejoblist.php | 24 ++++++++++ public/def.php | 4 +- public/index.php | 3 +- public/{test_market.php => market.php} | 0 public/test_activejoblist.php | 62 -------------------------- public/wrenchboard_class.php | 4 ++ 6 files changed, 33 insertions(+), 64 deletions(-) create mode 100644 public/activejoblist.php rename public/{test_market.php => market.php} (100%) delete mode 100644 public/test_activejoblist.php diff --git a/public/activejoblist.php b/public/activejoblist.php new file mode 100644 index 0000000..dae3f59 --- /dev/null +++ b/public/activejoblist.php @@ -0,0 +1,24 @@ + $member_id , + "sessionid" => $session_id , + "limit" => 10, + "page" => "1", + 'action'=>WRENCHBOARD_MOBILE_ACTIVEJOB +); + +$out = array(); +$ret = $wrenchboard->wrenchboard_api($data,$out); + +?> \ No newline at end of file diff --git a/public/def.php b/public/def.php index a5b8210..b35a585 100644 --- a/public/def.php +++ b/public/def.php @@ -45,7 +45,9 @@ define('WRENCHBOARD_GROUP_ACCEPTGROUP', 12020); define('WRENCHBOARD_GROUP_END', 12999); //************************************************************** -define('WRENCHBOARD_CARDS_GETCARDLIST', 40010); +define('WRENCHBOARD_CARDS_GETCARDLIST', 40010); + +define('WRENCHBOARD_MOBILE_ACTIVEJOB', 15020); define('WRENCHBOARD_LOGIN_SHOP', 50501); define('WRENCHBOARD_LOGIN_ADMIN', 50502); diff --git a/public/index.php b/public/index.php index a231d02..8e67a01 100644 --- a/public/index.php +++ b/public/index.php @@ -18,7 +18,8 @@ $dm ="http://localhost:9999/"; $tArr =[ 'login', 'signup', -'userscards' +'userscards', +'activejoblist' ]; echo ""; diff --git a/public/test_market.php b/public/market.php similarity index 100% rename from public/test_market.php rename to public/market.php diff --git a/public/test_activejoblist.php b/public/test_activejoblist.php deleted file mode 100644 index 758ffe6..0000000 --- a/public/test_activejoblist.php +++ /dev/null @@ -1,62 +0,0 @@ - 1, - "sessionid" => "ABCDEFGHIJKLMNOP", - "limit" => 10, - "page" => "1" -); - -$content = json_encode($data); - -$curl = curl_init($url); -curl_setopt($curl, CURLOPT_HEADER, false); -curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); -curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); -curl_setopt($curl, CURLOPT_HTTPHEADER, - array("Content-type" => "application/json")); -curl_setopt($curl, CURLOPT_POST, true); -curl_setopt($curl, CURLOPT_POSTFIELDS, $content); - -$json_response = curl_exec($curl); - -$status = curl_getinfo($curl, CURLINFO_HTTP_CODE); - -if ( $status != 200 ) { - echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl)); -} - -curl_close($curl); - -$response = json_decode($json_response, true); - -//echo "
"; -//var_dump($data); - -//echo "
";
-echo "
";
-echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
-echo "
"; - -//echo "

"; - -echo "
"; - -// saving the session in a file for other call use -$myfile = fopen("fl/sample_session.txt", "w") ; -$txt = $response['sessionid']."\n"; -fwrite($myfile, $txt); -$txt = $response['member_id']."\n"; -fwrite($myfile, $txt); -fclose($myfile); - - -echo highlight_string(file_get_contents(__FILE__)); -?> diff --git a/public/wrenchboard_class.php b/public/wrenchboard_class.php index 8e9dc69..6dd02f2 100644 --- a/public/wrenchboard_class.php +++ b/public/wrenchboard_class.php @@ -71,6 +71,10 @@ $pathName = ''; $pathName = 'startjoblist'; break; + case WRENCHBOARD_MOBILE_ACTIVEJOB: + $pathName = 'activejoblist'; + break; + } return $pathName; }