kopia lustrzana https://github.com/magicbug/Cloudlog
Reformatted the code
rodzic
6dde203bf5
commit
7f48eb7140
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
class Qsl_model extends CI_Model {
|
||||
function getQsoWithQslList() {
|
||||
$CI =& get_instance();
|
||||
class Qsl_model extends CI_Model
|
||||
{
|
||||
function getQsoWithQslList()
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
|
@ -18,12 +20,13 @@ class Qsl_model extends CI_Model {
|
|||
}
|
||||
}
|
||||
|
||||
function getQslForQsoId($id) {
|
||||
function getQslForQsoId($id)
|
||||
{
|
||||
// Clean ID
|
||||
$clean_id = $this->security->xss_clean($id);
|
||||
|
||||
// be sure that QSO belongs to user
|
||||
$CI =& get_instance();
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
if (!$CI->logbook_model->check_qso_is_accessible($clean_id)) {
|
||||
return;
|
||||
|
@ -36,12 +39,13 @@ class Qsl_model extends CI_Model {
|
|||
return $this->db->get()->result();
|
||||
}
|
||||
|
||||
function saveQsl($qsoid, $filename) {
|
||||
function saveQsl($qsoid, $filename)
|
||||
{
|
||||
// Clean ID
|
||||
$clean_id = $this->security->xss_clean($qsoid);
|
||||
|
||||
// be sure that QSO belongs to user
|
||||
$CI =& get_instance();
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
if (!$CI->logbook_model->check_qso_is_accessible($clean_id)) {
|
||||
return;
|
||||
|
@ -57,12 +61,13 @@ class Qsl_model extends CI_Model {
|
|||
return $this->db->insert_id();
|
||||
}
|
||||
|
||||
function deleteQsl($id) {
|
||||
function deleteQsl($id)
|
||||
{
|
||||
// Clean ID
|
||||
$clean_id = $this->security->xss_clean($id);
|
||||
|
||||
// be sure that QSO belongs to user
|
||||
$CI =& get_instance();
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
$this->db->select('qsoid');
|
||||
$this->db->from('qsl_images');
|
||||
|
@ -76,12 +81,13 @@ class Qsl_model extends CI_Model {
|
|||
$this->db->delete('qsl_images', array('id' => $clean_id));
|
||||
}
|
||||
|
||||
function getFilename($id) {
|
||||
function getFilename($id)
|
||||
{
|
||||
// Clean ID
|
||||
$clean_id = $this->security->xss_clean($id);
|
||||
|
||||
// be sure that QSO belongs to user
|
||||
$CI =& get_instance();
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
$this->db->select('qsoid');
|
||||
$this->db->from('qsl_images');
|
||||
|
@ -98,8 +104,9 @@ class Qsl_model extends CI_Model {
|
|||
return $this->db->get();
|
||||
}
|
||||
|
||||
function searchQsos($callsign) {
|
||||
$CI =& get_instance();
|
||||
function searchQsos($callsign)
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
|
@ -111,12 +118,13 @@ class Qsl_model extends CI_Model {
|
|||
return $this->db->get();
|
||||
}
|
||||
|
||||
function addQsotoQsl($qsoid, $filename) {
|
||||
function addQsotoQsl($qsoid, $filename)
|
||||
{
|
||||
$clean_qsoid = $this->security->xss_clean($qsoid);
|
||||
$clean_filename = $this->security->xss_clean($filename);
|
||||
|
||||
// be sure that QSO belongs to user
|
||||
$CI =& get_instance();
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
if (!$CI->logbook_model->check_qso_is_accessible($clean_qsoid)) {
|
||||
return;
|
||||
|
|
Ładowanie…
Reference in New Issue