Responsive design;
New menus (members); Improved interface for parent editing;
This commit is contained in:
30
_include/include_cities.php
Normal file
30
_include/include_cities.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR VÁROSLISTA
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# VÁROS SZERKESZTÉSE
|
||||
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# VÁROS LISTA
|
||||
|
||||
$scc_query = "SELECT * FROM school_city ORDER BY scc_city ASC";
|
||||
$scc_assoc_array = $sql->assoc_array($scc_query);
|
||||
|
||||
$smarty->assign('scc_assoc_array',$scc_assoc_array);
|
||||
$smarty->display('city_list.tpl');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
33
_include/include_coaches.php
Normal file
33
_include/include_coaches.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
# HA NINCS ID, AKKOR TAGLISTA
|
||||
# HA VAN ID, AKKOR TAG ADATAINAK MEGJELENÍTÉSE/SZERKESZTÉSE
|
||||
if ($this->is_id()) {
|
||||
# ADOTT TAG ADATAINAK MEGJELENÍTÉSE
|
||||
//user adatok
|
||||
$user_data_query = "SELECT * FROM user_coach WHERE ua_id = " . $this->get_id();
|
||||
$user_data_assoc_array = $sql->assoc_array($user_data_query);
|
||||
|
||||
//smarty thingz
|
||||
|
||||
$smarty->assign('user_data', $user_data_assoc_array[0]);
|
||||
$smarty->display('coach_data_edit.tpl');
|
||||
}
|
||||
else {
|
||||
# TAG LISTA
|
||||
|
||||
$user_list_query = "SELECT * FROM user_coach ORDER BY ua_name ASC;";
|
||||
$user_list_assoc_array = $sql->assoc_array($user_list_query);
|
||||
//végigmegyünk a tömbbön, objektumot csinálunk belőlük, és átadjuk egy array-ben a template-nek
|
||||
$user_array = array();
|
||||
foreach ($user_list_assoc_array as $user_list_array) {
|
||||
$current_user = new user();
|
||||
$current_user->set_user_data_by_id($user_list_array['ua_id']);
|
||||
$user_array[] = $current_user;
|
||||
}
|
||||
$smarty->assign('user_array', $user_array);
|
||||
$smarty->display('coach_list.tpl');
|
||||
//var_dump($user_array);
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -50,12 +50,22 @@ switch ($this->get_id()) {
|
||||
case 'training_type':
|
||||
# TRAINING TYPE létrehozása
|
||||
$smarty->display('training_type_create.tpl');
|
||||
|
||||
break;
|
||||
case 'parent':
|
||||
# PARENT LÉTREHOZÁSA
|
||||
$smarty->display('parent_create.tpl');
|
||||
|
||||
break;
|
||||
case 'coach':
|
||||
# COACH létrehozása
|
||||
$smarty->display('coach_create.tpl');
|
||||
break;
|
||||
case 'shirt':
|
||||
# SHIRT létrehozása
|
||||
$smarty->display('shirt_create.tpl');
|
||||
break;
|
||||
case 'city':
|
||||
# CITY létrehozása
|
||||
$smarty->display('city_create.tpl');
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
|
||||
10
_include/include_delete_city.php
Normal file
10
_include/include_delete_city.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$delete_query = "DELETE FROM school_city WHERE scc_id = " . $this->get_id() . ";";
|
||||
$sql->execute_query($delete_query);
|
||||
header("Location: /admin/cities");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
10
_include/include_delete_coach.php
Normal file
10
_include/include_delete_coach.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$delete_query = "DELETE FROM user_coach WHERE ua_id = " . $this->get_id() . ";";
|
||||
$sql->execute_query($delete_query);
|
||||
header("Location: /admin/coaches");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$delete_query = "DELETE FROM user_parent WHERE uk_id = " . $this->get_id() . ";";
|
||||
$delete_query = "DELETE FROM user_kid WHERE uk_id = " . $this->get_id() . ";";
|
||||
$sql->execute_query($delete_query);
|
||||
header("Location: /admin/members");
|
||||
}
|
||||
|
||||
10
_include/include_delete_shirt.php
Normal file
10
_include/include_delete_shirt.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$delete_query = "DELETE FROM shirt WHERE shirt_id = " . $this->get_id() . ";";
|
||||
$sql->execute_query($delete_query);
|
||||
header("Location: /admin/shirts");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
8
_include/include_logout.php
Normal file
8
_include/include_logout.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
setcookie('badminton_coach_user', 'null', time()-60*60*72, '/');
|
||||
unset($_COOKIE['badminton_coach_user']);
|
||||
header('Location: http://' . $_SERVER['HTTP_HOST']);
|
||||
|
||||
|
||||
?>
|
||||
33
_include/include_shirts.php
Normal file
33
_include/include_shirts.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR PÓLÓLISTA
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# PÓLÓ SZERKESZTÉSE
|
||||
$shirt_query = "SELECT * FROM shirt WHERE shirt_id = " . $this->get_id();
|
||||
$shirt_assoc_array = $sql->assoc_array($shirt_query);
|
||||
|
||||
$smarty->assign('shirt_array',$shirt_assoc_array[0]);
|
||||
$smarty->display('shirt_data_edit.tpl');
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# PÓLÓ LISTA
|
||||
|
||||
$shirt_query = "SELECT * FROM shirt ORDER BY shirt_name ASC";
|
||||
$shirt_assoc_array = $sql->assoc_array($shirt_query);
|
||||
|
||||
$smarty->assign('shirt_assoc_array',$shirt_assoc_array);
|
||||
$smarty->display('shirt_list.tpl');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -46,8 +46,6 @@ if ($this->is_id()) {
|
||||
|
||||
else {
|
||||
|
||||
$actual_month = date('m');
|
||||
//$actual_month = 10;
|
||||
$traning_list_query = "SELECT * FROM training ORDER BY tr_date DESC;";
|
||||
$training_list_assoc_array = $sql->assoc_array($traning_list_query);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user