sort fix. school edit.

This commit is contained in:
Ricsi
2016-12-16 21:52:29 +01:00
parent d458b996a4
commit 52e8c55e81
18 changed files with 119 additions and 6 deletions

View File

@@ -211,6 +211,25 @@ if (isset($_POST['action'])) {
header("Location: /admin/regions");
}
break;
case 'school_create':
# iskola létrehozása
//todo: iskola object
$sql->insert_into('school', array(
'sc_name' => $_POST['sc_name'],
)
);
header("Location: /admin/schools");
break;
case 'school_update':
# school lista updatelése AB-ba
unset($_POST['action']);
foreach ($_POST as $key => $value) {
$key_parts = explode('_', $key);
$sc_id = $key_parts[1];
$sql->update_table('school', array('sc_name' => $value), array('sc_id' => $sc_id));
header("Location: /admin/schools");
}
break;
default:
# code...
break;