diff --git a/Database_creator.sql b/Database_creator.sql new file mode 100644 index 0000000..b8b1023 --- /dev/null +++ b/Database_creator.sql @@ -0,0 +1,53 @@ +/* +DROP TABLE IF EXISTS Record_details, Outstanding_warrants, Criminal_summary, Person_summary; +DROP DATABASE IF EXISTS Serial_enforcing_interface_database; +*/ +CREATE DATABASE IF NOT EXISTS serial_enforcing_interface_database; +USE serial_enforcing_interface_database; + +CREATE TABLE IF NOT EXISTS person_summary ( + person_number int AUTO_INCREMENT NOT NULL, + picture varchar(50) NOT NULL, + first_name varchar(50) NOT NULL, + last_name varchar(50) NOT NULL, + middle_name varchar(50), + date_of_birth date NOT NULL, + state_of_residence varchar(50), + CONSTRAINT PRIMARY KEY (person_number) +); + +CREATE TABLE IF NOT EXISTS criminal_summary ( + person_number_criminal_summary int NOT NULL, + charges int NOT NULL, + convictions int NOT NULL, + outstanding_warrants int NOT NULL, + flight_risk varchar(3) NOT NULL, + CONSTRAINT FK1 FOREIGN KEY (person_number_criminal_summary) REFERENCES person_summary (person_number) +); + +CREATE TABLE IF NOT EXISTS outstanding_warrants ( + person_number_outstanding_warrants int NOT NULL, + date_issues date NOT NULL, + charge varchar(50) NOT NULL, + country_state varchar(20) NOT NULL, + CONSTRAINT FK2 FOREIGN KEY (person_number_outstanding_warrants) REFERENCES person_summary (person_number) +); + +CREATE TABLE IF NOT EXISTS record_details ( + person_number_record_details int NOT NULL, + offense_date date NOT NULL, + offense varchar(200) NOT NULL, + disposition_outcome varchar(200) NOT NULL, + offense_location_prefix char(10) NOT NULL, + offense_location_street_number int(10) NOT NULL, + offense_location_street_name char(20) NOT NULL, + offense_location_street_type char(20) NOT NULL, + offense_location_unit char(30), + offense_location_city char(30) NOT NULL, + offense_location_state char(10) NOT NULL, + offense_location_zip_code int(10), + offense_location_county char(50), + sentence_penalty varchar(100) NOT NULL, + charge_type varchar(50) NOT NULL, + CONSTRAINT FK3 FOREIGN KEY (person_number_record_details) REFERENCES person_summary (person_number) +); \ No newline at end of file diff --git a/Images/Gabrielle.png b/Images/Gabrielle.png new file mode 100644 index 0000000..a4cc2ea Binary files /dev/null and b/Images/Gabrielle.png differ diff --git a/Images/Jack.png b/Images/Jack.png new file mode 100644 index 0000000..4f18fef Binary files /dev/null and b/Images/Jack.png differ diff --git a/Images/John.png b/Images/John.png new file mode 100644 index 0000000..c04b62d Binary files /dev/null and b/Images/John.png differ diff --git a/Sample_profiles.sql b/Sample_profiles.sql new file mode 100644 index 0000000..e0e17b8 --- /dev/null +++ b/Sample_profiles.sql @@ -0,0 +1,4 @@ +USE serial_enforcing_interface_database; +insert into person_summary(picture, first_name, last_name, middle_name, date_of_birth, state_of_residence) VALUES ('John.png', 'John', 'Smith', NULL, DATE_SUB(SYSDATE(), INTERVAL 120 MONTH), 'California'); +insert into person_summary(picture, first_name, last_name, middle_name, date_of_birth, state_of_residence) VALUES ('Jack.png', 'Jack', 'Park', NULL, DATE_SUB(SYSDATE(), INTERVAL 50 MONTH), 'Texas'); +insert into person_summary(picture, first_name, last_name, middle_name, date_of_birth, state_of_residence) VALUES ('Gabrielle.png', 'Gabrielle', 'Adams', NULL, DATE_SUB(SYSDATE(), INTERVAL 250 MONTH), 'New York'); \ No newline at end of file diff --git a/catalog.php b/catalog.php new file mode 100644 index 0000000..cb5696b --- /dev/null +++ b/catalog.php @@ -0,0 +1,48 @@ + + + + + + + + Catalog + + + + +
+
+

Catalog of persons

+
+
+ +
+ + +
+ + +
+
+

", $row -> first_name,"

