forked from kkaiser1952/NCM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetGenComments.php
32 lines (27 loc) · 974 Bytes
/
getGenComments.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
error_reporting( 0 );
//date_default_timezone_set("America/Chicago");
require_once "dbConnectDtls.php";
$q = intval($_GET['q']);
//$q = 2428;
//echo("$q");
// The if condition prevents the program from using the netID = 0 in the SQL
if ($q > 0 ) {
// This SQL gets the genComm from the TimeLog
$sql = ("SELECT comment
FROM `TimeLog`
WHERE callsign = 'GENCOMM'
AND id = 0
AND netID = $q
ORDER BY ID DESC
LIMIT 0,1
");
foreach($db_found->query($sql) as $row) {
$comment = $row[comment];
}
// the htmlspecialchars(urldecode() stuff is so characters after the ampersand are still returned
// see the example URL below
echo (htmlspecialchars(urldecode("$comment")));
}
// https://goto.webcasts.com/starthere.jsp?ei=1340938&tp_key=db6ffe8646
?>