diff --git a/application/config/migration.php b/application/config/migration.php
index 4082bbf7..1533ff2e 100644
--- a/application/config/migration.php
+++ b/application/config/migration.php
@@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
| be upgraded / downgraded to.
|
*/
-$config['migration_version'] = 105;
+$config['migration_version'] = 106;
/*
|--------------------------------------------------------------------------
diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php
index 86ce804c..de19ebf5 100644
--- a/application/controllers/Logbook.php
+++ b/application/controllers/Logbook.php
@@ -533,7 +533,20 @@ class Logbook extends CI_Controller {
$html .= "
RST (R) | ";
$html .= "Band | ";
$html .= "Mode | ";
- $html .= "QSL | ";
+ switch($this->session->userdata('user_previous_qsl_type')) {
+ case 0:
+ $html .= "".$this->lang->line('gen_hamradio_qsl')." | ";
+ break;
+ case 1:
+ $html .= "".$this->lang->line('lotw_short')." | ";
+ break;
+ case 2:
+ $html .= "".$this->lang->line('eqsl_short')." | ";
+ break;
+ default:
+ $html .= "".$this->lang->line('gen_hamradio_qsl')." | ";
+ break;
+ }
$html .= " | ";
$html .= "";
@@ -565,44 +578,88 @@ class Logbook extends CI_Controller {
$html .= "".$row->COL_MODE." | ";
else
$html .= "".$row->COL_SUBMODE." | ";
- $html .= "";
- $html .= "COL_QSL_SENT) {
- case "Y":
- $html .= "green";
- break;
- case "Q":
- $html .= "yellow";
- break;
- case "R":
- $html .= "yellow";
- break;
- case "I":
- $html .= "grey";
- break;
- default:
- $html .= "red";
+ if ($this->session->userdata('user_previous_qsl_type') == 1) {
+ $html .= " | ";
+ $html .= "COL_LOTW_QSL_SENT) {
+ case "Y":
+ $html .= "green";
+ break;
+ default:
+ $html .= "red";
+ }
+ $html .= "\">▲";
+ $html .= "COL_LOTW_QSL_RCVD) {
+ case "Y":
+ $html .= "green";
+ break;
+ default:
+ $html .= "red";
+ }
+ $html .= "\">▼";
+ $html .= " | ";
+ } else if ($this->session->userdata('user_previous_qsl_type') == 2) {
+ $html .= "";
+ $html .= "COL_EQSL_QSL_SENT) {
+ case "Y":
+ $html .= "green";
+ break;
+ default:
+ $html .= "red";
+ }
+ $html .= "\">▲";
+ $html .= "COL_EQSL_QSL_RCVD) {
+ case "Y":
+ $html .= "green";
+ break;
+ default:
+ $html .= "red";
+ }
+ $html .= "\">▼";
+ $html .= " | ";
+ } else {
+ $html .= "";
+ $html .= "COL_QSL_SENT) {
+ case "Y":
+ $html .= "green";
+ break;
+ case "Q":
+ $html .= "yellow";
+ break;
+ case "R":
+ $html .= "yellow";
+ break;
+ case "I":
+ $html .= "grey";
+ break;
+ default:
+ $html .= "red";
+ }
+ $html .= "\">▲";
+ $html .= "COL_QSL_RCVD) {
+ case "Y":
+ $html .= "green";
+ break;
+ case "Q":
+ $html .= "yellow";
+ break;
+ case "R":
+ $html .= "yellow";
+ break;
+ case "I":
+ $html .= "grey";
+ break;
+ default:
+ $html .= "red";
+ }
+ $html .= "\">▼";
+ $html .= " | ";
}
- $html .= "\">▲";
- $html .= "COL_QSL_RCVD) {
- case "Y":
- $html .= "green";
- break;
- case "Q":
- $html .= "yellow";
- break;
- case "R":
- $html .= "yellow";
- break;
- case "I":
- $html .= "grey";
- break;
- default:
- $html .= "red";
- }
- $html .= "\">▼";
- $html .= "";
$html .= "".$row->station_callsign." | ";
$html .= "";
}
diff --git a/application/controllers/User.php b/application/controllers/User.php
index 7128e97f..c323bdb9 100644
--- a/application/controllers/User.php
+++ b/application/controllers/User.php
@@ -9,6 +9,8 @@ class User extends CI_Controller {
// Load language files
$this->lang->load(array(
'account',
+ 'lotw',
+ 'eqsl',
));
}
@@ -78,6 +80,7 @@ class User extends CI_Controller {
$data['user_column4'] = $this->input->post('user_column4');
$data['user_column5'] = $this->input->post('user_column5');
$data['user_show_profile_image'] = $this->input->post('user_show_profile_image');
+ $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type');
$this->load->view('user/add', $data);
} else {
$this->load->view('user/add', $data);
@@ -107,7 +110,8 @@ class User extends CI_Controller {
$this->input->post('user_column3'),
$this->input->post('user_column4'),
$this->input->post('user_column5'),
- $this->input->post('user_show_profile_image'))) {
+ $this->input->post('user_show_profile_image'),
+ $this->input->post('user_previous_qsl_type'))) {
// Check for errors
case EUSERNAMEEXISTS:
$data['username_error'] = 'Username '.$this->input->post('user_name').' already in use!';
@@ -147,6 +151,7 @@ class User extends CI_Controller {
$data['user_column4'] = $this->input->post('user_column4');
$data['user_column5'] = $this->input->post('user_column5');
$data['user_show_profile_image'] = $this->input->post('user_show_profile_image');
+ $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type');
$this->load->view('user/add', $data);
$this->load->view('interface_assets/footer');
}
@@ -336,6 +341,12 @@ class User extends CI_Controller {
$data['user_show_profile_image'] = $q->user_show_profile_image;
}
+ if($this->input->post('user_previous_qsl_type')) {
+ $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type', false);
+ } else {
+ $data['user_previous_qsl_type'] = $q->user_previous_qsl_type;
+ }
+
if($this->input->post('user_column1')) {
$data['user_column1'] = $this->input->post('user_column1', true);
} else {
@@ -418,6 +429,7 @@ class User extends CI_Controller {
$data['user_column4'] = $this->input->post('user_column4');
$data['user_column5'] = $this->input->post('user_column5');
$data['user_show_profile_image'] = $this->input->post('user_show_profile_image');
+ $data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type');
$this->load->view('user/edit');
$this->load->view('interface_assets/footer');
}
diff --git a/application/migrations/106_add_user_previous_qsl_type.php b/application/migrations/106_add_user_previous_qsl_type.php
new file mode 100644
index 00000000..2574753c
--- /dev/null
+++ b/application/migrations/106_add_user_previous_qsl_type.php
@@ -0,0 +1,28 @@
+db->field_exists('user_previous_qsl_type', 'users')) {
+ $fields = array(
+ 'user_previous_qsl_type integer DEFAULT 0',
+ );
+
+ $this->dbforge->add_column('users', $fields);
+ }
+ }
+
+ public function down()
+ {
+ if ($this->db->field_exists('user_previous_qsl_type', 'users')) {
+ $this->dbforge->drop_column('users', 'user_previous_qsl_type');
+ }
+ }
+}
diff --git a/application/models/User_model.php b/application/models/User_model.php
index ae8053a9..384a42b0 100644
--- a/application/models/User_model.php
+++ b/application/models/User_model.php
@@ -114,7 +114,7 @@ class User_Model extends CI_Model {
function add($username, $password, $email, $type, $firstname, $lastname, $callsign, $locator, $timezone,
$measurement, $user_date_format, $user_stylesheet, $user_qth_lookup, $user_sota_lookup, $user_wwff_lookup,
$user_show_notes, $user_column1, $user_column2, $user_column3, $user_column4, $user_column5,
- $user_show_profile_image) {
+ $user_show_profile_image, $user_previous_qsl_type) {
// Check that the user isn't already used
if(!$this->exists($username)) {
$data = array(
@@ -140,6 +140,7 @@ class User_Model extends CI_Model {
'user_column4' => xss_clean($user_column4),
'user_column5' => xss_clean($user_column5),
'user_show_profile_image' => xss_clean($user_show_profile_image),
+ 'user_previous_qsl_type' => xss_clean($user_previous_qsl_type),
);
// Check the password is valid
@@ -193,6 +194,7 @@ class User_Model extends CI_Model {
'user_column4' => xss_clean($fields['user_column4']),
'user_column5' => xss_clean($fields['user_column5']),
'user_show_profile_image' => xss_clean($fields['user_show_profile_image']),
+ 'user_previous_qsl_type' => xss_clean($fields['user_previous_qsl_type']),
);
// Check to see if the user is allowed to change user levels
@@ -310,6 +312,7 @@ class User_Model extends CI_Model {
'user_column3' => isset($u->row()->user_column3) ? $u->row()->user_column3: 'RSTR',
'user_column4' => isset($u->row()->user_column4) ? $u->row()->user_column4: 'Band',
'user_column5' => isset($u->row()->user_column5) ? $u->row()->user_column5: 'Country',
+ 'user_previous_qsl_type' => isset($u->row()->user_previous_qsl_type) ? $u->row()->user_previous_qsl_type: 0,
'active_station_logbook' => $u->row()->active_station_logbook,
);
diff --git a/application/views/user/add.php b/application/views/user/add.php
index 3c8b3570..4ca651b5 100644
--- a/application/views/user/add.php
+++ b/application/views/user/add.php
@@ -247,6 +247,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+