Statts point added
This commit is contained in:
@@ -77,3 +77,9 @@ defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user
|
||||
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
|
||||
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
||||
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
||||
|
||||
|
||||
|
||||
define('START_PASS_CHANGE', 100);
|
||||
define('CONFIRM_PASS_PIN', 200);
|
||||
define('CONFIRM_PASS_CHANGE', 300);
|
||||
|
||||
@@ -62,7 +62,7 @@ $routes->get('/en/desktop/api/v2/myfituser/tracking', 'Myfituser::users');
|
||||
$routes->get('/en/desktop/api/v2/myfituser/reminders', 'Myfituser::users');
|
||||
$routes->get('/en/desktop/api/v2/myfituser/calendar', 'Myfituser::users');
|
||||
$routes->get('/en/desktop/api/v2/myfituser/loginhx', 'Myfituser::users');
|
||||
|
||||
$routes->get('/en/desktop/api/v2/myfituser/stats', 'Myfituser::users');
|
||||
|
||||
//MYFIT DESKTOP USERS
|
||||
$routes->post('/en/mobile/api/v2/myfituser/login', 'Myfituser::users');
|
||||
|
||||
@@ -17,17 +17,7 @@ class Myfituser extends BaseController
|
||||
|
||||
public function index()
|
||||
{
|
||||
/* header('Access-Control-Allow-Origin: * ');
|
||||
//header("Access-Control-Allow-Origin: http://localhost:9057 ");
|
||||
header('Access-Control-Expose-Headers: Access-Control-Allow-Origin');
|
||||
header('Access-Control-Allow-Credentials: true ');
|
||||
//header("Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With");
|
||||
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
|
||||
header('Content-type: application/json');
|
||||
|
||||
$mBlogData = new \App\Models\myfitBlogData();
|
||||
$res1 = $mBlogData->getBlogData([]);
|
||||
return $this->response->setJson($res1);*/
|
||||
}
|
||||
|
||||
public function users()
|
||||
@@ -55,7 +45,7 @@ class Myfituser extends BaseController
|
||||
'calendar' => ['GET'],
|
||||
'profile' => ['GET'],
|
||||
'loginhx' => ['GET'],
|
||||
|
||||
'stats' => ['GET'],
|
||||
];
|
||||
|
||||
// Retrieve an HTTP Request header, with case-insensitive names
|
||||
@@ -96,6 +86,9 @@ class Myfituser extends BaseController
|
||||
case 'profile':
|
||||
$res = $this->dummyData($raw_array);
|
||||
break;
|
||||
case 'stats':
|
||||
$res = $this->dummyData($raw_array);
|
||||
break;
|
||||
case 'loginhx':
|
||||
$myfitHx = new \App\Models\myfitHx();
|
||||
$res1 = $myfitHx->readLoginHx($raw_array);
|
||||
@@ -113,86 +106,5 @@ class Myfituser extends BaseController
|
||||
'raw_data' => $raw_array,
|
||||
];
|
||||
}
|
||||
public function blogdata()
|
||||
{
|
||||
/* header("Access-Control-Allow-Origin: *");
|
||||
//header("x-devicetoken : *");
|
||||
//header("Authorization : Token");
|
||||
header("Access-Control-Expose-Headers: Access-Control-Allow-Origin");
|
||||
header("Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With,x-session-id, client_id, x-float-device-location-latitude, x-float-device-location-longitude, x-devicetoken");
|
||||
header("Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS");
|
||||
header('Content-type: application/json');
|
||||
Access-Control-Allow-Origin
|
||||
|
||||
header1 = ('Access-Control-Allow-Credentials','true')
|
||||
header2 = ('Access-Control-Allow-Origin', 'https://serviceview.example.com')
|
||||
|
||||
*/
|
||||
header('Access-Control-Allow-Origin: * ');
|
||||
//header("Access-Control-Allow-Origin: http://localhost:9057 ");
|
||||
header('Access-Control-Expose-Headers: Access-Control-Allow-Origin');
|
||||
header('Access-Control-Allow-Credentials: true ');
|
||||
//header("Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With");
|
||||
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
|
||||
header('Content-type: application/json');
|
||||
|
||||
$mBlogData = new \App\Models\myfitBlogData();
|
||||
$res1 = $mBlogData->getBlogData([]);
|
||||
return $this->response->setJson($res1);
|
||||
// $this->setGetReturn(res1);
|
||||
}
|
||||
|
||||
public function country()
|
||||
{
|
||||
//header("Access-Control-Allow-Origin: http://localhost:9057 ");
|
||||
header('Access-Control-Allow-Origin: * ');
|
||||
header('Access-Control-Expose-Headers: Access-Control-Allow-Origin');
|
||||
header('Access-Control-Allow-Credentials: true ');
|
||||
//header("Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With");
|
||||
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
|
||||
header('Content-type: application/json');
|
||||
|
||||
$mCountry = new \App\Models\myfitCountry();
|
||||
return $this->response->setJson($mCountry->getSiteCountries([]));
|
||||
}
|
||||
|
||||
public function faq()
|
||||
{
|
||||
//header("Access-Control-Allow-Origin: http://localhost:9057 ");
|
||||
header('Access-Control-Allow-Origin: * ');
|
||||
header('Access-Control-Expose-Headers: Access-Control-Allow-Origin');
|
||||
header('Access-Control-Allow-Credentials: true ');
|
||||
//header("Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With");
|
||||
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
|
||||
header('Content-type: application/json');
|
||||
|
||||
$mFaq = new \App\Models\myfitFaqData();
|
||||
return $this->response->setJson($mFaq->getSiteFaq([]));
|
||||
}
|
||||
|
||||
public function pricing()
|
||||
{
|
||||
//header("Access-Control-Allow-Origin: http://localhost:9057 ");
|
||||
header('Access-Control-Allow-Origin: * ');
|
||||
header('Access-Control-Expose-Headers: Access-Control-Allow-Origin');
|
||||
header('Access-Control-Allow-Credentials: true ');
|
||||
//header("Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With");
|
||||
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
|
||||
header('Content-type: application/json');
|
||||
|
||||
$mPricing = new \App\Models\myfitPricing();
|
||||
return $this->response->setJson($mPricing->getSitePricing([]));
|
||||
}
|
||||
|
||||
private function setGetReturn($resp)
|
||||
{
|
||||
header('Access-Control-Allow-Origin: * ');
|
||||
//header("Access-Control-Allow-Origin: http://localhost:9057 ");
|
||||
header('Access-Control-Expose-Headers: Access-Control-Allow-Origin');
|
||||
header('Access-Control-Allow-Credentials: true ');
|
||||
//header("Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With");
|
||||
header('Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS');
|
||||
header('Content-type: application/json');
|
||||
return $this->response->setJson($resp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,17 +11,32 @@ class myfitResetPass extends Model
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
//$db = \Config\Database::connect('mermsemr');
|
||||
$this->db = \Config\Database::connect($this->con_name);
|
||||
}
|
||||
|
||||
/*
|
||||
Reset password will be in stages
|
||||
|
||||
STAGE 1 : Resquest _start password change - user get a code
|
||||
*/
|
||||
public function resetPass($in)
|
||||
{
|
||||
$reminder_category =[];
|
||||
$sqlQ =
|
||||
'SELECT * FROM members_resetpass';
|
||||
$change_state = $in['stage'];
|
||||
|
||||
switch ($change_state) {
|
||||
case START_PASS_CHANGE:
|
||||
break;
|
||||
|
||||
case CONFIRM_PASS_PIN:
|
||||
break;
|
||||
|
||||
case CONFIRM_PASS_CHANGE:
|
||||
break;
|
||||
}
|
||||
|
||||
$reminder_category = [];
|
||||
$sqlQ = 'SELECT * FROM members_resetpass';
|
||||
|
||||
|
||||
$query = $this->db->query($sqlQ);
|
||||
$data['resetpass_data'] = $query->getResultArray();
|
||||
return $inx = [
|
||||
@@ -30,9 +45,5 @@ class myfitResetPass extends Model
|
||||
'status' => 1,
|
||||
'raw_data' => $in,
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user