sql delete replaced by delete flag
log list (simple), log categories
minor bug fixes in css
This commit is contained in:
Ricsi
2016-12-30 18:00:05 +01:00
parent 664097a976
commit 5a78b09a38
39 changed files with 557 additions and 92 deletions

View File

@@ -1,8 +1,19 @@
<?php
if ($this->is_id()) {
$delete_query = "DELETE FROM school WHERE sc_id = " . $this->get_id() . ";";
$sql->execute_query($delete_query);
//$delete_query = "DELETE FROM school WHERE sc_id = " . $this->get_id() . ";";
//$sql->execute_query($delete_query);
//akiknek ez a school_id van beállítva, azoknál null-ra állítjuk
$school_query = "SELECT uk_id FROM user_kid WHERE uk_school_sc_id = " . $this->get_id();
$school_assoc_array = $sql->assoc_array($school_query);
foreach ($school_assoc_array as $uk_id) {
$sql->update_table('user_kid', array('uk_school_sc_id' => 'null'), array('uk_id' => $uk_id['uk_id']));
}
$sql->update_table('school', array('sc_deleted' => 1), array('sc_id' => $this->get_id()));
log::register('delete_school', $this->get_id());
header("Location: /admin/schools");
}