camp fixes; cookie box
This commit is contained in:
@@ -202,6 +202,11 @@ class camp
|
||||
return $sql->num_of_rows("select * from camp join camp_apply on capp_camp_id = camp_id where capp_status = 2 AND camp_id = " . $this->get_camp_id());
|
||||
}
|
||||
|
||||
public function has_deleted_apply() {
|
||||
global $sql;
|
||||
return $sql->num_of_rows("select * from camp join camp_apply on capp_camp_id = camp_id where capp_status = 5 AND camp_id = " . $this->get_camp_id());
|
||||
}
|
||||
|
||||
|
||||
public function set_camp_data_by_id($_camp_id) {
|
||||
global $sql;
|
||||
|
||||
@@ -216,6 +216,11 @@ class camp_apply {
|
||||
$sql->update_table('camp_apply', array('capp_status' => $_status_id, 'capp_accept_date' => date("Y-m-d H:i:s")), array('capp_id' => $_apply_id));
|
||||
}
|
||||
|
||||
public static function has_contact($_capp_id) {
|
||||
global $sql;
|
||||
return $sql->num_of_rows('SELECT * FROM camp_apply_contact WHERE cac_camp_apply_capp_id = ' . $_capp_id . ';');
|
||||
}
|
||||
|
||||
public function set_capp_data_by_id($_id) {
|
||||
global $sql;
|
||||
$capp_data_assoc_array = $sql->assoc_array("select * from camp_apply where capp_id = " . $_id);
|
||||
@@ -246,6 +251,14 @@ class camp_apply {
|
||||
}
|
||||
}
|
||||
|
||||
public function get_responsible_contact() {
|
||||
global $sql;
|
||||
$cc_id = $sql->single_variable("SELECT cac_camp_contact_cc_id FROM camp_apply_contact WHERE cac_camp_apply_capp_id = " . $this->get_capp_id() . " AND cac_is_responsible = 1;");
|
||||
$cc = new camp_contact();
|
||||
$cc->set_cc_data_by_id($cc_id);
|
||||
return $cc;
|
||||
}
|
||||
|
||||
//egy létező jelentkezésnél felelős kapcsolattartóra állít valakit
|
||||
public static function make_contact_responsible($_apply_id, $_cc_id, $_is_responsible = false) {
|
||||
global $sql;
|
||||
|
||||
@@ -198,6 +198,10 @@ class page {
|
||||
# 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');
|
||||
break;
|
||||
case 'apply':
|
||||
# TÁBORI JELENTKEZŐ ADATAINAK MEGTEKINTÉSE
|
||||
include('include_apply.php');
|
||||
@@ -355,14 +359,22 @@ class page {
|
||||
include('include_camp_apply.php');
|
||||
break;
|
||||
case 'jelentkezesek':
|
||||
# jelentkezés
|
||||
# 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');
|
||||
break;
|
||||
case 'logout':
|
||||
# kijelentkezés
|
||||
$from = "tabor";
|
||||
include('include_logout.php');
|
||||
break;
|
||||
case 'delete_apply':
|
||||
# jelentkezés törlése
|
||||
include('include_delete_apply.php');
|
||||
break;
|
||||
default:
|
||||
include('include_camp_information.php');
|
||||
break;
|
||||
@@ -379,11 +391,15 @@ class 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);
|
||||
setcookie('bc_reg_error', null, time()-60*60*3, '/');
|
||||
}
|
||||
$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, '/');
|
||||
}
|
||||
$smarty->display("login.tpl");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user