rep init
This commit is contained in:
commit
9767c6bddc
22 changed files with 551 additions and 0 deletions
32
app/public/sites/addclass.php
Normal file
32
app/public/sites/addclass.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
if(array_key_exists('class_name', $_GET)) {
|
||||
if ($_GET['class_name'] != null) {
|
||||
$result = insertInto('school_class', array('sccl_name'), array($_GET['class_name']));
|
||||
if($result == true && !($result instanceof Exception)) {
|
||||
echo '<div class="alert alert-success">Succesfully inserted the class "'.$_GET['class_name'].'"</div>';
|
||||
} else {
|
||||
echo '<div class="alert alert-danger">Failed to insert the class. Please check if it is unique "'.$_GET['class_name'].'"</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<h1>Klasse erfassen: </h1>
|
||||
<form action="index.php" method="GET">
|
||||
<div class="form-group row">
|
||||
<label for="class_name" class="col-4 col-form-label">Klassen Name</label>
|
||||
<div class="col-8">
|
||||
<div class="input-group">
|
||||
<input id="class_name" name="class_name" placeholder="4bAPC" type="text" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="site" name="site" value="addclass">
|
||||
<div class="form-group row">
|
||||
<div class="offset-4 col-8">
|
||||
<button name="submit" type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
5
app/public/sites/home.php
Normal file
5
app/public/sites/home.php
Normal file
|
@ -0,0 +1,5 @@
|
|||
<h1>Wilkommen</h1>
|
||||
<p>
|
||||
Das ist die Startseite <br>
|
||||
Insert non-filler text here
|
||||
</p>
|
14
app/public/sites/tableclass.php
Normal file
14
app/public/sites/tableclass.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
echo '<h1> Schulklassen </h1>';
|
||||
|
||||
$query = 'select * from school_class';
|
||||
makeTable($query);
|
||||
|
||||
$query = 'SELECT sccl_name
|
||||
FROM school_class
|
||||
where sccl_name like ?';
|
||||
|
||||
$searchValue = '4';
|
||||
$searchValue = '%'.$searchValue.'%';
|
||||
makeTable($query, array($searchValue));
|
Loading…
Add table
Add a link
Reference in a new issue