Responsive design;
New menus (members); Improved interface for parent editing;
This commit is contained in:
@@ -68,7 +68,7 @@ if (isset($_POST['action'])) {
|
||||
if (!isset($_POST['up_phone'])) $_POST['up_phone'] = null;
|
||||
if (!isset($_POST['up_facebook'])) $_POST['up_facebook'] = null;
|
||||
user_parent::update_parent($_POST, $up_id);
|
||||
header("Location: /admin/parents/" . $up_id);
|
||||
//header("Location: /admin/parents/" . $up_id);
|
||||
break;
|
||||
|
||||
case 'training_data_edit':
|
||||
@@ -110,6 +110,70 @@ if (isset($_POST['action'])) {
|
||||
header("Location: " . $actual_link);
|
||||
}
|
||||
break;
|
||||
case 'coach_create':
|
||||
# edző létrehozása
|
||||
if (isset($_POST['ua_can_login']) && !empty($_POST['ua_can_login'])) {
|
||||
$psw = md5($_POST['ua_password']);
|
||||
}
|
||||
else {
|
||||
$psw = "null";
|
||||
}
|
||||
user::create_user($_POST['ua_name'], $_POST['ua_email'], $psw);
|
||||
header("Location: /admin/coaches");
|
||||
break;
|
||||
case 'coach_data_edit':
|
||||
# edző update
|
||||
if (isset($_POST['ua_can_login']) && !empty($_POST['ua_can_login'])) {
|
||||
$psw = md5($_POST['ua_password']);
|
||||
}
|
||||
else {
|
||||
$psw = "null";
|
||||
}
|
||||
user::update_user($_POST['ua_name'], $_POST['ua_email'], $psw, $_POST['ua_id']);
|
||||
header("Location: /admin/coaches");
|
||||
break;
|
||||
case 'shirt_create':
|
||||
# póló létrehozása
|
||||
//todo: shirt object
|
||||
$sql->insert_into('shirt', array(
|
||||
'shirt_name' => $_POST['shirt_name'],
|
||||
'shirt_year' => (!empty($_POST['shirt_year'])?$_POST['shirt_year']:'null')
|
||||
)
|
||||
);
|
||||
header("Location: /admin/shirts");
|
||||
break;
|
||||
case 'shirt_data_edit':
|
||||
# shirt update
|
||||
//todo: shirt object
|
||||
$sql->update_table('shirt', array(
|
||||
'shirt_name' => $_POST['shirt_name'],
|
||||
'shirt_year' => (!empty($_POST['shirt_year'])?$_POST['shirt_year']:'null')
|
||||
),
|
||||
array(
|
||||
'shirt_id' => $_POST['shirt_id']
|
||||
)
|
||||
);
|
||||
header("Location: /admin/shirts");
|
||||
break;
|
||||
case 'city_create':
|
||||
# település létrehozása
|
||||
//todo: település object
|
||||
$sql->insert_into('school_city', array(
|
||||
'scc_city' => $_POST['scc_city'],
|
||||
)
|
||||
);
|
||||
header("Location: /admin/cities");
|
||||
break;
|
||||
case 'city_update':
|
||||
# city lista updatelése AB-ba
|
||||
unset($_POST['action']);
|
||||
foreach ($_POST as $key => $value) {
|
||||
$key_parts = explode('_', $key);
|
||||
$scc_id = $key_parts[1];
|
||||
$sql->update_table('school_city', array('scc_city' => $value), array('scc_id' => $scc_id));
|
||||
header("Location: /admin/cities");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user