Added time of "Worked before" in Contest-Section

这个提交包含在:
int2001 2023-12-30 20:17:24 +00:00
父节点 2886ec5a4c
当前提交 70db88b521
找不到此签名对应的密钥
GPG 密钥 ID: DFB1C13CD2DB037B
共有 2 个文件被更改,包括 5 次插入2 次删除

查看文件

@ -189,7 +189,8 @@ class Contesting extends CI_Controller {
header('Content-Type: application/json');
if ($result && $result->num_rows()) {
echo json_encode(array('message' => 'Worked before'));
$timeb4=$result->row()->b4;
echo json_encode(array('message' => 'Worked '.$timeb4.' before'));
}
return;
}

查看文件

@ -219,7 +219,8 @@ class Contesting_model extends CI_Model {
$date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]);
$date = $date->format('Y-m-d H:i:s');
$this->db->select('timediff(UTC_TIMESTAMP(),col_time_on) b4');
$this->db->where('STATION_ID', $station_id);
$this->db->where('COL_CALL', xss_clean($call));
$this->db->where("COL_BAND", xss_clean($band));
@ -229,6 +230,7 @@ class Contesting_model extends CI_Model {
$this->db->where("COL_MODE", xss_clean($mode));
$this->db->or_where("COL_SUBMODE", xss_clean($mode));
$this->db->group_end();
$this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "DESC");
$query = $this->db->get($this->config->item('table_name'));
return $query;