diff --git a/candidate.php b/candidate.php new file mode 100644 index 0000000..6c81254 --- /dev/null +++ b/candidate.php @@ -0,0 +1,330 @@ + + + + + + Candidate Details + + + + + + + + +
+ prepare("SELECT * FROM Candidate WHERE candidate_id = ?"); + $stmt->execute([$_GET['id']]); + $candidate = $stmt->fetch(PDO::FETCH_ASSOC); + + // Fetch candidate assessments + $stmt_assessments = $pdo->prepare("SELECT assessment_id, candidate_id, assessed_by, assess_date, assessment, status FROM Candidate_Assessment WHERE candidate_id = ? ORDER BY assess_date DESC"); + $stmt_assessments->execute([$_GET['id']]); + $assessments = $stmt_assessments->fetchAll(PDO::FETCH_ASSOC); + + // Fetch candidate synthesis plans + $stmt_plans = $pdo->prepare("SELECT * FROM Candidate_Synthesis_Plan WHERE candidate_id = ? ORDER BY plan_id DESC"); + $stmt_plans->execute([$_GET['id']]); + $plans = $stmt_plans->fetchAll(PDO::FETCH_ASSOC); + + } catch (PDOException $e) { + echo '
Database error: ' . $e->getMessage() . '
'; + } + } + + if ($candidate): + ?> +
+

Candidate:

+
+ +
+
+
Candidate Details
+

Candidate ID:

+

Run ID:

+

Project ID:

+

SMILES ID:

+

Estimated Cost:

+

Generated Time:

+

Synthesis Approved:

+

Status:

+
+
+ +
+
+
+
Candidate Assessments
+ Create Assessment +
+
+ 0): ?> +
+ + + + + + + + + + + + + + + + + + + + + + +
Assessment IDCommentsAssessor NameDateStatusActions
+ Edit +
+
+ +

No assessments found for this candidate.

+ +
+
+ +
+
+
Candidate Synthesis Plans
+
+ 0): ?> +
+ + + + + + + + + + + + + + + +
Plan IDActions
+ View +
+
+ +

No synthesis plans found for this candidate.

+ +
+
+ +
+
+
Sample Wells
+
+ prepare(" + SELECT + sw.sample_id, + wp.Temperature, + wp.incubation_start, + wp.incubation_end, + sol.name as solution_name, + wsn.amount as solution_amount, + wsn.units as solution_units, + sv.name as solvent_name, + wsv.amount as solvent_amount, + wsv.units as solvent_units, + cat.name as catalyst_name, + wcat.amount as catalyst_amount, + wcat.units as catalyst_units, + sld.name as solid_name, + wsd.amount as solid_amount, + wsd.units as solid_units, + pxrd.character_id as pxrd_characterization_id + FROM + Candidate c + JOIN + Candidate_Synthesis_Plan csp ON c.candidate_id = csp.candidate_id + JOIN + Well_Plate wp ON csp.plan_id = wp.plan_id + JOIN + Sample_Well sw ON wp.well_plate_id = sw.well_plate_id + LEFT JOIN + Well_Solution wsn ON sw.sample_id = wsn.sample_id + LEFT JOIN + Preprep_vial sol ON wsn.vial_id = sol.vial_id + LEFT JOIN + Well_Solvents wsv ON sw.sample_id = wsv.sample_id + LEFT JOIN + Solvent sv ON wsv.solvent_id = sv.solvent_id + LEFT JOIN + Well_Catalysts wcat ON sw.sample_id = wcat.sample_id + LEFT JOIN + Catalyst cat ON wcat.catalyst_id = cat.catalyst_id + LEFT JOIN + Well_Solids wsd ON sw.sample_id = wsd.sample_id + LEFT JOIN + Solid sld ON wsd.solid_id = sld.solid_id + LEFT JOIN + PXRD_Characterization pxrd ON sw.sample_id = pxrd.sample_id + WHERE + c.candidate_id = ? + "); + $stmt_sample_wells->execute([$_GET['id']]); + $sample_wells = $stmt_sample_wells->fetchAll(PDO::FETCH_GROUP | PDO::FETCH_ASSOC); + + if ($sample_wells && count($sample_wells) > 0): + ?> +
+ + + + + + + + + + + $rows): + $first_row = $rows[0]; + $incubation_start = new DateTime($first_row['incubation_start']); + $incubation_end = new DateTime($first_row['incubation_end']); + $incubation_duration = $incubation_start->diff($incubation_end); + ?> + + + + + + + + +
Sample IDCompositionIncubationPXRD Characterization
+
    + + +
  • Solution:
  • + + +
  • Solvent:
  • + + +
  • Catalyst:
  • + + +
  • Solid:
  • + + +
