mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
RESTv1
This commit is contained in:
Executable
+44
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Vilesci extends CI_Controller {
|
||||
|
||||
/**
|
||||
* Index Page for this controller.
|
||||
*
|
||||
* Maps to the following URL
|
||||
* http://example.com/index.php/welcome
|
||||
* - or -
|
||||
* http://example.com/index.php/welcome/index
|
||||
* - or -
|
||||
* Since this controller is set as the default controller in
|
||||
* config/routes.php, it's displayed at http://example.com/
|
||||
*
|
||||
* So any other public methods not prefixed with an underscore will
|
||||
* map to /index.php/welcome/<method_name>
|
||||
* @see http://codeigniter.com/user_guide/general/urls.html
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if ($this->dbupdate())
|
||||
echo 'System-DB needs update!';
|
||||
else
|
||||
{
|
||||
$this->load->view('templates/header');
|
||||
$this->load->view('vilesci_frameset');
|
||||
$this->load->view('templates/footer');
|
||||
}
|
||||
}
|
||||
|
||||
private function dbupdate()
|
||||
{
|
||||
// Check for update (codeigniter migration)
|
||||
$this->load->library('migration');
|
||||
if ($this->migration->current() === FALSE)
|
||||
show_error($this->migration->error_string());
|
||||
if ($this->migration->current() != $this->migration->latest())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user