kopia lustrzana https://github.com/magicbug/Cloudlog
Slight changes to the dashboard ui, and created some template librarys for pending coding tasks
rodzic
3d354596ca
commit
08b07587c4
|
@ -39,6 +39,7 @@ class Dashboard extends CI_Controller {
|
|||
|
||||
$data['total_qsl_sent'] = $this->logbook_model->total_qsl_sent();
|
||||
$data['total_qsl_recv'] = $this->logbook_model->total_qsl_recv();
|
||||
$data['total_qsl_requested'] = $this->logbook_model->total_qsl_requested();
|
||||
|
||||
$data['total_bands'] = $this->logbook_model->total_bands();
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Clublog {
|
||||
|
||||
/*
|
||||
Communicates with the Clublog.org API functions
|
||||
*/
|
||||
|
||||
public function send(){}
|
||||
public function check(){}
|
||||
}
|
||||
|
||||
/* End of file Clublog.php */
|
|
@ -0,0 +1,14 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Eqsl {
|
||||
|
||||
/*
|
||||
Communicates with the eQSL.cc API functions
|
||||
*/
|
||||
|
||||
public function send(){}
|
||||
public function receive(){}
|
||||
public function check(){}
|
||||
}
|
||||
|
||||
/* End of file eQSL.php */
|
|
@ -313,6 +313,18 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
}
|
||||
|
||||
function total_qsl_requested() {
|
||||
$query = $this->db->query('SELECT DISTINCT (COL_QSL_SENT) AS band, count(COL_QSL_SENT) AS count FROM '.$this->config->item('table_name').' WHERE COL_QSL_SENT = "R" GROUP BY band');
|
||||
|
||||
$row = $query->row();
|
||||
|
||||
if($row == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return $row->count;
|
||||
}
|
||||
}
|
||||
|
||||
function total_qsl_recv() {
|
||||
$query = $this->db->query('SELECT DISTINCT (COL_QSL_RCVD) AS band, count(COL_QSL_RCVD) AS count FROM '.$this->config->item('table_name').' WHERE COL_QSL_RCVD = "Y" GROUP BY band');
|
||||
|
||||
|
|
|
@ -124,15 +124,18 @@
|
|||
<div class="dashboard_breakdown">
|
||||
<table width="100%">
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">Total QSOs</td>
|
||||
<td class="item title" colspan="2">QSOs</td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">Total </td>
|
||||
<td class="item"><?php echo $total_qsos; ?></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">QSOs This Year</td>
|
||||
<td class="item">This Year</td>
|
||||
<td class="item"><?php echo $year_qsos; ?></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">QSOs This Month</td>
|
||||
<td class="item">This Month</td>
|
||||
<td class="item"><?php echo $month_qsos; ?></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
|
@ -140,21 +143,35 @@
|
|||
<td class="item"></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">Countrys Worked</td>
|
||||
<td class="item title" colspan="2">Countrys</td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">Worked</td>
|
||||
<td class="item"><?php echo $total_countrys; ?></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">Needed</td>
|
||||
<td class="item"><?php $dxcc = 340 - $total_countrys; echo $dxcc; ?></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item"> </td>
|
||||
<td class="item"></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">QSL Cards Sent</td>
|
||||
<td class="item title" colspan="2">QSL Cards</td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">Sent</td>
|
||||
<td class="item"><?php echo $total_qsl_sent; ?></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">QSL Cards Received</td>
|
||||
<td class="item">Received</td>
|
||||
<td class="item"><?php echo $total_qsl_recv; ?></td>
|
||||
</tr>
|
||||
<tr class="dashboard_tr">
|
||||
<td class="item">Requested</td>
|
||||
<td class="item"><?php echo $total_qsl_requested; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -180,7 +197,7 @@
|
|||
// Display the map, with some controls
|
||||
var map = new GMap(document.getElementById("map"));
|
||||
map.addControl(new GLargeMapControl());
|
||||
map.addControl(new GMapTypeControl());
|
||||
//map.addControl(new GMapTypeControl());
|
||||
map.setCenter(new GLatLng(33.137551,0.703125),2);
|
||||
|
||||
// arrays to hold copies of the markers and html used by the side_bar
|
||||
|
|
|
@ -121,6 +121,7 @@
|
|||
.dashboard_breakdown { float: right; width: 310px; }
|
||||
.dashboard_bottom .chart { float: left; }
|
||||
td.item { padding-bottom: 5px; }
|
||||
.dashboard_breakdown .title { color: #439BF6; }
|
||||
|
||||
/* Tabs CSS */
|
||||
.ui-widget-content { border: none; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<title>View QSO Info</title>
|
||||
<link rel="stylesheet" href="<?php echo base_url();?>css/reset.css" type="text/css" />
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: Arial, "Trebuchet MS", sans-serif; }
|
||||
body { font-family: Arial, "Trebuchet MS", sans-serif; font-size: 12px;}
|
||||
h1 { font-weight: bold; font-size: 23px; margin-top: 5px; margin-bottom: 10px; }
|
||||
|
||||
h2 { font-weight: bold; font-size: 18px; margin-top: 5px; margin-bottom: 10px; }
|
||||
|
@ -147,7 +147,7 @@ margin: 10px 0;
|
|||
|
||||
<div id="stat">
|
||||
|
||||
<div id="map_canvas" style="width: 420px; height: 300px"></div>
|
||||
<div id="map_canvas" style="width: 420px; height: 250px"></div>
|
||||
|
||||
<?php
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue