deletes and fixes
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# JELENTEKEZÉS ELFOGADÁSA
|
||||
camp_apply::apply_response($this->get_id(), 3);
|
||||
$new_apply = new camp_apply();
|
||||
$new_apply->set_capp_data_by_id($this->get_id());
|
||||
header('Location: /admin/camps/' . $new_apply->get_capp_camp_id()->get_camp_id());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# TÁBORI JELENTKEZÉS
|
||||
|
||||
//jelentkező
|
||||
$apply = new camp_apply();
|
||||
$apply->set_capp_data_by_id($this->get_id());
|
||||
|
||||
//felelős kapcsolattartó
|
||||
$res_cc_id = $sql->single_variable("SELECT cac_camp_contact_cc_id FROM camp_apply_contact WHERE cac_is_responsible = 1 AND cac_camp_apply_capp_id = " . $this->get_id() );
|
||||
$res_cc = new camp_contact();
|
||||
$res_cc->set_cc_data_by_id($res_cc_id);
|
||||
|
||||
//további kapcst-ók
|
||||
|
||||
$cc_ids = $sql->assoc_array("SELECT cac_camp_contact_cc_id FROM camp_apply_contact WHERE cac_is_responsible = 0 AND cac_camp_apply_capp_id = " . $this->get_id() );
|
||||
|
||||
$contacts = array();
|
||||
foreach ($cc_ids as $cc) {
|
||||
$contact = new camp_contact();
|
||||
$contact->set_cc_data_by_id($cc['cac_camp_contact_cc_id']);
|
||||
$contacts[] = $contact;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$smarty->assign('apply',$apply);
|
||||
$smarty->assign('res_cc',$res_cc);
|
||||
$smarty->assign('contacts',$contacts);
|
||||
$smarty->display('apply.tpl');
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -6,10 +6,6 @@
|
||||
$where = '';
|
||||
if ($this->is_id()) {
|
||||
# RENDEZÉS
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
switch ($this->get_id()) {
|
||||
case 1:
|
||||
//1 - egyenleg szerint növekvő
|
||||
@@ -22,31 +18,10 @@ if ($this->is_id()) {
|
||||
$order_by = 'uk_name ASC';
|
||||
$url_postfix = '/' . $this->get_id();
|
||||
break;
|
||||
case 3:
|
||||
//3 - tartozások csökkenőben
|
||||
$where = ' AND uk_balance < 0';
|
||||
$order_by = 'uk_balance ASC, uk_name ASC';
|
||||
$url_postfix = '/' . $this->get_id();
|
||||
break;
|
||||
case 4:
|
||||
//4 - tartozások növekvőben
|
||||
$where = ' AND uk_balance < 0';
|
||||
$order_by = 'uk_balance DESC, uk_name ASC';
|
||||
$url_postfix = '/' . $this->get_id();
|
||||
break;
|
||||
case 5:
|
||||
//5 - tartozások növekvőben
|
||||
$where = ' AND uk_balance < 0';
|
||||
$order_by = 'uk_last_notification DESC, uk_name ASC';
|
||||
$url_postfix = '/' . $this->get_id();
|
||||
break;
|
||||
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
# EGYENLEG LISTA
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
//jelentkező
|
||||
$apply = new camp_apply();
|
||||
$apply->set_capp_data_by_id($this->get_id());
|
||||
|
||||
//felelős kapcsolattartó
|
||||
$res_cc_id = $sql->single_variable("SELECT cac_camp_contact_cc_id FROM camp_apply_contact WHERE cac_is_responsible = 1 AND cac_camp_apply_capp_id = " . $this->get_id() );
|
||||
$res_cc = new camp_contact();
|
||||
$res_cc->set_cc_data_by_id($res_cc_id);
|
||||
|
||||
//további kapcst-ók
|
||||
|
||||
$cc_ids = $sql->assoc_array("SELECT cac_camp_contact_cc_id FROM camp_apply_contact WHERE cac_is_responsible = 0 AND cac_camp_apply_capp_id = " . $this->get_id() );
|
||||
|
||||
$contacts = array();
|
||||
foreach ($cc_ids as $cc) {
|
||||
$contact = new camp_contact();
|
||||
$contact->set_cc_data_by_id($cc['cac_camp_contact_cc_id']);
|
||||
$contacts[] = $contact;
|
||||
}
|
||||
|
||||
$smarty->assign('apply',$apply);
|
||||
$smarty->assign('res_cc',$res_cc);
|
||||
$smarty->assign('contacts',$contacts);
|
||||
$smarty->display('apply.tpl');
|
||||
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# JELENTKEZÉSEK: 2 táblázat
|
||||
// elbírált jelentkezések
|
||||
// elfogadásra váró jelentkezések
|
||||
|
||||
//lekérjük az elbírált jelentkezéseket
|
||||
$accepted_applies = $sql->assoc_array("SELECT * FROM camp_apply JOIN camp_kid on ck_id = capp_camp_kid_ck_id WHERE ck_owner_id = " . $user->get_cu_id() . " AND capp_status in (3,4);");
|
||||
$color = "";
|
||||
$apply_array = array();
|
||||
foreach ($accepted_applies as $apply) {
|
||||
$new_apply = new camp_apply();
|
||||
$new_apply->set_capp_data_by_id($apply['capp_id']);
|
||||
//lekérjük a státuszt
|
||||
//TODO: objektummal
|
||||
$status = $sql->single_variable('SELECT cas_name FROM camp_apply_status WHERE cas_id = ' . $new_apply->get_capp_status());
|
||||
if ($new_apply->get_capp_status() == 3) {
|
||||
$color = "green";
|
||||
}
|
||||
else {
|
||||
$color = "red";
|
||||
}
|
||||
$new_apply->set_capp_status($status);
|
||||
$apply_array[] = $new_apply;
|
||||
}
|
||||
|
||||
|
||||
//lekérjük az elfogadásra váró jelentkezéseket
|
||||
$pending_applies = $sql->assoc_array("SELECT * FROM camp_apply JOIN camp_kid on ck_id = capp_camp_kid_ck_id WHERE ck_owner_id = " . $user->get_cu_id() . " AND capp_status = 2;");
|
||||
|
||||
$apply_array_2 = array();
|
||||
foreach ($pending_applies as $apply) {
|
||||
$new_apply = new camp_apply();
|
||||
$new_apply->set_capp_data_by_id($apply['capp_id']);
|
||||
$apply_array_2[] = $new_apply;
|
||||
}
|
||||
|
||||
$smarty->assign('color', $color);
|
||||
$smarty->assign('apply_array', $apply_array);
|
||||
$smarty->assign('pending_apply_array', $apply_array_2);
|
||||
$smarty->display('applies.tpl');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,170 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR ÁTIRÁNYÍTÉS /1-re
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# TÁBORI JELENTKEZÉS
|
||||
//var_dump($_COOKIE);
|
||||
|
||||
if ($this->get_id() == 1) {
|
||||
//1. LÉPÉS JELENTKEZŐ ADATAI
|
||||
//lekérjük a camp_user kid-jeit egy tömbbe
|
||||
$kid_assoc_array = $sql->assoc_array("SELECT * FROM camp_kid WHERE ck_owner_id = " . $user->get_cu_id() . " AND ck_original_id IS NULL");
|
||||
$kids = array();
|
||||
foreach ($kid_assoc_array as $kid_array) {
|
||||
$new_kid = new camp_kid();
|
||||
$new_kid->set_ck_data_by_id($kid_array['ck_id']);
|
||||
$kids[] = $new_kid;
|
||||
}
|
||||
|
||||
$shirt_assoc_array = $sql->assoc_array("SELECT * FROM camp_shirt WHERE cshirt_deleted = 0 ORDER BY cshirt_id ASC;");
|
||||
$shirts = array();
|
||||
foreach ($shirt_assoc_array as $shirt) {
|
||||
$new_shirt = new camp_shirt();
|
||||
$new_shirt->set_cshirt_data_by_id($shirt['cshirt_id']);
|
||||
$shirts[] = $new_shirt;
|
||||
}
|
||||
|
||||
|
||||
$smarty->assign('step',1);
|
||||
$smarty->assign('kids',$kids);
|
||||
$smarty->assign('shirts',$shirts);
|
||||
$smarty->display('camp_apply.tpl');
|
||||
|
||||
//var_dump($user);
|
||||
}
|
||||
|
||||
elseif ($this->get_id() == 2) {
|
||||
//2. LÉPÉS KAPCSOLATTARTÓ ADATAI
|
||||
//csak akkor érhető el, ha van cookie, egyébként visszadob az első lépésre
|
||||
if (!isset($_COOKIE['badminton_camp_session_id'])) {
|
||||
header('Location: /tabor/jelentkezes/1');
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
|
||||
//lekérjük a korábban megadott kapcsolattartókat
|
||||
$contact_assoc_array = $sql->assoc_array("SELECT * FROM camp_contact WHERE cc_owner_id = " . $user->get_cu_id() . " AND cc_original_id IS NULL");
|
||||
$contacts = array();
|
||||
foreach ($contact_assoc_array as $contact_array) {
|
||||
$new_cc = new camp_contact();
|
||||
$new_cc->set_cc_data_by_id($contact_array['cc_id']);
|
||||
$contacts[] = $new_cc;
|
||||
}
|
||||
|
||||
//lekérjük van-e felelős kapcsolattartó
|
||||
//ha van, akkor nem lehet bepipálni
|
||||
//ha nincs, akkor van pipa
|
||||
$has_responsible = camp_apply::has_responsible_contact($_COOKIE['badminton_camp_session_id']);
|
||||
|
||||
|
||||
//lekérjük a contact type-okat
|
||||
$cct_assoc_array = $sql->assoc_array("SELECT * FROM camp_contact_type WHERE cct_owner IS NULL OR cct_owner = " . $user->get_cu_id() . ";");
|
||||
$cct_array = array();
|
||||
foreach ($cct_assoc_array as $cct) {
|
||||
$new_cct = new camp_contact_type();
|
||||
$new_cct->set_cct_data_by_id($cct['cct_id']);
|
||||
$cct_array[] = $new_cct;
|
||||
}
|
||||
|
||||
$smarty->assign('cct_array', $cct_array);
|
||||
|
||||
//van-e már jelentkező
|
||||
$has_contact = camp_apply::has_contact($_COOKIE['badminton_camp_session_id']);
|
||||
|
||||
//lekérjük a session_id alapján a camp_kid it-t, objektumot csinálunk belőle és úgy adjuk át
|
||||
$ck_id = $sql->single_variable("SELECT capp_camp_kid_ck_id FROM camp_apply WHERE capp_id = " . $_COOKIE['badminton_camp_session_id']);
|
||||
$new_camp_kid = new camp_kid();
|
||||
$new_camp_kid->set_ck_data_by_id($ck_id);
|
||||
|
||||
//van-e
|
||||
$smarty->assign('camp_kid', $new_camp_kid);
|
||||
$smarty->assign('has_contact', $has_contact);
|
||||
$smarty->assign('contacts', $contacts);
|
||||
$smarty->assign('step',2);
|
||||
$smarty->assign('has_responsible',($has_responsible?true:false));
|
||||
$smarty->assign('camp_apply_id', $_COOKIE['badminton_camp_session_id']);
|
||||
$smarty->display('camp_apply.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
elseif ($this->get_id() == 3) {
|
||||
# amikor nem választott felelős kapcsolattartót
|
||||
|
||||
//megnézzük van-e sessionj-e
|
||||
if (!isset($_COOKIE['badminton_camp_session_id'])) {
|
||||
header('Location: /tabor/jelentkezes/1');
|
||||
}
|
||||
|
||||
//lekérjük a contact-okat
|
||||
$contact_assoc_array = $sql->assoc_array('SELECT * FROM camp_apply_contact WHERE cac_camp_apply_capp_id = ' . $_COOKIE['badminton_camp_session_id']);
|
||||
$contacts = array();
|
||||
foreach ($contact_assoc_array as $contact_array) {
|
||||
$new_contact = new camp_contact();
|
||||
$new_contact->set_cc_data_by_id($contact_array['cac_camp_contact_cc_id']);
|
||||
$contacts[] = $new_contact;
|
||||
}
|
||||
|
||||
$smarty->assign('contacts', $contacts);
|
||||
$smarty->assign('step',3);
|
||||
$smarty->assign('camp_apply_id', $_COOKIE['badminton_camp_session_id']);
|
||||
$smarty->display('camp_apply.tpl');
|
||||
|
||||
}
|
||||
|
||||
elseif ($this->get_id() == 4) {
|
||||
# tábor adatok megadása
|
||||
|
||||
//megnézzük van-e sessionj-e
|
||||
if (!isset($_COOKIE['badminton_camp_session_id'])) {
|
||||
header('Location: /tabor/jelentkezes/1');
|
||||
}
|
||||
|
||||
//lekérjük azokat a táborokat, amikre lehet jelentkezni, és a kezdődátum a mainál később van (>), és nem törölt
|
||||
$camp_assoc_array = $sql->assoc_array("SELECT * FROM camp WHERE camp_deleted = 0 AND camp_is_open = 1 AND camp_from > NOW() ORDER BY camp_from ASC;");
|
||||
|
||||
$camp_array = array();
|
||||
foreach ($camp_assoc_array as $camp) {
|
||||
$new_camp = new camp();
|
||||
$new_camp->set_camp_data_by_id($camp['camp_id']);
|
||||
$camp_array[] = $new_camp;
|
||||
}
|
||||
|
||||
$smarty->assign('step',4);
|
||||
$smarty->assign('camp_array',$camp_array);
|
||||
$smarty->assign('camp_apply_id', $_COOKIE['badminton_camp_session_id']);
|
||||
$smarty->display('camp_apply.tpl');
|
||||
|
||||
}
|
||||
|
||||
elseif ($this->get_id() == 5) {
|
||||
# visszaigazoló szöveg
|
||||
|
||||
//megnézzük van-e sessionj-e
|
||||
if (!isset($_COOKIE['badminton_camp_session_id']) || empty($_COOKIE['badminton_camp_session_id'])) {
|
||||
header('Location: /tabor/jelentkezes/1');
|
||||
}
|
||||
|
||||
setcookie('badminton_camp_session_id', null, time()-60*60, '/');
|
||||
$smarty->assign('step',5);
|
||||
$smarty->display('camp_apply.tpl');
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# REDIRECT
|
||||
header("Location: /tabor/jelentkezes/1");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
# empty
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# TURNUS LISTA, LEGÖRDÜLŐ GYEREKEKKEL
|
||||
|
||||
$camps_assoc_array = $sql->assoc_array("SELECT * FROM camp WHERE camp_deleted = 0 ORDER BY camp_from ASC;");
|
||||
$camps = array();
|
||||
foreach ($camps_assoc_array as $camp_array) {
|
||||
$new_camp = new camp();
|
||||
$new_camp->set_camp_data_by_id($camp_array['camp_id']);
|
||||
$camps[] = $new_camp;
|
||||
}
|
||||
|
||||
$smarty->assign('camps', $camps);
|
||||
$smarty->display('camp_details.tpl');
|
||||
}
|
||||
?>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
# TÁBOR INFORMÁCIÓK
|
||||
|
||||
$info_query = "SELECT set_id FROM setting_value JOIN setting ON setv_setting_set_id = set_id WHERE set_name = 'Tábor - információk';";
|
||||
|
||||
$setv_id = $sql->single_variable($info_query);
|
||||
|
||||
$new_setval = new setting_value();
|
||||
$new_setval->set_setting_value_data_by_id($setv_id);
|
||||
|
||||
$smarty->assign('setting', $new_setval);
|
||||
|
||||
$smarty->display('information.tpl');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR TÁBORI PÓLÓLISTA
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# TÁBORI PÓLÓ SZERKESZTÉSE
|
||||
$camp_shirt_query = "SELECT * FROM camp_shirt WHERE cshirt_id = " . $this->get_id();
|
||||
$camp_shirt_assoc_array = $sql->assoc_array($camp_shirt_query);
|
||||
$smarty->assign('camp_shirt_array',$camp_shirt_assoc_array[0]);
|
||||
$smarty->display('camp_shirt_data_edit.tpl');
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# TÁBORI PÓLÓ LISTA
|
||||
|
||||
$camp_shirt_query = "SELECT * FROM camp_shirt WHERE cshirt_deleted = 0 ORDER BY cshirt_id DESC";
|
||||
$shirt_assoc_array = $sql->assoc_array($camp_shirt_query);
|
||||
|
||||
$smarty->assign('shirt_assoc_array',$shirt_assoc_array);
|
||||
$smarty->display('camp_shirt_list.tpl');
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR TÁBOR_TÍPUSLISTA
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# TÁBOR_TÍPUS SZERKESZTÉSE
|
||||
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# TÁBOR_TÍPUS LISTA
|
||||
|
||||
$ct_query = "SELECT * FROM camp_type WHERE ct_deleted = 0 ORDER BY ct_name ASC";
|
||||
$ct_assoc_array = $sql->assoc_array($ct_query);
|
||||
|
||||
$ct_array = array();
|
||||
foreach ($ct_assoc_array as $value) {
|
||||
$new_ct = new camp_type();
|
||||
$new_ct->set_ct_data_by_id($value['ct_id']);
|
||||
$ct_array[] = $new_ct;
|
||||
}
|
||||
|
||||
$smarty->assign('ct_array',$ct_array);
|
||||
$smarty->display('camp_type_list.tpl');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,140 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR TÁBORLISTA
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# TÁBOR SZERKESZTÉSE
|
||||
|
||||
$camp = new camp();
|
||||
$camp->set_camp_data_by_id($this->get_id());
|
||||
|
||||
//labda típusok hozzáadása
|
||||
$shuttle_assoc_array = $sql->assoc_array("SELECT * FROM camp_shuttle_type WHERE cst_deleted = 0 ORDER BY cst_id ASC");
|
||||
$shuttle_array = array();
|
||||
foreach ($shuttle_assoc_array as $shuttle_type) {
|
||||
$new_cst = new camp_shuttle_type();
|
||||
$new_cst->set_cst_data_by_id($shuttle_type['cst_id']);
|
||||
$shuttle_array[] = $new_cst;
|
||||
}
|
||||
$smarty->assign('shuttle_array', $shuttle_array);
|
||||
|
||||
|
||||
//ottalvós opciók hozzáadása
|
||||
$accomodation_assoc = $sql->assoc_array("SELECT * FROM camp_accomodation_type WHERE cat_deleted = 0 ORDER BY cat_id ASC");
|
||||
$accomodation_array = array();
|
||||
foreach ($accomodation_assoc as $accomodation_type) {
|
||||
$new_cat = new camp_accomodation_type();
|
||||
$new_cat->set_cat_data_by_id($accomodation_type['cat_id']);
|
||||
$accomodation_array[] = $new_cat;
|
||||
}
|
||||
$smarty->assign('accomodation_array', $accomodation_array);
|
||||
|
||||
|
||||
//tábor típusok
|
||||
$ct_assoc_array = $sql->assoc_array("SELECT * FROM camp_type WHERE ct_deleted = 0 ORDER BY ct_name ASC");
|
||||
$camp_type_array = array();
|
||||
foreach ($ct_assoc_array as $ct) {
|
||||
$new_ct = new camp_type();
|
||||
$new_ct->set_ct_data_by_id($ct['ct_id']);
|
||||
$camp_type_array[] = $new_ct;
|
||||
}
|
||||
$smarty->assign('camp_type_array', $camp_type_array);
|
||||
|
||||
|
||||
|
||||
//shuttles
|
||||
$shuttles_assoc_array = $sql->assoc_array('SELECT * FROM camp_shuttle WHERE cs_camp_id = ' . $this->get_id());
|
||||
$shuttles = array();
|
||||
foreach ($shuttles_assoc_array as $shuttle) {
|
||||
$new_sh = new camp_shuttle_type();
|
||||
$new_sh->set_cst_data_by_id($shuttle['cs_shuttle_id']);
|
||||
$shuttles[] = $new_sh->get_cst_id(); //csak az id-t rakjuk bele, hogy in_array-jel könnyebb legyen keresni
|
||||
}
|
||||
|
||||
//accomodations
|
||||
$accom_assoc_array = $sql->assoc_array('SELECT * FROM camp_accomodation WHERE ca_camp_id = ' . $this->get_id());
|
||||
$accoms = array();
|
||||
foreach ($accom_assoc_array as $accom) {
|
||||
$new_ac = new camp_accomodation_type();
|
||||
$new_ac->set_cat_data_by_id($accom['ca_accomodation_id']);
|
||||
$accoms[] = $new_ac->get_cat_id(); //csak az id-t rakjuk bele, hogy in_array-jel könnyebb legyen keresni
|
||||
}
|
||||
|
||||
//visszaigazolt jelentkezések
|
||||
$accepted_applies = $sql->assoc_array("SELECT * FROM camp_apply JOIN camp_kid on ck_id = capp_camp_kid_ck_id WHERE capp_camp_id = " . $this->get_id() . " AND capp_status in (3,4) ORDER BY ck_name ASC;");
|
||||
$color = "";
|
||||
$apply_array = array();
|
||||
foreach ($accepted_applies as $apply) {
|
||||
$new_apply = new camp_apply();
|
||||
$new_apply->set_capp_data_by_id($apply['capp_id']);
|
||||
//lekérjük a státuszt
|
||||
//TODO: objektummal
|
||||
$status = $sql->single_variable('SELECT cas_name FROM camp_apply_status WHERE cas_id = ' . $new_apply->get_capp_status());
|
||||
$new_apply->set_capp_status($status);
|
||||
$apply_array[] = $new_apply;
|
||||
}
|
||||
|
||||
//lekérjük az elfogadásra váró jelentkezéseket
|
||||
$pending_applies = $sql->assoc_array("SELECT * FROM camp_apply JOIN camp_kid on ck_id = capp_camp_kid_ck_id WHERE capp_camp_id = " . $this->get_id() . " AND capp_status = 2 ORDER BY capp_date DESC;;");
|
||||
|
||||
$apply_array_2 = array();
|
||||
foreach ($pending_applies as $apply) {
|
||||
$new_apply = new camp_apply();
|
||||
$new_apply->set_capp_data_by_id($apply['capp_id']);
|
||||
$apply_array_2[] = $new_apply;
|
||||
}
|
||||
|
||||
//lekérjük a töröltó jelentkezéseket
|
||||
$pending_applies = $sql->assoc_array("SELECT * FROM camp_apply JOIN camp_kid on ck_id = capp_camp_kid_ck_id WHERE capp_camp_id = " . $this->get_id() . " AND capp_status = 5 ORDER BY capp_accept_date DESC;;");
|
||||
|
||||
$apply_array_3 = array();
|
||||
foreach ($pending_applies as $apply) {
|
||||
$new_apply = new camp_apply();
|
||||
$new_apply->set_capp_data_by_id($apply['capp_id']);
|
||||
$apply_array_3[] = $new_apply;
|
||||
}
|
||||
|
||||
//var_dump($apply_array_3);
|
||||
|
||||
$smarty->assign('apply_array', $apply_array);
|
||||
$smarty->assign('pending_apply_array', $apply_array_2);
|
||||
$smarty->assign('deleted_apply_array', $apply_array_3);
|
||||
|
||||
$smarty->assign('camp', $camp);
|
||||
$smarty->assign('shuttles', $shuttles);
|
||||
$smarty->assign('accomodations', $accoms);
|
||||
|
||||
|
||||
$smarty->display('camp_data_update.tpl');
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# TÁBOR LISTA
|
||||
|
||||
//tábor adatok
|
||||
$camp_query = "SELECT * FROM camp WHERE camp_deleted = 0 ORDER BY camp_from DESC";
|
||||
$camp_assoc_array = $sql->assoc_array($camp_query);
|
||||
|
||||
$camp_array = array();
|
||||
foreach ($camp_assoc_array as $camp_data) {
|
||||
$new_camp = new camp();
|
||||
$new_camp->set_camp_data_by_id($camp_data['camp_id']);
|
||||
$camp_array[] = $new_camp;
|
||||
}
|
||||
|
||||
|
||||
$smarty->assign('camp_array',$camp_array);
|
||||
$smarty->display('camp_list.tpl');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -167,78 +167,6 @@ switch ($this->get_id()) {
|
||||
$smarty->assign('mic_array', $mic_array);
|
||||
$smarty->display('money_income_create.tpl');
|
||||
break;
|
||||
case 'backup':
|
||||
# BACKUP
|
||||
//létrehozzá, és hozzáfűzi az ID-t a dátumhoz
|
||||
//visszatér a backup oldalra
|
||||
//backup classből hívogat, statikusan
|
||||
|
||||
$new_bu_id = $sql->insert_into('backup', array('bu_date' => date('Y-m-d H:i:s')));
|
||||
$sql->update_table('backup', array('bu_name' => date('Ymd_Hi') . '_' . $new_bu_id), array('bu_id' => $new_bu_id));
|
||||
//log
|
||||
|
||||
$dump_content = $sql->export_database();
|
||||
$file_name = date('Ymd_Hi_') . $new_bu_id . '.sql';
|
||||
$path = 'backup/';
|
||||
touch($path.$file_name);
|
||||
file_put_contents($path.$file_name, $dump_content);
|
||||
|
||||
header("Location: /admin/settings/3");
|
||||
break;
|
||||
case 'camp_type':
|
||||
# ÚJ TÁBOR TÍPUS
|
||||
$smarty->display('camp_type_create.tpl');
|
||||
break;
|
||||
case 'camp':
|
||||
# ÚJ TÁBOR
|
||||
|
||||
//tábor típusok
|
||||
$ct_assoc_array = $sql->assoc_array("SELECT * FROM camp_type WHERE ct_deleted = 0 ORDER BY ct_name ASC");
|
||||
$camp_type_array = array();
|
||||
foreach ($ct_assoc_array as $ct) {
|
||||
$new_ct = new camp_type();
|
||||
$new_ct->set_ct_data_by_id($ct['ct_id']);
|
||||
$camp_type_array[] = $new_ct;
|
||||
}
|
||||
$smarty->assign('camp_type_array', $camp_type_array);
|
||||
|
||||
|
||||
//labda típusok hozzáadása
|
||||
$shuttle_assoc_array = $sql->assoc_array("SELECT * FROM camp_shuttle_type WHERE cst_deleted = 0 ORDER BY cst_id ASC");
|
||||
$shuttle_array = array();
|
||||
foreach ($shuttle_assoc_array as $shuttle_type) {
|
||||
$new_cst = new camp_shuttle_type();
|
||||
$new_cst->set_cst_data_by_id($shuttle_type['cst_id']);
|
||||
$shuttle_array[] = $new_cst;
|
||||
}
|
||||
$smarty->assign('shuttle_array', $shuttle_array);
|
||||
|
||||
|
||||
//ottalvós opciók hozzáadása
|
||||
$accomodation_assoc = $sql->assoc_array("SELECT * FROM camp_accomodation_type WHERE cat_deleted = 0 ORDER BY cat_id ASC");
|
||||
$accomodation_array = array();
|
||||
foreach ($accomodation_assoc as $accomodation_type) {
|
||||
$new_cat = new camp_accomodation_type();
|
||||
$new_cat->set_cat_data_by_id($accomodation_type['cat_id']);
|
||||
$accomodation_array[] = $new_cat;
|
||||
}
|
||||
$smarty->assign('accomodation_array', $accomodation_array);
|
||||
|
||||
|
||||
$smarty->display('camp_create.tpl');
|
||||
break;
|
||||
case 'camp_shirt':
|
||||
# CAMP SHIRT létrehozása
|
||||
$smarty->display('camp_shirt_create.tpl');
|
||||
break;
|
||||
case 'user_camp_leader':
|
||||
# táborvezető létrehozása
|
||||
$smarty->display('user_camp_leader_create.tpl');
|
||||
break;
|
||||
case 'user_group':
|
||||
# táborvezető létrehozása
|
||||
$smarty->display('user_group_create.tpl');
|
||||
break;
|
||||
case 'training_template':
|
||||
# edzés sablon létrehozása
|
||||
//TRAINING TYPE ARRAY
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# JELENTKEZÉS ÁTÁLLÍTÁSA TÖRÖLT STÁTUSZRA
|
||||
$sql->update_table('camp_apply', array('capp_status' => 5, 'capp_accept_date' => date("Y-m-d H:i:s")), array('capp_id' => $this->get_id()));
|
||||
header("Location: /tabor/jelentkezesek");
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
//$delete_query = "DELETE FROM user_kid WHERE uk_id = " . $this->get_id() . ";";
|
||||
//$sql->execute_query($delete_query);
|
||||
$sql->update_table('backup', array('bu_deleted' => 1), array('bu_id' => $this->get_id()));
|
||||
log::register('delete_backup', $this->get_id());
|
||||
header("Location: /admin/settings/3");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
//$delete_query = "DELETE FROM user_kid WHERE uk_id = " . $this->get_id() . ";";
|
||||
//$sql->execute_query($delete_query);
|
||||
$sql->update_table('camp', array('camp_deleted' => 1), array('camp_id' => $this->get_id()));
|
||||
$new_camp = new camp();
|
||||
$new_camp->set_camp_data_by_id($this->get_id());
|
||||
log::register('delete_camp', $new_camp->get_camp_from() . " (" . $new_camp->get_camp_city() . ")");
|
||||
header("Location: /admin/camps");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$sql->update_table('user_camp_leader', array('ucl_deleted' => 1), array('ucl_id' => $this->get_id()));
|
||||
log::register('delete_camp_leader', $this->get_id());
|
||||
header("Location: /admin/camp_user");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
//akiknek ez a shirt_id van beállítva, azoknál null-ra állítjuk
|
||||
$shirt_query = "SELECT ck_id FROM camp_kid WHERE ck_shirt_size_id = " . $this->get_id();
|
||||
$shirt_assoc_array = $sql->assoc_array($shirt_query);
|
||||
foreach ($shirt_assoc_array as $uk_id) {
|
||||
$sql->update_table('camp_kid', array('ck_shirt_size_id' => 'null'), array('ck_id' => $uk_id['ck_id']));
|
||||
}
|
||||
|
||||
$sql->update_table('camp_shirt', array('cshirt_deleted' => 1), array('cshirt_id' => $this->get_id()));
|
||||
|
||||
log::register('delete_camp_shirt', $this->get_id());
|
||||
header("Location: /admin/camp_shirt_type");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
//$delete_query = "DELETE FROM user_kid WHERE uk_id = " . $this->get_id() . ";";
|
||||
//$sql->execute_query($delete_query);
|
||||
$sql->update_table('camp_type', array('ct_deleted' => 1), array('ct_id' => $this->get_id()));
|
||||
log::register('delete_ct', $this->get_id());
|
||||
header("Location: /admin/camp_types");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
//$delete_query = "DELETE FROM user_kid WHERE uk_id = " . $this->get_id() . ";";
|
||||
//$sql->execute_query($delete_query);
|
||||
$sql->update_table('user_group', array('ug_deleted' => 1), array('ug_id' => $this->get_id()));
|
||||
log::register('delete_user_group', $this->get_id());
|
||||
header("Location: /admin/user_groups");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# JELENTEKEZÉS ELFOGADÁSA
|
||||
camp_apply::apply_response($this->get_id(), 4);
|
||||
$new_apply = new camp_apply();
|
||||
$new_apply->set_capp_data_by_id($this->get_id());
|
||||
header('Location: /admin/camps/' . $new_apply->get_capp_camp_id()->get_camp_id());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,85 +1,10 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$action_list_query = "
|
||||
SELECT
|
||||
$action_list_query = "
|
||||
SELECT
|
||||
object_id,
|
||||
timestamp(object_date) as object_date,
|
||||
object_type,
|
||||
(SELECT
|
||||
count(distinct date(tr_date))
|
||||
FROM
|
||||
presence
|
||||
JOIN
|
||||
training ON tr_id = pr_training_tr_id
|
||||
WHERE
|
||||
YEAR(tr_date) = YEAR(object_date)
|
||||
AND MONTH(tr_date) = MONTH(object_date)
|
||||
AND tr_date <= object_date
|
||||
AND pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
AND tr_date > (select
|
||||
if(max(trd) is null,
|
||||
'1900-01-01',
|
||||
max(trd))
|
||||
from
|
||||
(select
|
||||
tr_date trd
|
||||
from
|
||||
presence
|
||||
join training ON tr_id = pr_training_tr_id
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
and tr_date >= (SELECT
|
||||
tr_date
|
||||
from
|
||||
presence
|
||||
join training ON tr_id = pr_training_tr_id
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
and date(tr_date) = uk_first_training
|
||||
ORDER BY tr_date ASC
|
||||
limit 1)
|
||||
order by tr_date ASC
|
||||
limit 2) as elso_ket_edzes)) as 'training_per_month',
|
||||
(SELECT
|
||||
count(pr_id)
|
||||
FROM
|
||||
presence
|
||||
JOIN
|
||||
training ON tr_id = pr_training_tr_id
|
||||
WHERE
|
||||
DATE(tr_date) = DATE(object_date)
|
||||
AND tr_date <= object_date
|
||||
AND pr_user_kid_uk_id = ".$user->get_uk_id().") as 'training_per_day',
|
||||
(select
|
||||
if(sum(if(trd = object_date, 1, 0)) > 0,
|
||||
1,
|
||||
0)
|
||||
from
|
||||
(select
|
||||
tr_date trd
|
||||
from
|
||||
presence
|
||||
join training ON tr_id = pr_training_tr_id
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
and tr_date >= (SELECT
|
||||
tr_date
|
||||
from
|
||||
presence
|
||||
join training ON tr_id = pr_training_tr_id
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
and date(tr_date) = uk_first_training
|
||||
ORDER BY tr_date ASC
|
||||
limit 1)
|
||||
order by tr_date ASC
|
||||
limit 2) elso2edzes) as 'first_two'
|
||||
object_type
|
||||
FROM
|
||||
((SELECT
|
||||
pr_training_tr_id as object_id,
|
||||
@@ -102,31 +27,31 @@ FROM
|
||||
mod_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
and mod_deleted = 0)) actions
|
||||
order by object_date ASC;
|
||||
";
|
||||
";
|
||||
|
||||
$action_assoc_array = $sql->assoc_array($action_list_query);
|
||||
$action_assoc_array = $sql->assoc_array($action_list_query);
|
||||
|
||||
$actions = array();
|
||||
$de_array = array();
|
||||
foreach ($action_assoc_array as $action) {
|
||||
$actions = array();
|
||||
$de_array = array();
|
||||
foreach ($action_assoc_array as $action) {
|
||||
|
||||
|
||||
if ($action['object_type'] == 'training') {
|
||||
$new_training = new training();
|
||||
$new_training->set_training_data_by_id($action['object_id']);
|
||||
//$actions[] = $new_training;
|
||||
$new_diary_entry = new diary_entry($action['object_id'], $action['object_date'], $action['object_type'], $action['training_per_month'], $action['training_per_day'], $action['first_two'], $new_training);
|
||||
}
|
||||
elseif ($action['object_type'] == 'money_deposit') {
|
||||
$new_mod = new money_deposit();
|
||||
$new_mod->set_mod_data_by_id($action['object_id']);
|
||||
//$actions[] = $new_mod;
|
||||
$new_diary_entry = new diary_entry($action['object_id'], $action['object_date'], $action['object_type'], $action['training_per_month'], $action['training_per_day'], $action['first_two'], null, $new_mod);
|
||||
}
|
||||
if ($action['object_type'] == 'training') {
|
||||
$new_training = new training();
|
||||
$new_training->set_training_data_by_id($action['object_id']);
|
||||
//$actions[] = $new_training;
|
||||
$new_diary_entry = new diary_entry($action['object_id'], $action['object_date'], $action['object_type'], 0, 0, 0, $new_training);
|
||||
}
|
||||
elseif ($action['object_type'] == 'money_deposit') {
|
||||
$new_mod = new money_deposit();
|
||||
$new_mod->set_mod_data_by_id($action['object_id']);
|
||||
//$actions[] = $new_mod;
|
||||
$new_diary_entry = new diary_entry($action['object_id'], $action['object_date'], $action['object_type'], 0, 0, 0, null, $new_mod);
|
||||
}
|
||||
|
||||
$de_array[] = $new_diary_entry;
|
||||
$de_array[] = $new_diary_entry;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//itt csak hivatkozással adjuk át a tömböt, a calculate_balance kiszámolja, belerakja és visszadja
|
||||
@@ -137,16 +62,16 @@ order by object_date ASC;
|
||||
$balance_transfer = 0;
|
||||
}
|
||||
|
||||
$de_array = array_reverse($de_array);
|
||||
$de_array = array_reverse($de_array);
|
||||
//$de_array[] = $first_entry;
|
||||
//var_dump($de_array);
|
||||
//var_dump($de_array);
|
||||
//$smarty->assign('actions', $actions);
|
||||
$smarty->assign('actions', $de_array);
|
||||
$smarty->assign('balance_transfer', $balance_transfer);
|
||||
$smarty->assign('balance_transfer', $balance_transfer);
|
||||
|
||||
//$smarty->assign('balance', $balance);
|
||||
$smarty->display('user_diary.tpl');
|
||||
//$smarty->assign('balance', $balance);
|
||||
$smarty->display('user_diary.tpl');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
# BACKUP DOWNLOAD
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
$backup = new backup();
|
||||
$backup->set_backup_data_by_id($this->get_id());
|
||||
|
||||
$filename = "\backup\/".$backup->get_bu_name() . "\.sql";
|
||||
|
||||
header('Content-Type: application/octet-stream');
|
||||
header("Content-Transfer-Encoding: Binary");
|
||||
//header("Content-disposition: attachment; filename='backup/".$backup->get_bu_name().".sql'");
|
||||
//header("Content-disposition: attachment; filename=\"backup/".$backup->get_bu_name().".sql\"");
|
||||
header("Content-disposition: attachment; filename=\"".$filename."\"");
|
||||
|
||||
//var_dump(is_file("backup/".$backup->get_bu_name() . ".sql"));
|
||||
|
||||
//header('Location: /admin/settings/3');
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# NEM LEHET
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# EMAIL LOG RÉSZLETEK
|
||||
|
||||
$email_log = new email_log();
|
||||
$email_log->set_el_data_by_id($this->get_id());
|
||||
|
||||
$smarty->assign('email', $email_log);
|
||||
$smarty->display('email.tpl');
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# EMAIL LISTA (50 / oldal)
|
||||
|
||||
$all_emails_query = "SELECT count(DISTINCT el_id) FROM email_log";
|
||||
$emails_query = "SELECT * FROM email_log ORDER BY el_sent_date DESC LIMIT ".($this->is_id()?($this->get_id()-1) * 50:"0").",50";
|
||||
$el_assoc_array = $sql->assoc_array($emails_query);
|
||||
$el_count = $sql->single_variable($all_emails_query);
|
||||
$next_link = true;
|
||||
|
||||
$el_array = array();
|
||||
foreach ($el_assoc_array as $key => $el) {
|
||||
$new_el = new email_log();
|
||||
$new_el->set_el_data_by_id($el['el_id']);
|
||||
$el_array[] = $new_el;
|
||||
}
|
||||
|
||||
$fold = $el_count > 50;
|
||||
|
||||
if ($el_count <= $this->get_id()*50) {
|
||||
$next_link = false;
|
||||
}
|
||||
|
||||
$smarty->assign('el_array', $el_array);
|
||||
$smarty->assign('fold', $fold);
|
||||
$smarty->assign('next_id', $next_link?$this->get_id()+1:false);
|
||||
$smarty->assign('previous_id', ($this->get_id()>1?$this->get_id()-1:false));
|
||||
|
||||
$smarty->display('emails.tpl');
|
||||
}
|
||||
else {
|
||||
header("Location: /admin/emails/1");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,17 +1,14 @@
|
||||
<?php
|
||||
|
||||
# INFORMÁCIÓK
|
||||
# INFORMÁCIÓK
|
||||
|
||||
$info_query = "SELECT set_id FROM setting_value JOIN setting ON setv_setting_set_id = set_id WHERE set_name = 'Információk'";
|
||||
|
||||
$setv_id = $sql->single_variable($info_query);
|
||||
|
||||
$new_setval = new setting_value();
|
||||
$new_setval->set_setting_value_data_by_id($setv_id);
|
||||
$smarty->assign('setting', $new_setval);
|
||||
|
||||
$smarty->display('information.tpl');
|
||||
$info_query = "SELECT set_id FROM setting_value JOIN setting ON setv_setting_set_id = set_id WHERE set_name = 'Információk'";
|
||||
|
||||
$setv_id = $sql->single_variable($info_query);
|
||||
|
||||
$new_setval = new setting_value();
|
||||
$new_setval->set_setting_value_data_by_id($setv_id);
|
||||
$smarty->assign('setting', $new_setval);
|
||||
|
||||
$smarty->display('information.tpl');
|
||||
?>
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA VAN ID, AKKOR PROFIL FELTÖLTÉS
|
||||
|
||||
if ($this->is_id()) {
|
||||
switch ($this->get_id()) {
|
||||
case '1':
|
||||
$smarty->assign('error', 'Nem található a fájlnévvel egyező gyerek a rendszerben!');
|
||||
break;
|
||||
case '2':
|
||||
$smarty->assign('error', 'Ismeretlen esemény típus');
|
||||
break;
|
||||
case '3':
|
||||
$smarty->assign('error', 'A fájlnak szezonnal kell kezdődnie!');
|
||||
break;
|
||||
case 'success':
|
||||
# code...
|
||||
$smarty->assign('success', 'Sikeres feltöltés!');
|
||||
break;
|
||||
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
# PROFIL FELTÖLTÉS
|
||||
}
|
||||
|
||||
$smarty->display('upload_milestone.tpl');
|
||||
|
||||
?>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR VÁROSLISTA
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# VÁROS SZERKESZTÉSE
|
||||
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# VÁROS LISTA
|
||||
|
||||
//megnézzük, hogy adott-e meg felelős kapcsolattartót
|
||||
//ha nem, akkor a 3-as oldalon kilistázzuk a megadott kapcsolattartókat, és kattintással lehet választani
|
||||
//ha igen, akkor a negyedik oldalra megyünk
|
||||
if (camp_apply::has_responsible_contact($_COOKIE['badminton_camp_session_id'])) {
|
||||
header('Location: /tabor/jelentkezes/4');
|
||||
}
|
||||
else {
|
||||
header('Location: /tabor/jelentkezes/3');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# JELENTEKEZÉS ELFOGADÁSA
|
||||
camp_apply::apply_response($this->get_id(), 6);
|
||||
$new_apply = new camp_apply();
|
||||
$new_apply->set_capp_data_by_id($this->get_id());
|
||||
header('Location: /admin/camps/' . $new_apply->get_capp_camp_id()->get_camp_id());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -3,68 +3,68 @@
|
||||
# HA NINCS ID, AKKOR BEÁLLÍTÁSOK
|
||||
# HA VAN ID, AKKOR ADOTT BEÁLLÍTÁS
|
||||
if ($this->is_id()) {
|
||||
# ADOTT BEÁLLÍTÁS
|
||||
# ADOTT BEÁLLÍTÁS
|
||||
|
||||
//először ellenőrizzük, hogy létezik-e hozzá setting_value, ha nem, akkor létrehozzuk
|
||||
if (!$sql->num_of_rows('SELECT * FROM setting_value WHERE setv_setting_set_id = ' . $this->get_id())) {
|
||||
$new_set = new setting();
|
||||
$new_set->set_setting_data_by_id($this->get_id());
|
||||
$new_setting_value_id = $sql->insert_into('setting_value', array(
|
||||
'setv_set_date' => date('Y-m-d H:i:s'),
|
||||
'setv_setting_set_id' => $this->get_id()
|
||||
));
|
||||
}
|
||||
$new_setting = new setting_value();
|
||||
$new_setting->set_setting_value_data_by_id($this->get_id());
|
||||
//először ellenőrizzük, hogy létezik-e hozzá setting_value, ha nem, akkor létrehozzuk
|
||||
if (!$sql->num_of_rows('SELECT * FROM setting_value WHERE setv_setting_set_id = ' . $this->get_id())) {
|
||||
$new_set = new setting();
|
||||
$new_set->set_setting_data_by_id($this->get_id());
|
||||
$new_setting_value_id = $sql->insert_into('setting_value', array(
|
||||
'setv_set_date' => date('Y-m-d H:i:s'),
|
||||
'setv_setting_set_id' => $this->get_id()
|
||||
));
|
||||
}
|
||||
$new_setting = new setting_value();
|
||||
$new_setting->set_setting_value_data_by_id($this->get_id());
|
||||
|
||||
if ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 1) {
|
||||
//textarea
|
||||
}
|
||||
if ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 1) {
|
||||
//textarea
|
||||
}
|
||||
|
||||
elseif ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 2) {
|
||||
//biztonsági mentés
|
||||
$backup_assoc_array = $sql->assoc_array("SELECT * FROM backup WHERE bu_deleted = 0 ORDER BY bu_date DESC, bu_id DESC limit 14;");
|
||||
$backups = array();
|
||||
foreach ($backup_assoc_array as $value) {
|
||||
$new_backup = new backup();
|
||||
$new_backup->set_backup_data_by_id($value['bu_id']);
|
||||
$backups[] = $new_backup;
|
||||
}
|
||||
$smarty->assign('backups', $backups);
|
||||
}
|
||||
elseif ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 2) {
|
||||
//biztonsági mentés
|
||||
$backup_assoc_array = $sql->assoc_array("SELECT * FROM backup WHERE bu_deleted = 0 ORDER BY bu_date DESC, bu_id DESC limit 14;");
|
||||
$backups = array();
|
||||
foreach ($backup_assoc_array as $value) {
|
||||
$new_backup = new backup();
|
||||
$new_backup->set_backup_data_by_id($value['bu_id']);
|
||||
$backups[] = $new_backup;
|
||||
}
|
||||
$smarty->assign('backups', $backups);
|
||||
}
|
||||
|
||||
elseif ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 3) {
|
||||
//url -> hozzáfűzi az admin után a varcharban lévő url-t
|
||||
header('Location: /admin/' . $new_setting->get_setv_varchar());
|
||||
}
|
||||
elseif ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 3) {
|
||||
//url -> hozzáfűzi az admin után a varcharban lévő url-t
|
||||
header('Location: /admin/' . $new_setting->get_setv_varchar());
|
||||
}
|
||||
|
||||
elseif ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 4) {
|
||||
elseif ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 4) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$smarty->assign("setting", $new_setting);
|
||||
$smarty->assign("setting", $new_setting);
|
||||
|
||||
$smarty->display("setting_data_edit.tpl");
|
||||
$smarty->display("setting_data_edit.tpl");
|
||||
|
||||
}
|
||||
else {
|
||||
# BEÁLLÍTÁSOK
|
||||
# BEÁLLÍTÁSOK
|
||||
|
||||
$settings_query = "SELECT * FROM setting ORDER BY set_name ASC";
|
||||
$settings_assoc_array = $sql->assoc_array($settings_query);
|
||||
$settings_query = "SELECT * FROM setting ORDER BY set_name ASC";
|
||||
$settings_assoc_array = $sql->assoc_array($settings_query);
|
||||
|
||||
$settings = array();
|
||||
$settings = array();
|
||||
|
||||
foreach ($settings_assoc_array as $value) {
|
||||
$new_setting = new setting();
|
||||
$new_setting->set_setting_data_by_id($value['set_id']);
|
||||
$settings[] = $new_setting;
|
||||
}
|
||||
foreach ($settings_assoc_array as $value) {
|
||||
$new_setting = new setting();
|
||||
$new_setting->set_setting_data_by_id($value['set_id']);
|
||||
$settings[] = $new_setting;
|
||||
}
|
||||
|
||||
$smarty->assign('settings',$settings);
|
||||
$smarty->display('settings.tpl');
|
||||
$smarty->assign('settings',$settings);
|
||||
$smarty->display('settings.tpl');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
// Import PHPMailer classes into the global namespace
|
||||
// These must be at the top of your script, not inside a function
|
||||
//use PHPMailer\PHPMailer\PHPMailer;
|
||||
//use PHPMailer\PHPMailer\Exception;
|
||||
|
||||
//Load Composer's autoloader
|
||||
//require 'vendor/autoload.php';
|
||||
|
||||
$mail = new PHPMailer(true); // Passing `true` enables exceptions
|
||||
try {
|
||||
//Server settings
|
||||
$mail->SMTPDebug = 2; // Enable verbose debug output
|
||||
$mail->isSMTP(); // Set mailer to use SMTP
|
||||
$mail->Host = 'mail.gginternet.com '; // Specify main and backup SMTP servers
|
||||
$mail->SMTPAuth = true; // Enable SMTP authentication
|
||||
$mail->Username = 'hirlevel@tollaslabda.info'; // SMTP username
|
||||
$mail->Password = 'tollas12'; // SMTP password
|
||||
$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
|
||||
$mail->Port = 465; // TCP port to connect to
|
||||
|
||||
//Recipients
|
||||
$mail->setFrom('from@example.com', 'Mailer');
|
||||
$mail->addAddress('tricsusz@gmail.com', 'Tóth Richárd'); // Add a recipient
|
||||
//$mail->addAddress('ellen@example.com'); // Name is optional
|
||||
//$mail->addReplyTo('info@example.com', 'Information');
|
||||
//$mail->addCC('cc@example.com');
|
||||
//$mail->addBCC('bcc@example.com');
|
||||
|
||||
//Attachments
|
||||
//$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
|
||||
//$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
|
||||
|
||||
//Content
|
||||
$mail->isHTML(true); // Set email format to HTML
|
||||
$mail->Subject = 'Here is the subject';
|
||||
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
|
||||
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
|
||||
|
||||
$mail->send();
|
||||
echo 'Message has been sent';
|
||||
} catch (Exception $e) {
|
||||
echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# TÁBORVEZETŐ SZERKESZTÉSE
|
||||
|
||||
$ucl = new user_camp_leader();
|
||||
$ucl->set_user_data_by_id($this->get_id());
|
||||
|
||||
$smarty->assign('user', $ucl);
|
||||
$smarty->display('user_camp_leader_data_edit.tpl');
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# TÁBORVEZETŐ LISTA
|
||||
|
||||
$ucl_assoc_array = $sql->assoc_array("SELECT * FROM user_camp_leader WHERE ucl_deleted = 0 ORDER BY ucl_name ASC;");
|
||||
$ucl_array = array();
|
||||
foreach ($ucl_assoc_array as $ucl) {
|
||||
$new_ucl = new user_camp_leader();
|
||||
$new_ucl->set_user_data_by_id($ucl['ucl_id']);
|
||||
$ucl_array[] = $new_ucl;
|
||||
}
|
||||
|
||||
$smarty->assign('ucl_array', $ucl_array);
|
||||
$smarty->display('user_camp_leader_list.tpl');
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
# HA NINCS ID, AKKOR CSOPORTLISTA
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
# CSOPORT SZERKESZTÉSE /TAGLISTA
|
||||
|
||||
$group = new user_group();
|
||||
$group->set_ug_data_by_id($this->get_id());
|
||||
|
||||
$smarty->assign('user_group', $group);
|
||||
$smarty->display('user_group_data_edit.tpl');
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
# CSOPORT LISTA
|
||||
|
||||
$group_query = "SELECT * FROM user_group WHERE ug_deleted = 0 ORDER By ug_name ASC;";
|
||||
$group_assoc_array = $sql->assoc_array($group_query);
|
||||
|
||||
$group_array = array();
|
||||
foreach ($group_assoc_array as $group) {
|
||||
$new_ug = new user_group();
|
||||
$new_ug->set_ug_data_by_id($group['ug_id']);
|
||||
$group_array[] = $new_ug;
|
||||
}
|
||||
|
||||
$smarty->assign('user_group_array',$group_array);
|
||||
$smarty->display('user_group_list.tpl');
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,29 +3,27 @@
|
||||
# HA NINCS ID, AKKOR SEMMI
|
||||
# HA VAN ID, AKKOR BEFIZETÉS / USER
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
# USERHEZ TARTOZÓ BEFIZETÉSEK
|
||||
$user_mod_query = "SELECT * FROM money_deposit WHERE mod_user_kid_uk_id = " . $this->get_id() . " and mod_deleted = 0 ORDER BY mod_date DESC;";
|
||||
$umod_assoc_array = $sql->assoc_array($user_mod_query);
|
||||
# USERHEZ TARTOZÓ BEFIZETÉSEK
|
||||
$user_mod_query = "SELECT * FROM money_deposit JOIN money_income ON mi_id = mod_money_income_mi_id WHERE mod_user_kid_uk_id = " . $this->get_id() . " and mod_deleted = 0 ORDER BY mi_date DESC;";
|
||||
$umod_assoc_array = $sql->assoc_array($user_mod_query);
|
||||
|
||||
$mods = array();
|
||||
foreach ($umod_assoc_array as $key => $value) {
|
||||
$new_mod = new money_deposit();
|
||||
$new_mod->set_mod_data_by_id($value['mod_id']);
|
||||
$mods[] = $new_mod;
|
||||
}
|
||||
$mods = array();
|
||||
foreach ($umod_assoc_array as $key => $value) {
|
||||
$new_mod = new money_deposit();
|
||||
$new_mod->set_mod_data_by_id($value['mod_id']);
|
||||
$mods[] = $new_mod;
|
||||
}
|
||||
|
||||
$smarty->assign("mod_array", $mods);
|
||||
$smarty->assign("balance", $sql->single_variable('SELECT uk_balance FROM user_kid WHERE uk_id = ' . $this->get_id()));
|
||||
$smarty->assign("mod_user_kid_id", $this->get_id());
|
||||
$smarty->display("view_deposit.tpl");
|
||||
|
||||
$smarty->assign("mod_array", $mods);
|
||||
$smarty->assign("balance", $sql->single_variable('SELECT uk_balance FROM user_kid WHERE uk_id = ' . $this->get_id()));
|
||||
$smarty->assign("mod_user_kid_id", $this->get_id());
|
||||
$smarty->display("view_deposit.tpl");
|
||||
|
||||
}
|
||||
else {
|
||||
# EMPTY
|
||||
# EMPTY
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user