113 lines
2.6 KiB
PHP
113 lines
2.6 KiB
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
use App\Services\WpContentsClient;
|
|
use App\Services\CoreGradeClient;
|
|
|
|
class Home extends BaseController
|
|
{
|
|
public function index()
|
|
{
|
|
// $siteData =[];
|
|
// $out = $this->APIcall('GET','http://10.10.10.35:8805/blogdata/coregrade',[]);
|
|
// $siteData['blogdata'] = is_array( $out['payload']['blogdata']) ? $out['payload']['blogdata'] : [];
|
|
// $siteData['blog_media_url'] = $out['payload']['image_url'];
|
|
|
|
$siteData = $this->getBlogItems();
|
|
|
|
return view('web/index',$siteData);
|
|
}
|
|
|
|
public function blog()
|
|
{
|
|
$siteData = $this->getBlogItems();
|
|
// $data = array();
|
|
// $data["blog_post"] =$this->getBlogItems(); // $blog_post;
|
|
//var_dump( $siteData);
|
|
//exit();
|
|
return view('web/blog',$siteData );
|
|
}
|
|
|
|
public function privacy()
|
|
{
|
|
return view('web/privacy');
|
|
}
|
|
|
|
public function contact()
|
|
{
|
|
return view('web/contact');
|
|
}
|
|
|
|
|
|
public function about()
|
|
{
|
|
return view('web/about');
|
|
}
|
|
|
|
public function blogdetails()
|
|
{
|
|
$currentPost = $this->getBlogOneItem(13);
|
|
return view('web/blog-details',$currentPost);
|
|
}
|
|
|
|
public function security()
|
|
{
|
|
return view('home/index');
|
|
}
|
|
|
|
public function terms()
|
|
{
|
|
return view('web/terms');
|
|
}
|
|
|
|
|
|
public function indexold()
|
|
{
|
|
return view('home/index');
|
|
}
|
|
public function login()
|
|
{
|
|
return view('home/login');
|
|
}
|
|
|
|
public function newuser()
|
|
{
|
|
return view('home/newuser');
|
|
}
|
|
|
|
public function resetpass()
|
|
{
|
|
$data = array();
|
|
$out = [];
|
|
$data["next_page"] = 50;
|
|
$data["error_message"] = "";
|
|
$request = \Config\Services::request();
|
|
|
|
if ($_POST) {
|
|
$data['username'] = trim($request->getVar('username'));
|
|
$data["mode"] = RESET_START;
|
|
if ($data['username'] != '') {
|
|
// echo COREGRADE_START_RESET_PASSWORD;
|
|
$ret = CoreGradeClient::coreGradeWebApi(COREGRADE_START_RESET_PASSWORD, $data, $out);
|
|
$data["next_page"] = 100;
|
|
} else {
|
|
$data["error_message"] = "Please enter a valid username to continue";
|
|
|
|
}
|
|
}
|
|
return view('home/resetpass', $data);
|
|
}
|
|
|
|
|
|
// public function blogdetails()
|
|
// {
|
|
// return view('web/blog-details');
|
|
// }
|
|
// public function blog()
|
|
// {
|
|
// $data = array();
|
|
// $data["blog_post"] =$this->getBlogItems(); // $blog_post;
|
|
// return view('blog/index',$data);
|
|
// }
|
|
}
|