diff --git a/public/myfit/CONFIGURE.php b/public/myfit/CONFIGURE.php
index a4dcfe2..fa07ecc 100644
--- a/public/myfit/CONFIGURE.php
+++ b/public/myfit/CONFIGURE.php
@@ -5,6 +5,33 @@ $member_id = fgets($myfile);
$guid = fgets($myfile);
fclose($myfile);
+$sampleAcc = [
+ "ses66181+merms6214@gmail.com",
+ "ses66181+merms6358@gmail.com",
+ "ses66181+merms6357@gmail.com",
+ "ses66181+merms7490@gmail.com",
+ "ses66181+merms6578@gmail.com",
+ "ses66181+merms3966@gmail.com",
+ "ses66181+fake001gmail.com",
+ "ses66181+merms8439@gmail.com",
+ "ses66181+merms3573@gmail.com",
+ "ses66181+merms2433@gmail.com",
+ "ses66181+merms9389@gmail.com",
+ "ses66181+merms4500@gmail.com",
+ "ses66181+merms6961@gmail.com",
+ "ses66181+merms6917@gmail.com",
+ "ses66181+merms2512@gmail.com",
+ "ses66181+merms3893@gmail.com",
+ "ses66181+merms2553@gmail.com",
+ "ses66181+merms1040@gmail.com",
+ "ses66181+merms3960@gmail.com",
+ "ses66181+merms1842@gmail.com",
+ "ses66181+merms2776@gmail.com",
+ "ses66181+merms6864@gmail.com",
+ "ses66181+merms4092@gmail.com",
+ "ses66181+merms8455@gmail.com"];
+
+
// Find a randomDate between $start_date and $end_date
function randomDate($start_date, $end_date)
{
diff --git a/public/myfit/calendar.php b/public/myfit/calendar.php
new file mode 100644
index 0000000..b15c411
--- /dev/null
+++ b/public/myfit/calendar.php
@@ -0,0 +1,25 @@
+myfit_api("calendar",$data,$out);
+
+$myfit_class->showOutResult($out);
+
+echo "INPUT
";
+var_dump($data);
+
+echo "OUTPUT ";
+var_dump($out);
+
+echo highlight_string(file_get_contents(__FILE__));
\ No newline at end of file
diff --git a/public/myfit/index.php b/public/myfit/index.php
index ae7e6c7..4d7c70b 100644
--- a/public/myfit/index.php
+++ b/public/myfit/index.php
@@ -19,7 +19,18 @@ $tArr =[
['login','What are you for really *******'],
['tracking_weight','What are you for really *******'],
['tracking_blood_pressure','What are you for really *******'],
- ['tracking_history','This is a sample call for tracking history']
+ ['tracking_history','This is a sample call for tracking history'],
+ ['loginhx','Login History'],
+ ['signup','Create new Account'],
+ ['signup_code','Temporary to give the sign up codes'],
+ ['signup_complete','Complete Signup'],
+ ['resetpass','Reset Password'],
+ ['resetpass_code','Temporary to give the resetpass up codes'],
+ ['resetpass_verify','Verify Reset Password'],
+ ['resetpass_complete','Verify Reset Password'],
+ ['test_email','TEST EMAIL'],
+ ['profile_resetpass','Reset Password in a user account'],
+ ['calendar','Get Calendar Data']
];
diff --git a/public/myfit/login.php b/public/myfit/login.php
index 4ea3d82..b146347 100644
--- a/public/myfit/login.php
+++ b/public/myfit/login.php
@@ -4,9 +4,9 @@ include 'myfit_class.php';
$myfit_class = new myfit_class();
- // $email = 'ameye@chiefsoft.com';
- $email = 'ses66181+merms8455@gmail.com';
- $email = 'ses66181+merms6214@gmail.com';
+ $email = 'ameye@chiefsoft.com';
+ // $email = 'ses66181+merms8455@gmail.com';
+ // $email = 'ses66181+merms6214@gmail.com';
$data['username'] = $email;
@@ -17,7 +17,9 @@ $myfit_class = new myfit_class();
$out = array();
$ret = $myfit_class->myfit_api("login",$data,$out);
-if ($out['session_token'] != ''){
+if (is_array($out)
+ && array_key_exists('session_token',$out)
+ && $out['session_token'] != '') {
echo 'Save the session for other use - you will need it';
$myfile = fopen("../../writable/myfit_session.txt", "w") or die("Unable to open file!");
fwrite($myfile, $out['session_token']);
diff --git a/public/myfit/loginhx.php b/public/myfit/loginhx.php
new file mode 100644
index 0000000..65745c0
--- /dev/null
+++ b/public/myfit/loginhx.php
@@ -0,0 +1,22 @@
+myfit_get_api("loginhx",$data,$out);
+
+$myfit_class->showOutResult($out);
+
+var_dump($data);
+var_dump($out);
+
+echo highlight_string(file_get_contents(__FILE__));
\ No newline at end of file
diff --git a/public/myfit/myfit_class.php b/public/myfit/myfit_class.php
index 471db4e..51d46e8 100644
--- a/public/myfit/myfit_class.php
+++ b/public/myfit/myfit_class.php
@@ -6,6 +6,9 @@ class myfit_class{
public $REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit";
public $REACT_APP_USERS_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser";
+// public $REACT_APP_AUX_ENDPOINT = "https://api.mermsemr.com/en/desktop/api/v2/myfit";
+// public $REACT_APP_USERS_ENDPOINT = "https://api.mermsemr.com/en/desktop/api/v2/myfituser";
+
function __construct() {
}
@@ -40,6 +43,7 @@ class myfit_class{
curl_close($curl);
$response = json_decode($json_response, true);
$this->showResult($url, $in, $response);
+ var_dump($response);
$out = $response;
return $response;
}
@@ -76,6 +80,7 @@ class myfit_class{
$out = $response;
return $response;
}
+
public function showResult($url, $in,$out){
$inHeaders = array_keys($in);
diff --git a/public/myfit/profile_resetpass.php b/public/myfit/profile_resetpass.php
new file mode 100644
index 0000000..e35d664
--- /dev/null
+++ b/public/myfit/profile_resetpass.php
@@ -0,0 +1,26 @@
+myfit_api("resetpass-profile",$data,$out);
+echo "INPUT ";
+
+print_r($data);
+var_dump($data);
+
+echo "OUTPUT ";
+print_r($out);
+var_dump($out);
+$myfit_class->showOutResult($out);
+
+echo highlight_string(file_get_contents(__FILE__));
\ No newline at end of file
diff --git a/public/myfit/resetpass.php b/public/myfit/resetpass.php
new file mode 100644
index 0000000..8dba53b
--- /dev/null
+++ b/public/myfit/resetpass.php
@@ -0,0 +1,29 @@
+myfit_api("resetpass",$data,$out);
+echo " ";
+var_dump($data);
+echo " ";
+var_dump($out);
+$myfit_class->showOutResult($out);
+
+echo highlight_string(file_get_contents(__FILE__));
+
+
diff --git a/public/myfit/resetpass_code.php b/public/myfit/resetpass_code.php
new file mode 100644
index 0000000..3775218
--- /dev/null
+++ b/public/myfit/resetpass_code.php
@@ -0,0 +1,16 @@
+myfit_api("resetpass-code",$data,$out);
+var_dump($out);
+$myfit_class->showOutResult($out);
+
+echo highlight_string(file_get_contents(__FILE__));
diff --git a/public/myfit/resetpass_complete.php b/public/myfit/resetpass_complete.php
new file mode 100644
index 0000000..1c6e8c4
--- /dev/null
+++ b/public/myfit/resetpass_complete.php
@@ -0,0 +1,31 @@
+ 'ses66181+merms2433@gmail.com',
+'reset_uuid' => '0b84822f-877c-4835-b42c-3ce8f801638e',
+'random_text' => '486891',
+'member_uid' => '8fc3bfb9-d9b6-4681-8533-5cefb72ec97f',
+'new_password' => 'mermsnewpass',
+'stage' => CONFIRM_PASS_CHANGE
+];
+
+$out = array();
+$ret = $myfit_class->myfit_api("resetpass",$data,$out);
+echo " INPUT ";
+var_dump($data);
+echo " OUTPUT ";
+var_dump($out);
+$myfit_class->showOutResult($out);
+
+echo highlight_string(file_get_contents(__FILE__));
+
+
diff --git a/public/myfit/resetpass_verify.php b/public/myfit/resetpass_verify.php
new file mode 100644
index 0000000..d4086e7
--- /dev/null
+++ b/public/myfit/resetpass_verify.php
@@ -0,0 +1,29 @@
+ 'ses66181+merms2433@gmail.com',
+'reset_uuid' => '0b84822f-877c-4835-b42c-3ce8f801638e',
+'random_text' => '486891',
+'stage' => CONFIRM_PASS_PIN
+];
+
+$out = array();
+$ret = $myfit_class->myfit_api("resetpass",$data,$out);
+echo " INPUT ";
+var_dump($data);
+echo " OUTPUT ";
+var_dump($out);
+$myfit_class->showOutResult($out);
+
+echo highlight_string(file_get_contents(__FILE__));
+
+
diff --git a/public/myfit/signup.php b/public/myfit/signup.php
new file mode 100644
index 0000000..2b2e40e
--- /dev/null
+++ b/public/myfit/signup.php
@@ -0,0 +1,23 @@
+$email,
+ 'email'=>$email,
+ 'password'=>'mermsemr',
+ 'firstname'=>"lirstname".rand(100,999),
+ 'lastname'=>"lastname".rand(100,999),
+ 'mode' => 'START'
+];
+$out = array();
+$ret = $myfit_class->myfit_api("account",$data,$out);
+
+echo " INPUT INTO API \n ";
+print_r($data);
+echo " RETURN FROM API \n ";
+print_r($out);
+
+echo highlight_string(file_get_contents(__FILE__));
diff --git a/public/myfit/signup_code.php b/public/myfit/signup_code.php
new file mode 100644
index 0000000..cee105f
--- /dev/null
+++ b/public/myfit/signup_code.php
@@ -0,0 +1,17 @@
+myfit_api("signup-code",$data,$out);
+var_dump($out);
+$myfit_class->showOutResult($out);
+
+echo highlight_string(file_get_contents(__FILE__));
diff --git a/public/myfit/signup_complete.php b/public/myfit/signup_complete.php
new file mode 100644
index 0000000..fe36031
--- /dev/null
+++ b/public/myfit/signup_complete.php
@@ -0,0 +1,24 @@
+'jubaworker+7202@gmail.com',
+ 'pend_uid'=>'633d988f-f771-4400-ad88-e5cd06c4fccd',
+ 'random_text'=>"1005455",
+ 'mode' => 'VERIFY'
+];
+$out = array();
+$ret = $myfit_class->myfit_api("account",$data,$out);
+
+echo " INPUT INTO API \n ";
+print_r($data);
+var_dump($data);
+echo " RETURN FROM API \n ";
+print_r($out);
+var_dump($out);
+echo " ---- \n ";
+
+echo highlight_string(file_get_contents(__FILE__));
+
diff --git a/public/myfit/test_email.php b/public/myfit/test_email.php
new file mode 100644
index 0000000..278b5ad
--- /dev/null
+++ b/public/myfit/test_email.php
@@ -0,0 +1,17 @@
+myfit_api("test-email",$data,$out);
+var_dump($data);
+var_dump($out);
+
+echo highlight_string(file_get_contents(__FILE__));
\ No newline at end of file
diff --git a/public/myfit/tracking_blood_pressure.php b/public/myfit/tracking_blood_pressure.php
index c69f3e7..e5ee2ac 100644
--- a/public/myfit/tracking_blood_pressure.php
+++ b/public/myfit/tracking_blood_pressure.php
@@ -20,6 +20,10 @@ $data['event_time'] = randomDate('2023-02-01 00:29', '2023-02-28 22:29');
$out = array();
-var_dump($data);
-$ret = $myfit_class->myfit_api("tracking",$data,$out);
+
+$ret = $myfit_class->myfit_api("tracking",$data,$out);
+var_dump($data);
+var_dump($out);
+
+echo highlight_string(file_get_contents(__FILE__));
diff --git a/public/myfit/tracking_weight.php b/public/myfit/tracking_weight.php
index 0475ce0..702c2a4 100644
--- a/public/myfit/tracking_weight.php
+++ b/public/myfit/tracking_weight.php
@@ -12,10 +12,12 @@ $data['sessionid'] = $session_token;
$data['code'] = 'WEIGT';
$data['unit'] = 'KG';
$data['val1'] = 135 + rand(0,12);
-//$data['event_time'] = '2023-02-18 03:37';
-//$data['event_time'] = randomDateInRange(strtotime('2023-02-01 00:29'), strtotime('2023-02-28 22:29'));
$data['event_time'] = randomDate('2023-02-01 00:29', '2023-02-28 22:29');
$out = array();
$ret = $myfit_class->myfit_api("tracking",$data,$out);
+
+var_dump($data);
+var_dump($out);
+echo highlight_string(file_get_contents(__FILE__));
\ No newline at end of file
diff --git a/public/signup.php b/public/signup.php
index 8d40e0c..d2218c5 100644
--- a/public/signup.php
+++ b/public/signup.php
@@ -21,6 +21,10 @@ $wrenchboard = new wrenchboard_class();
$out = array();
$ret = $wrenchboard->wrenchboard_api($data,$out);
- // print_r($out);
- // var_dump($ret);
+ echo " INPUT ";
+ var_dump($data);
+ echo " OUTPUT ";
+ var_dump($out);
+ echo highlight_string(file_get_contents(__FILE__));
+
?>
diff --git a/public/wrenchboard/accounttypes.php b/public/wrenchboard/accounttypes.php
new file mode 100644
index 0000000..758b07c
--- /dev/null
+++ b/public/wrenchboard/accounttypes.php
@@ -0,0 +1,17 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ 'action'=>WRENCHBOARD_ACCOUNT_ACCOUNT_TYPES
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/addrecipient.php b/public/wrenchboard/addrecipient.php
new file mode 100644
index 0000000..405de00
--- /dev/null
+++ b/public/wrenchboard/addrecipient.php
@@ -0,0 +1,25 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "firstname" => "Firstn",
+ "lastname" => "Lastn",
+ "bank_code"=>"033",
+ "account_no" => '1234567890',
+ "account_type" => 1,
+ "country" => 'NG',
+ "state" => 'Lagos',
+ "city" => 'Lagos',
+ 'accitytion'=>WRENCHBOARD_ACCOUNT_ADD_RECIPEINT
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out,'addrecipient');
+
+?>
diff --git a/public/wrenchboard/completesignuplink.php b/public/wrenchboard/completesignuplink.php
new file mode 100644
index 0000000..73edad6
--- /dev/null
+++ b/public/wrenchboard/completesignuplink.php
@@ -0,0 +1,19 @@
+ 'STARTER-NOTREAL' ,
+ 'username' => 'username@username',
+ "verify_link" => 'jsjsjsjsjsjsjsjsjsjsjsjs',
+ "password" => 'WHATPASS',
+ "login_mode" => "WEB",
+ 'action'=>WRENCHBOARD_COMPLETE_MOBILEUSER
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out,'completesignuplink');
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/countrybanks.php b/public/wrenchboard/countrybanks.php
new file mode 100644
index 0000000..7bef334
--- /dev/null
+++ b/public/wrenchboard/countrybanks.php
@@ -0,0 +1,18 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "country" => 'NG',
+ 'action'=>WRENCHBOARD_ACCOUNT_COUNTRY_BANKS
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/couponhx.php b/public/wrenchboard/couponhx.php
new file mode 100644
index 0000000..cc71e9e
--- /dev/null
+++ b/public/wrenchboard/couponhx.php
@@ -0,0 +1,19 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "limit" => 20,
+ "page" => 1,
+ 'action'=>WRENCHBOARD_COUPON_MEMLIST
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/def.php b/public/wrenchboard/def.php
new file mode 100644
index 0000000..454f902
--- /dev/null
+++ b/public/wrenchboard/def.php
@@ -0,0 +1,277 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "limit" => 20,
+ "page" => 1,
+ 'action'=>WRENCHBOARD_ACCOUNT_PENDJOB
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/homebanners.php b/public/wrenchboard/homebanners.php
new file mode 100644
index 0000000..9401e61
--- /dev/null
+++ b/public/wrenchboard/homebanners.php
@@ -0,0 +1,17 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ 'action'=>WRENCHBOARD_ACCOUNT_HOMEBANNERS
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out,'homebanners');
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/index.php b/public/wrenchboard/index.php
new file mode 100644
index 0000000..a3e159d
--- /dev/null
+++ b/public/wrenchboard/index.php
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+ WrenchBoard API Test POINT
+
+
+ WrenchBoard!
+ ";
+foreach($tArr as $rr){
+ $i++;
+ $urlS = $dm.$rr[0].".php";
+ $docU = $dm.$rr[2];
+ echo "$i ".$urlS ." ".$rr[1]."
+ ".$docU ." ";
+}
+
+echo "";
+
+//foreach ($_SERVER as $parm => $value) echo "$parm = '$value'\n";
+
+?>
+
+
+
+
+
+
+
+
diff --git a/public/wrenchboard/jobmanagerlist.php b/public/wrenchboard/jobmanagerlist.php
new file mode 100644
index 0000000..392441d
--- /dev/null
+++ b/public/wrenchboard/jobmanagerlist.php
@@ -0,0 +1,19 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "limit" => 30,
+ "offset" => 0,
+ 'action'=>WRENCHBOARD_JOB_LISTJOBS
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/loadprofile.php b/public/wrenchboard/loadprofile.php
new file mode 100644
index 0000000..4093393
--- /dev/null
+++ b/public/wrenchboard/loadprofile.php
@@ -0,0 +1,17 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ 'action'=>WRENCHBOARD_MOBILE_LOADPROFILE
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/login.php b/public/wrenchboard/login.php
new file mode 100644
index 0000000..286e684
--- /dev/null
+++ b/public/wrenchboard/login.php
@@ -0,0 +1,33 @@
+wrenchboard_api($data,$out);
+
+
+echo "=========================================================.....======================================";
+var_dump($out);
+
+if ($out['internal_return'] == 100){
+ echo 'Save the session for other use - you will need it';
+ $myfile = fopen("../../writable/wrench_session.txt", "w") or die("Unable to open file!");
+ fwrite($myfile, $out['session']);
+ fwrite($myfile, "\n");
+ fwrite($myfile, $out['member_id']);
+ fwrite($myfile, "\n");
+ fwrite($myfile, $out['uid']);
+ fclose($myfile);
+}
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/offerslist.php b/public/wrenchboard/offerslist.php
new file mode 100644
index 0000000..0d784c6
--- /dev/null
+++ b/public/wrenchboard/offerslist.php
@@ -0,0 +1,19 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "limit" => 20,
+ "page" => 1,
+ 'action'=>WRENCHBOARD_MOBILE_OFFERSLIST
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/paymenthx.php b/public/wrenchboard/paymenthx.php
new file mode 100644
index 0000000..53bebcc
--- /dev/null
+++ b/public/wrenchboard/paymenthx.php
@@ -0,0 +1,19 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "limit" => 20,
+ "page" => 1,
+ 'action'=>WRENCHBOARD_MOBILE_PAYMENTHX
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/profilepasschange.php b/public/wrenchboard/profilepasschange.php
new file mode 100644
index 0000000..87e9e06
--- /dev/null
+++ b/public/wrenchboard/profilepasschange.php
@@ -0,0 +1,19 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "current_pass" => "valid_current_pass",
+ "new_pass" => "valid_new_pass",
+ 'action'=>WRENCHBOARD_PROFILE_RESETPASS
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out,"profilepasschange");
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/purchasehx.php b/public/wrenchboard/purchasehx.php
new file mode 100644
index 0000000..2282d8b
--- /dev/null
+++ b/public/wrenchboard/purchasehx.php
@@ -0,0 +1,19 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "limit" => 20,
+ "page" => 1,
+ 'action'=>WRENCHBOARD_MOBILE_PURCHASEHX
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/recipients.php b/public/wrenchboard/recipients.php
new file mode 100644
index 0000000..e960428
--- /dev/null
+++ b/public/wrenchboard/recipients.php
@@ -0,0 +1,19 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "limit" => 20,
+ "page" => 1,
+ 'action'=>WRENCHBOARD_ACCOUNT_USER_RECIPEINT
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/refferhx.php b/public/wrenchboard/refferhx.php
new file mode 100644
index 0000000..cfbd0f0
--- /dev/null
+++ b/public/wrenchboard/refferhx.php
@@ -0,0 +1,19 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "limit" => 20,
+ "offset" => 1,
+ 'action'=>WRENCHBOARD_ACCOUNT_REFFERHX
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/sendmoney.php b/public/wrenchboard/sendmoney.php
new file mode 100644
index 0000000..9be5bfd
--- /dev/null
+++ b/public/wrenchboard/sendmoney.php
@@ -0,0 +1,27 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "senderid" => $member_id,
+ "amount" => $amount,
+ "Fee" => $fee,
+ "recipientid" => $recp[rand(0,3)],
+ 'action'=>WRENCHBOARD_SMONEY_MEMBER
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out,'sendmoney');
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/sendmoneyfee.php b/public/wrenchboard/sendmoneyfee.php
new file mode 100644
index 0000000..ac2ad01
--- /dev/null
+++ b/public/wrenchboard/sendmoneyfee.php
@@ -0,0 +1,18 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ "amount" => rand(10,10000),
+ 'action'=>WRENCHBOARD_SMONEY_PROCFEE
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/sendreferral.php b/public/wrenchboard/sendreferral.php
new file mode 100644
index 0000000..8df70f7
--- /dev/null
+++ b/public/wrenchboard/sendreferral.php
@@ -0,0 +1,20 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ 'action'=>WRENCHBOARD_ACCOUNT_SENDREFER,
+ 'ref_firstname' => 'Reffirst'.rand(10,99),
+ 'ref_lastname' => 'Reflast'.rand(10,99),
+ 'ref_email' => 'ameye+'.rand(100,999).'@chiefsoft.com'
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/session_read.php b/public/wrenchboard/session_read.php
new file mode 100644
index 0000000..f5d9ad4
--- /dev/null
+++ b/public/wrenchboard/session_read.php
@@ -0,0 +1,6 @@
+wrenchboard_api($data,$out);
+ echo " INPUT ";
+ var_dump($data);
+ echo " OUTPUT ";
+ var_dump($out);
+ echo highlight_string(file_get_contents(__FILE__));
+
+?>
diff --git a/public/wrenchboard/signupcountry.php b/public/wrenchboard/signupcountry.php
new file mode 100644
index 0000000..2e36894
--- /dev/null
+++ b/public/wrenchboard/signupcountry.php
@@ -0,0 +1,18 @@
+ 10,
+ "page" => "1",
+ 'action' => 1200021,
+);
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+
+//echo highlight_string(file_get_contents(__FILE__));
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/startresetpasword.php b/public/wrenchboard/startresetpasword.php
new file mode 100644
index 0000000..11da01d
--- /dev/null
+++ b/public/wrenchboard/startresetpasword.php
@@ -0,0 +1,15 @@
+ $reset_email ,
+ 'action'=>WRENCHBOARD_RESET_PASSWORD
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/updateprofile.php b/public/wrenchboard/updateprofile.php
new file mode 100644
index 0000000..d311299
--- /dev/null
+++ b/public/wrenchboard/updateprofile.php
@@ -0,0 +1,22 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ 'action'=>WRENCHBOARD_MOBILE_UPDATEPROFILE,
+ "firstname" =>'First'.rand(10,100),
+ "lastname" =>'Last'.rand(20,200),
+ "email" =>'ses66181+new'.rand(0,100)."@gmail.com",
+ "state" =>'Georgia',
+ "city" =>'Atlanta'.rand(0,100),
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/verifysignuplink.php b/public/wrenchboard/verifysignuplink.php
new file mode 100644
index 0000000..32d0806
--- /dev/null
+++ b/public/wrenchboard/verifysignuplink.php
@@ -0,0 +1,17 @@
+ $verify_link ,
+ 'action'=>WRENCHBOARD_VERIFY_PENDING_LINK
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/wallet.php b/public/wrenchboard/wallet.php
new file mode 100644
index 0000000..098c889
--- /dev/null
+++ b/public/wrenchboard/wallet.php
@@ -0,0 +1,17 @@
+ $member_id ,
+ "sessionid" => $session_id ,
+ "uid" => $uid,
+ 'action'=>WRENCHBOARD_ACCOUNT_WALLETS
+);
+
+$out = array();
+$ret = $wrenchboard->wrenchboard_api($data,$out);
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard/wrenchboard_class.php b/public/wrenchboard/wrenchboard_class.php
new file mode 100644
index 0000000..04eb911
--- /dev/null
+++ b/public/wrenchboard/wrenchboard_class.php
@@ -0,0 +1,235 @@
+ array('POST'),
+ 'generics' => array('POST'),
+ 'createuser' => array('POST'),
+ 'createmobileuser' => array('POST'),
+ 'completemobileuser' => array('POST'),
+ 'startresetpasword' => array('POST'),
+ 'userlogin' => array('POST'),
+ 'startjoblist' => array('POST'),
+ 'dashdata' => array('POST'),
+ 'getjobsdata' => array('POST'),
+ 'offerslist' => array('POST'),
+ 'activejoblist' => array('POST'),
+ 'loadprofile' => array('POST'),
+ 'account' => array('POST'),
+ 'message' => array('POST'),
+ 'pendingjob' => array('POST'),
+ 'paymenthx' => array('POST'),
+ 'getjob' => array('POST'),
+ 'mybanklist' => array('POST'),
+ 'sendmoney' => array('POST'),
+ 'sendinterest' => array('POST'),
+ 'sendmoneyfee' => array('POST'),
+ 'getpendingjobs' => array('POST'),
+ 'taskmessage' => array('POST'),
+ 'sendtaskmessage' => array('POST'),
+ 'getwallets' => array('POST'),
+ 'sitecontact' => array('POST'),
+ 'signupcountry' => array('POST'),
+ 'userscards' => array('POST'),
+ 'blogdata' => array('POST'),
+ 'blogitem' => array('POST'),
+ 'couponhx' => array('POST'),
+ 'couponpending' => array('POST'),
+ 'couponredeem' => array('POST'),
+ 'sendinterestmessage' => array('POST'),
+ 'replyinterestmessage' => array('POST')
+);
+
+*/
+
+private function baseUrlPath($in)
+{
+$pathName = '';
+ switch ($in['action']) {
+ case WRENCHBOARD_ACCOUNT_LOGIN:
+ $pathName = 'userlogin';
+ break;
+ case WRENCHBOARD_ACCOUNT_PENDING:
+ $pathName = 'createuser';
+ break;
+
+ case WRENCHBOARD_CARDS_GETCARDLIST:
+ $pathName = 'userscards';
+ break;
+
+ case WRENCHBOARD_CARDS_GETCARDLIST:
+ $pathName = 'startjoblist';
+ break;
+
+ case WRENCHBOARD_MOBILE_ACTIVEJOB:
+ $pathName = 'activejoblist';
+ break;
+ case WRENCHBOARD_ACCOUNT_WALLETS:
+ $pathName ='getwallets';
+ break;
+
+ case WRENCHBOARD_START_JOBLIST:
+ $pathName="startjoblist";
+ break;
+
+ case WRENCHBOARD_MOBILE_PAYMENTHX:
+ $pathName="paymenthx";
+ break;
+
+ case WRENCHBOARD_COUPON_MEMLIST:
+ $pathName= 'couponhx';
+ break;
+
+ case WRENCHBOARD_MOBILE_PURCHASEHX:
+ $pathName= 'purchasehx';
+ break;
+
+ case WRENCHBOARD_ACCOUNT_USER_RECIPEINT:
+ $pathName= 'recipients';
+ break;
+
+ case WRENCHBOARD_SMONEY_PROCFEE:
+ $pathName= 'sendmoneyfee';
+ break;
+
+ case WRENCHBOARD_MOBILE_UPDATEPROFILE:
+ $pathName= 'updateprofile';
+ break;
+
+ case WRENCHBOARD_ACCOUNT_SENDREFER:
+ $pathName= 'sendreferral';
+ break;
+
+ case WRENCHBOARD_ACCOUNT_REFFERHX:
+ $pathName= 'refferhx';
+ break;
+
+ case WRENCHBOARD_ACCOUNT_COUNTRY_BANKS:
+ $pathName= 'countrybanks';
+ break;
+
+ case WRENCHBOARD_ACCOUNT_PENDJOB:
+ $pathName = 'getpendingjobs';
+ break;
+ case WRENCHBOARD_MOBILE_OFFERSLIST:
+ $pathName = 'offerslist';
+ break;
+
+ case WRENCHBOARD_RESET_PASSWORD:
+ $pathName = 'startresetpasword';
+ break;
+
+ case WRENCHBOARD_ACCOUNT_ACCOUNT_TYPES:
+ $pathName = 'accounttypes';
+ break;
+ //loadprofile
+ case WRENCHBOARD_MOBILE_LOADPROFILE:
+ $pathName = 'loadprofile';
+ break;
+
+ case WRENCHBOARD_VERIFY_PENDING_LINK:
+ $pathName = 'verifysignuplink';
+ break;
+
+ case WRENCHBOARD_JOB_LISTJOBS:
+ $pathName = 'jobmanagerlist';
+ break;
+
+ case WRENCHBOARD_ACCOUNT_ADD_RECIPEINT:
+ $pathName = 'addrecipient';
+ break;
+
+
+
+ case 1200021:
+ $pathName="signupcountry";
+ break;
+
+ }
+return $pathName;
+}
+ public function wrenchboard_api($in, &$out = array(),$pathWay='') {
+ $ret = 0;
+
+ $urlPath = ($pathWay!='')? $pathWay :$this->baseUrlPath($in);
+ $local_url = $this->REACT_APP_USERS_ENDPOINT;
+ $url = $local_url ."/".$urlPath; //"/generics";
+ $data = $in;
+
+ $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);
+ $this->showResult($url, $in, $response);
+ $out = $response;
+ return $response["internal_return"];
+ }
+
+ private function showResult($url, $in,$out){
+
+ echo "
+ TARGET ENDPOINT[POST] ".$url."
+
+ ".var_dump($in)."
+ ".var_dump($out)."
+
+
+
";
+ //$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."
";
+ }
+ }
+
+}
+
+?>
\ No newline at end of file
diff --git a/public/wrenchboard_class.php b/public/wrenchboard_class.php
index 7beec6b..f5c7037 100644
--- a/public/wrenchboard_class.php
+++ b/public/wrenchboard_class.php
@@ -3,8 +3,8 @@ include_once('def.php');
class wrenchboard_class{
- public $REACT_APP_AUX_ENDPOINT = "https://apigate.lotus.g1.wrenchboard.com/svs/user";
- public $REACT_APP_USERS_ENDPOINT = "https://apigate.lotus.g1.wrenchboard.com/svs/user";
+ public $REACT_APP_AUX_ENDPOINT = "http://10.204.5.100:9083/en/wrench/api/v1"; //"https://apigate.lotus.g1.wrenchboard.com/svs/user";
+ public $REACT_APP_USERS_ENDPOINT = "http://10.204.5.100:9083/en/wrench/api/v1"; // "https://apigate.lotus.g1.wrenchboard.com/svs/user";
function __construct() {
@@ -119,7 +119,7 @@ return $pathName;
private function showResult($url, $in,$out){
echo "
- ".$url."
+ TARGET ENDPOINT[POST] ".$url."
".var_dump($in)."
".var_dump($out)."
diff --git a/writable/session.txt b/writable/session.txt
index 813e0fb..9e44e7d 100644
--- a/writable/session.txt
+++ b/writable/session.txt
@@ -1,2 +1,3 @@
-590B8F13C8AFF3FFC05AAFB90A1553D1
-2
\ No newline at end of file
+FC0B1233880F5DF0677E6054887C3625
+1
+3119b744-42ad-4834-bb83-b737588754ca
\ No newline at end of file