kopia lustrzana https://github.com/magicbug/Cloudlog
Same logic for Clublog
rodzic
9b9f62e3e9
commit
e4d50049e2
|
@ -26,7 +26,8 @@ class Clublog_model extends CI_Model {
|
|||
$this->db->where("station_id", $station_id);
|
||||
$this->db->where("COL_CLUBLOG_QSO_UPLOAD_STATUS", null);
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "");
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "N");
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "N");
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "M");
|
||||
$this->db->update($this->config->item('table_name'), $data);
|
||||
}
|
||||
|
||||
|
@ -54,6 +55,7 @@ class Clublog_model extends CI_Model {
|
|||
function mark_all_qsos_notsent($station_id) {
|
||||
$data = array(
|
||||
'COL_CLUBLOG_QSO_UPLOAD_DATE' => null,
|
||||
'COL_CLUBLOG_QSO_UPLOAD_STATUS' => "M",
|
||||
'COL_CLUBLOG_QSO_UPLOAD_STATUS' => "N",
|
||||
);
|
||||
|
||||
|
@ -70,6 +72,7 @@ class Clublog_model extends CI_Model {
|
|||
$this->db->group_start();
|
||||
$this->db->where("COL_CLUBLOG_QSO_UPLOAD_STATUS", null);
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "");
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "M");
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "N");
|
||||
$this->db->group_end();
|
||||
|
||||
|
@ -87,6 +90,7 @@ class Clublog_model extends CI_Model {
|
|||
$this->db->group_start();
|
||||
$this->db->where("COL_CLUBLOG_QSO_UPLOAD_STATUS", null);
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "");
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "M");
|
||||
$this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "N");
|
||||
$this->db->group_end();
|
||||
|
||||
|
|
|
@ -2699,13 +2699,16 @@ class Logbook_model extends CI_Model {
|
|||
$data['COL_ITUZ'] = $ituz;
|
||||
}
|
||||
|
||||
// Check if QRZ is already uploaded. If so, set qso to reupload to qrz.com (M)
|
||||
$qsql = "select COL_QRZCOM_QSO_UPLOAD_STATUS as QRZ_STATE from ".$this->config->item('table_name')." where COL_BAND=? and COL_CALL=? and COL_STATION_CALLSIGN=? and date_format(COL_TIME_ON, '%Y-%m-%d %H:%i') = ?";
|
||||
// Check if QRZ or ClubLog is already uploaded. If so, set qso to reupload to qrz.com (M) or clublog
|
||||
$qsql = "select COL_CLUBLOG_QSO_UPLOAD_STATUS as CL_STATE, COL_QRZCOM_QSO_UPLOAD_STATUS as QRZ_STATE from ".$this->config->item('table_name')." where COL_BAND=? and COL_CALL=? and COL_STATION_CALLSIGN=? and date_format(COL_TIME_ON, '%Y-%m-%d %H:%i') = ?";
|
||||
$query = $this->db->query($qsql, array($band, $callsign,$station_callsign,$datetime));
|
||||
$row = $query->row();
|
||||
if ($row->QRZ_STATE == 'Y') {
|
||||
$data['COL_QRZCOM_QSO_UPLOAD_STATUS'] = 'M';
|
||||
}
|
||||
if ($row->CL_STATE == 'Y') {
|
||||
$data['COL_CLUBLOG_QSO_UPLOAD_STATUS'] = 'M';
|
||||
}
|
||||
|
||||
$this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
|
|
Ładowanie…
Reference in New Issue