Files
WrenchBoradWeb/www-api/app/Controllers/Promo.php
T
CHIEFSOFT\ameye b22ab61ef4 WrenchPromoLoad
2024-09-16 18:03:41 -04:00

50 lines
1.8 KiB
PHP

<?php
namespace App\Controllers;
use CodeIgniter\API\ResponseTrait;
class Promo extends BaseController
{
use ResponseTrait;
public function promoStart(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out =[];
//$in["action"] = -1;
$in['action'] = WRENCHBOARD_MARKET_PLAN01_NEXT1;
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
$out['internal_return'] = $ret;
// $in["promo"] = $promo;
// $in["promo_owner"] = $promoOwner;
log_message('critical', "promoStart::promoStart ********* ALL ".serialize($in) );
$in["loc"] = $_SERVER["REMOTE_ADDR"];
$in['limit'] = 10;
$out["firstname"] = "Firstname";
$out["promo_title"] = "This is the promo title";
$out["promo_description"] = "This is the promo description , This is the promo description ,This is the promo description ,This is the promo description ,This is the promo description ,This is the promo description ,This is the promo description ,";
$out["site_name"]= "WrenchBoard";
$out["server_name"]= "https://www.wrenchboard.com";
$out['yyyy'] = '2024';
return $this->respond( $this->summaryReturnData($in,$out), 200);
}
public function promoTask(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out =[];
log_message('critical', "promoTask::promoStart ********* ALL ".serialize($in) );
$in["loc"] = $_SERVER["REMOTE_ADDR"];
// $in['action'] = WRENCHBOARD_MARKET_PLAN01_START;
$in['limit'] = 10;
// $ret['WRENCHBOARD_MARKET_PLAN01_START'] = (new \App\Models\BackendModel())->wrenchboard_api($in, $out);
return []; //json_encode( $final_out );
}
}