camp fixes; cookie box
This commit is contained in:
@@ -1,11 +1,31 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR ÁTIRÁNYÍTÉS /1-re
|
||||
|
||||
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');
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -72,14 +72,17 @@ if ($this->is_id()) {
|
||||
|
||||
$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));
|
||||
|
||||
@@ -92,9 +92,22 @@ if ($this->is_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('color', $color);
|
||||
$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);
|
||||
|
||||
23
_include/include_delete_apply.php
Normal file
23
_include/include_delete_apply.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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 {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
34
_include/include_move_next.php
Normal file
34
_include/include_move_next.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
21
_include/include_remove_apply.php
Normal file
21
_include/include_remove_apply.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user