+
+
"; + } + ?> +
+
+ + + + + \ No newline at end of file diff --git a/database_connection.txt b/database_connection.txt new file mode 100644 index 0000000..516cf53 --- /dev/null +++ b/database_connection.txt @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/exiting.php b/exiting.php new file mode 100644 index 0000000..e69de29 diff --git a/graphics.css b/graphics.css new file mode 100644 index 0000000..f2ee473 --- /dev/null +++ b/graphics.css @@ -0,0 +1,83 @@ +* { + box-sizing: border-box; + padding: 0; + margin: 0; +} + +html, body { + height:100%; + margin: 0; + padding: 0; +} + + +.block { + border: 1px solid black; + height: 100vh; + width: 100%; +} + + + +.block_quarter { + border: 1px solid black; + height: 25vh; + width: 100%; +} + +.block_text { + border: 1px solid black; + height: 25vh; + width: 100%; + text-align: center; + justify-content: center; + align-items: center; + display: flex; +} + + +.block_image { + border: 1px solid black; + height: 25vh; + width: 100%; + justify-content: top; + align-items: top; + display: flex; +} + +.block_text img { + top: 0px; + height: 100%; + width: 100%; + object-fit: contain; +} + +.block_image_text { + border: 1px solid black; + text-align:center; + height: relative; + width: 100%; +} + + +.container-row { + display: flex; + flex-direction: row; + height: 100vh; +} + +.container-column { + display: flex; + flex-direction: column; + height: 100vh; + + overflow: hidden; +} + +.container-column-group { + display:flex; + flex-direction: column; + margin-left: 10%; + margin-right: 10%; + overflow: hidden; +} diff --git a/main_site.html b/main_site.html new file mode 100644 index 0000000..2807be7 --- /dev/null +++ b/main_site.html @@ -0,0 +1,39 @@ + + + + Enforcing Interface landing page + + + + +
+
+ + +
+
+ + +
+
+

Welcome to the Interface

+
+
+ + + + +
+
+
+ + \ No newline at end of file diff --git a/profile_change.php b/profile_change.php new file mode 100644 index 0000000..e69de29 diff --git a/profile_create.php b/profile_create.php new file mode 100644 index 0000000..dbb6f0d --- /dev/null +++ b/profile_create.php @@ -0,0 +1,54 @@ + + + + Profile creation + + + + +
+

Create a profile

+
+ +
+
+
+

Picture:

+ +

First name:

+ +

Middle name:

+ +

Last name:

+ +

Date of birth:

+ +

State of residence:

+ +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/profile_create_next.php b/profile_create_next.php new file mode 100644 index 0000000..1c64896 --- /dev/null +++ b/profile_create_next.php @@ -0,0 +1,277 @@ + count($_SESSION['record_entries_list']) + 1, // Unique ID for the entry + 'offense date' => $_POST['offense_date'], + 'type of offense' => $_POST['type_of_offense'], + 'disposition outcome' => $_POST['disposition_outcome'], + 'offense location prefix' => $_POST['offense_location_prefix'], + 'offense location street number' => $_POST['offense_location_street_number'], + 'offense location street name' => $_POST['offense_location_street_name'], + 'offense location street type' => $_POST['offense_location_street_type'], + 'offense location unit' => $_POST['offense_location_unit'], + 'offense location city' => $_POST['offense_location_city'], + 'offense location state' => $_POST['offense_location_state'], + 'offense location zip code' => $_POST['offense_location_zip_code'], + 'offense location county' => $_POST['offense_location_county'] + ]; + + $_SESSION['record_entries_list'][] = $new_entry; // Add the new entry to the session list +} +//--------------------------------------------------------------------------------------\\ +// Multidimensional list reponsible for storing criminal record entries until they are sent +//--------------------------------------------------------------------------------------\\ + +//--------------------------------------------------------------------------------------\\ + + +function renderOffenseTypeOption() { +$offenseTypes = [ + 'Animal Cruelty','Arson','Assault','Battery','Bribery', + 'Burglary','Child Abuse','Child Pornography','Conspiracy','Contempt of Court', + 'Cybercrime','Disorderly Conduct','Domestic Violence','Driving Under the Influence (DUI)', + 'Driving Without a License','Embezzlement','Escape','Extortion','Forgery','Fraud','Hate Crime', + 'Homicide','Human Trafficking','Identity Theft','Illegal Weapons Possession','Kidnapping','Larceny', + 'Manslaughter','Money Laundering','Obstruction of Justice','Perjury','Public Intoxication','Resisting Arrest', + 'Robbery','Sexual Assault','Shoplifting','Smuggling','Solicitation','Soliciting Prostitution','Stalking', + 'Tax Evasion','Terrorism','Theft','Trespassing','Violation of Probation' +]; + + foreach($offenseTypes as $offense){ + echo "\n "; + } +} + +function renderDispositionOutcomes() { + $dispositionOutcomes = ['Acquittal','Amnesty','Charges dropped/No charges filed','Commutation', + 'Convicted','Deferred Prosecution','Dismissal','Expungement','Pardon','Pending','Reprieve', + 'Sealed','Suspended sentence','Vacated' + ]; + + + foreach($dispositionOutcomes as $disposition){ + echo "\n "; + } +} + +function renderOffenseLocationState() { + $offenseLocation = [ + 'ALABAMA','ALASKA','ARIZONA','ARKANSAS','CALIFORNIA','COLORADO','CONNECTICUT','DELAWARE','FLORIDA', + 'GEORGIA','HAWAII','IDAHO','ILLINOIS','INDIANA','IOWA','KANSAS','KENTUCKY','LOUISIANA','MAINE', + 'MARYLAND','MASSACHUSETTS','MICHIGAN','MINNESOTA','MISSISSIPPI','MISSOURI','MONTANA','NEBRASKA', + 'NEVADA','NEW HAMPSHIRE','NEW JERSEY','NEW MEXICO','NEW YORK','NORTH CAROLINA','NORTH DAKOTA', + 'OHIO','OKLAHOMA','OREGON','PENNSYLVANIA','RHODE ISLAND', + 'SOUTH CAROLINA','SOUTH DAKOTA','TENNESSEE','TEXAS', + 'UTAH','VERMONT','VIRGINIA','WASHINGTON', + 'WEST VIRGINIA','WISCONSIN','WYOMING']; + + + foreach ($offenseLocation as $location) { + echo "\n "; + } +} + +function renderOffenseLocationStreetType() { + $OffenseLocationStreetType = [ + 'Avenue','Boulevard','Circle','Court','Drive','Highway', + 'Lane','Parkway','Place','Road','Street','Terrace','Trail','Way' +]; + + + foreach ( $OffenseLocationStreetType as $location) { + echo "\n "; +} +} + +function criminalRecordEntries() { + // Display the list of criminal record entries + // if (empty($_SESSION['record_entries_list'])) { + // echo '

