groups
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
if (isset($_POST['action'])) {
|
||||
|
||||
|
||||
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
switch ($_POST['action']) {
|
||||
case 'user_register':
|
||||
@@ -18,7 +18,7 @@ if (isset($_POST['action'])) {
|
||||
$new_camp_user = camp_user::create_camp_user($_POST['user_email'], $_POST['user_password'], date("Y-m-d H:i:s"));
|
||||
log::register('new_camp_user', $new_camp_user, date("Y-m-d H:i:s"), $new_camp_user);
|
||||
setcookie('bc_reg_error', 2, 0, '/');
|
||||
header("Location: /tabor");
|
||||
header("Location: /tabor");
|
||||
}
|
||||
break;
|
||||
case 'login':
|
||||
@@ -32,7 +32,8 @@ if (isset($_POST['action'])) {
|
||||
$user_kid_id = null;
|
||||
$user_coach_id = null;
|
||||
$user_camp_id = null;
|
||||
|
||||
$user_camp_leader_id = null;
|
||||
|
||||
if ($_REQUEST['page'] == 'admin') $user_admin_id = $login->check_admin_login($_POST['user_name'], $_POST['user_password']);
|
||||
if ($_REQUEST['page'] == 'view') $user_kid_id = $login->check_kid_login($_POST['user_name'], $_POST['user_password']);
|
||||
if ($_REQUEST['page'] == 'coach') $user_coach_id = $login->check_coach_login($_POST['user_name'], $_POST['user_password']);
|
||||
@@ -92,10 +93,15 @@ if (isset($_POST['action'])) {
|
||||
$uid = $_POST['uk_id'];
|
||||
unset($_POST['uk_id']);
|
||||
user_kid::update_user($_POST, $uid);
|
||||
//filter_update
|
||||
$kid = new user_kid();
|
||||
$kid->set_user_data_by_id($uid);
|
||||
$kid->update_filters();
|
||||
//filter update end
|
||||
log::register('update_member', $uid);
|
||||
header("Location: " . $actual_link);
|
||||
//header("Location: " . $actual_link);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
@@ -156,7 +162,7 @@ if (isset($_POST['action'])) {
|
||||
if ($every_week) unset($_POST['every_week']);
|
||||
training::create_training($_POST, $every_week);
|
||||
header("Location: /admin/trainings/");
|
||||
|
||||
|
||||
|
||||
break;
|
||||
case 'training_type_create':
|
||||
@@ -218,7 +224,7 @@ if (isset($_POST['action'])) {
|
||||
# shirt update
|
||||
//todo: shirt object
|
||||
$sql->update_table('shirt', array(
|
||||
'shirt_name' => $_POST['shirt_name'],
|
||||
'shirt_name' => $_POST['shirt_name'],
|
||||
),
|
||||
array(
|
||||
'shirt_id' => $_POST['shirt_id']
|
||||
@@ -253,7 +259,7 @@ if (isset($_POST['action'])) {
|
||||
# körzet létrehozása
|
||||
//todo: körzet object
|
||||
$new_reg_id = $sql->insert_into('region', array(
|
||||
'reg_name' => $_POST['reg_name'],
|
||||
'reg_name' => $_POST['reg_name'],
|
||||
)
|
||||
);
|
||||
log::register('new_region', $new_reg_id);
|
||||
@@ -324,7 +330,7 @@ if (isset($_POST['action'])) {
|
||||
header("Location: /admin/money_expense");
|
||||
break;
|
||||
case 'settings_data_edit':
|
||||
$sql->update_table('setting_value',
|
||||
$sql->update_table('setting_value',
|
||||
array(
|
||||
'setv_'.$_POST['st_name'] => $_POST['set_val'],
|
||||
'setv_set_date' => date("Y-m-d H:i:s")
|
||||
@@ -401,7 +407,7 @@ if (isset($_POST['action'])) {
|
||||
# camp shirt update
|
||||
//todo: shirt object
|
||||
$sql->update_table('camp_shirt', array(
|
||||
'cshirt_name' => $_POST['shirt_name'],
|
||||
'cshirt_name' => $_POST['shirt_name'],
|
||||
),
|
||||
array(
|
||||
'cshirt_id' => $_POST['shirt_id']
|
||||
@@ -507,6 +513,18 @@ if (isset($_POST['action'])) {
|
||||
log::register('update_camp_leader', $_POST['ucl_id']);
|
||||
header('Location: /admin/camp_user');
|
||||
break;
|
||||
case 'user_group_create':
|
||||
# új csoport
|
||||
$new_ug_id = user_group::create_user_group($_POST['ug_name'], $_POST['ug_description'], $_POST['ug_is_automatic']);
|
||||
log::register('new_user_group', $new_ug_id);
|
||||
header('Location: /admin/user_groups');
|
||||
break;
|
||||
case 'user_group_update':
|
||||
# csoport update
|
||||
user_group::update_user_group($_POST['ug_name'], $_POST['ug_description'], $_POST['ug_id'], $_POST['ug_is_automatic']);
|
||||
log::register('update_user_group', $_POST['ug_id']);
|
||||
header('Location: /admin/user_groups');
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
@@ -515,4 +533,4 @@ if (isset($_POST['action'])) {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user