Start of the new Setup Welcome code
这个提交包含在:
父节点
2310014bdc
当前提交
54dea657ec
共有 2 个文件被更改,包括 47 次插入 和 0 次删除
|
|
@ -34,6 +34,16 @@ class Dashboard extends CI_Controller
|
||||||
$this->load->model('logbooks_model');
|
$this->load->model('logbooks_model');
|
||||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
|
/*
|
||||||
|
Setup Code
|
||||||
|
// Check if the user has any logbook locations if not its setup time
|
||||||
|
if (empty($logbooks_locations_array)) {
|
||||||
|
// user has no locations
|
||||||
|
$this->session->set_flashdata('notice', 'You have no locations, please add one to continue.');
|
||||||
|
redirect('information/welcome');
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Calculate Lat/Lng from Locator to use on Maps
|
// Calculate Lat/Lng from Locator to use on Maps
|
||||||
if ($this->session->userdata('user_locator')) {
|
if ($this->session->userdata('user_locator')) {
|
||||||
$this->load->library('qra');
|
$this->load->library('qra');
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Information extends CI_Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function welcome()
|
||||||
|
{
|
||||||
|
$this->load->model('user_model');
|
||||||
|
// Make sure users logged in
|
||||||
|
if ($this->user_model->validate_session() == 0) {
|
||||||
|
// user is not logged in
|
||||||
|
redirect('user/login');
|
||||||
|
}
|
||||||
|
$this->load->model('logbooks_model');
|
||||||
|
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
|
echo "welcome to cloudlog";
|
||||||
|
|
||||||
|
// check if user has any station logbooks
|
||||||
|
|
||||||
|
// if user has no logbooks create a General Logbook
|
||||||
|
|
||||||
|
// If logbooks_locations_array is empty
|
||||||
|
if (empty($logbooks_locations_array)) {
|
||||||
|
// user has no locations
|
||||||
|
echo "You have no locations, please add one to continue.";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if they have provided a valid grid locator
|
||||||
|
|
||||||
|
// Check if Callbook information is provided
|
||||||
|
|
||||||
|
// Check country files are present
|
||||||
|
|
||||||
|
// If all is present welcome the user and redirect to the dashboard
|
||||||
|
}
|
||||||
|
}
|
||||||
正在加载…
在新工单中引用