Skip to content

Commit

Permalink
Upgrade to Bootstrap 5
Browse files Browse the repository at this point in the history
  • Loading branch information
jxmx committed Aug 18, 2023
1 parent 59f63a6 commit 536ee8c
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 173 deletions.
45 changes: 15 additions & 30 deletions css/qsl.css
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
body {
padding-top: 50px;
}
.qsl {
padding: 40px 15px;
text-align: left;
font-size: .875rem;
height: 100%;
}

.qsl-head {
header {
color: white;
font-size: 24px;
padding-top: 10px;
}

footer {
background-color: lightgray;
padding: 10px;
line-height: 1em;
font-size: 0.8em;
margin-top: 10px;
}

.qsl-page-note {
color: black;
}

.table-hover > thead > tr > th {
background-color: #2E64FE;
color:#f3f3f3;
padding: 5px 25px;
font-size:1.1em;
}

.table-hover > thead > tr > th#thle {
border-radius: 10px 0px 0px 10px;
-moz-border-radius: 10px 0px 0px 10px;
-webkit-border-radius: 10px 0px 0px 10px;
}

.table-hover > thead > tr > th#thre {
border-radius: 0px 10px 10px 0px;
-moz-border-radius: 0px 10px 10px 0px;
-webkit-border-radius: 0px 10px 10px 0px;
}

.table-hover > tbody > tr > td {
padding: 5px 25px;
.}

.table-hover > tbody > tr:hover {
background-color: #E6E6E6;
}
Expand All @@ -56,8 +46,3 @@ input#submit:hover, input#submit:focus {
background-color :#0431b4; /*make the background a little darker*/
}

form p label {
display: block;
float: left;
width: 75px;
}
82 changes: 47 additions & 35 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,64 +16,76 @@
*/
?>
<?php include_once("qslconf.php"); ?>
<?php
error_reporting(E_ALL);
$conn = new mysqli($db_server, $db_user, $db_pass, $db_db);
if( $conn->connect_error){
die("Connection failed: " . $conn->connect_error);
}
$sql = "select min(str_to_date(qsodate, \"%Y-%m-%d\")) as qd from qsos;";
$res = $conn->query($sql);
$resa = $res->fetch_array();
$firstdate = $resa["qd"];

$sql = "select max(str_to_date(qsodate, \"%Y-%m-%d\")) as qd from qsos;";
$res = $conn->query($sql);
$resa = $res->fetch_array();
$lastdate = $resa["qd"];
$conn->close();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- <meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico"> -->

<title><?php echo $club_call; ?> QSL Print System</title>

<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="css/qsl.css" rel="stylesheet">

</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<p class="qsl-head"><?php echo $club_call; ?> QSL Print System</p>
</div>
</nav>

<div class="container">
<h1><?php echo $club_name; ?> - <?php echo $club_call; ?></h1>
</div>

<div class="container">
<header class="shadow-md bg-dark px-3">
<div class="row">
<div class="col-md-8">
<div class="qsl">
<h4><?php echo $club_call; ?> QSL Print System</h4>
</div>
</header>

