Skip to content

Commit 536ee8c

Browse files
committed
Upgrade to Bootstrap 5
1 parent 59f63a6 commit 536ee8c

File tree

8 files changed

+132
-173
lines changed

8 files changed

+132
-173
lines changed

css/qsl.css

+15-30
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,30 @@
11
body {
2-
padding-top: 50px;
3-
}
4-
.qsl {
5-
padding: 40px 15px;
6-
text-align: left;
2+
font-size: .875rem;
3+
height: 100%;
74
}
85

9-
.qsl-head {
6+
header {
107
color: white;
11-
font-size: 24px;
12-
padding-top: 10px;
138
}
149

10+
footer {
11+
background-color: lightgray;
12+
padding: 10px;
13+
line-height: 1em;
14+
font-size: 0.8em;
15+
margin-top: 10px;
16+
}
17+
18+
.qsl-page-note {
19+
color: black;
20+
}
21+
1522
.table-hover > thead > tr > th {
1623
background-color: #2E64FE;
1724
color:#f3f3f3;
18-
padding: 5px 25px;
1925
font-size:1.1em;
2026
}
2127

22-
.table-hover > thead > tr > th#thle {
23-
border-radius: 10px 0px 0px 10px;
24-
-moz-border-radius: 10px 0px 0px 10px;
25-
-webkit-border-radius: 10px 0px 0px 10px;
26-
}
27-
28-
.table-hover > thead > tr > th#thre {
29-
border-radius: 0px 10px 10px 0px;
30-
-moz-border-radius: 0px 10px 10px 0px;
31-
-webkit-border-radius: 0px 10px 10px 0px;
32-
}
33-
34-
.table-hover > tbody > tr > td {
35-
padding: 5px 25px;
36-
.}
37-
3828
.table-hover > tbody > tr:hover {
3929
background-color: #E6E6E6;
4030
}
@@ -56,8 +46,3 @@ input#submit:hover, input#submit:focus {
5646
background-color :#0431b4; /*make the background a little darker*/
5747
}
5848

59-
form p label {
60-
display: block;
61-
float: left;
62-
width: 75px;
63-
}

index.php

+47-35
Original file line numberDiff line numberDiff line change
@@ -16,64 +16,76 @@
1616
*/
1717
?>
1818
<?php include_once("qslconf.php"); ?>
19+
<?php
20+
error_reporting(E_ALL);
21+
$conn = new mysqli($db_server, $db_user, $db_pass, $db_db);
22+
if( $conn->connect_error){
23+
die("Connection failed: " . $conn->connect_error);
24+
}
25+
$sql = "select min(str_to_date(qsodate, \"%Y-%m-%d\")) as qd from qsos;";
26+
$res = $conn->query($sql);
27+
$resa = $res->fetch_array();
28+
$firstdate = $resa["qd"];
29+
30+
$sql = "select max(str_to_date(qsodate, \"%Y-%m-%d\")) as qd from qsos;";
31+
$res = $conn->query($sql);
32+
$resa = $res->fetch_array();
33+
$lastdate = $resa["qd"];
34+
$conn->close();
35+
?>
1936
<!DOCTYPE html>
2037
<html lang="en">
2138
<head>
2239
<meta charset="utf-8">
2340
<meta name="viewport" content="width=device-width, initial-scale=1">
24-
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
25-
<!-- <meta name="description" content="">
26-
<meta name="author" content="">
27-
<link rel="icon" href="../../favicon.ico"> -->
28-
2941
<title><?php echo $club_call; ?> QSL Print System</title>
30-
31-
<!-- Bootstrap core CSS -->
3242
<link href="css/bootstrap.min.css" rel="stylesheet">
33-
34-
<!-- Custom styles for this template -->
3543
<link href="css/qsl.css" rel="stylesheet">
36-
3744
</head>
3845

