diff --git a/application/controllers/Station.php b/application/controllers/Station.php index e47ccbd0..2c1398e1 100644 --- a/application/controllers/Station.php +++ b/application/controllers/Station.php @@ -56,9 +56,37 @@ class Station extends CI_Controller { } } - public function edit() + public function edit($id) { + $this->load->library('form_validation'); + $this->load->model('stations'); + $this->load->model('dxcc'); + + $station_profile_query = $this->stations->profile($id); + + $data['my_station_profile'] = $station_profile_query->row(); + + $data['dxcc_list'] = $this->dxcc->list(); + + $data['page_title'] = "Edit Station Profile"; + + $this->form_validation->set_rules('station_profile_name', 'Station Profile Name', 'required'); + + if ($this->form_validation->run() == FALSE) + { + $this->load->view('interface_assets/header', $data); + $this->load->view('station_profile/edit'); + $this->load->view('interface_assets/footer'); + } + else + { + $this->stations->edit(); + + $data['notice'] = "Station Profile ".$this->input->post('station_profile_name')." Updated"; + + redirect('station'); + } } function reassign_profile($id) { diff --git a/application/models/Stations.php b/application/models/Stations.php index a4fdf9f9..eb401ef1 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -58,6 +58,7 @@ class Stations extends CI_Model { 'station_cnty' => $this->input->post('station_cnty'), 'station_cq' => $this->input->post('station_cq'), 'station_itu' => $this->input->post('station_itu'), + 'eqslqthnickname' => $this->input->post('eqslnickname'), ); $this->db->where('station_id', $this->input->post('station_id')); diff --git a/application/views/station_profile/edit.php b/application/views/station_profile/edit.php new file mode 100644 index 00000000..a5899a9f --- /dev/null +++ b/application/views/station_profile/edit.php @@ -0,0 +1,113 @@ + +
+ +
+ session->flashdata('message')) { ?> + +
+

session->flashdata('message'); ?>

+
+ + +
+
+ station_profile_name; ?> (Callsign: station_callsign; ?>) +
+
+
+

+ session->flashdata('notice')) { ?> +
+ session->flashdata('notice'); ?> +
+ + + load->helper('form'); ?> + + + +
+ + +
+ + station_profile_name; } ?>" required> + Shortname for the station location for example Home (IO87IP) +
+ +
+ + station_callsign; } ?>" required> + Station Callsign for example 2M0SQL/P +
+ +
+ + num_rows() > 0) { ?> + + + station_country; } ?>" required /> + Station DXCC +
+ +
+ + station_city; } ?>" required> + Station City for example Inverness +
+ +
+ + station_cnty; } ?>"> + Station Cnty #get def from ADIF Spec# +
+ +
+ + station_cq; } ?>" required> + If you do not know your CQ Zone click Here to find it! +
+ +
+ + station_itu; } ?>" required> + If you do not know your ITU Zone click Here to find it! +
+ +
+ + station_gridsquare; } ?>" required> + Station Gridsquare for example IO87IP, if you are at a gridline enter the gridsquare with a comma for example IO77,IO78,IO87,IO88. +
+ +
+ + station_iota; } ?>"> + Station IOTA Reference for example EU-005. +
+ +
+ + station_sota; } ?>"> + Station SOTA Reference. +
+ +
+ + eqslqthnickname; } ?>"> + eQSL QTH Nickname. +
+ + + +
+
+
+ +
+ +
\ No newline at end of file