<main>
<div class="container">
<div class="row">
<div class="col-12 my-2">
<center>
<h3><?php echo $club_name; ?> - <?php echo $club_call; ?></h3>
</center>
</div>
</div>
<div class="row justify-content-around">
<div class="col-5">
<p>Welcome to the <?php echo $club_name; ?> QSL printing system.
This system allows you retrieve and print QSLs for QSOs with the
club call <?php echo $club_call; ?>. This system will provide
you with any QSL on record in the <i>current</i> QSL card or certificate
used by the club. To begin, enter your callsign below and click Search for QSOs.</p>
<hr>
<form action="qslfetch.php" method="post">
<p class="lead">Call Sign: <input type="text" name="call"></p>
<input id="submit" type="submit" value="Search for QSOs" />
<label for="call" class="form-label"><b>Enter the Callign to Search For:</b></label>
<input type="text" name="call" class="form-control">
<button type="submit" class="btn btn-primary my-2">Search for QSOs</button>
</form>
</div>
</div>
<div class="col-md-4">
<div class="qsl">
<?php print $qsl_page_note; ?>
<div class="col-5">
<div class="alert alert-secondary">
<div class="qsl-page-note">
<b>First QSO Date:</b> <?php echo $firstdate; ?><br>
<b>Last QSO Date:</b> <?php echo $lastdate; ?><hr>
<?php print $qsl_page_note; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<hr>
<footer>
<div class="d-flex">
<p class="text-muted">Site information &copy;&nbsp;<?php print date("Y"); ?>&nbsp;<?php print $club_name; ?><br/>
Powered by <a href="https://github.com/jxmx/smooth-qsl" target="_blank">Smooth QSL</a><br/>
This page load
Expand All @@ -87,7 +99,7 @@
?>
maintenance.</p>
</div>
</div>
</footer>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
2 changes: 0 additions & 2 deletions js/smoothqsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ function validateQsoFetchForm(){
qsoform.action = "qslprintmulti.php";
}

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.");

return true;
}

42 changes: 15 additions & 27 deletions load/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,33 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- <meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../favicon.ico"> -->

<title><?php echo $club_call; ?> QSL Print System ADIF Loader</title>

<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="../css/qsl.css" rel="stylesheet">


</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<p class="qsl-head"><?php echo $club_call; ?> QSL Print System ADIF Loader</p>
</div>
</nav>

<div class="container">
<h1><?php echo $club_call; ?> ADIF Loader</h1>
</div>

<header class="shadow-md bg-dark px-3">
<div class="row">
<h4><?php echo $club_call; ?> QSL Print System</h4>
</div>
</header>

<main>
<div class="container">
<div class="col-12">
<center>
<h4><?php echo $club_call; ?> ADIF Loader</h4>
</center>
</div>
<div class="row">
<div class="col-md-8">
<div class="qsl">
<p>To use the loader enter your call sign, the load key provided by
your club QSL manager in the <i>Load Key</i> box, select your ADIF file for
uploading, and then click the upload button. The loader supports ADIF 2.0
and the ADIF v3.0 non-XML formats.</p>
and the ADIF v3.0 non-XML formats. <b><i>This system will not deduplicate logs</i></b></p>

<form method="post" action="qsladifloader.php" enctype="multipart/form-data">

<p>
Expand Down Expand Up @@ -88,10 +77,9 @@
</p>

<p>
<input type="submit" value="Upload ADIF" name="submit" id="submit">
<button type="submit" class="btn btn-secondary" id="submit" name="submit">Upload ADIF</button>
</p>
</form>
</div>
</div>
<div class="col-md-4">
<div class="qsl">
Expand Down
33 changes: 11 additions & 22 deletions load/qsladifloadcommit.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,22 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- <meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../favicon.ico"> -->

<title><?php echo $club_call; ?> QSL Print System ADIF Loader</title>

<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="../css/qsl.css" rel="stylesheet">

</head>

<body>
<header class="shadow-md bg-dark px-3">
<div class="row">
<h4><?php echo $club_call; ?> QSL Print System</h4>
</div>
</header>

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<p class="qsl-head"><?php echo $club_call; ?> QSL Print System ADIF Loader</p>
</div>
</nav>

<main>
<div class="container">
<div class="qsl">
<?php
$conn = new mysqli($db_server, $db_user, $db_pass, $db_db);
if( $conn->connect_error){
Expand Down Expand Up @@ -166,15 +155,15 @@
end:
$conn->close();
?>
</div>
</div>
<div id="footer">
<div class="container">
<hr>
</main>
<footer>
<div class="d-flex">
<p class="text-muted">Site information &copy;&nbsp;<?php print date("Y"); ?>&nbsp;<?php print $club_name; ?><br/>
Powered by <a href="https://github.com/jxmx/smooth-qsl" target="_blank">Smooth QSL</a></p>
</div>
</div>
</footer>

<script src="../js/bootstrap.min.js"></script>
</body>
</html>
Expand Down
Loading

0 comments on commit 536ee8c

Please sign in to comment.