kopia lustrzana https://github.com/magicbug/Cloudlog
changes to css, views, background code
rodzic
106e83044c
commit
8ac7fbd70f
|
@ -59,6 +59,8 @@ class QSO extends CI_Controller {
|
|||
$this->session->set_userdata('band', $this->input->post('band'));
|
||||
$this->session->set_userdata('freq', $this->input->post('freq'));
|
||||
$this->session->set_userdata('mode', $this->input->post('mode'));
|
||||
$this->session->set_userdata('sat_name', $this->input->post('sat_name'));
|
||||
$this->session->set_userdata('sat_mode', $this->input->post('sat_mode'));
|
||||
|
||||
$this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY');
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
|
|
|
@ -93,7 +93,7 @@ class Logbook_model extends CI_Model {
|
|||
|
||||
|
||||
function total_ssb() {
|
||||
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'ssb\' or COL_MODE = \'lsb\' or COL_MODE = \'usb\'');
|
||||
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'SSB\' or COL_MODE = \'LSB\' or COL_MODE = \'USB\'');
|
||||
|
||||
if ($query->num_rows() > 0)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
|
||||
function total_cw() {
|
||||
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'cw\'');
|
||||
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'CW\'');
|
||||
|
||||
if ($query->num_rows() > 0)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
|
||||
function total_fm() {
|
||||
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'fm\'');
|
||||
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'FM\'');
|
||||
|
||||
if ($query->num_rows() > 0)
|
||||
{
|
||||
|
@ -129,7 +129,7 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
|
||||
function total_digi() {
|
||||
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE = \'psk31\' or COL_MODE = \'rtty\' or COL_MODE = \'psk63\' or COL_MODE = \'psk125\' or COL_MODE = \'JT65\'');
|
||||
$query = $this->db->query('SELECT COUNT( * ) as count FROM '.$this->config->item('table_name').' WHERE COL_MODE != \'SSB\' or COL_MODE != \'LSB\' or COL_MODE = \'USB\' or COL_MODE = \'CW\' or COL_MODE = \'FM\'');
|
||||
|
||||
if ($query->num_rows() > 0)
|
||||
{
|
||||
|
|
|
@ -38,6 +38,7 @@ ul#navlist li { float: left; margin: 2px 2px 0 3px; height:43px; border-bottom:
|
|||
#footer { margin: 0 auto; width: 780px; text-align: center; padding-top: 5px; padding-bottom: 5px; font-size: 12px; }
|
||||
|
||||
#message { margin: 0 auto; width: 770px; border: 1px solid #fcefa1; background-color: #fbfaf3; padding: 5px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; font-size: 12px; }
|
||||
#message p { line-height: 1.7; margin: 0px 0; }
|
||||
.clear { clear: both; }
|
||||
h2 { margin: 0 auto; width: 780px; font-weight: bold; font-size: 23px; margin-top: 5px; margin-bottom: 10px; }
|
||||
h3 { font-weight: bold; font-size: 16px; margin: 5px; }
|
||||
|
@ -51,15 +52,25 @@ table .titles { font-weight: bold; }
|
|||
#qso_input { border: 1px solid #dddddd; margin: 5px; padding: 2px; }
|
||||
.input_date { width: 70px; }
|
||||
.input_time { width: 54px; }
|
||||
#locator { width: 47px; text-transform: uppercase; }
|
||||
#locator { width: 55px; text-transform: uppercase; }
|
||||
#country { border: none; }
|
||||
#locator_info { font-size: 13px; }
|
||||
#comment { width: 145px; }
|
||||
|
||||
.dash_left { float: left; width: 430px; }
|
||||
.dash_sidebar { float: right; width: 350px; }
|
||||
.note { padding: 5px; }
|
||||
#notes_add { padding: 5px; }
|
||||
#search_box { padding: 5px; }
|
||||
|
||||
a { text-decoration: none; color: #000; }
|
||||
a:hover { text-decoration: underline; }
|
||||
|
||||
p {
|
||||
line-height: 1.7;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo $this->config->item('google_maps_api'); ?>&sensor=true"
|
||||
|
|
|
@ -19,4 +19,6 @@
|
|||
|
||||
?>
|
||||
|
||||
<p><a href="<?php echo site_url('notes/add'); ?>" title="Add Note">Create a Note</a></p>
|
||||
|
||||
</div>
|
|
@ -1,5 +1,28 @@
|
|||
<h2>Add QSO</h2>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url() ;?>/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url() ;?>/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ;?>/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".qsobox").fancybox({
|
||||
'width' : '75%',
|
||||
'height' : '50%',
|
||||
'autoScale' : false,
|
||||
'transitionIn' : 'none',
|
||||
'transitionOut' : 'none',
|
||||
'type' : 'iframe'
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?php if($notice) { ?>
|
||||
<div id="message" >
|
||||
<?php echo $notice; ?>
|
||||
|
@ -43,7 +66,7 @@ function settime () {
|
|||
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?></td>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||
<td><?php echo strtoupper($row->COL_CALL); ?></td>
|
||||
<td><a class="qsobox" href="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>"><?php echo strtoupper($row->COL_CALL); ?></a></td>
|
||||
<td><?php echo $row->COL_MODE; ?></td>
|
||||
<td><?php echo $row->COL_RST_SENT; ?></td>
|
||||
<td><?php echo $row->COL_RST_RCVD; ?></td>
|
||||
|
@ -138,7 +161,7 @@ function settime () {
|
|||
</select></td>
|
||||
<td><input id="locator" type="text" name="locator" value="" size="7" /></td>
|
||||
<!-- <td><input type="text" name="name" value="" /></td> -->
|
||||
<td><input type="text" name="comment" value="" /></td>
|
||||
<td><input id="comment" type="text" name="comment" value="" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
@ -162,12 +185,12 @@ function settime () {
|
|||
<table>
|
||||
<tr>
|
||||
<td class="title">Sat Name</td>
|
||||
<td><input type="text" name="sat_name" value="" /></td>
|
||||
<td><input type="text" name="sat_name" value="<?php echo $this->session->userdata('sat_name'); ?>" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="title">Sat Mode</td>
|
||||
<td><input type="text" name="sat_mode" value="" /></td>
|
||||
<td><input type="text" name="sat_mode" value="<?php echo $this->session->userdata('sat_mode'); ?>" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
$(document).ready(function() {
|
||||
$(".qsobox").fancybox({
|
||||
'width' : '75%',
|
||||
'height' : '75%',
|
||||
'height' : '50%',
|
||||
'autoScale' : false,
|
||||
'transitionIn' : 'none',
|
||||
'transitionOut' : 'none',
|
||||
|
|
|
@ -6,13 +6,35 @@
|
|||
body { font-family: Arial, "Trebuchet MS", sans-serif; }
|
||||
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; }
|
||||
|
||||
.clear { clear: both }
|
||||
#info { float: left; width: 50%; }
|
||||
#stat { float: right; width: 50%; }
|
||||
td { padding: 5px; }
|
||||
</style>
|
||||
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function initialize() {
|
||||
var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
|
||||
var myOptions = {
|
||||
zoom: 4,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
}
|
||||
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
position: myLatlng,
|
||||
map: map,
|
||||
title:"Hello World!"
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body onload="initialize()">
|
||||
<?php if ($query->num_rows() > 0) { foreach ($query->result() as $row) {
|
||||
?>
|
||||
<h1>QSO Information for <?php echo $row->COL_CALL; ?></h1>
|
||||
|
@ -35,7 +57,7 @@
|
|||
<td><?php echo $row->COL_BAND; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php if($row->COL_FREQ != null) { ?>
|
||||
<?php if($this->config->item('display_freq') == true) { ?>
|
||||
<tr>
|
||||
<td>Freq:</td>
|
||||
<td><?php echo $row->COL_FREQ; ?></td>
|
||||
|
@ -59,7 +81,7 @@
|
|||
|
||||
<?php if($row->COL_GRIDSQUARE != null) { ?>
|
||||
<tr>
|
||||
<td>Comment</td>
|
||||
<td>QRA</td>
|
||||
<td><?php echo $row->COL_GRIDSQUARE; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
@ -94,10 +116,53 @@
|
|||
</div>
|
||||
|
||||
<div id="stat">
|
||||
|
||||
|
||||
<div id="map_canvas" style="width: 420px; height: 300px"></div>
|
||||
|
||||
<?php
|
||||
|
||||
if($row->COL_GRIDSQUARE != null) {
|
||||
$stn_loc = qra2latlong($row->COL_GRIDSQUARE);
|
||||
|
||||
$lat = $stn_loc[0];
|
||||
$lng = $stn_loc[1];
|
||||
} else {
|
||||
$query = $this->db->query('
|
||||
SELECT *
|
||||
FROM dxcc
|
||||
WHERE prefix = SUBSTRING( \''.$row->COL_CALL.'\', 1, LENGTH( prefix ) )
|
||||
ORDER BY LENGTH( prefix ) DESC
|
||||
LIMIT 1
|
||||
');
|
||||
|
||||
foreach ($query->result() as $dxcc) {
|
||||
$lat = $dxcc->lat;
|
||||
$lng = $dxcc->long;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
function initialize() {
|
||||
var myLatlng = new google.maps.LatLng(<?php echo $lat; ?>,<?php echo $lng; ?>);
|
||||
var myOptions = {
|
||||
zoom: 4,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
}
|
||||
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
position: myLatlng,
|
||||
map: map,
|
||||
title:"<?php echo $row->COL_CALL; ?>"
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php } } ?>
|
||||
</body>
|
||||
|
||||
</html>
|
Ładowanie…
Reference in New Issue