84 lines
1.7 KiB
PHP
84 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
use App\Services\WpContentsClient;
|
|
use App\Services\CoreGradeClient;
|
|
|
|
class Home extends BaseController
|
|
{
|
|
public function index()
|
|
{
|
|
return view('home/index');
|
|
}
|
|
|
|
public function about()
|
|
{
|
|
return view('home/index');
|
|
}
|
|
|
|
public function security()
|
|
{
|
|
return view('home/index');
|
|
}
|
|
|
|
public function terms()
|
|
{
|
|
return view('home/index');
|
|
}
|
|
|
|
public function privacy()
|
|
{
|
|
return view('home/index');
|
|
}
|
|
|
|
public function contact()
|
|
{
|
|
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 howitworks()
|
|
{
|
|
return view('home/howitworks');
|
|
}
|
|
public function blog()
|
|
{
|
|
$data = array();
|
|
$data["blog_post"] =$this->getBlogItems(); // $blog_post;
|
|
return view('blog/index',$data);
|
|
}
|
|
}
|