瀏覽代碼

Remove Extraneous Files

Remove some extraneous files that were left over from the last commit
refactor.
pull/123/head
Justin Karimi 3 年之前
父節點
當前提交
ce59239f77
共有 3 個文件被更改,包括 0 次插入77 次删除
  1. +0
    -6
      templates/webpanel/controllers/Pass_Controller.php
  2. +0
    -30
      templates/webpanel/models/DB_Conn.php
  3. +0
    -41
      templates/webpanel/views/PassList.php

+ 0
- 6
templates/webpanel/controllers/Pass_Controller.php 查看文件

@@ -1,6 +0,0 @@
<?php
require('models/DB_Conn.php');
$db_con = new Conn($configs->db_dir);
$passes = $db_con->getPasses();
require('views/PassList.php');
?>

+ 0
- 30
templates/webpanel/models/DB_Conn.php 查看文件

@@ -1,30 +0,0 @@
<?php
class Conn {
private $con;

public function __construct(string $db_dir) {
$this->con = new SQLite3($db_dir . 'panel.db');
}

public function getPasses() {
$today = strtotime(date('Y-m-d', time()));
$query = $this->con->query("SELECT sat_name,
is_active,
pass_start,
pass_end,
max_elev
FROM predict_passes
WHERE (pass_start > $today)
ORDER BY pass_start ASC;");
$passes = [];
$i = 0;

while($row = $query->fetchArray()) {
$passes[$i] = $row;
$i++;
}

return $passes;
}
}
?>

+ 0
- 41
templates/webpanel/views/PassList.php 查看文件

@@ -1,41 +0,0 @@
<link rel="stylesheet" type="text/css" href="css/pass_list.css">

<table class="table table-bordered table-sm table-striped" id="passes">
<thead class="thead-dark">
<tr class="text-center">
<th scope="col"><?php echo $lang['satellite']; ?></th>
<th scope="col"><?php echo $lang['pass_start']; ?></th>
<th scope="col"><?php echo $lang['pass_end']; ?></th>
<th scope="col"><?php echo $lang['max_elev']; ?></th>
</tr>
</thead>
<tbody>
<?php
$now = date('H:i:s', time());

# account for no passes currently scheduled
if (count($passes) <= 0) {
echo "<tr><td colspan=\"4\" class=\"no-passes\">0 " . $lang['passes'] . "</td></tr>";
} else {
foreach ($passes as $pass) {
$pass_start = date('H:i:s', $pass['pass_start']);
$pass_end = date('H:i:s', $pass['pass_end']);

# gray out anything that has already run or did not run because there
# was another overlapping capture but is now in the past
if ($pass['is_active'] == false or $pass_end < $now) {
echo "<tr class='inactive'>";
} else {
echo "<tr>";
}

echo "<td scope=\"row\">". $pass['sat_name'] ."</td>";
echo "<td scope=\"row\" class=\"text-center\">" . $pass_start ."</td>";
echo "<td scope=\"row\" class=\"text-center\">" . $pass_end . "</td>";
echo "<td scope=\"row\" class=\"text-center\">" . $pass['max_elev'] ."</td>";
echo "</tr>";
}
}
?>
</tbody>
</table>

Loading…
取消
儲存