Dashboard: Map now shows weeks qsos rather than a single day

pull/106/merge
Peter Goodhall 2011-08-23 17:12:47 +01:00
rodzic 951a183ffa
commit 7806789fd7
3 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -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\": [";

Wyświetl plik

@ -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');

Wyświetl plik

@ -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>