diff options
author | William Harrington <kb0iic@berzerkula.org> | 2019-02-13 00:52:55 -0600 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2019-02-13 00:52:55 -0600 |
commit | 4a03f9b7f3b7dc6cbca3d04ad5c1a750a16cd9a8 (patch) | |
tree | 4cbea67f8d838d7960fc416d415df20e59d74972 | |
parent | e739e3e8df1bc076221a2ad227e41a3c88a26506 (diff) |
Adjust formatting
-rw-r--r-- | A8_srv_build/delete.php | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/A8_srv_build/delete.php b/A8_srv_build/delete.php index cfa52a3..4eb55c1 100644 --- a/A8_srv_build/delete.php +++ b/A8_srv_build/delete.php @@ -18,30 +18,27 @@ session_start(); <pre> <?php -include('config.inc'); - -print_r($_POST['delid']); +include('/home/kb0iic/config.inc'); if (!empty($_POST['delid'])) { - $delid = isset($_POST['delid']) ? $delid = $_POST['delid'] : null; - $nc = count($delid); - for ($i=0;$i<$nc;$i++) - { - $did = $delid[$i]; - echo "Removing $did\n"; + $delid = isset($_POST['delid']) ? $delid = $_POST['delid'] : null; + $nc = count($delid); + for ($i=0;$i<$nc;$i++) + { + $did = $delid[$i]; + echo "Removing $did\n"; $sql = 'DELETE PKG, PKG_CFG, PKG_BLD, PKG_NST, PKG_SET, PKG_NOT, PKG_URL FROM PKG, PKG_CFG, PKG_BLD, PKG_NST, PKG_SET, PKG_NOT, PKG_URL WHERE PKG_CFG.pkg_id = PKG.id AND PKG_BLD.pkg_id = PKG.id AND PKG_NST.pkg_id = PKG.id AND PKG_SET.pkg_id = PKG.id AND PKG_NOT.pkg_id = PKG.id AND PKG_URL.pkg_id = PKG.id AND PKG.id=:id ;'; - try { - $stmt = $pdo->prepare($sql); - $stmt->execute(['id' => $did]); - } catch (PDOException $e) { - echo '<font color="D00"><pre>Have a big problem</pre></font>'; - throw $e; - } - - } + try { + $stmt = $pdo->prepare($sql); + $stmt->execute(['id' => $did]); + } catch (PDOException $e) { + echo '<font color="D00"><pre>Have a big problem</pre></font>'; + throw $e; + } + } } else { - echo "No rows selected to delete!"; + echo "No rows selected to delete!"; } ?> </pre> |