diff --git a/_class/class_camp_apply.php b/_class/class_camp_apply.php index 0d95a43..3e04da7 100644 --- a/_class/class_camp_apply.php +++ b/_class/class_camp_apply.php @@ -8,6 +8,7 @@ class camp_apply private $capp_status = null; private $capp_accept_date = null; private $capp_camp_id = null; + private $capp_money; /** * get_s the value of capp_id. @@ -153,6 +154,30 @@ class camp_apply return $this; } + /** + * get_s the value of capp_money. + * + * @return mixed + */ + public function get_capp_money() + { + return $this->capp_money; + } + + /** + * Sets the value of capp_money. + * + * @param mixed $capp_money the capp money + * + * @return self + */ + private function set_capp_money($capp_money) + { + $this->capp_money = $capp_money; + + return $this; + } + //STATIC! public static function has_responsible_contact($_capp_id) { @@ -247,4 +272,13 @@ class camp_apply 'capp_camp_id' => $_camp, ], ['capp_id' => $_apply_id]); } + + public static function set_money($_money, $_capp_id) + { + global $sql; + + $sql->update_table('camp_apply', [ + 'capp_money' => $_money, + ], ['capp_id' => $_capp_id]); + } } diff --git a/_class/class_page.php b/_class/class_page.php index cf8322d..f840d29 100644 --- a/_class/class_page.php +++ b/_class/class_page.php @@ -7,25 +7,32 @@ */ - -class page { - +class page +{ private $page = null; private $subpage = null; private $id = null; - function __construct() { - if (isset($_GET['page'])) $this->set_page($_GET['page']); - if (isset($_GET['subpage'])) $this->set_subpage($_GET['subpage']); - if (isset($_GET['id'])) $this->set_id($_GET['id']); + public function __construct() + { + if (isset($_GET['page'])) { + $this->set_page($_GET['page']); + } + if (isset($_GET['subpage'])) { + $this->set_subpage($_GET['subpage']); + } + if (isset($_GET['id'])) { + $this->set_id($_GET['id']); + } } - public function get_page_nav() { + public function get_page_nav() + { global $smarty, $sql, $user; //nem kell if, hanem page alapján beillesztük az id-t - if ($this->get_page() == 'admin') { + if ('admin' == $this->get_page()) { if ($user) { - $menus_query = " + $menus_query = ' SELECT * FROM @@ -37,32 +44,27 @@ class page { OR ua_authority_a_id = 1) WHERE spage_page_id = 1 - AND ua_user_kid_uk_id = " . $user->get_ua_id() ." ORDER BY spage_id ASC; - "; - } - else { - $menus_query = "SELECT * FROM subpage WHERE spage_page_id = 1;"; + AND ua_user_kid_uk_id = '.$user->get_ua_id().' ORDER BY spage_id ASC; + '; + } else { + $menus_query = 'SELECT * FROM subpage WHERE spage_page_id = 1;'; } $menu_assoc_array = $sql->assoc_array($menus_query); $smarty->assign('menus', $menu_assoc_array); - } - elseif ($this->get_page() == 'view' || $this->get_page() == 'preview') { - $menus_query = "SELECT * FROM subpage WHERE spage_page_id = 2;"; + } elseif ('view' == $this->get_page() || 'preview' == $this->get_page()) { + $menus_query = 'SELECT * FROM subpage WHERE spage_page_id = 2;'; $menu_assoc_array = $sql->assoc_array($menus_query); $smarty->assign('menus', $menu_assoc_array); - } - elseif ($this->get_page() == 'coach' || $this->get_page() == 'coach_preview') { - $menus_query = "SELECT * FROM subpage WHERE spage_page_id = 3;"; + } elseif ('coach' == $this->get_page() || 'coach_preview' == $this->get_page()) { + $menus_query = 'SELECT * FROM subpage WHERE spage_page_id = 3;'; $menu_assoc_array = $sql->assoc_array($menus_query); $smarty->assign('menus', $menu_assoc_array); - } - elseif ($this->get_page() == 'tabor') { - $menus_query = "SELECT * FROM subpage WHERE spage_page_id = 4;"; + } elseif ('tabor' == $this->get_page()) { + $menus_query = 'SELECT * FROM subpage WHERE spage_page_id = 4;'; $menu_assoc_array = $sql->assoc_array($menus_query); $smarty->assign('menus', $menu_assoc_array); - } - elseif ($this->get_page() == 'taborvezeto') { - $menus_query = "SELECT * FROM subpage WHERE spage_page_id = 5;"; + } elseif ('taborvezeto' == $this->get_page()) { + $menus_query = 'SELECT * FROM subpage WHERE spage_page_id = 5;'; $menu_assoc_array = $sql->assoc_array($menus_query); $smarty->assign('menus', $menu_assoc_array); } @@ -71,9 +73,8 @@ class page { $smarty->display('nav.tpl'); } - - - function findInStructure($id, &$array) { + public function findInStructure($id, &$array) + { if (array_key_exists($id, $array)) { return $id; } @@ -85,500 +86,504 @@ class page { } } - public function get_page_content() { + public function get_page_content() + { global $sql, $user, $smarty, $structure; //var_dump($user); ini_set('include_path', '_include/'); //ini_set('include_path', '/var/www/badminton_coach/_include'); - $exceptions = array("export_balance", "send_report", "money_update"); + $exceptions = ['export_balance', 'send_report', 'money_update']; if ((!empty($user) && $user->is_logged_in()) || in_array($this->get_subpage(), $exceptions)) { if ($this->is_page()) { //TODO: mi van ha nincs page? átirányítás v 404? //page alapján betölti a tpl-t - if ($this->is_subpage() && $this->get_page() == 'admin') { + if ($this->is_subpage() && 'admin' == $this->get_page()) { if ('create' == $this->get_subpage()) { $toFind = $this->get_id(); - } elseif (strpos($this->get_subpage(), 'delete') !== false) { + } elseif (false !== strpos($this->get_subpage(), 'delete')) { //delete_ utáni rész $toFind = substr($this->get_subpage(), 7); - } - else { + } else { $toFind = $this->get_subpage(); } $subPage = $this->findInStructure($toFind, $structure); if ((!empty($user) && $user->is_logged_in()) && 'exception' != $subPage && !$user->has_authority_by_name($subPage)) { - include('include_access_denied.php'); + include 'include_access_denied.php'; + return; } } switch ($this->get_page()) { case 'admin': - # ADMIN OLDALAK + // ADMIN OLDALAK switch ($this->get_subpage()) { case 'members': - # TAGOK KEZELÉSE - $tpl = "edit"; - include('include_members.php'); + // TAGOK KEZELÉSE + $tpl = 'edit'; + include 'include_members.php'; break; - case 'edit_member': - # TAG SZERKESZTÉSE - $tpl = "edit"; - include('include_members.php'); + // TAG SZERKESZTÉSE + $tpl = 'edit'; + include 'include_members.php'; break; case 'delete_member': - # TAG TÖRLÉSE - # TODO: error kezelés - include('include_delete_member.php'); + // TAG TÖRLÉSE + // TODO: error kezelés + include 'include_delete_member.php'; break; case 'delete_parent': - # SZÜLŐ TÖRLÉSE - # TODO: error kezelés - include('include_delete_parent.php'); + // SZÜLŐ TÖRLÉSE + // TODO: error kezelés + include 'include_delete_parent.php'; break; case 'parents': - # SZÜLŐK SZERKESZTÉSE - include('include_parents.php'); + // SZÜLŐK SZERKESZTÉSE + include 'include_parents.php'; break; case 'coaches': - # EDZŐK SZERKESZTÉSE - include('include_coaches.php'); + // EDZŐK SZERKESZTÉSE + include 'include_coaches.php'; break; case 'trainings': - # EDZÉSEK - # itt az edzések listája jelenik meg az aktuális hónapban - $tpl = "edit"; - include('include_trainings.php'); + // EDZÉSEK + // itt az edzések listája jelenik meg az aktuális hónapban + $tpl = 'edit'; + include 'include_trainings.php'; break; case 'training_templates': - # EDZÉS SABLONOK - include('include_training_templates.php'); + // EDZÉS SABLONOK + include 'include_training_templates.php'; break; case 'delete_training_template': - # EDZÉS SABLON TÖRLÉS - include('include_delete_training_template.php'); + // EDZÉS SABLON TÖRLÉS + include 'include_delete_training_template.php'; break; case 'shirts': - # PÓLÓK - include('include_shirts.php'); + // PÓLÓK + include 'include_shirts.php'; break; case 'cities': - # PÓLÓK - include('include_cities.php'); + // PÓLÓK + include 'include_cities.php'; break; case 'edit_training': - # TAG SZERKESZTÉSE - $tpl = "edit"; - include('include_trainings.php'); + // TAG SZERKESZTÉSE + $tpl = 'edit'; + include 'include_trainings.php'; break; case 'delete_training': - # EDZÉS TÖRLÉS - include('include_delete_training.php'); + // EDZÉS TÖRLÉS + include 'include_delete_training.php'; break; case 'create': - # LÉTREHOZÓS OLDALAK - include('include_create.php'); + // LÉTREHOZÓS OLDALAK + include 'include_create.php'; break; case 'presence': - # JELENLÉT - $tpl = "presence"; - include('include_presence.php'); + // JELENLÉT + $tpl = 'presence'; + include 'include_presence.php'; break; case 'schools': - # ISKOLÁK - include('include_schools.php'); + // ISKOLÁK + include 'include_schools.php'; break; case 'training_types': - # EDZÉS TÍPUSOK - include('include_training_types.php'); + // EDZÉS TÍPUSOK + include 'include_training_types.php'; break; case 'regions': - # DIÁKOLIMPIA KÖRZETEK - include('include_regions.php'); + // DIÁKOLIMPIA KÖRZETEK + include 'include_regions.php'; break; case 'log': - # NAPLÓ - include('include_log.php'); + // NAPLÓ + include 'include_log.php'; break; case 'money_deposit': - # BEFIZETÉSEK - include('include_money_deposit.php'); + // BEFIZETÉSEK + include 'include_money_deposit.php'; break; case 'lease': - # BÉRLETTÍPUSOK - include('include_lease.php'); + // BÉRLETTÍPUSOK + include 'include_lease.php'; break; case 'lock_training': - # EDZÉS ZÁROLÁS, FELOLDÁS - include('include_lock_training.php'); + // EDZÉS ZÁROLÁS, FELOLDÁS + include 'include_lock_training.php'; break; case 'view_deposit': - # BEFIZETÉSEK / USER - include('include_view_deposit.php'); + // BEFIZETÉSEK / USER + include 'include_view_deposit.php'; break; case 'money_expense': - # KIADÁSOK - include('include_money_expense.php'); + // KIADÁSOK + include 'include_money_expense.php'; break; case 'money_expense_category': - # KIADÁS KATEGÓRIÁK - include('include_money_expense_category.php'); + // KIADÁS KATEGÓRIÁK + include 'include_money_expense_category.php'; break; case 'money_income_category': - # BEVÉTEL KATEGÓRIÁK - include('include_money_income_category.php'); + // BEVÉTEL KATEGÓRIÁK + include 'include_money_income_category.php'; break; case 'money_income': - # BEVÉTELEK - include('include_money_income.php'); + // BEVÉTELEK + include 'include_money_income.php'; break; case 'money_update': - # FRISSÍTÉS - include('include_money_update.php'); + // FRISSÍTÉS + include 'include_money_update.php'; + // no break case 'settings': - # BEÁLLÍTÁSOK - include('include_settings.php'); + // BEÁLLÍTÁSOK + include 'include_settings.php'; break; case 'balance_list': - # BEÁLLÍTÁSOK - include('include_balance_list.php'); + // BEÁLLÍTÁSOK + include 'include_balance_list.php'; break; case 'stats': - # STATISZTIKÁK - include('include_stats.php'); + // STATISZTIKÁK + include 'include_stats.php'; break; case 'news': - # INFORMÁCIÓS FAL - include('include_information.php'); + // INFORMÁCIÓS FAL + include 'include_information.php'; break; case 'expire_check': - # CRON FUTTATÁSA - include('include_expire_check.php'); + // CRON FUTTATÁSA + include 'include_expire_check.php'; break; case 'userlist': - # GYEREK ADATLISTA - include('include_userlist.php'); + // GYEREK ADATLISTA + include 'include_userlist.php'; break; case 'export_users': - # GYEREKLISTA EXPORTÁLÁSA - include('include_export_users.php'); + // GYEREKLISTA EXPORTÁLÁSA + include 'include_export_users.php'; break; case 'traininglist': - # EDZÉS ADATLISTA - include('include_traininglist.php'); + // EDZÉS ADATLISTA + include 'include_traininglist.php'; break; case 'export_trainings': - # EDZÉSLISTA EXPORTÁLÁSA - include('include_export_trainings.php'); + // EDZÉSLISTA EXPORTÁLÁSA + include 'include_export_trainings.php'; break; case 'export_balance': - # EGYENLEG LISTA EXPORTÁLÁSA - include('include_export_balance.php'); + // EGYENLEG LISTA EXPORTÁLÁSA + include 'include_export_balance.php'; break; case 'download_report': - # EGYENLEG LISTA LETÖLTÉSE - include('include_download_report.php'); + // EGYENLEG LISTA LETÖLTÉSE + include 'include_download_report.php'; break; case 'send_report': - # EGYENLEG LISTA KÜLDÉSE - include('include_send_report.php'); + // EGYENLEG LISTA KÜLDÉSE + include 'include_send_report.php'; break; case 'set_credit_to_zero': - # HITELALKALOM NULLÁZÁS - include('include_set_credit_to_zero.php'); + // HITELALKALOM NULLÁZÁS + include 'include_set_credit_to_zero.php'; break; case 'delete_training_type': - # EDZÉS TÍPUS TÖRLÉS - include('include_delete_training_type.php'); + // EDZÉS TÍPUS TÖRLÉS + include 'include_delete_training_type.php'; break; case 'delete_coach': - # EDZŐ TÖRLÉS - include('include_delete_coach.php'); + // EDZŐ TÖRLÉS + include 'include_delete_coach.php'; break; case 'delete_shirt': - # PÓLÓ TÖRLÉS - include('include_delete_shirt.php'); + // PÓLÓ TÖRLÉS + include 'include_delete_shirt.php'; break; case 'delete_city': - # VÁROS TÖRLÉS - include('include_delete_city.php'); + // VÁROS TÖRLÉS + include 'include_delete_city.php'; break; case 'delete_region': - # KÖRZET TÖRLÉS - include('include_delete_region.php'); + // KÖRZET TÖRLÉS + include 'include_delete_region.php'; break; case 'delete_school': - # ISKOLA TÖRLÉS - include('include_delete_school.php'); + // ISKOLA TÖRLÉS + include 'include_delete_school.php'; break; case 'delete_money_deposit': - # BEFIZETÉS TÖRLÉS - include('include_delete_money_deposit.php'); + // BEFIZETÉS TÖRLÉS + include 'include_delete_money_deposit.php'; break; case 'delete_money_expense_category': - # BEFIZETÉS KATEGÓRIA TÖRLÉS - include('include_delete_money_expense_category.php'); + // BEFIZETÉS KATEGÓRIA TÖRLÉS + include 'include_delete_money_expense_category.php'; break; case 'delete_money_expense': - # BEFIZETÉS TÖRLÉS - include('include_delete_money_expense.php'); + // BEFIZETÉS TÖRLÉS + include 'include_delete_money_expense.php'; break; case 'delete_money_income_category': - # BEVÉTEL KATEGÓRIA TÖRLÉS - include('include_delete_money_income_category.php'); + // BEVÉTEL KATEGÓRIA TÖRLÉS + include 'include_delete_money_income_category.php'; break; case 'delete_money_income': - # BEVÉTEL TÖRLÉS - include('include_delete_money_income.php'); + // BEVÉTEL TÖRLÉS + include 'include_delete_money_income.php'; break; case 'delete_news': - # HÍR TÖRLÉS - include('include_delete_news.php'); + // HÍR TÖRLÉS + include 'include_delete_news.php'; break; case 'delete_lease': - # BÉRLETTÍPUS TÖRLÉS - include('include_delete_lease.php'); + // BÉRLETTÍPUS TÖRLÉS + include 'include_delete_lease.php'; break; case 'logout': - # kijelentkezés - $from = "admin"; - include('include_logout.php'); + // kijelentkezés + $from = 'admin'; + include 'include_logout.php'; break; case 'camps': - # TÁBOROK - include('include_camps.php'); + // TÁBOROK + include 'include_camps.php'; break; case 'camp_types': - # TÁBOR TÍPUSOK - include('include_camp_types.php'); + // TÁBOR TÍPUSOK + include 'include_camp_types.php'; break; case 'camp_shirt_type': - # TÁBOR PÓLÓ TÍPUSOK - include('include_camp_shirt_types.php'); + // TÁBOR PÓLÓ TÍPUSOK + include 'include_camp_shirt_types.php'; break; case 'accept_apply': - # TÁBOR JELENTKEZÉS ELFOGADÁSA - include('include_accept_apply.php'); + // TÁBOR JELENTKEZÉS ELFOGADÁSA + include 'include_accept_apply.php'; break; case 'deny_apply': - # TÁBOR JELENTKEZÉS ELUTASÍTÁSA - include('include_deny_apply.php'); + // TÁBOR JELENTKEZÉS ELUTASÍTÁSA + include 'include_deny_apply.php'; break; case 'remove_apply': - # TÁBOR JELENTKEZÉS ELTÁVOLÍTÁSA A LISTÁBÓL - include('include_remove_apply.php'); + // TÁBOR JELENTKEZÉS ELTÁVOLÍTÁSA A LISTÁBÓL + include 'include_remove_apply.php'; break; case 'apply': - # TÁBORI JELENTKEZŐ ADATAINAK MEGTEKINTÉSE - include('include_apply.php'); + // TÁBORI JELENTKEZŐ ADATAINAK MEGTEKINTÉSE + include 'include_apply.php'; break; case 'camp_user': - # táborvezetők - include('include_user_camp_leader.php'); + // táborvezetők + include 'include_user_camp_leader.php'; break; case 'camp_details': - # turnusok - include('include_camp_details.php'); + // turnusok + include 'include_camp_details.php'; + break; + case 'camp_fee': + // tábordíj befizetés + include 'include_camp_fee.php'; break; case 'delete_camp_type': - # TÁBOR TÍPUS TÖRLÉS - include('include_delete_camp_type.php'); + // TÁBOR TÍPUS TÖRLÉS + include 'include_delete_camp_type.php'; break; case 'delete_camp': - # TÁBOR TÖRLÉS - include('include_delete_camp.php'); + // TÁBOR TÖRLÉS + include 'include_delete_camp.php'; break; case 'delete_camp_shirt': - # TÁBORI PÓLÓ TÖRLÉS - include('include_delete_camp_shirt.php'); + // TÁBORI PÓLÓ TÖRLÉS + include 'include_delete_camp_shirt.php'; break; case 'delete_camp_leader': - # TÁBORVEZETŐ TÖRLÉS - include('include_delete_camp_leader.php'); + // TÁBORVEZETŐ TÖRLÉS + include 'include_delete_camp_leader.php'; break; default: - # code... + // code... break; } break; case 'ajax': if ($this->is_subpage()) { - include('ajax/'.$this->get_subpage()); + include 'ajax/'.$this->get_subpage(); } break; case 'view': - # SZÜLŐ FELÜLET + // SZÜLŐ FELÜLET switch ($this->get_subpage()) { case 'logout': - # kijelentkezés - $from = "view"; - include('include_logout.php'); + // kijelentkezés + $from = 'view'; + include 'include_logout.php'; break; case 'overview': - # áttekintő oldal adatokkal - include('include_overview.php'); + // áttekintő oldal adatokkal + include 'include_overview.php'; break; case 'diary': - # napló, edzéslista - include('include_diary.php'); + // napló, edzéslista + include 'include_diary.php'; break; case 'information': - # információk - include('include_information_wall.php'); + // információk + include 'include_information_wall.php'; break; default: - include('include_diary.php'); + include 'include_diary.php'; break; } break; case 'preview': - # SZÜLŐI OLDAL ELŐNÉZET + // SZÜLŐI OLDAL ELŐNÉZET switch ($this->get_subpage()) { case 'overview': - # áttekintő oldal adatokkal - include('include_overview.php'); + // áttekintő oldal adatokkal + include 'include_overview.php'; break; case 'diary': - # napló, edzéslista - include('include_diary.php'); + // napló, edzéslista + include 'include_diary.php'; break; case 'information': - # információk - include('include_information_wall.php'); + // információk + include 'include_information_wall.php'; break; default: - include('include_diary.php'); + include 'include_diary.php'; break; } break; case 'coach': - # EDZŐI NÉZET + // EDZŐI NÉZET switch ($this->get_subpage()) { case 'diary': - # napló, edzéslista - include('include_coach_diary.php'); + // napló, edzéslista + include 'include_coach_diary.php'; break; case 'logout': - # kijelentkezés - $from = "coach"; - include('include_logout.php'); + // kijelentkezés + $from = 'coach'; + include 'include_logout.php'; break; default: - include('include_coach_diary.php'); + include 'include_coach_diary.php'; break; } break; case 'coach_preview': - # EDZŐI ELŐNÉZET + // EDZŐI ELŐNÉZET switch ($this->get_subpage()) { case 'diary': - # napló, edzéslista - include('include_coach_diary.php'); + // napló, edzéslista + include 'include_coach_diary.php'; break; default: - include('include_coach_diary.php'); + include 'include_coach_diary.php'; break; } break; case 'tabor': - # TÁBOR OLDALAK + // TÁBOR OLDALAK switch ($this->get_subpage()) { case 'informaciok': - # tábori információk - include('include_camp_information.php'); + // tábori információk + include 'include_camp_information.php'; break; case 'jelentkezes': - # jelentkezés - include('include_camp_apply.php'); + // jelentkezés + include 'include_camp_apply.php'; break; case 'jelentkezesek': - # jelentkezések - include('include_camp_applies.php'); + // jelentkezések + include 'include_camp_applies.php'; break; case 'move_next': - # továbblépés mentés nélkül - include('include_move_next.php'); + // továbblépés mentés nélkül + include 'include_move_next.php'; break; case 'logout': - # kijelentkezés - $from = "tabor"; - include('include_logout.php'); + // kijelentkezés + $from = 'tabor'; + include 'include_logout.php'; break; case 'delete_apply': - # jelentkezés törlése - include('include_delete_apply.php'); + // jelentkezés törlése + include 'include_delete_apply.php'; break; default: - include('include_camp_information.php'); + include 'include_camp_information.php'; break; } break; } } - } - else { + } else { //nincs bejelentkezve - $smarty->assign("page", $this->get_page()); + $smarty->assign('page', $this->get_page()); if ('tabor' == $this->get_page() && $this->is_subpage() && 'regisztracio' == $this->get_subpage()) { if (isset($_COOKIE['bc_reg_error'])) { $smarty->assign('error_code', $_COOKIE['bc_reg_error']); - setcookie('bc_reg_error', null, time()-60*60*3, '/'); + setcookie('bc_reg_error', null, time() - 60 * 60 * 3, '/'); } - $smarty->display("register.tpl"); - } - else { + $smarty->display('register.tpl'); + } else { if (isset($_COOKIE['bc_reg_error'])) { $smarty->assign('error_code', $_COOKIE['bc_reg_error']); - setcookie('bc_reg_error', null, time()-60*60*2, '/'); + setcookie('bc_reg_error', null, time() - 60 * 60 * 2, '/'); } - $smarty->display("login.tpl"); + $smarty->display('login.tpl'); } } - } - - private function set_page($_page) { + private function set_page($_page) + { $this->page = $_page; } - private function set_subpage($_subpage) { + private function set_subpage($_subpage) + { $this->subpage = $_subpage; } - private function set_id($_id) { + private function set_id($_id) + { $this->id = $_id; } - public function get_page() { + public function get_page() + { return $this->page; } - public function get_subpage() { + public function get_subpage() + { return $this->subpage; } - public function get_id() { + public function get_id() + { return $this->id; } - public function is_page() { + public function is_page() + { return !empty($this->page); } - public function is_subpage() { + public function is_subpage() + { return !empty($this->subpage); } - public function is_id() { + public function is_id() + { return !empty($this->id); } - } - - - - -?> diff --git a/_image/dollar.png b/_image/dollar.png new file mode 100644 index 0000000..239e319 Binary files /dev/null and b/_image/dollar.png differ diff --git a/_include/include_camp_fee.php b/_include/include_camp_fee.php new file mode 100644 index 0000000..24c334e --- /dev/null +++ b/_include/include_camp_fee.php @@ -0,0 +1,9 @@ +is_id()) { + $apply = new camp_apply(); + $apply->set_capp_data_by_id($this->get_id()); + + $smarty->assign('apply', $apply); + $smarty->display('camp_fee.tpl'); +} diff --git a/event_handler.php b/event_handler.php index 0848f13..d266ca1 100644 --- a/event_handler.php +++ b/event_handler.php @@ -597,6 +597,12 @@ if (isset($_POST['action'])) { log::register('update_lease', $l_id); header('Location: /admin/lease/'.$l_id); break; + case 'camp_fee': + unset($_POST['action']); + camp_apply::set_money($_POST['capp_money'], $_POST['capp_id']); + header('Location: /admin/camp_fee/'.$_POST['capp_id']); + # code... + break; default: // code... break; diff --git a/queries/202104_camp_updates.sql b/queries/202104_camp_updates.sql index 88d0d13..3edb3a7 100644 --- a/queries/202104_camp_updates.sql +++ b/queries/202104_camp_updates.sql @@ -14,3 +14,5 @@ ALTER TABLE `camp_apply` DROP INDEX `fk_camp_apply_3_idx`; ALTER TABLE `camp_apply` DROP `capp_accomodation_type`, DROP `capp_shuttle_type`; + +ALTER TABLE `camp_apply` ADD `capp_money` INT NOT NULL DEFAULT '0' AFTER `capp_camp_id`; diff --git a/template/templates/apply.tpl b/template/templates/apply.tpl index 25f9863..493ecc4 100644 --- a/template/templates/apply.tpl +++ b/template/templates/apply.tpl @@ -49,13 +49,6 @@
{$apply->get_capp_camp_kid_ck_id()->get_ck_sport_history()}
-
- -
{$apply->get_capp_camp_kid_ck_id()->get_ck_shirt()->get_cshirt_name()}
-
{/if} -
- -
- {if $apply->get_capp_accomodation_type()} - {$apply->get_capp_accomodation_type()->get_cat_name()} - {else} - Nincs megadva - {/if} -
-
- - -
- -
- {if $apply->get_capp_shuttle_type()} - {$apply->get_capp_shuttle_type()->get_cst_name()} - {else} - Nincs megadva - {/if} -
-
-

