kopia lustrzana https://github.com/magicbug/Cloudlog
Added option to delete a qso when in the Edit QSO area"
rodzic
7806789fd7
commit
126ab6b1eb
|
@ -84,6 +84,15 @@ class QSO extends CI_Controller {
|
|||
$this->session->set_flashdata('notice', 'Record Updated');
|
||||
redirect('logbook');
|
||||
}
|
||||
}
|
||||
|
||||
/* Delete QSO */
|
||||
function delete($id) {
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
$this->logbook_model->delete($id);
|
||||
|
||||
$this->session->set_flashdata('notice', 'QSO Deleted Successfully');
|
||||
redirect('logbook');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -300,6 +300,11 @@ class Logbook_model extends CI_Model {
|
|||
|
||||
return array('query' => $query, 'results' => $results, 'time' => $time);
|
||||
}
|
||||
|
||||
function delete($id) {
|
||||
$this->db->where('COL_PRIMARY_KEY', $id);
|
||||
$this->db->delete($this->config->item('table_name'));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<h2>Add QSO</h2>
|
||||
<div class="wrap_content note">
|
||||
<?php echo validation_errors(); ?>
|
||||
|
||||
<div style="float: right">
|
||||
<p><a href="<?php echo site_url('qso/delete'); ?>/<?php echo $COL_PRIMARY_KEY; ?>" ><img src="<?php echo base_url(); ?>/images/delete.png" width="16" height="16" alt="Delete" /> Delete QSO</a></p>
|
||||
</div>
|
||||
<form method="post" action="<?php echo site_url('qso/edit'); ?>" name="qsos">
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -112,5 +114,4 @@
|
|||
<div><input type="submit" value="Submit" /></div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -58,7 +58,8 @@
|
|||
<td><?php echo $row->COL_BAND; ?></td>
|
||||
<?php } ?>
|
||||
<td><?php echo $row->COL_COUNTRY; ?></td>
|
||||
<td><?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?><a href="<?php echo site_url('qso/edit'); ?>/<?php echo $row->COL_PRIMARY_KEY; ?>" ><img src="<?php echo base_url(); ?>/images/application_edit.png" width="16" height="16" alt="Edit" /><?php } ?></a></td>
|
||||
<td><?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?><a href="<?php echo site_url('qso/edit'); ?>/<?php echo $row->COL_PRIMARY_KEY; ?>" ><img src="<?php echo base_url(); ?>/images/application_edit.png" width="16" height="16" alt="Edit" />
|
||||
<?php } ?></a></td>
|
||||
</tr>
|
||||
<?php $i++; } ?>
|
||||
|
||||
|
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 715 B |
Ładowanie…
Reference in New Issue