Prining data added
This commit is contained in:
+17
-6
@@ -40,13 +40,24 @@ $routes->get('/chiefsoft/site/blogdata', 'Chiefsoft::blogdata'); // when no lim
|
||||
$routes->post('/chiefsoft/site/contact', 'Chiefsoft::contact');
|
||||
|
||||
//MERMS MYFIT
|
||||
$routes->get('/mermsmemr/myfit/country', 'Myfit::country');
|
||||
$routes->get('/mermsmemr/myfit/blogdata/(:any)', 'Myfit::blogdata/$1');
|
||||
$routes->get('/mermsmemr/myfit/blogdata', 'Myfit::blogdata'); // when no limit is sent
|
||||
$routes->get('/mermsmemr/myfit/faq', 'Myfit::faq');
|
||||
$routes->post('/mermsmemr/myfit/contact', 'Myfit::contact');
|
||||
$routes->get('/mermsmemr/myfit/pricing', 'Myfit::pricing');
|
||||
$routes->get('/en/desktop/api/v2/myfit/country', 'Myfit::country');
|
||||
$routes->get('/en/desktop/api/v2/myfit/blogdata/(:any)', 'Myfit::blogdata/$1');
|
||||
$routes->get('/en/desktop/api/v2/myfit/blogdata', 'Myfit::blogdata'); // when no limit is sent
|
||||
$routes->get('/en/desktop/api/v2/myfit/faq', 'Myfit::faq');
|
||||
$routes->post('/en/desktop/api/v2/myfit/contact', 'Myfit::contact');
|
||||
$routes->get('/en/desktop/api/v2/myfit/pricing', 'Myfit::pricing');
|
||||
|
||||
//MYFIT USERS
|
||||
$routes->post('/en/desktop/api/v2/myfituser/login', 'Myfituser::login');
|
||||
$routes->post('/en/desktop/api/v2/myfituser/account', 'Myfituser::account');
|
||||
|
||||
/*
|
||||
https://devapi.mermsemr.com/en/desktop/api/v2/myfit/country GET
|
||||
https://devapi.mermsemr.com/en/desktop/api/v2/myfit/blogdata/7 GET
|
||||
https://devapi.mermsemr.com/en/desktop/api/v2/myfit/contact POST
|
||||
https://devapi.mermsemr.com/en/desktop/api/v2/myfit/pricing GET
|
||||
https://devapi.mermsemr.com/en/desktop/api/v2/myfit/faq GET
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -26,7 +26,7 @@ class Myfit extends BaseController
|
||||
|
||||
public function contact()
|
||||
{
|
||||
$inx = array(
|
||||
/*$inx = array(
|
||||
'name' => $this->post('name'),
|
||||
'email' => $this->post('email'),
|
||||
'country' => $this->post('country'),
|
||||
@@ -34,10 +34,15 @@ class Myfit extends BaseController
|
||||
'message' => $this->post('message')
|
||||
);
|
||||
$something = $this->request->getVar('name');
|
||||
*/
|
||||
$raw_json = file_get_contents("php://input");
|
||||
$raw_array = json_decode($raw_json, true);
|
||||
$something = $raw_array["name"];
|
||||
|
||||
$inx = ['olu' => rand(100, 8888) . $something];
|
||||
$inx = [
|
||||
'message_id' => rand(100, 8888) . 'gsgsgsgsg-sssfsgggsgs-ususususu',
|
||||
'status'=>1
|
||||
];
|
||||
$mBlogData = new \App\Models\myfitBlogData();
|
||||
$res1 = $mBlogData->getBlogData([]);
|
||||
//return $this->response->setJson($res1);
|
||||
@@ -47,26 +52,83 @@ class Myfit extends BaseController
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ class myfitBlogData extends Model
|
||||
'post_type' => 'post',
|
||||
'post_mime_type' => '',
|
||||
'comment_count' => 0,
|
||||
'meta_value' => '2021/02/Gut.jpg',
|
||||
'meta_value' => 'https://blog.mermsemr.com/wp-content/uploads/2021/02/Gut.jpg',
|
||||
),
|
||||
1 =>
|
||||
array(
|
||||
@@ -217,7 +217,7 @@ class myfitBlogData extends Model
|
||||
'post_type' => 'post',
|
||||
'post_mime_type' => '',
|
||||
'comment_count' => 0,
|
||||
'meta_value' => '2021/01/COVID-19-vaccine_002.jpg',
|
||||
'meta_value' => 'https://blog.mermsemr.com/wp-content/uploads/2021/01/COVID-19-vaccine_002.jpg',
|
||||
),
|
||||
2 =>
|
||||
array(
|
||||
@@ -267,7 +267,7 @@ class myfitBlogData extends Model
|
||||
'post_type' => 'post',
|
||||
'post_mime_type' => '',
|
||||
'comment_count' => 0,
|
||||
'meta_value' => '2020/02/coronavirus.jpg',
|
||||
'meta_value' => 'https://blog.mermsemr.com/wp-content/uploads/2020/02/coronavirus.jpg',
|
||||
),
|
||||
3 =>
|
||||
array(
|
||||
@@ -361,7 +361,7 @@ heroin.</li></ul>
|
||||
'post_type' => 'post',
|
||||
'post_mime_type' => '',
|
||||
'comment_count' => 0,
|
||||
'meta_value' => '2020/07/drugshealth.jpg',
|
||||
'meta_value' => 'https://blog.mermsemr.com/wp-content/uploads/2020/07/drugshealth.jpg',
|
||||
),
|
||||
4 =>
|
||||
array(
|
||||
@@ -431,7 +431,7 @@ variations from the norm, and in addition other reproductive organ issue
|
||||
'post_type' => 'post',
|
||||
'post_mime_type' => '',
|
||||
'comment_count' => 0,
|
||||
'meta_value' => '2020/07/pregnancy-delay.jpg',
|
||||
'meta_value' => 'https://blog.mermsemr.com/wp-content/uploads/2020/07/pregnancy-delay.jpg',
|
||||
),
|
||||
5 =>
|
||||
array(
|
||||
@@ -469,7 +469,45 @@ variations from the norm, and in addition other reproductive organ issue
|
||||
'post_type' => 'post',
|
||||
'post_mime_type' => '',
|
||||
'comment_count' => 0,
|
||||
'meta_value' => '2020/07/health-tracking.jpg',
|
||||
'meta_value' => 'https://blog.mermsemr.com/wp-content/uploads/2020/07/health-tracking.jpg',
|
||||
),
|
||||
6 =>
|
||||
array(
|
||||
'id' => 19,
|
||||
'ID' => 19,
|
||||
'post_author' => 1,
|
||||
'post_date' => '2019-06-19T11:25:21.000Z',
|
||||
'post_date_gmt' => '2019-06-19T11:25:21.000Z',
|
||||
'post_content' => '<!-- wp:paragraph -->
|
||||
<p>Tracking your health and fitness should be a pivotal part of your training. It helps you to -</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:list -->
|
||||
<ul><li>Measure progress</li><li>Gauge the effectiveness of your exercise regime and diet</li><li>Sustain motivation</li><li>Form healthy habits</li><li>Understand how your lifestyle choices are affecting you</li><li>Make informed decisions about what to do next</li><li>Learn about your body and focus on methods that work for you</li></ul>
|
||||
<!-- /wp:list -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p></p>
|
||||
<!-- /wp:paragraph -->',
|
||||
'post_title' => 'Benefits of your Health Tracking',
|
||||
'post_excerpt' => '',
|
||||
'post_status' => 'publish',
|
||||
'comment_status' => 'closed',
|
||||
'ping_status' => 'open',
|
||||
'post_password' => '',
|
||||
'post_name' => 'benefits-of-your-health-tracking',
|
||||
'to_ping' => '',
|
||||
'pinged' => '',
|
||||
'post_modified' => '2021-09-06T14:03:21.000Z',
|
||||
'post_modified_gmt' => '2021-09-06T14:03:21.000Z',
|
||||
'post_content_filtered' => '',
|
||||
'post_parent' => 0,
|
||||
'guid' => 'https://blog.mermsemr.com/?p=15',
|
||||
'menu_order' => 0,
|
||||
'post_type' => 'post',
|
||||
'post_mime_type' => '',
|
||||
'comment_count' => 0,
|
||||
'meta_value' => 'https://blog.mermsemr.com/wp-content/uploads/2020/07/health-tracking.jpg',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
+15
-18
@@ -18,28 +18,25 @@ class myfitPricing extends Model
|
||||
return array
|
||||
(
|
||||
[
|
||||
'title' => 'This is the title 1 from backend',
|
||||
'text' => 'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.'
|
||||
'icon' => '/static/media/standard.png',
|
||||
'title' => 'Standard',
|
||||
'text' => 'For the basics.',
|
||||
'price' => '$16',
|
||||
'features' =>['Feature 1', 'Feature 2', 'Feature 3', 'Feature 4','Feature 5']
|
||||
],
|
||||
[
|
||||
'title' => 'This is the title 2',
|
||||
'text' => 'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.'
|
||||
'icon' => '/static/media/unlimited.png',
|
||||
'title' => 'Unlimited',
|
||||
'text' => 'Professionals here.',
|
||||
'price' => '$98',
|
||||
'features' =>['Feature 11', 'Feature 22', 'Feature 33', 'Feature 44','Feature 55']
|
||||
],
|
||||
[
|
||||
'title' => 'This is the title 3',
|
||||
'text' => 'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.'
|
||||
],
|
||||
[
|
||||
'title' => 'This is the title 4',
|
||||
'text' => 'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.'
|
||||
],
|
||||
[
|
||||
'title' => 'This is the title 5',
|
||||
'text' => 'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.'
|
||||
],
|
||||
[
|
||||
'title' => 'This is the title 6',
|
||||
'text' => 'Random Text Generator is a web application which provides true random text which you can use in your documents or web designs. How does it work? First we took many books available on project Gutenberg and stored their contents in a database.'
|
||||
'icon' => '/static/media/premium.png',
|
||||
'title' => 'Premium',
|
||||
'text' => 'For small team.',
|
||||
'price' => '$56',
|
||||
'features' =>['Feature 6', 'Feature 77', 'Feature 88', 'Feature 99','Feature 100']
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user