Felelős kapcsolattartó

diff --git a/template/templates/camp_data_update.tpl b/template/templates/camp_data_update.tpl index fe3fed8..424848e 100644 --- a/template/templates/camp_data_update.tpl +++ b/template/templates/camp_data_update.tpl @@ -87,10 +87,12 @@ {foreach $pending_apply_array as $apply} - {$apply->get_capp_id()} + {$apply->get_capp_id()} - {$apply->get_capp_camp_kid_ck_id()->get_ck_name()} + + {$apply->get_capp_camp_kid_ck_id()->get_ck_name()} + {$apply->get_capp_date()|substr:0:16} @@ -124,10 +126,12 @@ {foreach $deleted_apply_array as $apply} - {$apply->get_capp_id()} + {$apply->get_capp_id()} - {$apply->get_capp_camp_kid_ck_id()->get_ck_name()} + + {$apply->get_capp_camp_kid_ck_id()->get_ck_name()} + {$apply->get_capp_accept_date()|substr:0:16} @@ -151,6 +155,8 @@ Státusz Visszaigazolva Módosítás + Befizetés + Befizetett összeg {if !count($apply_array)} @@ -160,10 +166,12 @@ {foreach $apply_array as $apply} - {$apply->get_capp_id()} + {$apply->get_capp_id()} - {$apply->get_capp_camp_kid_ck_id()->get_ck_name()} + + {$apply->get_capp_camp_kid_ck_id()->get_ck_name()} + {$apply->get_capp_date()|substr:0:16} @@ -181,6 +189,20 @@ {/if} + + {if $camp->get_camp_price() == null or $apply->get_capp_money() == $camp->get_camp_price()} + + {elseif $camp->get_camp_price() > 0 and $apply->get_capp_money() == 0} + + {else} + + {/if} + + + + {$apply->get_capp_money()} Ft + + {/foreach} {/if} diff --git a/template/templates/camp_fee.tpl b/template/templates/camp_fee.tpl new file mode 100644 index 0000000..96dd9a7 --- /dev/null +++ b/template/templates/camp_fee.tpl @@ -0,0 +1,22 @@ +
+
+
+ Vissza +
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +