From 3fba3f1c61f46452a7a7ff1640c0fe03b867aa75 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Sat, 28 Mar 2020 13:53:17 -0700 Subject: [PATCH] typos in index.php --- index.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index 10f8cb9..7a6601a 100644 --- a/index.php +++ b/index.php @@ -177,11 +177,14 @@ foreach($showlist as $section) { break; case 'MO': echo 'Modules:
', "\n"; - $dbname = $cfgdir.'/'.GetCFGValues('dash_sql_filename'); - $db = new SQLiet3($dbname, SQLITE3_OPEN_READ_ONLY); + $dbname = $cfgdir.'/'.GetCFGValue('dash_sql_filename'); + $db = new SQLite3($dbname, SQLITE3_OPEN_READONLY); echo "\n"; echo '', "\n"; foreach (array('a', 'b', 'c') as $mod) { + $linkstatus = ''; + $address = ''; + $ctime = '': $module = 'module_'.$mod; if (array_key_exists($module, $cfg)) { $freq = 0.0; @@ -189,17 +192,13 @@ foreach($showlist as $section) { $freq = $cfg[$module.'_tx_frequency']; else if (array_key_exists($module.'_frequency', $cfg)) $freq = $cfg[$module.'_frequency']; - $ss = 'SELECT ip_address,to_callsign,to_mod,strftime("%s","now")-link_time FROM LINKSTATUS WHERE from_mod=' . "'" . strtoupper($mod) . "';"; + $ss = 'SELECT ip_address,to_callsign,to_mod,strftime("%s","now")-linked_time FROM LINKSTATUS WHERE from_mod=' . "'" . strtoupper($mod) . "';"; if ($stmnt = $db->prepare($ss)) { if ($result = $stmnt->execute()) { if ($row = $result->FetchArray(SQLITE3_NUM)) { $linkstatus = str_pad(trim($row[1]), 7).$row[2]; $address = $row[0]; $ctime = SecToString(intval($row[3])); - } else { - $linkstatus = 'Unlinked'; - $address = ''; - $ctime = ''; } $result->finalize(); }
ModuleModemFrequencyLinkLinked TimeLink IP