kopia lustrzana https://github.com/magicbug/Cloudlog
Dashboard: Map now shows weeks qsos rather than a single day
rodzic
951a183ffa
commit
7806789fd7
|
@ -49,7 +49,7 @@ class Dashboard extends CI_Controller {
|
|||
|
||||
$this->load->model('logbook_model');
|
||||
// TODO: Auth
|
||||
$qsos = $this->logbook_model->get_todays_qsos('');
|
||||
$qsos = $this->logbook_model->get_this_weeks_qsos('');
|
||||
|
||||
|
||||
echo "{\"markers\": [";
|
||||
|
|
|
@ -191,6 +191,15 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
}
|
||||
|
||||
function get_this_weeks_qsos() {
|
||||
$morning = date('Y/m/d',time()+(1 - date('w'))*24*3600);
|
||||
$night = date('Y/m/d',time()+( 7 - date('w'))*24*3600);
|
||||
$query = $this->db->query('SELECT * FROM '.$this->config->item('table_name').' WHERE COL_TIME_ON between \''.$morning.'\' AND \''.$night.'\'');
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
function month_qsos() {
|
||||
|
||||
$morning = date('Y-m-01 00:00:00');
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
</table>
|
||||
|
||||
|
||||
<h3>Todays Mapped QSOs</h3>
|
||||
<h3>This Weeks QSOs</h3>
|
||||
<div id="map" style="width: 420px; height: 300px"></div>
|
||||
|
||||
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
|
||||
|
|
Ładowanie…
Reference in New Issue