help contents

This commit is contained in:
CHIEFSOFT\ameye
2023-12-09 12:49:46 -05:00
parent a07a88ec49
commit d9532dbdbe
6 changed files with 134 additions and 28 deletions
+67 -28
View File
@@ -146,36 +146,75 @@ class WrenchFaq extends BaseController
}
private function apiHelpData() {
$total = 20;
$data = array(
"status" => 100,
"total_record" => ($total - 1),
"internal_return" => 0,
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$msg='';
$msgS = "<p> 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. </p>";
$txL = rand(1,5);
for($ii=1; $ii<$txL; $ii++){
$msg = $msg.$msgS;
}
$data["result_list"][] = array(
"uid" => $key,
"public" => "1",
"title" => "This is faq title dummy text ".$key,
"vid" => (rand(0,1)> 0) ? "https://www.youtube.com/embed/xZ4o180KFNk?si=zGuIgpfTb-Tc0o3H":'',
"msg" => $msg
);
$local_out =[];
$call_backend = true;
// $local_out = $this->dummyData();
$in["action"]=WRENCHBOARD_ACCT_HELPITEMS;
if ( $call_backend == true && $in["action"] !='' ){
$wrenchboard = new \App\Models\BackendModel();
$ret = $wrenchboard->wrenchboard_api($in, $out);
$out['internal_return'] = $ret;
}
else
{
$out = $local_out;
}
return $data;
$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}"],
"public" => "1",
"vid" => (rand(0,1)> 0) ? "https://www.youtube.com/embed/xZ4o180KFNk?si=zGuIgpfTb-Tc0o3H":'',
"icon" => $out["icon_${key}"],
"msg" => $out["contents_${key}"],
"date" => $out["added_${key}"],
);
}
return $res;
//
// $total = 20;
//
// $data = array(
// "status" => 100,
// "total_record" => ($total - 1),
// "internal_return" => 0,
// "result_list" => array(),
// );
//
//
// for ($i = 0; $i < $total; $i++) {
// $key = sprintf("%05d", $i);
// $msg='';
// $msgS = "<p> 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. </p>";
// $txL = rand(1,5);
// for($ii=1; $ii<$txL; $ii++){
// $msg = $msg.$msgS;
// }
//
// $data["result_list"][] = array(
// "uid" => $key,
// "public" => "1",
// "title" => "This is faq title dummy text ".$key,
// "vid" => (rand(0,1)> 0) ? "https://www.youtube.com/embed/xZ4o180KFNk?si=zGuIgpfTb-Tc0o3H":'',
// "msg" => $msg
// );
// }
//
// return $data;
}