No criminal record entries found.

'; + // } else { + // echo '

Criminal Record Entries:

'; + + // Loop through each entry and display its details + +foreach ($_SESSION['record_entries_list'] as $new_entry) { + echo '
'; + + // Display each entry's details + + echo '

Offense Date: ', htmlspecialchars($new_entry['offense_date']), '

'; + echo '

Type of Offense: ', htmlspecialchars($new_entry['type_of_offense']), '

'; + echo '

Disposition Outcome: ', htmlspecialchars($new_entry['disposition_outcome']), '

'; + echo '

Offense Location: ', htmlspecialchars($new_entry['offense_location_prefix']), ' ', + htmlspecialchars($new_entry['offense_location_street_number']), ' ', + htmlspecialchars($new_entry['offense_location_street_name']), ' ', + htmlspecialchars($new_entry['offense_location_street_type']), ' ', + htmlspecialchars($new_entry['offense_location_unit']), ', ', + htmlspecialchars($new_entry['offense_location_city']), ', ', + htmlspecialchars($new_entry['offense_location_state']), ' ', + htmlspecialchars($new_entry['offense_location_zip_code']), ' ', + htmlspecialchars($new_entry['offense_location_county']), '

'; + + }; + } + + +function renderProfileDisplay( + $var_directory, $var_target_file, $var_first_name, + $var_middle_name, $var_last_name, $var_date_of_birth, + $var_state_of_residence) { + + echo '
'; + echo '
'; + echo '

FIRST NAME:

', $var_first_name,'
'; + echo '

MIDDLE NAME:

', $var_middle_name,'
'; + echo '

LAST NAME:

', $var_last_name,'
'; + echo '

DATE OF BIRTH:

', $var_date_of_birth,'
'; + echo '

STATE OF RESIDENCE:

', $var_state_of_residence; + echo '
'; + +} +?> + + + + + Criminal Profile + + + + +
+

Create a profile

+
+'; +echo '
'; +echo '
'; +echo '
'; + + +renderProfileDisplay($var_directory, $var_target_file, $var_first_name, $var_middle_name, $var_last_name, $var_date_of_birth, $var_state_of_residence); +echo '
'; +echo '
'; + +echo '

Add criminal record entry


'; +echo '
'; + + +echo '

Date of offense



'; + + +echo '

Type of offense

'; +echo '

'; + + +echo '

Disposition outcome

'; +echo '

'; + +echo '
'; +echo '

Location of offense

'; + +echo 'Precisation of location'; +echo '
'; + +echo 'street number'; +echo '
'; + +echo 'street name'; +echo '
'; + +echo 'street type'; +echo '
'; +echo 'street unit (optional)'; +echo '
'; + +echo 'city'; +echo '
'; + +echo 'state'; +echo '
'; +echo 'zip code (optional)'; +echo '
'; + +echo 'county (optional)'; +echo '
'; + +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo '
'; +echo '
'; +echo '
'; +echo ''; +echo '
'; +echo '
'; +echo '
'; + +echo '
'; +echo '
'; +echo '

Criminal record entries


'; +echo '
'; + + if (isset($_SESSION['record_entries_list'])){ + criminalRecordEntries(); + } else { + echo '

No criminal record entries found.

'; + } + // Loop through each entry and display its details + + +echo '
'; +echo '
'; +echo '
'; + +echo ''; +echo ''; +?> diff --git a/profile_delete.php b/profile_delete.php new file mode 100644 index 0000000..e69de29 diff --git a/profile_finish.php b/profile_finish.php new file mode 100644 index 0000000..3bfd7e5 --- /dev/null +++ b/profile_finish.php @@ -0,0 +1,4 @@ + \ No newline at end of file