3946
<body>
40-
41-
<nav class="navbar navbar-inverse navbar-fixed-top">
42-
<div class="container">
43-
<p class="qsl-head"><?php echo $club_call; ?> QSL Print System</p>
44-
</div>
45-
</nav>
46-
47-
<div class="container">
48-
<h1><?php echo $club_name; ?> - <?php echo $club_call; ?></h1>
49-
</div>
50-
51-
<div class="container">
47+
<header class="shadow-md bg-dark px-3">
5248
<div class="row">
53-
<div class="col-md-8">
54-
<div class="qsl">
49+
<h4><?php echo $club_call; ?> QSL Print System</h4>
50+
</div>
51+
</header>
52+
53+
<main>
54+
<div class="container">
55+
<div class="row">
56+
<div class="col-12 my-2">
57+
<center>
58+
<h3><?php echo $club_name; ?> - <?php echo $club_call; ?></h3>
59+
</center>
60+
</div>
61+
</div>
62+
<div class="row justify-content-around">
63+
<div class="col-5">
5564
<p>Welcome to the <?php echo $club_name; ?> QSL printing system.
5665
This system allows you retrieve and print QSLs for QSOs with the
5766
club call <?php echo $club_call; ?>. This system will provide
5867
you with any QSL on record in the <i>current</i> QSL card or certificate
5968
used by the club. To begin, enter your callsign below and click Search for QSOs.</p>
6069
<hr>
6170
<form action="qslfetch.php" method="post">
62-
<p class="lead">Call Sign: <input type="text" name="call"></p>
63-
<input id="submit" type="submit" value="Search for QSOs" />
71+
<label for="call" class="form-label"><b>Enter the Callign to Search For:</b></label>
72+
<input type="text" name="call" class="form-control">
73+
<button type="submit" class="btn btn-primary my-2">Search for QSOs</button>
6474
</form>
6575
</div>
66-
</div>
67-
<div class="col-md-4">
68-
<div class="qsl">
69-
<?php print $qsl_page_note; ?>
76+
<div class="col-5">
77+
<div class="alert alert-secondary">
78+
<div class="qsl-page-note">
79+
<b>First QSO Date:</b> <?php echo $firstdate; ?><br>
80+
<b>Last QSO Date:</b> <?php echo $lastdate; ?><hr>
81+
<?php print $qsl_page_note; ?>
82+
</div>
83+
</div>
7084
</div>
7185
</div>
7286
</div>
73-
</div>
74-
<div id="footer">
75-
<div class="container">
76-
<hr>
87+
<footer>
88+
<div class="d-flex">
7789
<p class="text-muted">Site information &copy;&nbsp;<?php print date("Y"); ?>&nbsp;<?php print $club_name; ?><br/>
7890
Powered by <a href="https://github.com/jxmx/smooth-qsl" target="_blank">Smooth QSL</a><br/>
7991
This page load
@@ -87,7 +99,7 @@
8799
?>
88100
maintenance.</p>
89101
</div>
90-
</div>
102+
</footer>
91103
<script src="js/bootstrap.min.js"></script>
92104
</body>
93105
</html>

js/smoothqsl.js

-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ function validateQsoFetchForm(){
3131
qsoform.action = "qslprintmulti.php";
3232
}
3333

34-
alert("Your QSL card/certificate is being generated. Click OK and you will be prompted to print or save a PDF file. Once you have your QSL, please close the browser window or tab.");
35-
3634
return true;
3735
}
3836

load/index.php

+15-27
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,33 @@
2020
<html lang="en">
2121
<head>
2222
<meta charset="utf-8">
23-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
2423
<meta name="viewport" content="width=device-width, initial-scale=1">
25-
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
26-
<!-- <meta name="description" content="">
27-
<meta name="author" content="">
28-
<link rel="icon" href="../favicon.ico"> -->
29-
3024
<title><?php echo $club_call; ?> QSL Print System ADIF Loader</title>
31-
32-
<!-- Bootstrap core CSS -->
3325
<link href="../css/bootstrap.min.css" rel="stylesheet">
34-
35-
<!-- Custom styles for this template -->
3626
<link href="../css/qsl.css" rel="stylesheet">
37-
38-
3927
</head>
4028

