fixtags($job_description);
if ( substr($job_description,0,1)==='"' ){
// $job_description = substr($job_description,2);
}
return $job_description;
}
private function fixEmptyBanner($banner_str){
if (trim($banner_str)==''){
$banner_str = 'default.jpg';
}
return $banner_str;
}
private function taskFileLink(){
return 'file_link_will_be_here';
}
public function fixtags($text){
$text = htmlspecialchars($text);
$text = preg_replace("/=/", "=\"\"", $text);
$text = preg_replace("/"/", ""\"", $text);
$tags = "/<(\/|)(\w*)(\ |)(\w*)([\\\=]*)(?|(\")\""\"|)(?|(.*)?"(\")|)([\ ]?)(\/|)>/i";
$replacement = "<$1$2$3$4$5$6$7$8$9$10>";
$text = preg_replace($tags, $replacement, $text);
$text = preg_replace("/=\"\"/", "=", $text);
$text = str_replace("\\n", "
", $text);
$text = str_replace('""\"','',$text);
$text = str_replace('"\""','',$text);
$text = str_replace(' ','',$text);
$text = str_replace('href=\\"\"http://','',$text);
$text = str_replace('href=\\"\"https://','',$text);
return $text;
}
private function suggestedStatusText($status){
$stArr = ['0 Status','Waiting','2 Status', '3 Status', '4 Status', '5 Status' ];
return $stArr[$status];
}
public function processRecentOutJson($in, $out) {
return $out;
}
private function uploadedBanner($fileType){
return 'default.svg';
}
function GetFamilyAge($age,$year,$month){
$currAge= $age;
if ($year > 0 && $month > 0 ){
$bdate="$year/$month/1";
$currAge = date_diff(date_create($bdate), date_create('now'))->y;
}
return $currAge;
}
public function processOutJson($in, $out) {
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
switch ($in["action"]) {
case WRENCHBOARD_ACCOUNT_PREFERENCES:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"description" => $out["description_${key}"],
"uid" => $out["uid_${key}"],
"pref" => $out["pref_${key}"],
"lang" => $out["lang_${key}"],
"added" => $out["added_${key}"],
"currval" => 0,
);
}
break;
case WRENCHBOARD_ACCT_NOTIFICATIONS:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"title" => $out["msg_${key}"],
"uid" => $out["uid_${key}"],
"icon" => $out["icon_${key}"],
"date" => $out["added_${key}"],
);
}
break;
case WRENCHBOARD_ACCOUNT_RECENTS:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$banner_img = ( $out["banner_${key}"] !="" ) ? $out["banner_${key}"] : 'default.jpg';
$res["result_list"][] = array(
"uid" => $out["uid_${key}"],
"description" => $out["description_${key}"],
"title" => $out["title_${key}"],
"added" => $out["added_${key}"],
"status" => $out["status_${key}"],
"banner" => $banner_img,
);
}
break;
case WRENCHBOARD_MYFILES_LIST:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
// $pref_id = $out["pref_id_${key}"];
// $pref_value_key = "VALUE_".$pref_id;
// log_message('critical', "pref_value_key=>".$pref_value_key);
// log_message('critical', "pref_id =>".$pref_id);
$fileType = $out["file_type_${key}"];
$res["result_list"][] = array(
"file_uid" => $out["file_uid_${key}"],
"description" => $out["description_${key}"],
"title" => $out["title_${key}"],
"added" => $out["added_${key}"],
"file_type" => $out["file_type_${key}"],
"file_size" => $out["file_size_${key}"],
"file_name" => $out["file_name_${key}"],
"banner" => $this->uploadedBanner( $fileType ),
);
}
break;
case WRENCHBOARD_GETUSER_SETTINGS:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$pref_id = $out["pref_id_${key}"];
$pref_value_key = "VALUE_".$pref_id;
log_message('critical', "pref_value_key=>".$pref_value_key);
log_message('critical', "pref_id =>".$pref_id);
$res["result_list"][] = array(
"uid" => $out["uid_${key}"],
"description" => $out["description_${key}"],
"title" => $out["title_${key}"],
"pref_id" => $out["pref_id_${key}"],
"banner" => $this->fixEmptyBanner( $out["banner_${key}"]),
"pref_value" => $out[$pref_value_key],
);
}
break;
case WRENCHBOARD_FAMILY_RELLIST:
$connStatus["0"] = "Pending";
$connStatus["5"] = "Connected";
$connStatus["7"] = "Removed";
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"relative_uid" => $out["uid_${key}"],
"lastname" => $out["lastname_${key}"],
"email" => $out["email_${key}"],
"family_type" => $out["family_type_${key}"],
"status" => $connStatus[ $out["status_${key}"] ],
"status_action" => 'pending_relative_action',
"kid_count" => 0,
"firstname" => $out["firstname_${key}"],
);
}
break;
case WRENCHBOARD_FAMILY_SGGESTLIST:
case WRENCHBOARD_FAMILY_SGGESTWAITING:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$status_no = $out["status_${key}"];
$statusTxt = $this->suggestedStatusText($status_no);
$banner_img = ( $out["banner_${key}"] !="" ) ? $out["banner_${key}"] : 'default.jpg';
$res["result_list"][] = array(
"uid" => $out["uid_${key}"],
"family_uid" => $out["family_uid_${key}"],
"description" => $out["description_${key}"],
"title" => $out["title_${key}"],
"added" => $out["added_${key}"],
"status" => $out["status_${key}"],
"status_text" => $statusTxt ,
"banner" => $banner_img,
"firstname" => $out["firstname_${key}"],
"remind" => $out["remind_${key}"],
);
}
break;
case WRENCHBOARD_RELATIVES_SETTINGS:
$total = $out["total_kid"];
$res = array(
"status" => $out["status"],
"internal_return" => $out["internal_return"],
"kids_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["kids_list"][] = array(
"family_uid" => $out["family_uid_${key}"]
);
}
break;
case WRENCHBOARD_FAMILY_SAMPLETASKS:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$banner_img = ( $out["banner_${key}"] !="" ) ? $out["banner_${key}"] : 'default.jpg';
$res["result_list"][] = array(
"uid" => $out["uid_${key}"],
"description" => $out["description_${key}"],
"title" => $out["title_${key}"],
"added" => $out["added_${key}"],
"age" => $out["age_${key}"],
"banner" => $banner_img,
);
}
break;
case WRENCHBOARD_JOB_OFFER_INTLIST:
case WRENCHBOARD_JOB_WAITING_INT:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"interest_uid" => $out["interest_uid_${key}"],
"client_id" => $out["client_id_${key}"],
"client_uid" => $out["client_uid_${key}"],
"client_name" => $out["client_name_${key}"],
"client_added" => $out["client_added_${key}"],
"client_jobs_completed" => $out["client_jobs_completed_${key}"],
"client_jobs_active" => $out["client_jobs_active_${key}"],
"client_jobs_missed" => $out["client_jobs_missed_${key}"],
"client_offers_pending" => $out["client_offers_pending_${key}"],
"client_percent_completion" => $out["client_percent_completion_${key}"],
"client_ratings" => $out["client_ratings_${key}"],
"offer_code" => $out["offer_code_${key}"],
"offer_uid" => $out["offer_uid_${key}"],
"sent" => $out["sent_${key}"],
"title" => $out["title_${key}"],
"description" => $out["description_${key}"],
"job_id" => $out["job_id_${key}"],
"job_uid" => $out["job_uid_${key}"],
"expire" => $out["expire_${key}"],
"price" => $out["price_${key}"],
"timeline_days" => $out["timeline_days_${key}"],
'job_country' => $out["job_country_${key}"],
'currency' => $out["currency_${key}"],
'currency_code' => $out["currency_code_${key}"],
);
}
break;
case WRENCHBOARD_JOB_INT_QUESTLST:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"msg_uid" => $out["msg_uid_${key}"],
"msg" => $out["msg_${key}"],
"added" => $out["added_${key}"],
"sender" => $out["sender_${key}"],
);
}
break;
case WRENCHBOARD_USER_CARDLIST:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"card_uid" => $out["card_uid_${key}"],
"description" => $out["description_${key}"],
"digits" => $out["digits_${key}"],
"added" => $out["added_${key}"],
"active" => $out["active_${key}"],
"type" => $out["type_${key}"],
);
}
break;
case WRENCHBOARD_ACCOUNT_DASHDATA:
$res = $out;
$res['home_activities'] = [];
if ($res["next_due_status"]==1) {
$res['next_due'] = [
"item_code" => $out["item_code"],
"due_date" => $out["due_date"],
"price" => $out["price"],
"currency" => $out["currency"],
];
}
else{
$res['next_due'] = [];
}
break;
case WRENCHBOARD_ACCOUNT_HOMEBANNERS:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"family_action" => 0,
"home_dash_type" => $out["home_dash_type"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"title" => $out["title_${key}"],
"contract" => $out["contract_${key}"],
"card_type" => $out["card_type_${key}"],
"card_style" => $out["card_style_${key}"],
"description" => $out["description_${key}"],
"blog_id" => $out["blog_id_${key}"],
"card_icon" => $out["card_icon_${key}"],
"offer_id" => $out["offer_id_${key}"],
"banner" => $this->fixEmptyBanner( $out["banner_${key}"]),
"banner_location" => $out["banner_location_${key}"],
"link_path" => $out["link_path_${key}"],
"button_text" => $out["button_text_${key}"],
"short_button_text" => $out["short_button_text_${key}"],
"short_title" => $out["short_title_${key}"],
"short_description" => $out["short_description_${key}"],
"short_style" => $out["short_style_${key}"],
);
}
break;
case WRENCHBOARD_CONTRACT_MSGLIST:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"message" => $out["message_${key}"],
"msg" => $out["msg_${key}"],
"msg_date" => $out["msg_date_${key}"],
"msg_firstname" => $out["msg_firstname_${key}"],
"msg_id" => $out["msg_id_${key}"],
"msg_type" => $out["msg_type_${key}"],
"file_link" => $this->taskFileLink(),
"who" => $out["who_${key}"],
"msg_uid" => $out["msg_uid_${key}"],
);
}
break;
case WRENCHBOARD_FAMILY_LIST:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"family_uid" => $out["uid_${key}"],
"firstname" => $out["firstname_${key}"],
"lastname" => $out["lastname_${key}"],
"username" => $out["username_${key}"],
"age" => $this->GetFamilyAge( $out["age_${key}"],$out["year_${key}"],$out["month_${key}"]),
"year" => $out["year_${key}"],
"month" => $out["month_${key}"],
"last_login" => $out["last_login_${key}"],
"task_count" => $out["task_count_${key}"],
"enable_traking"=> $out["enable_traking_${key}"],
"pending_task_count" => $out["task_count_${key}"],
"added" => $out["added_${key}"],
"banner" => 'family.svg',
"profile_picture" => 'https://www.wrenchboard.com/assets/images/apps/icons/family.svg',
"banner_location" => 'LOCAL',
);
}
break;
case MOBILE_LOGIN:
$out["prefs"]=[];
$out["layout"]=[];
$res = $out;
break;
case WRENCHBOARD_CARDS_GETCARDLIST:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"assign_id" => $out["assign_id_${key}"],
"title" => $out["title_${key}"],
"description" => $out["description_${key}"],
"card_type" => $out["card_type_${key}"],
"card_style" => $out["card_style_${key}"],
"card_icon" => $out["card_icon_${key}"] );
}
break;
case WRENCHBOARD_COUPON_MEMLIST:
case WRENCHBOARD_COUPON_PENDLIST:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"coupon_id" => $out["coupon_id_${key}"],
"code" => $out["code_${key}"],
"amount" => $out["amount_${key}"],
"added" => $out["added_${key}"],
"status" => $out["status_${key}"],
"active" => $out["active_${key}"],
"allocation_uid"=> $out["allocation_uid_${key}"],
'currency' => 'Naira',
'currency_code' => 'NGN'
);
}
break;
case WRENCHBOARD_SIGNUP_COUNTRY:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
'result'=>'100',
'signup_country'=>[ ['NG', 'Nigeria'],['US', 'United States'] ],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"code" => $out["code_${key}"],
"country" => $out["country_${key}"],
"phone_code" => $out["phone_code_${key}"],
"uid"=> $out["uid_${key}"],
);
}
break;
case WRENCHBOARD_MOBILE_TASKMESSAGE:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"title" => $out["title_${key}"],
"msg" => $out["msg_${key}"],
"msg_id" => $out["msg_id_${key}"],
"date" => $out["date_${key}"]
);
}
break;
case WRENCHBOARD_START_JOBLIST:
case WRENCHBOARD_ACCOUNT_JOBLIST:
case WRENCHBOARD_ACCOUNT_PENDJOB:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
"categories" => $this->dummyCategory(),
"banners_options" => $this->dummyGetBanners()
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$int_c = 'interest_count_'.$out["offer_code_${key}"];
log_message('critical', "interest_count_ ::: ".$int_c);
$cateG = $out["category_${key}"];
$banner_img = ( $out["banner_${key}"] !="" ) ? $out["banner_${key}"] : 'default.jpg';
$res["result_list"][] = array(
"title" => $out["title_${key}"],
"description" => $out["description_${key}"],
"id" => $out["id_${key}"],
"offer_uid" => $out["offer_uid_${key}"],
"job_uid" => $out["job_uid_${key}"],
"job_description" => $this->cleanUpDescription($out["job_description_${key}"]),
"job_detail" => $this->cleanUpDescription($out["job_detail_${key}"]),
"price" => $out["price_${key}"],
"timeline_days" => $out["timeline_days_${key}"],
"expire" => $out["expire_${key}"],
"sent" => $out["sent_${key}"],
"offer_code" => $out["offer_code_${key}"],
"whishlisted"=> false,
"thumbnil" => 'marketplace-product-1.jpg',
'isActive' => true,
'offer_added' => $out["offer_added_${key}"],
'job_country' => $out["job_country_${key}"],
'currency' => $out["currency_${key}"],
'currency_code' => $out["currency_code_${key}"],
'interest_count' => $out[$int_c] ?? 0,
'category' => $this->dummyGetCategory( $cateG ),
'banner' => $banner_img
);
}
break;
case WRENCHBOARD_JOB_JOBGROUPS:
$total = $out["total_record"];
$total_member = $out["gm_total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"total_record_member" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$group_id = $out["group_id_${key}"];
$res["result_list"][] = array(
"group_uid" => $out["group_uid_${key}"],
"group_name" => $out["group_name_${key}"],
"group_id" => $out["group_id_${key}"],
"member_count" => $out["group_count_id_${group_id}"] ?? 0,
);
}
for ($i = 0; $i < $total_member; $i++) {
$key = sprintf("%05d", $i);
$res["result_list_member"][] = array(
"email" => $out["gm_email_${key}"],
"firstname" => $out["gm_firstname_${key}"],
"lastname" => $out["gm_lastname_${key}"],
"group_id" => $out["gm_group_id_${key}"],
"uid" => $out["gm_uid_${key}"],
);
}
break;
//const WRENCHBOARD_JOB_JOBFILES = 13012;
case 13012; //WRENCHBOARD_JOB_JOBFILES:
$total = $out["total_record"];
$total_member = $out["gm_total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"total_record_member" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$group_id = $out["group_id_${key}"];
$res["result_list"][] = array(
"file_uid" => $out["file_uid_${key}"],
"file_id" => $out["id_${key}"],
"originalname" => $out["originalname_${key}"],
"size" =>$out["size_${key}"]
);
}
break;
case WRENCHBOARD_MOBILE_ACTIVEJOB:
case WRENCHBOARD_MOBILE_OFFERSLIST:
case WRENCHBOARD_JOB_LISTJOBS:
case WRENCHBOARD_JOB_OFFERS:
case WRENCHBOARD_JOB_ACTIVE:
case WRENCHBOARD_JOB_USERACTIVE:
CASE WRENCHBOARD_JOB_REPORT:
case WRENCHBOARD_JOB_RECENTPASTDUE:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
"categories" => $this->dummyCategory(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$int_c = 'interest_count_'.$out["offer_code_${key}"];
$cateG = $out["category_${key}"];
$res["result_list"][] = array(
"title" => $out["title_${key}"],
"description" => $out["description_${key}"],
"id" => $out["id_${key}"],
"job_description" => $out["job_description_${key}"],
"job_detail" => $this->cleanUpDescription($out["job_detail_${key}"]),
"price" => $out["price_${key}"],
"timeline_days" => $out["timeline_days_${key}"],
"contract_id" => $out["contract_id_${key}"],
"contract_uid" => $out["contract_uid_${key}"],
"job_id" => $out["job_id_${key}"],
"contract" => $out["contract_${key}"],
"created" => $out["created_${key}"],
"status_description" => $out["status_description_${key}"],
"delivery_date" => $out["delivery_date_${key}"],
"owner_status" => $out["owner_status_${key}"],
"offer_uid" => $out["offer_uid_${key}"],
"family_uid" => $out["family_uid_${key}"],
"job_uid" => $out["job_uid_${key}"],
"origin_job_uid" => $out["origin_job_uid_${key}"],
"expire" => $out["expire_${key}"],
"sent" => $out["sent_${key}"],
"offer_code" => $out["offer_code_${key}"],
"job_to" => $out["job_to_${key}"],
"public_view" => $out["public_view_${key}"],
"whishlisted"=> false,
"thumbnil" => 'marketplace-product-1.jpg',
'isActive' => true,
'offer_added' => $out["offer_added_${key}"],
'job_country' => $out["job_country_${key}"],
'currency' => $out["currency_${key}"],
'job_type' => $out["job_type_${key}"],
'media_uid' => $out["media_uid_${key}"],
'job_mode' => $out["job_mode_${key}"],
'currency_code' => $out["currency_code_${key}"],
"banner" => $this->fixEmptyBanner( $out["banner_${key}"]),
'interest_count' => $out["${$int_c}"] ?? 0,
'ext_request' => $out["ext_request_${key}"],
'category' => $this->dummyGetCategory( $cateG ),
'depend_uid' => $out["depend_uid_${key}"],
'strict_timeline' => $out["strict_timeline_${key}"],
'minimum_due' => $out["minimum_due_${key}"]
);
}
break;
case WRENCHBOARD_MOBILE_JOB_MESSAGE:
case WRENCHBOARD_MOBILE_MESSAGE:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"msg" => $out["msg_${key}"],
"msg_id" => $out["msg_id_${key}"],
"msg_date" => $out["msg_date_${key}"],
"msg_from" => $out["msg_from_${key}"],
"reply" => $out["reply_${key}"],
"message_mode" => $out["message_mode_${key}"],
"uid" => $out["uid_${key}"],
"memo" => $out["memo_${key}"],
"title" => $out["title_${key}"],
"description" => $out["description_${key}"],
"job_description" => $out["job_description_${key}"]
);
}
break;
case WRENCHBOARD_MOBILE_PAYMENTHX:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"fee" => $out["fee_${key}"],
"amount" => $out["amount_${key}"],
"recipient" => $out["recipient_${key}"],
"confirmation" => $out["confirmation_${key}"],
"status" => $out["status_${key}"],
"trx_date" => $out["trx_date_${key}"],
"trx_id" => $out["trx_id_${key}"],
"code" => $out["code_${key}"],
"currency" => $out["currency_${key}"],
"symbol" => $out["symbol_${key}"]
);
}
break;
case WRENCHBOARD_MOBILE_PURCHASEHX:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"fee" => $out["fee_${key}"],
"amount" => $out["amount_${key}"],
"confirmation" => $out["confirmation_${key}"],
"status" => $out["status_${key}"],
"added_date" => $out["added_date_${key}"],
"payment_id" => $out["id_${key}"],
"payment_uid" => $out["uid_${key}"],
"currency"=> $out["currency_${key}"],
);
}
break;
case WRENCHBOARD_ACCOUNT_ACCOUNT_TYPES:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"name" => $out["name_${key}"],
"value" => $out["value_${key}"],
);
}
break;
case WRENCHBOARD_USER_GETBANKLIST:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"recipient" => $out["recipient_${key}"],
"account_no" => $out["account_no_${key}"],
"bank_id" => $out["bank_id_${key}"],
"added" => $out["added_${key}"]
);
}
break;
case WRENCHBOARD_ACCOUNT_USER_RECIPEINT:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"recipient" => $out["recipient_${key}"],
"account_no" => $out["account_no_${key}"],
"recipient_id" => $out["id_${key}"],
"recipient_uid" => $out["uid_${key}"],
"country" => $out["country_${key}"],
"added" => $out["added_${key}"],
"bank_name" => $out["bank_name_${key}"],
"bank_uid" => $out["bank_uid_${key}"],
);
}
break;
case WRENCHBOARD_ACCOUNT_COUNTRY_BANKS:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"name" => $out["name_${key}"],
"code" => $out["code_${key}"],
"country" => $out["country_${key}"],
"bank_uid" => $out["bank_uid_${key}"],
);
}
break;
case WRENCHBOARD_ACCOUNT_REFFERHX:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"added_date" => $out["added_date_${key}"],
"email" => $out["email_${key}"],
"firstname" => $out["firstname_${key}"],
"lastname" => $out["lastname_${key}"],
"status" => $out["status_${key}"]
);
}
break;
case WRENCHBOARD_ACCOUNT_WALLETS:
case WRENCHBOARD_FAMILY_WALLET:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 0),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$escrow_key = "escrow_".$out["code_${key}"];
$res["result_list"][] = array(
"currency" => $out["currency_${key}"],
"amount" => $out["amount_${key}"],
"escrow" => 0,
"symbol" => $out["symbol_${key}"],
"description" => $out["description_${key}"],
"action_type" => $out["action_type_${key}"],
"code" => $out["code_${key}"],
"country" => $out["country_${key}"],
"transfer_limit" => $out["transfer_limit_${key}"],
"processor" => $out["processor_${key}"],
"wallet_uid" => $out["wallet_uid_${key}"],
"escrow" => isset($out[$escrow_key]) ? $out[$escrow_key]: 0 ,
);
}
break;
//escrow_NAIRA
case WRENCHBOARD_FAMILY_TRANSFERHX:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 0),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"currency" => $out["currency_${key}"],
"amount" => $out["amount_${key}"],
"icon" => "https://www.wrenchboard.com/assets/images/apps/currency/".strtolower($out["currency_${key}"]).".svg",
"description" => $out["description_${key}"],
"confirmation" => $out["confirmation_${key}"],
"rec_lastname" => $out["rec_lastname_${key}"],
"rec_firstname" => $out["rec_firstname_${key}"],
"added" => $out["added_${key}"],
"uid" => $out["uid_${key}"],
);
}
break;
default:
return $out;
}
return $res;
}
public function dummyGetCategory($varCat){
return explode("@", $varCat);
// $i= rand(1,4);
// $res=array();
// switch ($i) {
// case 1:
// $res= array('CT1', 'CT2');
// break;
// case 2:
// $res= array( 'CT3', 'CT4');
// break;
// case 3:
// $res= array('CT1', 'CT4',);
// break;
// case 4:
// $res= array( 'CT4');
// break;
// }
// return $res;
}
public function dummyCategory(){
return array(
'CT1'=>'Writings & Translations',
'CT2'=>'Marketing & Promotions',
'CT3'=>'Errands',
'CT4'=>'Others',
);
}
public function dummyGetBanners(){
return [
['default.jpg','https://www.wrenchboard.com/assets/images/apps/jobs/defualt.jpg'],
['clean-closet.jpg','https://www.wrenchboard.com/assets/images/apps/jobs/clean-closet.jpg'],
['kid-book.jpg','https://www.wrenchboard.com/assets/images/apps/jobs/kid-book.jpg'],
['kid-coffee.jpg','https://www.wrenchboard.com/assets/images/apps/jobs/kid-coffee.jpg'],
['kid-dishes.jpg','https://www.wrenchboard.com/assets/images/apps/jobs/kid-dishes.jpg'],
];
}
public function getBlogData(){
return [
[
'meta_value' => "https://blog.wrenchboard.com/wp-content/uploads/2022/01/universitty.jpg",
'post_date' => "2018-06-25T18:54:22.000Z",
'post_date_gmt' => "2018-06-25T18:54:22.000Z",
'post_content' => "Globalization spells danger for the type of jobs that will be available at graduation. The nature of jobs changes so often that it could frustrate for the students. The changes also present new opportunities. Globalization also ensures that job can come anonymously from any part of the world and transaction can be completed privately.\n\nThis is where WrenchBoard comes in, rather than focus on your primary education as your source of income, the new economy will look at your skills as this guide. Your question is to self-examine and attributes values to what you have that others need to make their own or goal complete.\n\nUniversity students can earn extra income along with their regular educational and school work by taking part-time tasks online. To get a project up and running there are a lot of components of service that every business goes through and there are those tasks that students can attend to. Students are in best position to do an initial critique of sites, write articles that bear innocence or interest meddling or test an app for a company in beta phase.\n\nThe online nature of the jobs gives the student the necessary flexibility to operate and added the benefit of interacting with people that don’t think like them, it is an opportunity for the larger world. It is getting very hard to manufacture excuses for not to be involved with one online job or the other when the opportunities and the capabilities collide. A student should be made aware of the fact that life is going to get busier once the excuse of the school is removed.\n\nThere are many jobs students can easily do online\n