Merge pull request #690 from daccle/add_sig_to_station
Add sig and sig_info to station #688
这个提交包含在:
当前提交
f4d258b566
共有 6 个文件被更改,包括 60 次插入 和 2 次删除
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 54;
|
||||
$config['migration_version'] = 55;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_signature_to_station_profile extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'station_sig varchar(50) DEFAULT NULL',
|
||||
'station_sig_info varchar(50) DEFAULT NULL',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('station_profile', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('station_profile', 'station_sig');
|
||||
$this->dbforge->drop_column('station_profile', 'station_sig_info');
|
||||
}
|
||||
}
|
||||
|
|
@ -42,6 +42,8 @@ class Stations extends CI_Model {
|
|||
'station_city' => xss_clean($this->input->post('city', true)),
|
||||
'station_iota' => xss_clean(strtoupper($this->input->post('iota', true))),
|
||||
'station_sota' => xss_clean(strtoupper($this->input->post('sota', true))),
|
||||
'station_sig' => xss_clean(strtoupper($this->input->post('sig', true))),
|
||||
'station_sig_info' => xss_clean(strtoupper($this->input->post('sig_info', true))),
|
||||
'station_callsign' => xss_clean($this->input->post('station_callsign', true)),
|
||||
'station_dxcc' => xss_clean($this->input->post('dxcc', true)),
|
||||
'station_country' => xss_clean($this->input->post('station_country', true)),
|
||||
|
|
@ -64,6 +66,8 @@ class Stations extends CI_Model {
|
|||
'station_city' => xss_clean($this->input->post('city', true)),
|
||||
'station_iota' => xss_clean($this->input->post('iota', true)),
|
||||
'station_sota' => xss_clean($this->input->post('sota', true)),
|
||||
'station_sig' => xss_clean($this->input->post('sig', true)),
|
||||
'station_sig_info' => xss_clean($this->input->post('sig_info', true)),
|
||||
'station_callsign' => xss_clean($this->input->post('station_callsign', true)),
|
||||
'station_dxcc' => xss_clean($this->input->post('dxcc', true)),
|
||||
'station_country' => xss_clean($this->input->post('station_country', true)),
|
||||
|
|
@ -172,6 +176,14 @@ class Stations extends CI_Model {
|
|||
$this->db->where('COL_MY_SOTA_REF', $row->station_sota);
|
||||
}
|
||||
|
||||
if($row->station_sig != "") {
|
||||
$this->db->where('COL_MY_SIG', $row->station_sig);
|
||||
}
|
||||
|
||||
if($row->station_sig_info != "") {
|
||||
$this->db->where('COL_MY_SIG_INFO', $row->station_sig_info);
|
||||
}
|
||||
|
||||
$this->db->where('COL_MY_COUNTRY', $row->station_country);
|
||||
|
||||
if( strpos($row->station_gridsquare, ',') !== false ) {
|
||||
|
|
|
|||
文件差异因一行或多行过长而隐藏
|
|
@ -182,6 +182,18 @@
|
|||
<small id="stationSOTAInputHelp" class="form-text text-muted">Station SOTA reference.</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stationSigInput">Signature</label>
|
||||
<input type="text" class="form-control" name="sig" id="stationSigInput" aria-describedby="stationSigInputHelp">
|
||||
<small id="stationSigInputHelp" class="form-text text-muted">Station Signature (e.g. WWFF).</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stationSigInfoInput">Signature Info</label>
|
||||
<input type="text" class="form-control" name="sig_info" id="stationSigInfoInput" aria-describedby="stationSigInfoInputHelp">
|
||||
<small id="stationSigInfoInput" class="form-text text-muted">Station Signature Info (e.g. DLFF-0029).</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="eqslNickname">eQSL QTH Nickname</label>
|
||||
<input type="text" class="form-control" name="eqslnickname" id="eqslNickname" aria-describedby="eqslhelp">
|
||||
|
|
|
|||
|
|
@ -204,6 +204,18 @@
|
|||
<small id="stationSOTAInputHelp" class="form-text text-muted">Station SOTA reference.</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stationSigInput">Signature</label>
|
||||
<input type="text" class="form-control" name="sig" id="stationSigInput" aria-describedby="stationSigInputHelp" value="<?php if(set_value('sig') != "") { echo set_value('sig'); } else { echo $my_station_profile->station_sig; } ?>">
|
||||
<small id="stationSigInputHelp" class="form-text text-muted">Station Signature (e.g. WWFF)..</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="stationSigInfoInput">Signature Information</label>
|
||||
<input type="text" class="form-control" name="sig_info" id="stationSigInfoInput" aria-describedby="stationSigInfoInputHelp" value="<?php if(set_value('sig_info') != "") { echo set_value('sig_info'); } else { echo $my_station_profile->station_sig_info; } ?>">
|
||||
<small id="stationSigInfoInputHelp" class="form-text text-muted">Station Signature Info (e.g. DLFF-0029).</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="eqslNickname">eQSL QTH Nickname</label>
|
||||
<input type="text" class="form-control" name="eqslnickname" id="eqslNickname" aria-describedby="eqslhelp" value="<?php if(set_value('eqslnickname') != "") { echo set_value('eqslnickname'); } else { echo $my_station_profile->eqslqthnickname; } ?>">
|
||||
|
|
|
|||
正在加载…
在新工单中引用