Working Technical example
This commit is contained in:
parent
6f03be8cf6
commit
b1837b805e
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
function aprspass ($callsign) {
|
||||
function aprspass ($callsign) {
|
||||
$stophere = strpos($callsign, '-');
|
||||
if ($stophere) $callsign = substr($callsign, 0, $stophere);
|
||||
$realcall = strtoupper(substr($callsign, 0, 10));
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
|
||||
$app->post('/passcode', function () {
|
||||
require('aprs_func.php');
|
||||
echo aprspass($_POST['callsign']);
|
||||
$passcode = aprspass($_POST['callsign']);
|
||||
require('templates/passcode.php');
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
|
||||
<head>
|
||||
<title>APRS Passcode Generator</title>
|
||||
<style type="text/css" media="screen">
|
||||
|
@ -18,6 +19,7 @@
|
|||
}
|
||||
label {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
|
||||
<head>
|
||||
<title>APRS Passcode Generator - Passcode</title>
|
||||
<style type="text/css" media="screen">
|
||||
body {
|
||||
font-family: Arial, "MS Trebuchet", sans-serif;
|
||||
font-size: 14px;
|
||||
background-color: whiteSmoke;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 0 auto;
|
||||
width: 400px;
|
||||
padding: 10px;
|
||||
border: 1px solid #E5E5E5;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
label {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
.green {
|
||||
color: #4F8A10;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<h1>APRS Passcode Generator</h1>
|
||||
|
||||
<h2>Your Passcode: <span class="green"><?php echo $passcode; ?></span></h2>
|
||||
|
||||
<p><a href="../index.php">Generate a new Passcode</a></p>
|
||||
|
||||
<p>Techical Example of Passcode Generation using PHP</p>
|
||||
<p>Source code available on <a href="https://github.com/magicbug/PHP-APRS-Passcode" title="Github" target="_blank">Github</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue