diff --git a/addAppeals.php b/addAppeals.php index c0bf4f2..05d5f9a 100644 --- a/addAppeals.php +++ b/addAppeals.php @@ -3,12 +3,12 @@ include 'connect.php'; include_once "appeals_function.php"; -session_start(); +// session_start(); -if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) { - header("Location: index.html"); - exit(); -} +// if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) { +// header("Location: index.html"); +// exit(); +// } $criminal_ID = array_key_exists("criminal_ID", $_GET) ? $_GET['criminal_ID'] : null; if ($criminal_ID == null) { diff --git a/addCharges.php b/addCharges.php index 6b09d25..953d225 100644 --- a/addCharges.php +++ b/addCharges.php @@ -3,12 +3,12 @@ include 'connect.php'; include_once "addcharges_function.php"; -session_start(); +// session_start(); -if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) { - header("Location: index.html"); - exit(); -} +// if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) { +// header("Location: index.html"); +// exit(); +// } $criminal_ID = array_key_exists("criminal_ID", $_GET) ? $_GET['criminal_ID'] : null; if ($criminal_ID == null) { diff --git a/addCrimeofficers.php b/addCrimeofficers.php index aad8d0b..99cea16 100644 --- a/addCrimeofficers.php +++ b/addCrimeofficers.php @@ -1,11 +1,7 @@ Add Alias - diff --git a/criminal_add_and_edit.php b/criminal_add_and_edit.php index b67ddec..aff735b 100644 --- a/criminal_add_and_edit.php +++ b/criminal_add_and_edit.php @@ -1,10 +1,9 @@ rollback(); die($exception); - // throw $exception; } - // mysqli_query($con, $sql); } //get criminal by id @@ -116,7 +114,6 @@ function get_criminal_info_from_db() { } } catch (mysqli_sql_exception $exception) { die($exception); - // throw $exception; } } @@ -147,7 +144,6 @@ function add_criminal_info() { } catch (mysqli_sql_exception $exception) { $con->rollback(); die($exception); - // throw $exception; } } @@ -166,8 +162,7 @@ function update_criminal_info() { `criminal_phone`= ?, `criminal_violent_status`= ?, `criminal_probation_status`= ? - WHERE criminal_ID = ?"; - // die($sql); + WHERE criminal_ID = ?"; $criminal = Criminal::fromResultRow($_POST); try { @@ -192,7 +187,6 @@ function update_criminal_info() { } catch (mysqli_sql_exception $exception) { $con->rollback(); die($exception); - // throw $exception; } } ?> diff --git a/helloworld.php b/helloworld.php deleted file mode 100644 index fdb7c26..0000000 --- a/helloworld.php +++ /dev/null @@ -1,24 +0,0 @@ -setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - echo "Connected successfully"; // Display message upon successful connection -} catch (PDOException $e) { - echo "Connection failed: " . $e->getMessage(); // Display error message if connection fails -} - -$sql = "SELECT * FROM criminals"; -$stmt = $con->prepare($sql); -$stmt->execute(); -echo 'Criminals information:
'; -while ($row = $stmt->fetch()) { - echo '----------------------------------------
'; - foreach ($row as $columnName => $columnValue) { - echo $columnName . ': ' . $columnValue . '
'; - } -} - -?> diff --git a/index.html b/index.html index 6fbde75..e345dea 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + login diff --git a/police.php b/police.php index 27765a6..0a10b8a 100644 --- a/police.php +++ b/police.php @@ -29,7 +29,6 @@ Document - @@ -89,30 +88,6 @@ - // ' . $id . ' - // ' . $fname . ' - // ' . $lname . ' - // ' . $precinct . ' - // ' . $badge . ' - // ' . $phone . ' - // ' . $status . ' - // '; - // } - // } foreach($result as $row){ $id = $row->id; diff --git a/police_add_and_edit.php b/police_add_and_edit.php index c3395e4..422eb02 100644 --- a/police_add_and_edit.php +++ b/police_add_and_edit.php @@ -1,12 +1,10 @@ rollback(); die($exception); - // throw $exception; } - // mysqli_query($con, $sql); } //get police by id @@ -110,7 +108,6 @@ function get_police_info_from_db() { } } catch (mysqli_sql_exception $exception) { die($exception); - // throw $exception; } } @@ -138,7 +135,6 @@ function add_police_info() { } catch (mysqli_sql_exception $exception) { $con->rollback(); die($exception); - // throw $exception; } } @@ -154,8 +150,7 @@ function update_police_info() { `officer_badge`= ?, `officer_phone`= ?, `officer_status`= ? - WHERE officer_ID = ?"; - // die($sql); + WHERE officer_ID = ?"; $police = Police::fromResultRow($_POST); try { @@ -177,7 +172,6 @@ function update_police_info() { } catch (mysqli_sql_exception $exception) { $con->rollback(); die($exception); - // throw $exception; } } ?> diff --git a/popup.php b/popup.php index b18c2f9..7a1b363 100644 --- a/popup.php +++ b/popup.php @@ -68,14 +68,6 @@ function deleteSentence(id) {
- - - - - - - -
@@ -89,18 +81,14 @@ function deleteSentence(id) { $result = mysqli_query($con, $sql); if ($result && mysqli_num_rows($result) > 0) { - $criminal = mysqli_fetch_assoc($result); // Fetch the data as an associative array + $criminal = mysqli_fetch_assoc($result); echo '

Name: ' . $criminal['criminal_name_first'] . ' ' . $criminal['criminal_name_last'] . '

'; echo '

Address: ' . $criminal['criminal_street'] . ', ' . $criminal['criminal_city'] . ', ' . $criminal['criminal_zip'] . '

'; echo '

Phone: ' . $criminal['criminal_phone'] . '

'; echo '

Violation Status: ' . $criminal['criminal_violent_status'] . '

'; echo '

Probation Status: ' . $criminal['criminal_probation_status'] . '

'; - - //-----------------------------------------------------------------------------------> - // ALIAS --> - //-----------------------------------------------------------------------------------> - + $sql = "SELECT * FROM alias WHERE criminal_ID = '" . mysqli_real_escape_string($con, $criminal_id) . "'"; $result = mysqli_query($con, $sql); @@ -108,7 +96,7 @@ function deleteSentence(id) { while ($row = mysqli_fetch_assoc($result)) { echo '
'; echo '

' . $row['alias'] . '

'; - echo '
'; //form 1 + echo ''; echo ''; echo ''; echo ''; @@ -133,15 +121,10 @@ function deleteSentence(id) { ?> -
+
- - - - -

Sentencing @@ -171,12 +154,6 @@ function deleteSentence(id) {

- - - - - - '; } } - echo '
'; //closing box 3 charges - - /* ---------------------------CHARGES---------------------------------- */ - - - - - - - echo '
'; // Closing box2 + echo ''; + + echo ''; } } ?> @@ -478,19 +408,18 @@ function addCrimeStuff(crimeID, identifier) { body, html { height: 100%; - /* Set the body and html height to 100% */ } .container { width: 70%; padding: 20px; margin: 30px auto; - /* Add top and bottom margin, keep auto for horizontal centering */ + display: flex; background: #ddd; justify-content: space-between; height: 90vh; - /* Set the container height to 100% of the viewport height */ + max-width: 950px; } @@ -505,7 +434,7 @@ function addCrimeStuff(crimeID, identifier) { transition: 1s; overflow: auto; flex-direction: column; - /* Set flex direction to column for vertical stacking */ + } @@ -528,9 +457,9 @@ function addCrimeStuff(crimeID, identifier) { .box2 { height: auto; - /* Set a specific height */ + width: 100%; - /* Set a specific width */ + padding: 20px; background: #EEE0C9; margin-bottom: 10px; @@ -571,16 +500,16 @@ function addCrimeStuff(crimeID, identifier) { .table-container { text-align: center; - /* Center-align the content */ + margin: auto; - /* Center the container horizontally */ + max-width: 100%; - /* Ensure the container doesn't exceed the viewport width */ + } table { width: 100%; - /* Make the table take the full width of its container */ + } @@ -588,7 +517,7 @@ function addCrimeStuff(crimeID, identifier) { .popup { width: 30%; max-height: 80%; - /* Set a maximum height for scrollability */ + background: #fff; border-radius: 6px; position: absolute; @@ -614,15 +543,15 @@ function addCrimeStuff(crimeID, identifier) { .box3 { height: 200px; - /* Set a specific height */ + width: 100%; - /* Set a specific width */ + padding: 20px; background: #FFF4E3; margin-bottom: 10px; overflow: hidden; overflow-y: auto; - /* Enable vertical scrolling */ + border-radius: 1vw; height: auto; min-height: 100px; @@ -640,15 +569,15 @@ function addCrimeStuff(crimeID, identifier) { .box4 { height: 50px; - /* Set a specific height */ + width: 100%; - /* Set a specific width */ + padding: 20px; background: #FFF4E3; margin-bottom: 10px; overflow: hidden; overflow-y: auto; - /* Enable vertical scrolling */ + border-radius: 1vw; height: auto; min-height: 50px; @@ -693,9 +622,9 @@ function addCrimeStuff(crimeID, identifier) { .boxSentencing { height: 200px; - /* Set a specific height */ + width: 100%; - /* Set a specific width */ + padding: 20px; background: #EEE0C9; margin-bottom: 10px; @@ -715,9 +644,9 @@ function addCrimeStuff(crimeID, identifier) { .boxfinal { height: auto height-min: 100px; - /* Set a specific height */ + width: 100%; - /* Set a specific width */ + padding: 20px; background: #FFF4E3; margin-bottom: 10px; @@ -727,8 +656,6 @@ function addCrimeStuff(crimeID, identifier) { transition: 1s; - - } diff --git a/probation.php b/probation.php index 1e1265f..a3f62d1 100644 --- a/probation.php +++ b/probation.php @@ -29,7 +29,6 @@ Document - @@ -95,36 +94,7 @@ - // ' . $id . ' - // ' . $fname . ' - // ' . $lname . ' - // ' . $street . ' - // ' . $city . ' - // ' . $state . ' - // ' . $zip . ' - // ' . $phone . ' - // ' . $email . ' - // ' . $status . ' - // '; - // } - // } + foreach($result as $row){ $id = $row->id; $fname = $row->fname; diff --git a/probation_add_and_edit.php b/probation_add_and_edit.php index 55667f9..894fffb 100644 --- a/probation_add_and_edit.php +++ b/probation_add_and_edit.php @@ -3,7 +3,6 @@ include_once 'probation_functions.php'; if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) { - // echo "not logged in"; header("Location: index.html"); exit(); } @@ -27,7 +26,6 @@ Document -