From 48f6ea69bb5fa3f26c134daf696721b39dfbbcaf Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 8 Apr 2020 17:00:25 +0100 Subject: [PATCH] Added US state to station profile options --- application/config/migration.php | 2 +- .../039_add_state_to_stationprofile.php | 20 +++++++ application/models/Stations.php | 2 + application/views/station_profile/create.php | 58 +++++++++++++++++++ application/views/station_profile/edit.php | 58 +++++++++++++++++++ 5 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 application/migrations/039_add_state_to_stationprofile.php diff --git a/application/config/migration.php b/application/config/migration.php index 84603bf5..f19e068f 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'] = 38; +$config['migration_version'] = 39; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/039_add_state_to_stationprofile.php b/application/migrations/039_add_state_to_stationprofile.php new file mode 100644 index 00000000..e3451101 --- /dev/null +++ b/application/migrations/039_add_state_to_stationprofile.php @@ -0,0 +1,20 @@ +dbforge->add_column('station_profile', $fields); + } + + public function down() + { + $this->dbforge->drop_column('station_profile', 'state'); + } +} \ No newline at end of file diff --git a/application/models/Stations.php b/application/models/Stations.php index f48d3b8d..b6816cf8 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -44,6 +44,7 @@ class Stations extends CI_Model { 'station_cnty' => xss_clean($this->input->post('station_cnty', true)), 'station_cq' => xss_clean($this->input->post('station_cq', true)), 'station_itu' => xss_clean($this->input->post('station_itu', true)), + 'state' => xss_clean($this->input->post('station_state', true)), ); $this->db->insert('station_profile', $data); @@ -62,6 +63,7 @@ class Stations extends CI_Model { 'station_cnty' => xss_clean($this->input->post('station_cnty', true)), 'station_cq' => xss_clean($this->input->post('station_cq', true)), 'station_itu' => xss_clean($this->input->post('station_itu', true)), + 'state' => xss_clean($this->input->post('station_state', true)), 'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)), ); diff --git a/application/views/station_profile/create.php b/application/views/station_profile/create.php index 88568151..6beac7e3 100644 --- a/application/views/station_profile/create.php +++ b/application/views/station_profile/create.php @@ -59,6 +59,64 @@ Station City for example Inverness +
+ + + Select Station State +
+
diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php index 48ce7695..d58f8819 100644 --- a/application/views/station_profile/edit.php +++ b/application/views/station_profile/edit.php @@ -60,6 +60,64 @@ Station City for example Inverness
+
+ + + Select Station State +
+
station_cnty; } ?>">