+
+ °C for + format('%h hours, %i minutes'); ?> + + + View + + N/A + +
+
+ +

No sample wells found for this candidate.

+ +
+
+ + +
Candidate not found or ID not provided.
+ +
+ + + + diff --git a/create_assessment.php b/create_assessment.php new file mode 100644 index 0000000..cd6f35f --- /dev/null +++ b/create_assessment.php @@ -0,0 +1,148 @@ + + + + + + Create Candidate Assessment + + + + + + + + +
+ prepare($sql); + $stmt->execute([$candidate_id, $assessed_by, $assess_date, $assessment, $status]); + + header("Location: candidate.php?id=" . $candidate_id); + exit(); + } catch (PDOException $e) { + echo '
Database error: ' . $e->getMessage() . '
'; + } + } + + if ($candidate_id): + ?> +
+

Create Assessment for Candidate:

+
+ +
+
+
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + +
Candidate ID not provided.
+ +
+ + + + diff --git a/create_project.php b/create_project.php new file mode 100644 index 0000000..0ca0120 --- /dev/null +++ b/create_project.php @@ -0,0 +1,144 @@ + + + + + + Create Project - Lab Workflow Manager + + + + + + +prepare($sql); + $stmt->execute([$name, $description, 1, 1]); + header("Location: index.php"); + exit(); + } catch (PDOException $e) { + $message = '
Error: ' . $e->getMessage() . '
'; + } + } else { + $message = '
Please fill in all fields.
'; + } +} +?> + + + +
+
+

Create New Project

+ Back to Projects +
+ + + +
+
+
Project Details
+
+
+ + +
+
+ + +
+ +
+
+
+
+ + + + diff --git a/create_user.php b/create_user.php new file mode 100644 index 0000000..09edea5 --- /dev/null +++ b/create_user.php @@ -0,0 +1,151 @@ + + + + + + Create User - Lab Workflow Manager + + + + + + +prepare($sql); + $stmt->execute([$username, $password, $role, 1]); + header("Location: users.php"); + exit(); + } catch (PDOException $e) { + $message = '
Error: ' . $e->getMessage() . '
'; + } + } else { + $message = '
Please fill in all fields.
'; + } +} +?> + + + +
+
+

Create New User

+ Back to Users +
+ + + +
+
+
User Details
+
+
+ + +
+
+ + +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/db/schema.sql b/db/schema.sql new file mode 100644 index 0000000..9d2c1b3 --- /dev/null +++ b/db/schema.sql @@ -0,0 +1,292 @@ +CREATE TABLE IF NOT EXISTS `Solvent` ( + `solvent_id` Int NOT NULL AUTO_INCREMENT, + `name` text, + PRIMARY KEY (`solvent_id`) +); + +CREATE TABLE IF NOT EXISTS `Preprep_vial` ( + `vial_id` Int NOT NULL AUTO_INCREMENT, + `name` text, + `type` text, + PRIMARY KEY (`vial_id`) +); + +CREATE TABLE IF NOT EXISTS `Catalyst` ( + `catalyst_id` Int NOT NULL AUTO_INCREMENT, + `name` text, + PRIMARY KEY (`catalyst_id`) +); + +CREATE TABLE IF NOT EXISTS `Vial_Catalyst` ( + `vial_id` Int, + `catalyst_id` Int, + `vial_catalyst_id` Int NOT NULL AUTO_INCREMENT, + `name` text, + `type` text, + PRIMARY KEY (`vial_catalyst_id`), + FOREIGN KEY (`vial_id`) + REFERENCES `Preprep_vial`(`vial_id`), + FOREIGN KEY (`catalyst_id`) + REFERENCES `Catalyst`(`catalyst_id`) +); + +CREATE TABLE IF NOT EXISTS `Incubator` ( + `incubator_id` Int NOT NULL AUTO_INCREMENT, + `type` text, + `name` text, + PRIMARY KEY (`incubator_id`) +); + +CREATE TABLE IF NOT EXISTS `Organization` ( + `org_id` Int NOT NULL AUTO_INCREMENT, + `name` text, + `address` text, + `contact_info` text, + PRIMARY KEY (`org_id`) +); + +CREATE TABLE IF NOT EXISTS `Project` ( + `org_id` Int, + `project_id` Int NOT NULL AUTO_INCREMENT, + `mdr_id` text, + `name` text, + `description` text, + `Start Date` date, + PRIMARY KEY (`project_id`), + FOREIGN KEY (`org_id`) + REFERENCES `Organization`(`org_id`) +); + +CREATE TABLE IF NOT EXISTS `Generation_Run` ( + `project_id` Int, + `run_id` Int NOT NULL AUTO_INCREMENT, + `repository` text, + `rounds` int, + `status` text, + `run_start` Timestamp, + `run_end` Timestamp, + `compute_consumed` float, + `wandb_link` text, + PRIMARY KEY (`run_id`), + FOREIGN KEY (`project_id`) + REFERENCES `Project`(`project_id`) +); + +CREATE TABLE IF NOT EXISTS `Candidate` ( + `run_id` Int, + `candidate_id` Int NOT NULL AUTO_INCREMENT, + `project_id` Int, + `smiles_id` text, + `estimated_cost` float, + `generated_time` Timestamp, + `synthesis_approved` Timestamp, + `status` text, + PRIMARY KEY (`candidate_id`), + FOREIGN KEY (`run_id`) + REFERENCES `Generation_Run`(`run_id`) +); + +CREATE TABLE IF NOT EXISTS `Candidate_Synthesis_Plan` ( + `candidate_id` Int, + `plan_id` Int NOT NULL AUTO_INCREMENT, + `conditions_doc_link` text, + PRIMARY KEY (`plan_id`), + FOREIGN KEY (`candidate_id`) + REFERENCES `Candidate`(`candidate_id`) +); + +CREATE TABLE IF NOT EXISTS `Laboratory` ( + `lab_id` Int NOT NULL AUTO_INCREMENT, + `name` text, + `description` text, + `location` text, + PRIMARY KEY (`lab_id`) +); + +CREATE TABLE IF NOT EXISTS `Well_Plate` ( + `plan_id` Int, + `lab_id` Int, + `well_plate_id` Int NOT NULL AUTO_INCREMENT, + `incubation_start` Timestamp, + `incubation_end` Timestamp, + `Temperature` float, + `incubator_id` Int, + `status` text, + PRIMARY KEY (`well_plate_id`), + FOREIGN KEY (`plan_id`) + REFERENCES `Candidate_Synthesis_Plan`(`plan_id`), + FOREIGN KEY (`lab_id`) + REFERENCES `Laboratory`(`lab_id`) +); + +CREATE TABLE IF NOT EXISTS `Sample_Well` ( + `well_plate_id` Int, + `sample_id` Int NOT NULL AUTO_INCREMENT, + `picture_url` text, + PRIMARY KEY (`sample_id`), + FOREIGN KEY (`well_plate_id`) + REFERENCES `Well_Plate`(`well_plate_id`) +); + +CREATE TABLE IF NOT EXISTS `Well_Solution` ( + `sample_id` Int, + `vial_id` Int, + `well_solution_id` Int NOT NULL AUTO_INCREMENT, + `units` text, + `amount` Float, + PRIMARY KEY (`well_solution_id`), + FOREIGN KEY (`vial_id`) + REFERENCES `Preprep_vial`(`vial_id`), + FOREIGN KEY (`sample_id`) + REFERENCES `Sample_Well`(`sample_id`) +); + +CREATE TABLE IF NOT EXISTS `Well_Catalysts` ( + `sample_id` Int, + `catalyst_id` Int, + `well_catalyst_id` Int NOT NULL AUTO_INCREMENT, + `units` text, + `amount` Float, + PRIMARY KEY (`well_catalyst_id`), + FOREIGN KEY (`catalyst_id`) + REFERENCES `Catalyst`(`catalyst_id`), + FOREIGN KEY (`sample_id`) + REFERENCES `Sample_Well`(`sample_id`) +); + +CREATE TABLE IF NOT EXISTS `MDR` ( + `mdr_id` Int NOT NULL AUTO_INCREMENT, + `name` text, + `description` text, + `date_approved` date, + PRIMARY KEY (`mdr_id`) +); + +CREATE TABLE IF NOT EXISTS `Well_Solvents` ( + `sample_id` Int, + `solvent_id` Int, + `well_solvent_id` Int NOT NULL AUTO_INCREMENT, + `units` text, + `amount` Float, + PRIMARY KEY (`well_solvent_id`), + FOREIGN KEY (`solvent_id`) + REFERENCES `Solvent`(`solvent_id`), + FOREIGN KEY (`sample_id`) + REFERENCES `Sample_Well`(`sample_id`) +); + +CREATE TABLE IF NOT EXISTS `MDR_Goals` ( + `goal_id` Int NOT NULL AUTO_INCREMENT, + `mdr_id` Int, + `goal_name` text, + `operator` text, + `measurement` float, + PRIMARY KEY (`goal_id`), + FOREIGN KEY (`mdr_id`) + REFERENCES `MDR`(`mdr_id`) +); + +CREATE TABLE IF NOT EXISTS `Vial_Solvent` ( + `vial_id` Int, + `solvent_id` Int, + `vial_solvent_id` Int NOT NULL AUTO_INCREMENT, + `units` text, + `amount` Float, + PRIMARY KEY (`vial_solvent_id`), + FOREIGN KEY (`solvent_id`) + REFERENCES `Solvent`(`solvent_id`), + FOREIGN KEY (`vial_id`) + REFERENCES `Preprep_vial`(`vial_id`) +); + +CREATE TABLE IF NOT EXISTS `Solid` ( + `solid_id` Int NOT NULL AUTO_INCREMENT, + `name` text, + `smiles_id` text, + PRIMARY KEY (`solid_id`) +); + +CREATE TABLE IF NOT EXISTS `Well_Solids` ( + `sample_id` Int, + `solid_id` Int, + `well_solid_id` Int NOT NULL AUTO_INCREMENT, + `units` text, + `amount` Float, + PRIMARY KEY (`well_solid_id`), + FOREIGN KEY (`solid_id`) + REFERENCES `Solid`(`solid_id`), + FOREIGN KEY (`sample_id`) + REFERENCES `Sample_Well`(`sample_id`) +); + +CREATE TABLE IF NOT EXISTS `Users` ( + `user_id` Int NOT NULL AUTO_INCREMENT, + `org_id` Int, + `username` text, + `password` text, + `role` text, + PRIMARY KEY (`user_id`), + FOREIGN KEY (`org_id`) + REFERENCES `Organization`(`org_id`) +); + +CREATE TABLE IF NOT EXISTS `TGA_Analysis` ( + `sample_id` Int, + `tga_id` Int NOT NULL AUTO_INCREMENT, + `temp_comp_array` Int, + `date` Timestamp, + PRIMARY KEY (`tga_id`), + FOREIGN KEY (`sample_id`) + REFERENCES `Sample_Well`(`sample_id`) +); + +CREATE TABLE IF NOT EXISTS `tga_scorecard` ( + `tag_id` Int, + `tga_score_id` Int NOT NULL AUTO_INCREMENT, + `hashtable` Int, + PRIMARY KEY (`tga_score_id`), + FOREIGN KEY (`tag_id`) + REFERENCES `TGA_Analysis`(`tga_id`) +); + +CREATE TABLE IF NOT EXISTS `PXRD_Characterization` ( + `sample_id` Int, + `character_id` Int NOT NULL AUTO_INCREMENT, + `point_array` Int, + `pxrd_score` float, + `date` Timestamp, + PRIMARY KEY (`character_id`), + FOREIGN KEY (`sample_id`) + REFERENCES `Sample_Well`(`sample_id`) +); + +CREATE TABLE IF NOT EXISTS `Sample_Post_Instrumentation_Analysis` ( + `sample_id` Int, + `analysis_id` Int NOT NULL AUTO_INCREMENT, + `summary` text, + `last_updated` Timestamp, + PRIMARY KEY (`analysis_id`), + FOREIGN KEY (`sample_id`) + REFERENCES `Sample_Well`(`sample_id`) +); + +CREATE TABLE IF NOT EXISTS `Candidate_Assessment` ( + `candidate_id` Int, + `assessment_id` Int NOT NULL AUTO_INCREMENT, + `assessment` text, + `assessed_by` text, + `assess_date` Timestamp, + `status` text, + PRIMARY KEY (`assessment_id`), + FOREIGN KEY (`candidate_id`) + REFERENCES `Candidate`(`candidate_id`) +); + +CREATE TABLE IF NOT EXISTS `pxrd_scorecard` ( + `character_id` Int, + `pxrd_score_id` Int NOT NULL AUTO_INCREMENT, + `hashtable` text, + PRIMARY KEY (`pxrd_score_id`), + FOREIGN KEY (`character_id`) + REFERENCES `PXRD_Characterization`(`character_id`) +); \ No newline at end of file diff --git a/edit_assessment.php b/edit_assessment.php new file mode 100644 index 0000000..6ca8ab1 --- /dev/null +++ b/edit_assessment.php @@ -0,0 +1,168 @@ + + + + + + Edit Candidate Assessment + + + + + + + + +
+ prepare("SELECT * FROM Candidate_Assessment WHERE assessment_id = ?"); + $stmt->execute([$assessment_id]); + $assessment_data = $stmt->fetch(PDO::FETCH_ASSOC); + if ($assessment_data) { + $candidate_id = $assessment_data['candidate_id']; + } + } catch (PDOException $e) { + echo '
Database error: ' . $e->getMessage() . '
'; + } + } + + if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $assessment_id = $_POST['assessment_id']; + $assessed_by = $_POST['assessed_by']; + $assess_date = $_POST['assess_date']; + $assessment = $_POST['assessment']; + $status = $_POST['status']; + $candidate_id = $_POST['candidate_id']; + + try { + $pdo = db(); + $sql = "UPDATE Candidate_Assessment SET assessed_by = ?, assess_date = ?, assessment = ?, status = ? WHERE assessment_id = ?"; + $stmt = $pdo->prepare($sql); + $stmt->execute([$assessed_by, $assess_date, $assessment, $status, $assessment_id]); + + header("Location: candidate.php?id=" . $candidate_id); + exit(); + } catch (PDOException $e) { + echo '
Database error: ' . $e->getMessage() . '
'; + } + } + + if ($assessment_data): + ?> +
+

Edit Assessment for Candidate:

+
+ +
+
+
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + +
Assessment ID not provided.
+ +
Assessment not found.
+ +
+ + + + \ No newline at end of file diff --git a/index.php b/index.php index 7205f3d..a262f2f 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,160 @@ - - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + Lab Workflow Manager + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

+ + + +
+
+

Projects Dashboard

+ + Create New Project +
-
- + +
+
+
All Projects
+
+ + + + + + + + + + + query("SELECT project_id, name, description, `Start Date` FROM Project ORDER BY `Start Date` DESC"); + $projects = $stmt->fetchAll(PDO::FETCH_ASSOC); + + if (count($projects) > 0) { + foreach ($projects as $project) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + } else { + echo ''; + } + } catch (PDOException $e) { + echo ''; + } + ?> + +
IDNameDescriptionStart Date
" . htmlspecialchars($project['project_id']) . "" . htmlspecialchars($project['name']) . "" . htmlspecialchars($project['description']) . "" . htmlspecialchars($project['Start Date']) . "
No projects found.
Database error: ' . $e->getMessage() . '
+
+
+
+ + + - + \ No newline at end of file diff --git a/project.php b/project.php new file mode 100644 index 0000000..a71dca2 --- /dev/null +++ b/project.php @@ -0,0 +1,198 @@ + + + + + + Project Details + + + + + + + + +
+ prepare("SELECT * FROM Project WHERE project_id = ?"); + $stmt->execute([$_GET['id']]); + $project = $stmt->fetch(PDO::FETCH_ASSOC); + } catch (PDOException $e) { + echo '
Database error: ' . $e->getMessage() . '
'; + } + } + + if ($project): + ?> +
+

Project:

+
+ +
+
+
Project Details
+

ID:

+

Description:

+

Start Date:

+
+
+
+
+
Generation Runs
+ prepare(" + SELECT + gr.run_id, + gr.repository, + gr.rounds, + gr.status, + gr.run_start, + gr.run_end, + COUNT(c.candidate_id) AS candidate_count + FROM + Generation_Run gr + LEFT JOIN + Candidate c ON gr.run_id = c.run_id + WHERE + gr.project_id = ? + GROUP BY + gr.run_id + ORDER BY + gr.run_start DESC + "); + $stmt_runs->execute([$_GET['id']]); + $runs = $stmt_runs->fetchAll(PDO::FETCH_ASSOC); + + if (count($runs) > 0) { + echo '
'; + foreach ($runs as $run) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + echo '
Run IDRepositoryRoundsStatusStart TimeEnd TimeCandidates
" . htmlspecialchars($run['run_id']) . "" . htmlspecialchars($run['repository']) . "" . htmlspecialchars($run['rounds']) . "" . htmlspecialchars($run['status']) . "" . htmlspecialchars($run['run_start']) . "" . htmlspecialchars($run['run_end']) . "" . htmlspecialchars($run['candidate_count']) . "
"; + // Candidate table will go here + try { + $stmt_candidates = $pdo->prepare("SELECT candidate_id, smiles_id, estimated_cost, status FROM Candidate WHERE run_id = ?"); + $stmt_candidates->execute([$run['run_id']]); + $candidates = $stmt_candidates->fetchAll(PDO::FETCH_ASSOC); + + if (count($candidates) > 0) { + echo ''; + foreach ($candidates as $candidate) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + echo '
Candidate IDSMILES IDEst. CostStatus
" . htmlspecialchars($candidate['candidate_id']) . "" . htmlspecialchars($candidate['smiles_id']) . "" . htmlspecialchars($candidate['estimated_cost']) . "" . htmlspecialchars($candidate['status']) . "
'; + } else { + echo '

No candidates found for this run.

'; + } + } catch (PDOException $e) { + echo '
Database error fetching candidates: ' . $e->getMessage() . '
'; + } + echo "
'; + } else { + echo '

No generation runs found for this project.

'; + } + } catch (PDOException $e) { + echo '
Database error fetching generation runs: ' . $e->getMessage() . '
'; + } + ?> +
+
+ +
Project not found or ID not provided.
+ +
+ + + + diff --git a/synthesis_plan.php b/synthesis_plan.php new file mode 100644 index 0000000..e9ee564 --- /dev/null +++ b/synthesis_plan.php @@ -0,0 +1,165 @@ +prepare("SELECT * FROM Candidate_Synthesis_Plan WHERE plan_id = ?"); +$stmt->execute([$plan_id]); +$plan = $stmt->fetch(PDO::FETCH_ASSOC); + +?> + + + + + + + Candidate Synthesis Plan Details + + + +
+

Candidate Synthesis Plan Details

+ + + + + + + + + + + + + + + + +
Plan ID
Candidate ID
Conditions DocumentView Document
+ +
Synthesis plan not found.
+ + Back to Candidate + +
+
+
Well Plates
+
+
+ prepare("SELECT wp.*, l.name as laboratory_name FROM Well_Plate wp JOIN Laboratory l ON wp.lab_id = l.lab_id WHERE wp.plan_id = ?"); + $stmt_well_plate->execute([$plan_id]); + $well_plates = $stmt_well_plate->fetchAll(PDO::FETCH_ASSOC); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Well Plate IDLaboratory NameIncubation StartIncubation EndTemperatureIncubator IDStatus
+ prepare("SELECT * FROM Sample_Well WHERE well_plate_id = ?"); + $stmt_sample_well->execute([$well_plate['well_plate_id']]); + $sample_wells = $stmt_sample_well->fetchAll(PDO::FETCH_ASSOC); + ?> + +
Sample Wells
+ + + + + + + + + + + + + + + + + + + + + + + +
Sample IDPictureSolutionsSolventsCatalystsSolids
Sample Well + prepare("SELECT ws.*, s.name FROM Well_Solution ws JOIN Preprep_vial s ON ws.vial_id = s.vial_id WHERE ws.sample_id = ?"); + $stmt_solutions->execute([$sample_well['sample_id']]); + $solutions = $stmt_solutions->fetchAll(PDO::FETCH_ASSOC); + foreach ($solutions as $solution) { + echo htmlspecialchars($solution['name']) . ' (' . htmlspecialchars($solution['amount']) . ' ' . htmlspecialchars($solution['units']) . ')
'; + } + ?> +
+ prepare("SELECT ws.*, s.name FROM Well_Solvents ws JOIN Solvent s ON ws.solvent_id = s.solvent_id WHERE ws.sample_id = ?"); + $stmt_solvents->execute([$sample_well['sample_id']]); + $solvents = $stmt_solvents->fetchAll(PDO::FETCH_ASSOC); + foreach ($solvents as $solvent) { + echo htmlspecialchars($solvent['name']) . ' (' . htmlspecialchars($solvent['amount']) . ' ' . htmlspecialchars($solvent['units']) . ')
'; + } + ?> +
+ prepare("SELECT wc.*, c.name FROM Well_Catalysts wc JOIN Catalyst c ON wc.catalyst_id = c.catalyst_id WHERE wc.sample_id = ?"); + $stmt_catalysts->execute([$sample_well['sample_id']]); + $catalysts = $stmt_catalysts->fetchAll(PDO::FETCH_ASSOC); + foreach ($catalysts as $catalyst) { + echo htmlspecialchars($catalyst['name']) . ' (' . htmlspecialchars($catalyst['amount']) . ' ' . htmlspecialchars($catalyst['units']) . ')
'; + } + ?> +
+ prepare("SELECT ws.*, s.name FROM Well_Solids ws JOIN Solid s ON ws.solid_id = s.solid_id WHERE ws.sample_id = ?"); + $stmt_solids->execute([$sample_well['sample_id']]); + $solids = $stmt_solids->fetchAll(PDO::FETCH_ASSOC); + foreach ($solids as $solid) { + echo htmlspecialchars($solid['name']) . ' (' . htmlspecialchars($solid['amount']) . ' ' . htmlspecialchars($solid['units']) . ')
'; + } + ?> +
+ +
No sample wells found for this well plate.
+ +
+ +
No well plates found for this synthesis plan.
+ +
+
+
+ + diff --git a/users.php b/users.php new file mode 100644 index 0000000..27e29e9 --- /dev/null +++ b/users.php @@ -0,0 +1,100 @@ +query("SELECT user_id, username, role, org_id FROM Users"); +$users = $stmt->fetchAll(PDO::FETCH_ASSOC); +?> + + + + + + User Management + + + + + +
+
+ +
+
+

User Management

+ Create New User +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
User IDUsernameRoleOrganization IDActions
No users found.
+ + +
+
+
+
+
+ + +