Merms New Website

This commit is contained in:
Olu Amey
2021-05-19 14:36:02 +00:00
commit 685a80769d
288 changed files with 86164 additions and 0 deletions
+76
View File
@@ -0,0 +1,76 @@
<?php
namespace App\Controllers;
/**
* Class BaseController
*
* BaseController provides a convenient place for loading components
* and performing functions that are needed by all your controllers.
* Extend this class in any new controllers:
* class Home extends BaseController
*
* For security be sure to declare any new methods as protected or private.
*
* @package CodeIgniter
*/
use CodeIgniter\Controller;
class BaseController extends Controller {
/**
* An array of helpers to be loaded automatically upon
* class instantiation. These helpers will be available
* to all other controllers that extend BaseController.
*
* @var array
*/
protected $helpers = [];
/**
* Constructor.
*/
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
// Do Not Edit This Line
parent::initController($request, $response, $logger);
//--------------------------------------------------------------------
// Preload any models, libraries, etc, here.
//--------------------------------------------------------------------
// E.g.:
// $this->session = \Config\Services::session();
$this->session = \Config\Services::session();
}
protected function renderExtPage($page, $data) {
echo view('header');
echo view($page, $data);
echo view('footer');
}
protected function getBlogItems() {
$blog_feed_url = MERMS_BLOG_SITE ."/?feed=rss";
$rss = simplexml_load_file($blog_feed_url);
$blog_post = array();
$blog_cnt =0;
foreach ($rss->channel->item as $item) {
$image = "/assets/image/resources/blog-2.jpg";
//print_r($item);
$itemA = array(
'title' => $item->title,
'desc' => $item->description,
'link' => $item->link,
'date' => $item->pubDate,
'image' => $image,
);
if ($blog_cnt == 0){
$this->session->blogItem = $itemA ;
}
$blog_cnt++;
array_push($blog_post, $itemA);
}
return $blog_post;
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Controllers;
class Developers extends BaseController {
public function index() {
$data = array();
$this->renderExtPage('developers', $data);
}
//--------------------------------------------------------------------
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Controllers;
class Download extends BaseController {
public function index() {
$data = array();
$this->renderExtPage('download', $data);
}
//--------------------------------------------------------------------
}
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Controllers;
class Faq extends BaseController {
public function index() {
$data = array();
$data["merms_faq"] = MERMS_FAQ;
$this->renderExtPage('faq', $data);
}
//--------------------------------------------------------------------
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Controllers;
class Home extends BaseController {
public function index() {
global $myfit_items;
global $practice_text1;
global $practice_text2;
$data = array();
$data["blog_post"] =$this->getBlogItems(); // $blog_post;
$data["myfit_items"] = $myfit_items;
$data["practice_text1"] = $practice_text1;
$data["practice_text2"] = $practice_text2;
$data["country"] = MERMS_COUNTRIES;
$data["merms_faq"] = MERMS_FAQ;
$this->renderExtPage('merms-home', $data);
}
//--------------------------------------------------------------------
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\Controllers;
class Land extends BaseController {
public function index() {
$data = array();
$this->renderExtPage('terms', $data);
}
public function covit() {
$data = array();
$this->renderExtPage('covit', $data);
}
//--------------------------------------------------------------------
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Controllers;
class Merms extends BaseController {
public function index() {
global $myfit_items;
global $practice_text1;
global $practice_text2;
$data = array();
$data["blog_post"] =$this->getBlogItems(); // $blog_post;
$data["myfit_items"] = $myfit_items;
$data["practice_text1"] = $practice_text1;
$data["practice_text2"] = $practice_text2;
$data["country"] = MERMS_COUNTRIES;
$this->renderExtPage('merms-home', $data);
}
//--------------------------------------------------------------------
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Controllers;
class Myfit extends BaseController {
public function index() {
$data = array();
$this->renderExtPage('myfit', $data);
}
//--------------------------------------------------------------------
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Controllers;
class Providers extends BaseController {
public function index() {
$data = array();
$this->renderExtPage('providers', $data);
}
//--------------------------------------------------------------------
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Controllers;
class Support extends BaseController {
public function index() {
global $myfit_items;
global $practice_text1;
global $practice_text2;
$data = array();
$data["blog_post"] =$this->getBlogItems(); // $blog_post;
$data["myfit_items"] = $myfit_items;
$data["practice_text1"] = $practice_text1;
$data["practice_text2"] = $practice_text2;
$data["country"] = MERMS_COUNTRIES;
$this->renderExtPage('merms-home', $data);
}
//--------------------------------------------------------------------
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Controllers;
class Terms extends BaseController {
public function index() {
$data = array();
$this->renderExtPage('terms', $data);
}
//--------------------------------------------------------------------
}