kopia lustrzana https://github.com/magicbug/Cloudlog
[Cabrillo export] Added more info to the form
rodzic
9252f1ea38
commit
a48858acda
|
@ -78,6 +78,8 @@ class Cabrillo extends CI_Controller {
|
|||
|
||||
$this->load->model('stations');
|
||||
|
||||
$this->load->model('user_model');
|
||||
|
||||
$station_id = $this->security->xss_clean($this->input->post('station_id'));
|
||||
$contest_id = $this->security->xss_clean($this->input->post('contestid'));
|
||||
|
||||
|
@ -88,18 +90,33 @@ class Cabrillo extends CI_Controller {
|
|||
|
||||
$station = $station->row();
|
||||
|
||||
$userinfo = $this->user_model->get_by_id($this->session->userdata('user_id'));
|
||||
|
||||
$userinfo = $userinfo->row();
|
||||
|
||||
$data['qsos'] = $this->Contesting_model->export_custom($from, $to, $contest_id, $station_id);
|
||||
|
||||
$data['contest_id'] = $contest_id;
|
||||
$data['callsign'] = $station->station_callsign;
|
||||
$data['claimed_score'] = '';
|
||||
$data['operators'] = '';
|
||||
$data['club'] = '';
|
||||
$data['name'] = '';
|
||||
$data['address1'] = '';
|
||||
$data['address2'] = '';
|
||||
$data['address3'] = '';
|
||||
$data['soapbox'] = '';
|
||||
$data['categoryoperator'] = $this->security->xss_clean($this->input->post('categoryoperator'));
|
||||
$data['categoryassisted'] = $this->security->xss_clean($this->input->post('categoryassisted'));
|
||||
$data['categoryband'] = $this->security->xss_clean($this->input->post('categoryband'));
|
||||
$data['categorymode'] = $this->security->xss_clean($this->input->post('categorymode'));
|
||||
$data['categorypower'] = $this->security->xss_clean($this->input->post('categorypower'));
|
||||
$data['categorystation'] = $this->security->xss_clean($this->input->post('categorystation'));
|
||||
$data['categorytransmitter'] = $this->security->xss_clean($this->input->post('categorytransmitter'));
|
||||
$data['categoryoverlay'] = $this->security->xss_clean($this->input->post('categoryoverlay'));
|
||||
$data['operators'] = $this->security->xss_clean($this->input->post('operators'));
|
||||
$data['club'] = $this->security->xss_clean($this->input->post('club'));
|
||||
$data['name'] = $userinfo->user_firstname . ' ' . $userinfo->user_lastname;
|
||||
$data['email'] = $userinfo->user_email;
|
||||
$data['address'] = $this->security->xss_clean($this->input->post('address'));
|
||||
$data['addresscity'] = $this->security->xss_clean($this->input->post('addresscity'));
|
||||
$data['addressstateprovince'] = $this->security->xss_clean($this->input->post('addressstateprovince'));
|
||||
$data['addresspostalcode'] = $this->security->xss_clean($this->input->post('addresspostalcode'));
|
||||
$data['addresscountry'] = $this->security->xss_clean($this->input->post('addresscountry'));
|
||||
$data['soapbox'] = $this->security->xss_clean($this->input->post('soapbox'));
|
||||
$data['gridlocator'] = $station->station_gridsquare;
|
||||
|
||||
$this->load->view('cabrillo/export', $data);
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
class Cabrilloformat {
|
||||
|
||||
public function header($contest_id, $callsign, $claimed_score, $operators, $club, $name, $address1, $address2, $address3, $soapbox, $gridlocator) {
|
||||
public function header($contest_id, $callsign, $claimed_score,
|
||||
$operators, $club, $name, $address, $addresscity, $addressstateprovince, $addresspostalcode, $addresscountry, $soapbox, $gridlocator,
|
||||
$categoryoverlay, $categorytransmitter, $categorystation, $categorypower, $categorymode, $categoryband, $categoryassisted, $categoryoperator, $email) {
|
||||
$cab_header = "";
|
||||
$cab_header .= "START-OF-LOG: 3.0"."\r\n";
|
||||
$cab_header .= "CONTEST: ".$contest_id."\r\n";
|
||||
|
@ -18,16 +20,30 @@ class Cabrilloformat {
|
|||
$cab_header .= "CLUB: ".$club."\r\n";
|
||||
}
|
||||
|
||||
$cab_header .= "CATEGORY-OPERATOR: ".$categoryoperator."\r\n";
|
||||
$cab_header .= "CATEGORY-BAND: ".$categoryassisted."\r\n";
|
||||
$cab_header .= "CATEGORY-ASSISTED: ".$categoryband."\r\n";
|
||||
$cab_header .= "CATEGORY-MODE: ".$categorymode."\r\n";
|
||||
$cab_header .= "CATEGORY-POWER: ".$categorypower."\r\n";
|
||||
$cab_header .= "CATEGORY-STATION: ".$categorystation."\r\n";
|
||||
$cab_header .= "CATEGORY-TRANSMITTER: ".$categorytransmitter."\r\n";
|
||||
$cab_header .= "CATEGORY-OVERLAY: ".$categoryoverlay."\r\n";
|
||||
|
||||
$cab_header .= "NAME: ".$name."\r\n";
|
||||
$cab_header .= "ADDRESS: ".$address1."\r\n";
|
||||
$cab_header .= "ADDRESS: ".$address2."\r\n";
|
||||
$cab_header .= "ADDRESS: ".$address3."\r\n";
|
||||
$cab_header .= "ADDRESS: ".$address."\r\n";
|
||||
$cab_header .= "ADDRESS-CITY: ".$addresscity."\r\n";
|
||||
$cab_header .= "ADDRESS-STATE-PROVINCE: ".$addressstateprovince."\r\n";
|
||||
$cab_header .= "ADDRESS-POSTALCODE: ".$addresspostalcode."\r\n";
|
||||
$cab_header .= "ADDRESS-COUNTRY: ".$addresscountry."\r\n";
|
||||
$cab_header .= "EMAIL: ".$email."\r\n";
|
||||
$cab_header .= "SOAPBOX: ".$soapbox."\r\n";
|
||||
|
||||
if($gridlocator != null) {
|
||||
$cab_header .= "GRID-LOCATOR: ".$gridlocator."\r\n";
|
||||
}
|
||||
|
||||
$cab_header .= "CREATED-BY: Cloudlog"."\r\n";
|
||||
|
||||
return $cab_header;
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ header('Content-Disposition: attachment; filename="'.$callsign.'-'.$contest_id.'
|
|||
$CI =& get_instance();
|
||||
$CI->load->library('Cabrilloformat');
|
||||
|
||||
echo $CI->cabrilloformat->header($contest_id, $callsign, $claimed_score, $operators, $club, $name, $address1, $address2, $address3, $soapbox, $gridlocator);
|
||||
echo $CI->cabrilloformat->header($contest_id, $callsign, $claimed_score,
|
||||
$operators, $club, $name, $address, $addresscity, $addressstateprovince, $addresspostalcode, $addresscountry, $soapbox, $gridlocator,
|
||||
$categoryoverlay, $categorytransmitter, $categorystation, $categorypower, $categorymode, $categoryband, $categoryassisted, $categoryoperator, $email);
|
||||
foreach ($qsos->result() as $row) {
|
||||
echo $CI->cabrilloformat->qso($row);
|
||||
}
|
||||
|
|
|
@ -33,6 +33,145 @@
|
|||
</div>
|
||||
<div class="form-group form-inline row contestdates">
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="soapbox">Club: </div>
|
||||
<input class="form-control my-1 mr-sm-2 col-md-4" id="soapbox" type="soapbox" name="soapbox" aria-label="soapbox">
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="categoryoperator">Category-operator: </div>
|
||||
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categoryoperator" name="categoryoperator">
|
||||
<option value="SINGLE-OP">Single-OP</option>
|
||||
<option value="MULTI-OP">Mulit-OP</option>
|
||||
<option value="CHECKLOG">Checklog</option>
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="categoryassisted">Category-assisted: </div>
|
||||
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categoryassisted" name="categoryassisted">
|
||||
<option value="ASSISTED">Assisted</option>
|
||||
<option value="NON-ASSISTED">Non-assisted</option>
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="categoryband">Category-band: </div>
|
||||
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categoryband" name="categoryband">
|
||||
<option value="ALL">ALL</option>
|
||||
<option value="160M">160M</option>
|
||||
<option value="80M">80M</option>
|
||||
<option value="40M">40M</option>
|
||||
<option value="20M">20M</option>
|
||||
<option value="15M">15M</option>
|
||||
<option value="10M">10M</option>
|
||||
<option value="6M">6M</option>
|
||||
<option value="4M">4M</option>
|
||||
<option value="2M">2M</option>
|
||||
<option value="222">222</option>
|
||||
<option value="432">432</option>
|
||||
<option value="902">902</option>
|
||||
<option value="1.2G">1.2G</option>
|
||||
<option value="2.3G">2.3G</option>
|
||||
<option value="3.4G">3.4G</option>
|
||||
<option value="5.7G">5.7G</option>
|
||||
<option value="10G">10G</option>
|
||||
<option value="24G">24G</option>
|
||||
<option value="47G">47G</option>
|
||||
<option value="75G">75G</option>
|
||||
<option value="122G">122G</option>
|
||||
<option value="134G">134G</option>
|
||||
<option value="241G">241G</option>
|
||||
<option value="Light">Light</option>
|
||||
<option value="VHF-3-BAND and VHF-FM-ONLY (ARRL VHF Contests only)">VHF-3-BAND and VHF-FM-ONLY (ARRL VHF Contests only)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="categorymode">Category-mode: </div>
|
||||
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categorymode" name="categorymode">
|
||||
<option value="CW">CW</option>
|
||||
<option value="DIGI">DIGI</option>
|
||||
<option value="FM">FM</option>
|
||||
<option value="RTTY">RTTY</option>
|
||||
<option value="SSB">SSB</option>
|
||||
<option value="MIXED">MIXED</option>
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="categorypower">Category-power: </div>
|
||||
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categorypower" name="categorypower">
|
||||
<option value="HIGH">HIGH</option>
|
||||
<option value="LOW">LOW</option>
|
||||
<option value="QRP">QRP</option>
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="categorystation">Category-station: </div>
|
||||
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categorystation" name="categorystation">
|
||||
<option value="DISTRIBUTED">DISTRIBUTED</option>
|
||||
<option value="FIXED">FIXED</option>
|
||||
<option value="MOBILE">MOBILE</option>
|
||||
<option value="PORTABLE">PORTABLE</option>
|
||||
<option value="ROVER">ROVER</option>
|
||||
<option value="ROVER-LIMITED">ROVER-LIMITED</option>
|
||||
<option value="ROVER-UNLIMITED">ROVER-UNLIMITED</option>
|
||||
<option value="EXPEDITION">EXPEDITION</option>
|
||||
<option value="HQ">HQ</option>
|
||||
<option value="SCHOOL">SCHOOL</option>
|
||||
<option value="EXPLORER">EXPLORER</option>
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="categorytransmitter">Category-transmitter: </div>
|
||||
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categorytransmitter" name="categorytransmitter">
|
||||
<option value="ONE">ONE</option>
|
||||
<option value="TWO">TWO</option>
|
||||
<option value="LIMITED">LIMITED</option>
|
||||
<option value="UNLIMITED">UNLIMITED</option>
|
||||
<option value="SWL">SWL</option>
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="categoryoverlay">Category-overlay: </div>
|
||||
<select class="custom-select my-1 mr-sm-2 col-md-4" id="categoryoverlay" name="categoryoverlay">
|
||||
<option value="CLASSIC">CLASSIC</option>
|
||||
<option value="ROOKIE">ROOKIE</option>
|
||||
<option value="TB-WIRES">TB-WIRES</option>
|
||||
<option value="YOUTH">YOUTH</option>
|
||||
<option value="NOVICE-TECH">NOVICE-TECH</option>
|
||||
<option value="YL">YL</option>
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="operators">Operators: </div>
|
||||
<input class="form-control my-1 mr-sm-2 col-md-4" id="operators" type="operators" name="operators" aria-label="operators">
|
||||
</select>
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="soapbox">Soapbox: </div>
|
||||
<input class="form-control my-1 mr-sm-2 col-md-4" id="soapbox" type="text" name="soapbox" aria-label="soapbox">
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="address">Address: </div>
|
||||
<input class="form-control my-1 mr-sm-2 col-md-4" id="address" type="text" name="address" aria-label="address">
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="addresscity">Address-city: </div>
|
||||
<input class="form-control my-1 mr-sm-2 col-md-4" id="addresscity" type="text" name="addresscity" aria-label="addresscity">
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="addressstateprovince">Address-state-province: </div>
|
||||
<input class="form-control my-1 mr-sm-2 col-md-4" id="addressstateprovince" type="text" name="addressstateprovince" aria-label="addressstateprovince">
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="addresspostalcode">Address-postalcode: </div>
|
||||
<input class="form-control my-1 mr-sm-2 col-md-4" id="addresspostalcode" type="text" name="addresspostalcode" aria-label="addresspostalcode">
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="addresscountry">Address-country: </div>
|
||||
<input class="form-control my-1 mr-sm-2 col-md-4" id="addresscountry" type="text" name="addresscountry" aria-label="addresscountry">
|
||||
</div>
|
||||
<div hidden="true" class="form-group form-inline row additionalinfo">
|
||||
<div class="col-md-3 control-label" for="button1id"></div>
|
||||
<button id="button1id" type="submit" name="button1id" class="btn btn-sm btn-primary"> Export</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php }
|
||||
|
|
|
@ -2,6 +2,7 @@ function loadYears() {
|
|||
$(".contestyear").empty();
|
||||
$(".contestname").empty();
|
||||
$(".contestdates").empty();
|
||||
$(".additionalinfo").attr("hidden", true);
|
||||
$.ajax({
|
||||
url: base_url+'index.php/cabrillo/getYears',
|
||||
type: 'post',
|
||||
|
@ -65,7 +66,7 @@ function loadContestDates() {
|
|||
'</select>' +
|
||||
'<select class="custom-select my-1 mr-sm-2 col-md-2" id="contestdatesto" name="contestdatesto">' +
|
||||
'</select>' +
|
||||
' <button class="btn btn-sm btn-primary" type="submit">Export</button>');
|
||||
' <button class="btn btn-sm btn-primary" onclick="addAdditionalInfo();" type="button">Proceed</button>');
|
||||
|
||||
$.each(data, function(key, value) {
|
||||
$('#contestdatesfrom')
|
||||
|
@ -83,4 +84,8 @@ function loadContestDates() {
|
|||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addAdditionalInfo() {
|
||||
$(".additionalinfo").removeAttr("hidden");
|
||||
}
|
Ładowanie…
Reference in New Issue