[User selectable columns] Added the possibility to configure some of the columns shown in the dashboard and in the logbook.

这个提交包含在:
Andreas 2021-05-05 17:52:42 +02:00
父节点 4fb2d03913
当前提交 159aa0562d
共有 10 个文件被更改,包括 490 次插入81 次删除

查看文件

@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
| be upgraded / downgraded to. | be upgraded / downgraded to.
| |
*/ */
$config['migration_version'] = 68; $config['migration_version'] = 69;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

查看文件

@ -223,7 +223,7 @@ class Logbook extends CI_Controller {
function worked_grid_before($gridsquare, $type, $band, $mode) function worked_grid_before($gridsquare, $type, $band, $mode)
{ {
if (strlen($gridsquare) < 4) if (strlen($gridsquare) < 4)
return false; return false;
$CI =& get_instance(); $CI =& get_instance();
$CI->load->model('Stations'); $CI->load->model('Stations');
@ -231,14 +231,14 @@ class Logbook extends CI_Controller {
if($type == "SAT") { if($type == "SAT") {
$this->db->where('COL_PROP_MODE', 'SAT'); $this->db->where('COL_PROP_MODE', 'SAT');
} else { } else {
$this->db->where('COL_MODE', $mode); $this->db->where('COL_MODE', $mode);
$this->db->where('COL_BAND', $band); $this->db->where('COL_BAND', $band);
$this->db->where('COL_PROP_MODE !=','SAT'); $this->db->where('COL_PROP_MODE !=','SAT');
} }
$this->db->where('station_id', $station_id); $this->db->where('station_id', $station_id);
$this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4)); $this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4));
$this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "desc"); $this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "desc");
$this->db->limit(1); $this->db->limit(1);
@ -257,7 +257,7 @@ class Logbook extends CI_Controller {
/* /*
* Function: jsonlookupgrid * Function: jsonlookupgrid
* *
* Usage: Used to look up gridsquares when creating a QSO to check whether its needed or not * Usage: Used to look up gridsquares when creating a QSO to check whether its needed or not
* the $type variable is only used for satellites, set this to SAT. * the $type variable is only used for satellites, set this to SAT.
* *
*/ */
@ -271,16 +271,16 @@ class Logbook extends CI_Controller {
$station_id = $CI->Stations->find_active(); $station_id = $CI->Stations->find_active();
if($type == "SAT") { if($type == "SAT") {
$this->db->where('COL_PROP_MODE', 'SAT'); $this->db->where('COL_PROP_MODE', 'SAT');
} else { } else {
$this->db->where('COL_MODE', $mode); $this->db->where('COL_MODE', $mode);
$this->db->where('COL_BAND', $band); $this->db->where('COL_BAND', $band);
$this->db->where('COL_PROP_MODE !=','SAT'); $this->db->where('COL_PROP_MODE !=','SAT');
} }
$this->db->where('station_id', $station_id); $this->db->where('station_id', $station_id);
$this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4)); $this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4));
$query = $this->db->get($this->config->item('table_name'), 1, 0); $query = $this->db->get($this->config->item('table_name'), 1, 0);
foreach ($query->result() as $workedBeforeRow) foreach ($query->result() as $workedBeforeRow)
@ -295,7 +295,7 @@ class Logbook extends CI_Controller {
} }
function jsonlookupdxcc($country, $type, $band, $mode) { function jsonlookupdxcc($country, $type, $band, $mode) {
$return = [ $return = [
"workedBefore" => false, "workedBefore" => false,
]; ];
@ -305,17 +305,17 @@ class Logbook extends CI_Controller {
$station_id = $CI->Stations->find_active(); $station_id = $CI->Stations->find_active();
if($type == "SAT") { if($type == "SAT") {
$this->db->where('COL_PROP_MODE', 'SAT'); $this->db->where('COL_PROP_MODE', 'SAT');
} else { } else {
$this->db->where('COL_MODE', $mode); $this->db->where('COL_MODE', $mode);
$this->db->where('COL_BAND', $band); $this->db->where('COL_BAND', $band);
$this->db->where('COL_PROP_MODE !=','SAT'); $this->db->where('COL_PROP_MODE !=','SAT');
} }
$this->db->where('station_id', $station_id); $this->db->where('station_id', $station_id);
$this->db->where('COL_COUNTRY', urldecode($country)); $this->db->where('COL_COUNTRY', urldecode($country));
$query = $this->db->get($this->config->item('table_name'), 1, 0); $query = $this->db->get($this->config->item('table_name'), 1, 0);
foreach ($query->result() as $workedBeforeRow) foreach ($query->result() as $workedBeforeRow)
{ {
@ -329,7 +329,7 @@ class Logbook extends CI_Controller {
} }
function jsonlookupcallsign($callsign, $type, $band, $mode) { function jsonlookupcallsign($callsign, $type, $band, $mode) {
// Convert - in Callsign to / Used for URL processing // Convert - in Callsign to / Used for URL processing
$callsign = str_replace("-","/",$callsign); $callsign = str_replace("-","/",$callsign);
@ -342,17 +342,17 @@ class Logbook extends CI_Controller {
$station_id = $CI->Stations->find_active(); $station_id = $CI->Stations->find_active();
if($type == "SAT") { if($type == "SAT") {
$this->db->where('COL_PROP_MODE', 'SAT'); $this->db->where('COL_PROP_MODE', 'SAT');
} else { } else {
$this->db->where('COL_MODE', $mode); $this->db->where('COL_MODE', $mode);
$this->db->where('COL_BAND', $band); $this->db->where('COL_BAND', $band);
$this->db->where('COL_PROP_MODE !=','SAT'); $this->db->where('COL_PROP_MODE !=','SAT');
} }
$this->db->where('station_id', $station_id); $this->db->where('station_id', $station_id);
$this->db->where('COL_CALL', strtoupper($callsign)); $this->db->where('COL_CALL', strtoupper($callsign));
$query = $this->db->get($this->config->item('table_name'), 1, 0); $query = $this->db->get($this->config->item('table_name'), 1, 0);
foreach ($query->result() as $workedBeforeRow) foreach ($query->result() as $workedBeforeRow)
{ {
@ -413,7 +413,7 @@ class Logbook extends CI_Controller {
echo "]"; echo "]";
echo "}"; echo "}";
} }
function view($id) { function view($id) {
$this->load->model('user_model'); $this->load->model('user_model');
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; } if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
@ -437,11 +437,11 @@ class Logbook extends CI_Controller {
$this->load->view('view_log/qso'); $this->load->view('view_log/qso');
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
function partial($id) { function partial($id) {
$this->load->model('user_model'); $this->load->model('user_model');
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; } if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
$html = ""; $html = "";
@ -563,12 +563,12 @@ class Logbook extends CI_Controller {
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; } if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
$this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*'); //$this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
$this->db->from($this->config->item('table_name')); $this->db->from($this->config->item('table_name'));
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
$this->db->like(''.$this->config->item('table_name').'.COL_CALL', $id); $this->db->like(''.$this->config->item('table_name').'.COL_CALL', $id);
$this->db->or_like(''.$this->config->item('table_name').'.COL_GRIDSQUARE', $id); $this->db->or_like(''.$this->config->item('table_name').'.COL_GRIDSQUARE', $id);
$this->db->or_like(''.$this->config->item('table_name').'.COL_VUCC_GRIDS', $id); $this->db->or_like(''.$this->config->item('table_name').'.COL_VUCC_GRIDS', $id);
@ -716,4 +716,4 @@ class Logbook extends CI_Controller {
} }
} }

查看文件

@ -57,6 +57,10 @@ class User extends CI_Controller {
$data['user_stylesheet'] = $this->input->post('user_stylesheet'); $data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup'); $data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
$data['user_show_notes'] = $this->input->post('user_show_notes'); $data['user_show_notes'] = $this->input->post('user_show_notes');
$data['user_column1'] = $this->input->post('user_column1');
$data['user_column2'] = $this->input->post('user_column2');
$data['user_column3'] = $this->input->post('user_column3');
$data['user_column4'] = $this->input->post('user_column4');
$this->load->view('user/add', $data); $this->load->view('user/add', $data);
} else { } else {
$this->load->view('user/add', $data); $this->load->view('user/add', $data);
@ -65,7 +69,24 @@ class User extends CI_Controller {
} }
else else
{ {
switch($this->user_model->add($this->input->post('user_name'), $this->input->post('user_password'), $this->input->post('user_email'), $this->input->post('user_type'), $this->input->post('user_firstname'), $this->input->post('user_lastname'), $this->input->post('user_callsign'), $this->input->post('user_locator'), $this->input->post('user_timezone'), $this->input->post('user_measurement_base'), $this->input->post('user_date_format'), $this->input->post('user_stylesheet'), $this->input->post('user_sota_lookup'), $this->input->post('user_show_notes'))) { switch($this->user_model->add($this->input->post('user_name'),
$this->input->post('user_password'),
$this->input->post('user_email'),
$this->input->post('user_type'),
$this->input->post('user_firstname'),
$this->input->post('user_lastname'),
$this->input->post('user_callsign'),
$this->input->post('user_locator'),
$this->input->post('user_timezone'),
$this->input->post('user_measurement_base'),
$this->input->post('user_date_format'),
$this->input->post('user_stylesheet'),
$this->input->post('user_sota_lookup'),
$this->input->post('user_show_notes'),
$this->input->post('user_column1'),
$this->input->post('user_column2'),
$this->input->post('user_column3'),
$this->input->post('user_column4'))) {
// Check for errors // Check for errors
case EUSERNAMEEXISTS: case EUSERNAMEEXISTS:
$data['username_error'] = 'Username <b>'.$this->input->post('user_name').'</b> already in use!'; $data['username_error'] = 'Username <b>'.$this->input->post('user_name').'</b> already in use!';
@ -97,6 +118,10 @@ class User extends CI_Controller {
$data['user_stylesheet'] = $this->input->post('user_stylesheet'); $data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup'); $data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
$data['user_show_notes'] = $this->input->post('user_show_notes'); $data['user_show_notes'] = $this->input->post('user_show_notes');
$data['user_column1'] = $this->input->post('user_column1');
$data['user_column2'] = $this->input->post('user_column2');
$data['user_column3'] = $this->input->post('user_column3');
$data['user_column4'] = $this->input->post('user_column4');
$this->load->view('user/add', $data); $this->load->view('user/add', $data);
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
@ -265,6 +290,30 @@ class User extends CI_Controller {
$data['user_show_notes'] = $q->user_show_notes; $data['user_show_notes'] = $q->user_show_notes;
} }
if($this->input->post('user_column1')) {
$data['user_column1'] = $this->input->post('user_column1', true);
} else {
$data['user_column1'] = $q->user_column1;
}
if($this->input->post('user_column2')) {
$data['user_column2'] = $this->input->post('user_column2', true);
} else {
$data['user_column2'] = $q->user_column2;
}
if($this->input->post('user_column3')) {
$data['user_column3'] = $this->input->post('user_column3', true);
} else {
$data['user_column3'] = $q->user_column3;
}
if($this->input->post('user_column4')) {
$data['user_column4'] = $this->input->post('user_column4', true);
} else {
$data['user_column4'] = $q->user_column4;
}
$this->load->view('user/edit', $data); $this->load->view('user/edit', $data);
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }
@ -308,6 +357,10 @@ class User extends CI_Controller {
$data['user_stylesheet'] = $this->input->post('user_stylesheet'); $data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup'); $data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
$data['user_show_notes'] = $this->input->post('user_show_notes'); $data['user_show_notes'] = $this->input->post('user_show_notes');
$data['user_column1'] = $this->input->post('user_column1');
$data['user_column2'] = $this->input->post('user_column2');
$data['user_column3'] = $this->input->post('user_column3');
$data['user_column4'] = $this->input->post('user_column4');
$this->load->view('user/edit'); $this->load->view('user/edit');
$this->load->view('interface_assets/footer'); $this->load->view('interface_assets/footer');
} }

查看文件

@ -0,0 +1,46 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* This migration creates a table called options which will hold global options needed within cloudlog
* removing the need for lots of configuration files.
*/
class Migration_add_user_definable_columns extends CI_Migration {
public function up()
{
$fields = array(
'user_column1 varchar(32) default "Mode"',
);
$this->dbforge->add_column('users', $fields);
$fields = array(
'user_column2 varchar(32) default "RSTS"',
);
$this->dbforge->add_column('users', $fields);
$fields = array(
'user_column3 varchar(32) default "RSTR"',
);
$this->dbforge->add_column('users', $fields);
$fields = array(
'user_column4 varchar(32) default "Band"',
);
$this->dbforge->add_column('users', $fields);
}
public function down()
{
$this->dbforge->drop_column('users', 'user_column1');
$this->dbforge->drop_column('users', 'user_column2');
$this->dbforge->drop_column('users', 'user_column3');
$this->dbforge->drop_column('users', 'user_column4');
}
}

查看文件

@ -790,7 +790,7 @@ class Logbook_model extends CI_Model {
} }
function get_qsos($num, $offset) { function get_qsos($num, $offset) {
$this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*'); //$this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
$this->db->from($this->config->item('table_name')); $this->db->from($this->config->item('table_name'));
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
@ -865,7 +865,7 @@ class Logbook_model extends CI_Model {
$CI->load->model('Stations'); $CI->load->model('Stations');
$station_id = $CI->Stations->find_active(); $station_id = $CI->Stations->find_active();
$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_STX_STRING, COL_SRX_STRING'); //$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_STX_STRING, COL_SRX_STRING, COL_IOTA, COL_STATE, COL_GRIDSQUARE');
$this->db->where("station_id", $station_id); $this->db->where("station_id", $station_id);
$this->db->order_by("COL_TIME_ON", "desc"); $this->db->order_by("COL_TIME_ON", "desc");
$this->db->limit($num); $this->db->limit($num);

查看文件

@ -114,6 +114,10 @@ class User_Model extends CI_Model {
'user_stylesheet' => xss_clean($user_stylesheet), 'user_stylesheet' => xss_clean($user_stylesheet),
'user_sota_lookup' => xss_clean($user_sota_lookup), 'user_sota_lookup' => xss_clean($user_sota_lookup),
'user_show_notes' => xss_clean($user_show_notes), 'user_show_notes' => xss_clean($user_show_notes),
'user_column1' => xss_clean($user_column1),
'user_column2' => xss_clean($user_column2),
'user_column3' => xss_clean($user_column3),
'user_column4' => xss_clean($user_column4),
); );
// Check the password is valid // Check the password is valid
@ -157,6 +161,10 @@ class User_Model extends CI_Model {
'user_stylesheet' => xss_clean($fields['user_stylesheet']), 'user_stylesheet' => xss_clean($fields['user_stylesheet']),
'user_sota_lookup' => xss_clean($fields['user_sota_lookup']), 'user_sota_lookup' => xss_clean($fields['user_sota_lookup']),
'user_show_notes' => xss_clean($fields['user_show_notes']), 'user_show_notes' => xss_clean($fields['user_show_notes']),
'user_column1' => xss_clean($fields['user_column1']),
'user_column2' => xss_clean($fields['user_column2']),
'user_column3' => xss_clean($fields['user_column3']),
'user_column4' => xss_clean($fields['user_column4']),
); );
// Check to see if the user is allowed to change user levels // Check to see if the user is allowed to change user levels
@ -266,6 +274,10 @@ class User_Model extends CI_Model {
'user_stylesheet' => $u->row()->user_stylesheet, 'user_stylesheet' => $u->row()->user_stylesheet,
'user_sota_lookup' => $u->row()->user_sota_lookup, 'user_sota_lookup' => $u->row()->user_sota_lookup,
'user_show_notes' => $u->row()->user_show_notes, 'user_show_notes' => $u->row()->user_show_notes,
'user_column1' => $u->row()->user_column1,
'user_column2' => $u->row()->user_column2,
'user_column3' => $u->row()->user_column3,
'user_column4' => $u->row()->user_column4,
); );
$this->session->set_userdata($userdata); $this->session->set_userdata($userdata);

查看文件

@ -40,19 +40,65 @@
<th><?php echo $this->lang->line('general_word_time'); ?></th> <th><?php echo $this->lang->line('general_word_time'); ?></th>
<?php } ?> <?php } ?>
<th><?php echo $this->lang->line('gen_hamradio_call'); ?></th> <th><?php echo $this->lang->line('gen_hamradio_call'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_mode'); ?></th> <?php
<th class="d-none d-sm-table-cell"><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></th> echo '<th>';
<th class="d-none d-sm-table-cell"><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></th> switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) {
<th><?php echo $this->lang->line('gen_hamradio_band'); ?></th> case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rst_sent'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rst_recv'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo 'IOTA'; break;
case 'State': echo 'State'; break;
case 'Grid': echo 'Gridsquare'; break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</th>' .
'<th>';
switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rst_sent'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rst_recv'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo 'IOTA'; break;
case 'State': echo 'State'; break;
case 'Grid': echo 'Gridsquare'; break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</th>' .
'<th>';
switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rst_sent'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rst_recv'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo 'IOTA'; break;
case 'State': echo 'State'; break;
case 'Grid': echo 'Gridsquare'; break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</th>' .
'<th>';
switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rst_sent'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rst_recv'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo 'IOTA'; break;
case 'State': echo 'State'; break;
case 'Grid': echo 'Gridsquare'; break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</th>';
?>
</tr> </tr>
</thead> </thead>
<?php <?php
$i = 0; $i = 0;
foreach ($last_five_qsos->result() as $row) { ?> foreach ($last_five_qsos->result() as $row) { ?>
<?php echo '<tr class="tr'.($i & 1).'">'; ?> <?php echo '<tr class="tr'.($i & 1).'">'; ?>
<?php <?php
// Get Date format // Get Date format
if($this->session->userdata('user_date_format')) { if($this->session->userdata('user_date_format')) {
@ -68,19 +114,60 @@
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td> <td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> <?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td> <td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
<?php } else { ?>
<?php } ?> <?php } ?>
<td> <td>
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></a> <a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></a>
</td> </td>
<td><?php echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; ?></td> <?php
<td class="d-none d-sm-table-cell"><?php echo $row->COL_RST_SENT; ?> <?php if ($row->COL_STX_STRING) { ?><span class="label"><?php echo $row->COL_STX_STRING;?></span><?php } ?></td> switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) {
<td class="d-none d-sm-table-cell"><?php echo $row->COL_RST_RCVD; ?> <?php if ($row->COL_SRX_STRING) { ?><span class="label"><?php echo $row->COL_SRX_STRING;?></span><?php } ?></td> case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
<?php if($row->COL_SAT_NAME != null) { ?> case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '<span class="label">' . $row->COL_STX_STRING . '</span>';}; break;
<td><?php echo $row->COL_SAT_NAME; ?></td> case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '<span class="label">' . $row->COL_SRX_STRING . '</span>';}; break;
<?php } else { ?> case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
<td><?php echo strtolower($row->COL_BAND); ?></td> case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
<?php } ?> case 'Grid': echo '<td>' . ($row->COL_GRIDSQUARE); break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '<span class="label">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '<span class="label">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'Grid': echo '<td>' . ($row->COL_GRIDSQUARE); break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '<span class="label">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '<span class="label">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'Grid': echo '<td>' . ($row->COL_GRIDSQUARE); break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX_STRING) { echo '<span class="label">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX_STRING) { echo '<span class="label">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'Grid': echo '<td>' . ($row->COL_GRIDSQUARE); break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
?>
</tr> </tr>
<?php $i++; } ?> <?php $i++; } ?>
</table> </table>
@ -96,7 +183,7 @@
<tr class="titles"> <tr class="titles">
<td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td> <td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td>
</tr> </tr>
<?php foreach ($radio_status->result_array() as $row) { ?> <?php foreach ($radio_status->result_array() as $row) { ?>
<tr> <tr>
<td><?php echo $row['radio']; ?></td> <td><?php echo $row['radio']; ?></td>
@ -114,8 +201,8 @@
<?php } ?> <?php } ?>
<?php <?php
// converts a frequency in Hz (e.g. 3650) to 3.650 MHz // converts a frequency in Hz (e.g. 3650) to 3.650 MHz
function frequency_display_string($frequency) function frequency_display_string($frequency)
{ {
return number_format (($frequency / 1000 / 1000), 3) . " MHz"; return number_format (($frequency / 1000 / 1000), 3) . " MHz";
@ -126,12 +213,12 @@
<tr class="titles"> <tr class="titles">
<td colspan="2"><i class="fas fa-chart-bar"></i> <?php echo $this->lang->line('dashboard_qso_breakdown'); ?></td> <td colspan="2"><i class="fas fa-chart-bar"></i> <?php echo $this->lang->line('dashboard_qso_breakdown'); ?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo $this->lang->line('general_word_total'); ?></td> <td><?php echo $this->lang->line('general_word_total'); ?></td>
<td><?php echo $total_qsos; ?></td> <td><?php echo $total_qsos; ?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo $this->lang->line('general_word_year'); ?></td> <td><?php echo $this->lang->line('general_word_year'); ?></td>
<td><?php echo $year_qsos; ?></td> <td><?php echo $year_qsos; ?></td>
@ -149,7 +236,7 @@
<tr class="titles"> <tr class="titles">
<td colspan="2"><i class="fas fa-globe-europe"></i> <?php echo $this->lang->line('dashboard_countries_breakdown'); ?></td> <td colspan="2"><i class="fas fa-globe-europe"></i> <?php echo $this->lang->line('dashboard_countries_breakdown'); ?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo $this->lang->line('general_word_worked'); ?></td> <td><?php echo $this->lang->line('general_word_worked'); ?></td>
<td><?php echo $total_countries; ?></td> <td><?php echo $total_countries; ?></td>
@ -162,7 +249,7 @@
<?php echo $total_countries_confirmed_lotw; ?> <?php echo $total_countries_confirmed_lotw; ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><?php echo $this->lang->line('general_word_needed'); ?></td> <td><?php echo $this->lang->line('general_word_needed'); ?></td>
<td><?php echo $total_countries_needed; ?></td> <td><?php echo $total_countries_needed; ?></td>
@ -170,21 +257,21 @@
</table> </table>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?> <?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
<table class="table table-striped"> <table class="table table-striped">
<tr class="titles"> <tr class="titles">
<td colspan="2"><i class="fas fa-envelope"></i> <?php echo $this->lang->line('general_word_qslcards'); ?></td> <td colspan="2"><i class="fas fa-envelope"></i> <?php echo $this->lang->line('general_word_qslcards'); ?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo $this->lang->line('general_word_sent'); ?></td> <td><?php echo $this->lang->line('general_word_sent'); ?></td>
<td><?php echo $total_qsl_sent; ?></td> <td><?php echo $total_qsl_sent; ?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo $this->lang->line('general_word_received'); ?></td> <td><?php echo $this->lang->line('general_word_received'); ?></td>
<td><?php echo $total_qsl_recv; ?></td> <td><?php echo $total_qsl_recv; ?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo $this->lang->line('general_word_requested'); ?></td> <td><?php echo $this->lang->line('general_word_requested'); ?></td>
<td><?php echo $total_qsl_requested; ?></td> <td><?php echo $total_qsl_requested; ?></td>

查看文件

@ -136,6 +136,62 @@
<option value="1"><?php echo $this->lang->line('general_word_yes'); ?></option> <option value="1"><?php echo $this->lang->line('general_word_yes'); ?></option>
</select> </select>
</div> </div>
<div class="form-row">
<div class="form-group col-md-3">
<label for="column1">Column 1.</label>
<select class="custom-select" id="column1" name="user_column1">
<option value="Band"> <?php echo $this->lang->line('gen_hamradio_band'); ?></option>
<option value="Mode" selected ='selected'> <?php echo $this->lang->line('gen_hamradio_mode'); ?></option>
<option value="RSTS"><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></option>
<option value="RSTR"><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></option>
<option value="Country"><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA">IOTA</option>
<option value="State">State</option>
<option value="Grid">Gridsquare</option>
</select>
</div>
<div class="form-group col-md-3">
<label for="column2">Column 2.</label>
<select class="custom-select" id="column2" name="user_column2">
<option value="Band"> <?php echo $this->lang->line('gen_hamradio_band'); ?></option>
<option value="Mode"> <?php echo $this->lang->line('gen_hamradio_mode'); ?></option>
<option value="RSTS" selected ='selected'><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></option>
<option value="RSTR"><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></option>
<option value="Country"><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA">IOTA</option>
<option value="State">State</option>
<option value="Grid">Gridsquare</option>
</select>
</div>
<div class="form-group col-md-3">
<label for="column3">Column 3.</label>
<select class="custom-select" id="column3" name="user_column3">
<option value="Band"> <?php echo $this->lang->line('gen_hamradio_band'); ?></option>
<option value="Mode"> <?php echo $this->lang->line('gen_hamradio_mode'); ?></option>
<option value="RSTS"><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></option>
<option value="RSTR" selected ='selected'><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></option>
<option value="Country"><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA">IOTA</option>
<option value="State">State</option>
<option value="Grid">Gridsquare</option>
</select>
</div>
<div class="form-group col-md-3">
<label for="column4">Column 4.</label>
<select class="custom-select" id="column4" name="user_column4">
<option value="Band" selected ='selected'> <?php echo $this->lang->line('gen_hamradio_band'); ?></option>
<option value="Mode"> <?php echo $this->lang->line('gen_hamradio_mode'); ?></option>
<option value="RSTS"><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></option>
<option value="RSTR"><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></option>
<option value="Country"><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA">IOTA</option>
<option value="State">State</option>
<option value="Grid">Gridsquare</option>
</select>
</div>
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" /> <input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
<button type="submit" class="btn btn-primary">Create Account</button> <button type="submit" class="btn btn-primary">Create Account</button>

查看文件

@ -314,6 +314,76 @@
</div> </div>
</div> </div>
<br>
<div class="row">
<div class="col-md">
<div class="card">
<div class="card-header">
Logbook fields
</div>
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-3">
<label for="column1">Choose column 1</label>
<select class="custom-select" id="column1" name="user_column1">
<option value="Band" <?php if ($user_column1 == "Band") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_band'); ?></option>
<option value="Mode" <?php if ($user_column1 == "Mode") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_mode'); ?></option>
<option value="RSTS" <?php if ($user_column1 == "RSTS") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></option>
<option value="RSTR" <?php if ($user_column1 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></option>
<option value="Country" <?php if ($user_column1 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column1 == "IOTA") { echo " selected =\"selected\""; } ?>>IOTA</option>
<option value="State" <?php if ($user_column1 == "State") { echo " selected =\"selected\""; } ?>>State</option>
<option value="Grid" <?php if ($user_column1 == "Grid") { echo " selected =\"selected\""; } ?>>Gridsquare</option>
</select>
</div>
<div class="form-group col-md-3">
<label for="column2">Choose column 2</label>
<select class="custom-select" id="column2" name="user_column2">
<option value="Band" <?php if ($user_column2 == "Band") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_band'); ?></option>
<option value="Mode" <?php if ($user_column2 == "Mode") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_mode'); ?></option>
<option value="RSTS" <?php if ($user_column2 == "RSTS") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></option>
<option value="RSTR" <?php if ($user_column2 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></option>
<option value="Country" <?php if ($user_column2 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column2 == "IOTA") { echo " selected =\"selected\""; } ?>>IOTA</option>
<option value="State" <?php if ($user_column2 == "State") { echo " selected =\"selected\""; } ?>>State</option>
<option value="Grid" <?php if ($user_column2 == "Grid") { echo " selected =\"selected\""; } ?>>Gridsquare</option>
</select>
</div>
<div class="form-group col-md-3">
<label for="column3">Choose column 3</label>
<select class="custom-select" id="column3" name="user_column3">
<option value="Band" <?php if ($user_column3 == "Band") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_band'); ?></option>
<option value="Mode" <?php if ($user_column3 == "Mode") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_mode'); ?></option>
<option value="RSTS" <?php if ($user_column3 == "RSTS") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></option>
<option value="RSTR" <?php if ($user_column3 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></option>
<option value="Country" <?php if ($user_column3 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column3 == "IOTA") { echo " selected =\"selected\""; } ?>>IOTA</option>
<option value="State" <?php if ($user_column3 == "State") { echo " selected =\"selected\""; } ?>>State</option>
<option value="Grid" <?php if ($user_column3 == "Grid") { echo " selected =\"selected\""; } ?>>Gridsquare</option>
</select>
</div>
<div class="form-group col-md-3">
<label for="column4">Choose column 4</label>
<select class="custom-select" id="column4" name="user_column4">
<option value="Band" <?php if ($user_column4 == "Band") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_band'); ?></option>
<option value="Mode" <?php if ($user_column4 == "Mode") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_mode'); ?></option>
<option value="RSTS" <?php if ($user_column4 == "RSTS") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rst_sent'); ?></option>
<option value="RSTR" <?php if ($user_column4 == "RSTR") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('gen_hamradio_rst_recv'); ?></option>
<option value="Country" <?php if ($user_column4 == "Country") { echo " selected =\"selected\""; } ?>><?php echo $this->lang->line('general_word_country'); ?></option>
<option value="IOTA" <?php if ($user_column4 == "IOTA") { echo " selected =\"selected\""; } ?>>IOTA</option>
<option value="State" <?php if ($user_column4 == "State") { echo " selected =\"selected\""; } ?>>State</option>
<option value="Grid" <?php if ($user_column4 == "Grid") { echo " selected =\"selected\""; } ?>>Gridsquare</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" /> <input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
<br> <br>
@ -321,6 +391,4 @@
<br> <br>
<br> <br>
</form> </form>
</div> </div>

查看文件

@ -6,10 +6,56 @@
<td><?php echo $this->lang->line('general_word_time'); ?></td> <td><?php echo $this->lang->line('general_word_time'); ?></td>
<?php } ?> <?php } ?>
<td><?php echo $this->lang->line('gen_hamradio_call'); ?></td> <td><?php echo $this->lang->line('gen_hamradio_call'); ?></td>
<td><?php echo $this->lang->line('gen_hamradio_mode'); ?></td> <?php
<td><?php echo $this->lang->line('gen_hamradio_rsts'); ?></td> echo '<td>';
<td><?php echo $this->lang->line('gen_hamradio_rstr'); ?></td> switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) {
<td><?php echo $this->lang->line('gen_hamradio_band'); ?></td> case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rst_sent'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rst_recv'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo 'IOTA'; break;
case 'State': echo 'State'; break;
case 'Grid': echo 'Gridsquare'; break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
echo '<td>';
switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rst_sent'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rst_recv'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo 'IOTA'; break;
case 'State': echo 'State'; break;
case 'Grid': echo 'Gridsquare'; break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
echo '<td>';
switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rst_sent'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rst_recv'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo 'IOTA'; break;
case 'State': echo 'State'; break;
case 'Grid': echo 'Gridsquare'; break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
echo '<td>';
switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rst_sent'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rst_recv'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo 'IOTA'; break;
case 'State': echo 'State'; break;
case 'Grid': echo 'Gridsquare'; break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</td>';
?>
<td><?php echo $this->lang->line('general_word_country'); ?></td> <td><?php echo $this->lang->line('general_word_country'); ?></td>
<?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> <?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<td>QSL</td> <td>QSL</td>
@ -27,7 +73,7 @@
</tr> </tr>
<?php $i = 0; foreach ($results->result() as $row) { ?> <?php $i = 0; foreach ($results->result() as $row) { ?>
<?php <?php
// Get Date format // Get Date format
if($this->session->userdata('user_date_format')) { if($this->session->userdata('user_date_format')) {
// If Logged in and session exists // If Logged in and session exists
@ -45,14 +91,55 @@
<td> <td>
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></a> <a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></a>
</td> </td>
<td><?php echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; ?></td> <?php
<td><?php echo $row->COL_RST_SENT; ?> <?php if ($row->COL_STX) { ?><span class="badge badge-light"><?php echo $row->COL_STX;?></span><?php } ?><?php if ($row->COL_STX_STRING) { ?><span class="badge badge-light"><?php echo $row->COL_STX_STRING;?></span><?php } ?></td>
<td><?php echo $row->COL_RST_RCVD; ?> <?php if ($row->COL_SRX) { ?><span class="badge badge-light"><?php echo $row->COL_SRX;?></span><?php } ?><?php if ($row->COL_SRX_STRING) { ?><span class="badge badge-light"><?php echo $row->COL_SRX_STRING;?></span><?php } ?></td> switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) {
<?php if($row->COL_SAT_NAME != null) { ?> case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
<td><?php echo $row->COL_SAT_NAME; ?></td> case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
<?php } else { ?> case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
<td><?php echo strtolower($row->COL_BAND); ?></td> case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
<?php } ?> case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'Grid': echo '<td>' . ($row->COL_GRIDSQUARE); break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'Grid': echo '<td>' . ($row->COL_GRIDSQUARE); break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'Grid': echo '<td>' . ($row->COL_GRIDSQUARE); break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span class="badge badge-light">' . $row->COL_STX . '</span>';}if ($row->COL_STX_STRING) { echo '<span class="badge badge-light">' . $row->COL_STX_STRING . '</span>';}; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span class="badge badge-light">' . $row->COL_SRX . '</span>';}if ($row->COL_SRX_STRING) { echo '<span class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';}; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'Grid': echo '<td>' . ($row->COL_GRIDSQUARE); break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
}
echo '</td>';
?>
<td><?php echo ucwords(strtolower(($row->COL_COUNTRY))); ?></td> <td><?php echo ucwords(strtolower(($row->COL_COUNTRY))); ?></td>
<?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> <?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<td class="qsl"> <td class="qsl">
@ -115,15 +202,15 @@
<?php } ?> <?php } ?>
</td> </td>
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
<?php if(isset($row->station_callsign)) { ?> <?php if(isset($row->station_callsign)) { ?>
<td> <td>
<span class="badge badge-light"><?php echo $row->station_callsign; ?></span> <span class="badge badge-light"><?php echo $row->station_callsign; ?></span>
</td> </td>
<?php } ?> <?php } ?>
<?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> <?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<td> <td>
<div class="dropdown"> <div class="dropdown">