Files
WrenchBoradWeb/www-api/app/Controllers/WrenchFaq.php
T
CHIEFSOFT\ameye 1416d152cd faq added
2023-06-29 21:27:39 -04:00

138 lines
5.8 KiB
PHP

<?php
namespace App\Controllers;
//use CodeIgniter\API\ResponseTrait;
//$routes->post('/en/wrench/api/v1/faq', 'WrenchFaq::apigate');
class WrenchFaq extends BaseController
{
//use ResponseTrait;
protected $db;
public $con_name = 'wrench_blog';
public function apigate(){
return json_encode( $this->apiData() );
}
private function apiData() {
/*
$this->db = \Config\Database::connect($this->con_name);
$data = array();
try {
$mysql = "SELECT id, post_title, post_content,post_date,comment_count FROM wp_posts WHERE post_type='post' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 9";
$mysql = "SELECT p1.id AS id, p1.*, wm2.meta_value FROM wp_posts p1 LEFT JOIN wp_postmeta wm1
ON (wm1.post_id = p1.id AND wm1.meta_value IS NOT NULL AND wm1.meta_key = '_thumbnail_id' )
LEFT JOIN
wp_postmeta wm2
ON (wm1.meta_value = wm2.post_id AND wm2.meta_key = '_wp_attached_file' AND wm2.meta_value IS NOT NULL )
WHERE
p1.post_status='publish'
AND p1.post_type='post'
ORDER BY p1.post_date DESC LIMIT 2000";
$query = $this->db->query($mysql);
$data['payload']['blogdata'] = $query->getResult('array');
$totalCount = count( $data['payload']['blogdata'] );
$randomIndex = rand(1, $totalCount);
$data['payload']['featured'] = $data['payload']['blogdata'][$randomIndex ];
$data['payload']['image_url'] = 'https://blog.float.sg/wp-content/uploads/';
$data['payload']['blog_url'] = 'https://blog.float.sg/';
$data['payload']['total'] = $totalCount;
} catch (Exception $ex) {
}
*/
$total = 1;
$data = array(
"status" => 100,
"total_record" => ($total - 1),
"internal_return" => 0,
"result_list" => array(),
);
$data["result_list"][] = array(
"public" => "1",
"title" => "What is WrenchBoard ?",
"msg" => "WrenchBoard is the platform to set and rewards goals. Easily create plans for your kids or family, reward completion, or find others to perform tasks for you, or you can find opportunities to earn from any skill. ",
);
$data["result_list"][] = array(
"public" => "1",
"title" => "How can I use WrenchBoard ?",
"msg" => "Create your free account, add family and kids, and create and assign tasks. Reward when completed, or use your account to find the opportunity to earn rewards. ",
);
$data["result_list"][] = array(
"public" => "1",
"title" => "What is WrenchBoard family account ? ",
"msg" => "WrenchBoard allows you to create accounts for your family or kids, assign specific goals, and reward achievements from the parent's account.",
);
$data["result_list"][] = array(
"public" => "1",
"title" => "What is WrenchBoard Family Login ?",
"msg" => "The family account is a subset of your account that you can manage from your account. You can control the task and earnings from your account, which will be the parent account. ",
);
$data["result_list"][] = array(
"public" => "1",
"title" => "Do I need different account to post or perform task ?",
"msg" => "You can use your one account to perform any variety of activities. You dont need a separate account. ",
);
$data["result_list"][] = array(
"public" => "1",
"title" => "Does WrenchBoard work on mobile devices?",
"msg" => "Yes, you can browse from your mobile device. For the best experience, use our native app from app stores. ",
);
$data["result_list"][] = array(
"public" => "1",
"title" => "What is WrenchBoard Market ?",
"msg" => "The market is the place to see all jobs posted to the public, you can raise your hand by showing interest, and the owner can approve you starting the task. ",
);
$data["result_list"][] = array(
"public" => "1",
"title" => "How does WrenchBoard protect my privacy?",
"msg" => "We value the privacy of our patrons, and with this in our backbone, we strive to employ the best industry standards and practices to protect all privacy. We continuously abreast ourselves with the growing threat and endeavor to ensure we are always a step ahead. ",
);
$data["result_list"][] = array(
"public" => "1",
"title" => "How do I contact WrenchBoard Support?",
"msg" => "We are here to hear you and assist you in any way possible. The best way is to go into your account and send a message to support or use our chat or support email.",
);
// for ($i = 0; $i < $total; $i++) {
// $key = sprintf("%05d", $i);
// $data["result_list"][] = array(
// "public" => "1",
// "title" => "This is faq title dummy text ".$key,
// "msg" => "Random gibberish text to use in web pages, site templates and in typography demos. Get rid of Lorem Ipsum forever. A tool for web designers who want to save time. ".$key,
// );
// }
for ($i = 0; $i < 5; $i++) {
$key = sprintf("%05d", $i);
$data["result_list"][] = array(
"public" => "0",
"title" => "Do not show to the website 55".$key,
"msg" => "Random gibberish text to use in web pages, site templates and in typography demos. Get rid of Lorem Ipsum forever. A tool for web designers who want to save time. ".$key,
);
}
return $data;
}
}