20161230
sql delete replaced by delete flag log list (simple), log categories minor bug fixes in css
This commit is contained in:
@@ -17,11 +17,13 @@ if (isset($_POST['action'])) {
|
||||
if ($user_coach_id) {
|
||||
//sikeres bejelentkezés
|
||||
$login->login_user($user_coach_id, 'badminton_coach_user', 1);
|
||||
log::register('admin_login', $user_coach_id, null, $user_coach_id);
|
||||
header("Location: " . $actual_link);
|
||||
}
|
||||
elseif ($user_kid_id) {
|
||||
//sikeres bejelentkezés
|
||||
$login->login_user($user_kid_id, 'badminton_parent_user', 2);
|
||||
log::register('kid_login', $user_kid_id, null, $user_kid_id);
|
||||
header("Location: " . $actual_link);
|
||||
}
|
||||
else {
|
||||
@@ -47,6 +49,7 @@ if (isset($_POST['action'])) {
|
||||
$uid = $_POST['uk_id'];
|
||||
unset($_POST['uk_id']);
|
||||
user_kid::update_user($_POST, $uid);
|
||||
log::register('update_member', $uid);
|
||||
header("Location: " . $actual_link);
|
||||
break;
|
||||
|
||||
@@ -62,6 +65,7 @@ if (isset($_POST['action'])) {
|
||||
//var_dump($_POST);
|
||||
//die("aaa");
|
||||
$new_user_id = user_kid::create_user($_POST);
|
||||
log::register('new_member', $new_user_id);
|
||||
header("Location: /admin/edit_member/" . $new_user_id);
|
||||
break;
|
||||
|
||||
@@ -71,7 +75,8 @@ if (isset($_POST['action'])) {
|
||||
if (!isset($_POST['up_email'])) $_POST['up_email'] = null;
|
||||
if (!isset($_POST['up_phone'])) $_POST['up_phone'] = null;
|
||||
if (!isset($_POST['up_facebook'])) $_POST['up_facebook'] = null;
|
||||
user_parent::create_parent($_POST['up_name'], $_POST['up_email'], $_POST['up_facebook'], $_POST['up_phone']);
|
||||
$new_parent_id = user_parent::create_parent($_POST['up_name'], $_POST['up_email'], $_POST['up_facebook'], $_POST['up_phone']);
|
||||
log::register('new_parent', $new_parent_id);
|
||||
header("Location: /admin/parents");
|
||||
break;
|
||||
|
||||
@@ -84,7 +89,8 @@ 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);
|
||||
log::register('update_parent', $up_id);
|
||||
header("Location: /admin/parents/" . $up_id);
|
||||
break;
|
||||
|
||||
case 'training_data_edit':
|
||||
@@ -94,6 +100,7 @@ if (isset($_POST['action'])) {
|
||||
unset($_POST['action']);
|
||||
//var_dump($_POST);
|
||||
training::update_training($_POST, $tr_id);
|
||||
log::register('update_training', $tr_id);
|
||||
header("Location: " . $actual_link);
|
||||
break;
|
||||
|
||||
@@ -113,6 +120,7 @@ if (isset($_POST['action'])) {
|
||||
# edzés típus létrehozása
|
||||
unset($_POST['action']);
|
||||
$new_trt_id = training_type::create_training_type($_POST);
|
||||
log::register('new_training_type', $new_trt_id);
|
||||
header("Location: /admin/training_types");
|
||||
|
||||
break;
|
||||
@@ -123,8 +131,9 @@ if (isset($_POST['action'])) {
|
||||
$key_parts = explode('_', $key);
|
||||
$trt_id = $key_parts[1];
|
||||
$sql->update_table('training_type', array('trt_name' => $value), array('trt_id' => $trt_id));
|
||||
header("Location: " . $actual_link);
|
||||
}
|
||||
log::register('update_training_type', 'update all');
|
||||
header("Location: " . $actual_link);
|
||||
break;
|
||||
case 'coach_create':
|
||||
# edző létrehozása
|
||||
@@ -135,7 +144,8 @@ if (isset($_POST['action'])) {
|
||||
$psw = "null";
|
||||
}
|
||||
|
||||
user::create_user($_POST['ua_name'], $psw);
|
||||
$new_coach_id = user::create_user($_POST['ua_name'], $psw);
|
||||
log::register('new_coach', $new_coach_id);
|
||||
header("Location: /admin/coaches");
|
||||
break;
|
||||
case 'coach_data_edit':
|
||||
@@ -150,15 +160,17 @@ if (isset($_POST['action'])) {
|
||||
$psw = "null";
|
||||
}
|
||||
user::update_user($_POST['ua_name'], $psw, $_POST['ua_id']);
|
||||
log::register('update_coach', $_POST['ua_id']);
|
||||
header("Location: /admin/coaches");
|
||||
break;
|
||||
case 'shirt_create':
|
||||
# póló létrehozása
|
||||
//todo: shirt object
|
||||
$sql->insert_into('shirt', array(
|
||||
$new_shirt_id = $sql->insert_into('shirt', array(
|
||||
'shirt_name' => $_POST['shirt_name']
|
||||
)
|
||||
);
|
||||
log::register('new_shirt', $new_shirt_id);
|
||||
header("Location: /admin/shirts");
|
||||
break;
|
||||
case 'shirt_data_edit':
|
||||
@@ -171,15 +183,17 @@ if (isset($_POST['action'])) {
|
||||
'shirt_id' => $_POST['shirt_id']
|
||||
)
|
||||
);
|
||||
log::register('update_shirt', $_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(
|
||||
$new_city_id = $sql->insert_into('school_city', array(
|
||||
'scc_city' => $_POST['scc_city'],
|
||||
)
|
||||
);
|
||||
log::register('new_city', $new_city_id);
|
||||
header("Location: /admin/cities");
|
||||
break;
|
||||
case 'city_update':
|
||||
@@ -189,16 +203,18 @@ if (isset($_POST['action'])) {
|
||||
$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");
|
||||
}
|
||||
log::register('update_city', 'update all');
|
||||
header("Location: /admin/cities");
|
||||
break;
|
||||
case 'region_create':
|
||||
# körzet létrehozása
|
||||
//todo: körzet object
|
||||
$sql->insert_into('region', array(
|
||||
$new_reg_id = $sql->insert_into('region', array(
|
||||
'reg_name' => $_POST['reg_name'],
|
||||
)
|
||||
);
|
||||
log::register('new_region', $new_reg_id);
|
||||
header("Location: /admin/regions");
|
||||
break;
|
||||
case 'region_update':
|
||||
@@ -208,16 +224,18 @@ if (isset($_POST['action'])) {
|
||||
$key_parts = explode('_', $key);
|
||||
$reg_id = $key_parts[1];
|
||||
$sql->update_table('region', array('reg_name' => $value), array('reg_id' => $reg_id));
|
||||
header("Location: /admin/regions");
|
||||
}
|
||||
log::register('update_region', 'update all');
|
||||
header("Location: /admin/regions");
|
||||
break;
|
||||
case 'school_create':
|
||||
# iskola létrehozása
|
||||
//todo: iskola object
|
||||
$sql->insert_into('school', array(
|
||||
$new_school_id = $sql->insert_into('school', array(
|
||||
'sc_name' => $_POST['sc_name'],
|
||||
)
|
||||
);
|
||||
log::register('new_school', $new_school_id);
|
||||
header("Location: /admin/schools");
|
||||
break;
|
||||
case 'school_update':
|
||||
@@ -227,8 +245,9 @@ if (isset($_POST['action'])) {
|
||||
$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");
|
||||
}
|
||||
log::register('update_school', 'update all');
|
||||
header("Location: /admin/schools");
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
|
||||
Reference in New Issue
Block a user