Controller/ProjectController.php gelöscht
This commit is contained in:
parent
2755e88291
commit
77ad00cb6d
@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace ppb\Controller;
|
|
||||||
use ppb\Model\ProjectModel;
|
|
||||||
|
|
||||||
|
|
||||||
class ProjectController {
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Method to get all projects
|
|
||||||
// This method is called by the router
|
|
||||||
// and is used to get all projects from the database
|
|
||||||
// and return them as JSON
|
|
||||||
|
|
||||||
public function getProject(): void
|
|
||||||
{
|
|
||||||
echo "This is the Table Project";
|
|
||||||
echo "<br>";
|
|
||||||
$model = new ProjectModel();
|
|
||||||
$data = $model->readProject();
|
|
||||||
|
|
||||||
echo "<br>";
|
|
||||||
|
|
||||||
|
|
||||||
// Display the data in a table format
|
|
||||||
echo '<table border="1" cellpadding="5" cellspacing="0">';
|
|
||||||
// Table header
|
|
||||||
echo '<tr>';
|
|
||||||
foreach (array_keys($data[0]) as $header) {
|
|
||||||
echo '<th>' . htmlspecialchars($header) . '</th>';
|
|
||||||
}
|
|
||||||
echo '</tr>';
|
|
||||||
// Table rows
|
|
||||||
foreach ($data as $row) {
|
|
||||||
echo '<tr>';
|
|
||||||
foreach ($row as $cell) {
|
|
||||||
echo '<td>' . htmlspecialchars($cell) . '</td>';
|
|
||||||
}
|
|
||||||
echo '</tr>';
|
|
||||||
}
|
|
||||||
echo '</table>';
|
|
||||||
}
|
|
||||||
public function addNewMediaType($data): void
|
|
||||||
{
|
|
||||||
$model = new ProjectModel();
|
|
||||||
$model->insertNewMediaType($data);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user