4129
<body>
42-
43-
<nav class="navbar navbar-inverse navbar-fixed-top">
44-
<div class="container">
45-
<p class="qsl-head"><?php echo $club_call; ?> QSL Print System ADIF Loader</p>
46-
</div>
47-
</nav>
48-
49-
<div class="container">
50-
<h1><?php echo $club_call; ?> ADIF Loader</h1>
51-
</div>
52-
30+
<header class="shadow-md bg-dark px-3">
31+
<div class="row">
32+
<h4><?php echo $club_call; ?> QSL Print System</h4>
33+
</div>
34+
</header>
35+
36+
<main>
5337
<div class="container">
38+
<div class="col-12">
39+
<center>
40+
<h4><?php echo $club_call; ?> ADIF Loader</h4>
41+
</center>
42+
</div>
5443
<div class="row">
5544
<div class="col-md-8">
56-
<div class="qsl">
5745
<p>To use the loader enter your call sign, the load key provided by
5846
your club QSL manager in the <i>Load Key</i> box, select your ADIF file for
5947
uploading, and then click the upload button. The loader supports ADIF 2.0
60-
and the ADIF v3.0 non-XML formats.</p>
48+
and the ADIF v3.0 non-XML formats. <b><i>This system will not deduplicate logs</i></b></p>
49+
6150
<form method="post" action="qsladifloader.php" enctype="multipart/form-data">
6251

6352
<p>
@@ -88,10 +77,9 @@
8877
</p>
8978

9079
<p>
91-
<input type="submit" value="Upload ADIF" name="submit" id="submit">
80+
<button type="submit" class="btn btn-secondary" id="submit" name="submit">Upload ADIF</button>
9281
</p>
9382
</form>
94-
</div>
9583
</div>
9684
<div class="col-md-4">
9785
<div class="qsl">

load/qsladifloadcommit.php

+11-22
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,22 @@
5151
<html lang="en">
5252
<head>
5353
<meta charset="utf-8">
54-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
5554
<meta name="viewport" content="width=device-width, initial-scale=1">
56-
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
57-
<!-- <meta name="description" content="">
58-
<meta name="author" content="">
59-
<link rel="icon" href="../favicon.ico"> -->
60-
6155
<title><?php echo $club_call; ?> QSL Print System ADIF Loader</title>
62-
63-
<!-- Bootstrap core CSS -->
6456
<link href="../css/bootstrap.min.css" rel="stylesheet">
65-
66-
<!-- Custom styles for this template -->
6757
<link href="../css/qsl.css" rel="stylesheet">
6858

6959
</head>
7060

7161
<body>
62+
<header class="shadow-md bg-dark px-3">
63+
<div class="row">
64+
<h4><?php echo $club_call; ?> QSL Print System</h4>
65+
</div>
66+
</header>
7267

73-
<nav class="navbar navbar-inverse navbar-fixed-top">
74-
<div class="container">
75-
<p class="qsl-head"><?php echo $club_call; ?> QSL Print System ADIF Loader</p>
76-
</div>
77-
</nav>
78-
68+
<main>
7969
<div class="container">
80-
<div class="qsl">
8170
<?php
8271
$conn = new mysqli($db_server, $db_user, $db_pass, $db_db);
8372
if( $conn->connect_error){
@@ -166,15 +155,15 @@
166155
end:
167156
$conn->close();
168157
?>
169-
</div>
170158
</div>
171-
<div id="footer">
172-
<div class="container">
173-
<hr>
159+
</main>
160+
<footer>
161+
<div class="d-flex">
174162
<p class="text-muted">Site information &copy;&nbsp;<?php print date("Y"); ?>&nbsp;<?php print $club_name; ?><br/>
175163
Powered by <a href="https://github.com/jxmx/smooth-qsl" target="_blank">Smooth QSL</a></p>
176164
</div>
177-
</div>
165+
</footer>
166+
178167
<script src="../js/bootstrap.min.js"></script>
179168
</body>
180169
</html>

0 commit comments

Comments
 (0)