Add DB column and edit/view functiions

pull/1569/head
phl0 2022-08-15 16:57:37 +02:00
rodzic 66f70af2c4
commit 59a3df06b6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
5 zmienionych plików z 40 dodań i 2 usunięć

Wyświetl plik

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

Wyświetl plik

@ -0,0 +1,28 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Class Migration_add_wwff_columns
*
* Add wWFF columnds to database
*
*/
class Migration_add_wwff_columns extends CI_Migration {
public function up()
{
if (!$this->db->field_exists('COL_WWFF_REF', 'TABLE_HRD_CONTACTS_V01')) {
$fields = array(
'COL_WWFF_REF VARCHAR(30) DEFAULT NULL',
);
$this->dbforge->add_column('TABLE_HRD_CONTACTS_V01', $fields, 'COL_VUCC_GRIDS');
}
}
public function down()
{
$this->dbforge->drop_column('TABLE_HRD_CONTACTS_V01', 'COL_WWFF_REF');
}
}

Wyświetl plik

@ -177,6 +177,7 @@ class Logbook_model extends CI_Model {
'COL_STATE' => trim($this->input->post('usa_state')),
'COL_CNTY' => $clean_county_input,
'COL_SOTA_REF' => trim($this->input->post('sota_ref')),
'COL_WWFF_REF' => trim($this->input->post('wwff_ref')),
'COL_SIG' => trim($this->input->post('sig')),
'COL_SIG_INFO' => trim($this->input->post('sig_info')),
'COL_DARC_DOK' => strtoupper(trim($darc_dok)),
@ -661,6 +662,7 @@ class Logbook_model extends CI_Model {
'COL_LOTW_QSL_RCVD' => $this->input->post('lotw_recv'),
'COL_IOTA' => $this->input->post('iota_ref'),
'COL_SOTA_REF' => $this->input->post('sota_ref'),
'COL_WWFF_REF' => $this->input->post('wwff_ref'),
'COL_TX_PWR' => $txpower,
'COL_SIG' => $this->input->post('sig'),
'COL_SIG_INFO' => $this->input->post('sig_info'),
@ -2656,6 +2658,7 @@ class Logbook_model extends CI_Model {
'COL_SILENT_KEY' => (!empty($record['silent_key'])) ? $record['silent_key'] : '',
'COL_SKCC' => (!empty($record['skcc'])) ? $record['skcc'] : '',
'COL_SOTA_REF' => (!empty($record['sota_ref'])) ? $record['sota_ref'] : '',
'COL_WWFF_REF' => (!empty($record['wwff_ref'])) ? $record['wwff_ref'] : '',
'COL_SRX' => (!empty($record['srx'])) ? $record['srx'] : null,
'COL_SRX_STRING' => (!empty($record['srx_string'])) ? $record['srx_string'] : '',
'COL_STATE' => (!empty($record['state'])) ? strtoupper($record['state']) : '',

Wyświetl plik

@ -396,7 +396,7 @@
<div class="form-group">
<label for="wwff_ref">WWFF</label>
<input type="text" class="form-control" id="wwff_ref_edit" name="wwff_ref" value="<?php echo $qso->COL_SOTA_REF; ?>">
<input type="text" class="form-control" id="wwff_ref_edit" name="wwff_ref" value="<?php echo $qso->COL_WWFF_REF; ?>">
</div>
<div class="form-group">

Wyświetl plik

@ -208,6 +208,13 @@
</tr>
<?php } ?>
<?php if($row->COL_WWFF_REF != null) { ?>
<tr>
<td><?php echo $this->lang->line('gen_hamradio_wwff_reference'); ?></td>
<td><a href="https://wwff.co/directory/?showRef=<?php echo $row->COL_WWFF_REF; ?>" target="_blank"><?php echo $row->COL_WWFF_REF; ?></a></td>
</tr>
<?php } ?>
<?php if($row->COL_SIG != null) { ?>
<tr>
<td><?php echo $this->lang->line('gen_hamradio_sig'); ?></td>