Start of the new Setup Welcome code

pull/3147/head
Peter Goodhall 2024-06-11 14:50:27 +01:00
rodzic 2310014bdc
commit 54dea657ec
2 zmienionych plików z 47 dodań i 0 usunięć

Wyświetl plik

@ -34,6 +34,16 @@ class Dashboard extends CI_Controller
$this->load->model('logbooks_model');
$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
if ($this->session->userdata('user_locator')) {
$this->load->library('qra');

Wyświetl plik

@ -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
}
}