CAMP part 1, registration, apply, new login screen, wide layout
This commit is contained in:
13
_ajax/get_camp_accomodation_list.php
Executable file
13
_ajax/get_camp_accomodation_list.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
ini_set('include_path', '../_class/');
|
||||
include('class_sql.php');
|
||||
|
||||
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach');
|
||||
else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');
|
||||
|
||||
|
||||
//lekérjük a labda típusokat
|
||||
$accom_assoc_array = $sql->assoc_array("SELECT * FROM camp_accomodation JOIN camp_accomodation_type on cat_id = ca_accomodation_id WHERE ca_camp_id = " . $_POST['camp_id']);
|
||||
|
||||
echo json_encode($accom_assoc_array);
|
||||
?>
|
||||
13
_ajax/get_camp_contact_data.php
Executable file
13
_ajax/get_camp_contact_data.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
ini_set('include_path', '../_class/');
|
||||
include('class_sql.php');
|
||||
|
||||
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach');
|
||||
else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');
|
||||
|
||||
|
||||
//lekérjük a labda típusokat
|
||||
$cc_assoc_array = $sql->assoc_array("SELECT * FROM camp_contact WHERE cc_id = " . $_POST['camp_contact_id']);
|
||||
|
||||
echo json_encode($cc_assoc_array);
|
||||
?>
|
||||
13
_ajax/get_camp_kid_data.php
Executable file
13
_ajax/get_camp_kid_data.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
ini_set('include_path', '../_class/');
|
||||
include('class_sql.php');
|
||||
|
||||
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach');
|
||||
else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');
|
||||
|
||||
|
||||
//lekérjük a labda típusokat
|
||||
$ck_assoc_array = $sql->assoc_array("SELECT * FROM camp_kid WHERE ck_id = " . $_POST['camp_kid_id']);
|
||||
|
||||
echo json_encode($ck_assoc_array);
|
||||
?>
|
||||
18
_ajax/get_camp_shuttle_list.php
Executable file
18
_ajax/get_camp_shuttle_list.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
ini_set('include_path', '../_class/');
|
||||
include('class_sql.php');
|
||||
|
||||
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach');
|
||||
else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');
|
||||
|
||||
|
||||
//lekérjük a labda típusokat
|
||||
$shuttle_assoc_array = $sql->assoc_array("SELECT * FROM camp_shuttle JOIN camp_shuttle_type on cst_id = cs_shuttle_id WHERE cs_camp_id = " . $_POST['camp_id']);
|
||||
|
||||
$shuttle_array = array();
|
||||
foreach ($shuttle_assoc_array as $shuttle) {
|
||||
$shuttle_array[$shuttle['cst_id']] = $shuttle['cst_name'];
|
||||
}
|
||||
|
||||
echo json_encode($shuttle_assoc_array);
|
||||
?>
|
||||
292
_class/class_camp.php
Normal file
292
_class/class_camp.php
Normal file
@@ -0,0 +1,292 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* tábor osztály
|
||||
*/
|
||||
class camp
|
||||
{
|
||||
private $camp_id;
|
||||
private $camp_city;
|
||||
private $camp_from;
|
||||
private $camp_to;
|
||||
private $camp_camp_type_ct_id; //ID
|
||||
private $camp_type; //OBJ
|
||||
private $camp_shuttle = array(); //array
|
||||
private $camp_sleep;
|
||||
private $camp_deleted;
|
||||
private $camp_is_open;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value of camp_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_camp_id()
|
||||
{
|
||||
return $this->camp_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of camp_id.
|
||||
*
|
||||
* @param mixed $camp_id the camp id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_camp_id($camp_id)
|
||||
{
|
||||
$this->camp_id = $camp_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of camp_city.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_camp_city()
|
||||
{
|
||||
return $this->camp_city;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of camp_city.
|
||||
*
|
||||
* @param mixed $camp_city the camp city
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_camp_city($camp_city)
|
||||
{
|
||||
$this->camp_city = $camp_city;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of camp_from.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_camp_from()
|
||||
{
|
||||
return $this->camp_from;
|
||||
}
|
||||
|
||||
public function get_camp_from_day() {
|
||||
$day = date("d", strtotime($this->camp_from));
|
||||
if (substr($day, 0, 1) == '0') return substr($day, 1, 1);
|
||||
return date("d", strtotime($this->camp_from));
|
||||
}
|
||||
|
||||
public function get_camp_to_day() {
|
||||
$day = date("d", strtotime($this->camp_to));
|
||||
if (substr($day, 0, 1) == '0') return substr($day, 1, 1);
|
||||
return date("d", strtotime($this->camp_to));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of camp_from.
|
||||
*
|
||||
* @param mixed $camp_from the camp from
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_camp_from($camp_from)
|
||||
{
|
||||
$this->camp_from = $camp_from;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of camp_to.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_camp_to()
|
||||
{
|
||||
return $this->camp_to;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of camp_to.
|
||||
*
|
||||
* @param mixed $camp_to the camp to
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_camp_to($camp_to)
|
||||
{
|
||||
$this->camp_to = $camp_to;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of camp_camp_type_ct_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_camp_camp_type_ct_id()
|
||||
{
|
||||
return $this->camp_camp_type_ct_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of camp_camp_type_ct_id.
|
||||
*
|
||||
* @param mixed $camp_camp_type_ct_id the camp camp type ct id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_camp_camp_type_ct_id($camp_camp_type_ct_id)
|
||||
{
|
||||
$this->camp_camp_type_ct_id = $camp_camp_type_ct_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of camp_type.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_camp_type()
|
||||
{
|
||||
return $this->camp_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of camp_type.
|
||||
*
|
||||
* @param mixed $camp_type the camp type
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_camp_type($camp_type)
|
||||
{
|
||||
$this->camp_type = $camp_type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function get_camp_deleted() {
|
||||
return $this->camp_deleted;
|
||||
}
|
||||
|
||||
private function set_camp_deleted($_item) {
|
||||
$this->camp_deleted = $_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_camp_is_open() {
|
||||
return $this->camp_is_open;
|
||||
}
|
||||
|
||||
private function set_camp_is_open($_item) {
|
||||
$this->camp_is_open = $_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function has_pending_apply() {
|
||||
global $sql;
|
||||
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 set_camp_data_by_id($_camp_id) {
|
||||
global $sql;
|
||||
$camp_data_assoc_array = $sql->assoc_array("select * from camp where camp_id = " . $_camp_id);
|
||||
$camp_data_array = $camp_data_assoc_array[0];
|
||||
//alapadatok
|
||||
foreach ($camp_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
if ('camp_camp_type_ct_id' == $field) {
|
||||
$new_ct = new camp_type();
|
||||
$new_ct->set_ct_data_by_id($value);
|
||||
$this->set_camp_type($new_ct);
|
||||
}
|
||||
}
|
||||
|
||||
//labdatípusok hozzáadása tömbbe
|
||||
$shuttle_assoc_array = $sql->assoc_array("SELECT cs_shuttle_id FROM camp_shuttle WHERE cs_camp_id = " . $_camp_id . ";");
|
||||
if (!empty($shuttle_assoc_array)) {
|
||||
foreach ($shuttle_assoc_array as $shuttle_array) {
|
||||
$this->camp_shuttle[] = $shuttle_array['cs_shuttle_id'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static function create_camp($_city, $_from, $_to, $_is_open, $_ct_id, $_shuttles, $_accoms) {
|
||||
global $sql;
|
||||
|
||||
$new_camp_id = $sql->insert_into('camp',array(
|
||||
'camp_city' => $_city,
|
||||
'camp_from' => $_from,
|
||||
'camp_to' => $_to,
|
||||
'camp_is_open' => $_is_open,
|
||||
'camp_camp_type_ct_id' => $_ct_id
|
||||
));
|
||||
|
||||
if (!empty($_shuttles)) {
|
||||
foreach ($_shuttles as $_shuttle_id) {
|
||||
$sql->insert_into('camp_shuttle', array('cs_camp_id' => $new_camp_id, 'cs_shuttle_id' => $_shuttle_id));
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($_accoms)) {
|
||||
foreach ($_accoms as $_accom_id) {
|
||||
$sql->insert_into('camp_accomodation', array('ca_camp_id' => $new_camp_id, 'ca_accomodation_id' => $_accom_id));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function update_camp($_city, $_from, $_to, $_is_open, $_ct_id, $_shuttles, $_accoms, $_camp_id) {
|
||||
global $sql;
|
||||
|
||||
$new_camp_id = $sql->update_table('camp',array(
|
||||
'camp_city' => $_city,
|
||||
'camp_from' => $_from,
|
||||
'camp_to' => $_to,
|
||||
'camp_is_open' => $_is_open,
|
||||
'camp_camp_type_ct_id' => $_ct_id
|
||||
),
|
||||
array(
|
||||
'camp_id' => $_camp_id
|
||||
)
|
||||
);
|
||||
|
||||
//kitöröljük a korábbi shuttle és accom sorokat
|
||||
$sql->execute_query('DELETE FROM camp_shuttle WHERE cs_camp_id = ' . $_camp_id);
|
||||
$sql->execute_query('DELETE FROM camp_accomodation WHERE ca_camp_id = ' . $_camp_id);
|
||||
|
||||
if (!empty($_shuttles)) {
|
||||
foreach ($_shuttles as $_shuttle_id) {
|
||||
$sql->insert_into('camp_shuttle', array('cs_camp_id' => $_camp_id, 'cs_shuttle_id' => $_shuttle_id));
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($_accoms)) {
|
||||
foreach ($_accoms as $_accom_id) {
|
||||
$sql->insert_into('camp_accomodation', array('ca_camp_id' => $_camp_id, 'ca_accomodation_id' => $_accom_id));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
82
_class/class_camp_accomodation_type.php
Normal file
82
_class/class_camp_accomodation_type.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SHUTTLE
|
||||
*/
|
||||
class camp_accomodation_type
|
||||
{
|
||||
private $cat_id;
|
||||
private $cat_name;
|
||||
private $cat_deleted;
|
||||
|
||||
/**
|
||||
* Gets the value of cat_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cat_id()
|
||||
{
|
||||
return $this->cat_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cat_id.
|
||||
*
|
||||
* @param mixed $cat_id the cat id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cat_id($cat_id)
|
||||
{
|
||||
$this->cat_id = $cat_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cat_name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cat_name()
|
||||
{
|
||||
return $this->cat_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cat_name.
|
||||
*
|
||||
* @param mixed $cat_name the cat name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cat_name($cat_name)
|
||||
{
|
||||
$this->cat_name = $cat_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function set_cat_deleted($_item) {
|
||||
$this->cat_deleted = $_item;
|
||||
}
|
||||
|
||||
public function get_cat_deleted($_item) {
|
||||
return $this->cat_deleted;
|
||||
}
|
||||
|
||||
public function set_cat_data_by_id($_cat_id) {
|
||||
global $sql;
|
||||
$cat_assoc_array = $sql->assoc_array("select * from camp_accomodation_type where cat_id = " . $_cat_id);
|
||||
$cat_array = $cat_assoc_array[0];
|
||||
//alapadatok
|
||||
foreach ($cat_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
294
_class/class_camp_apply.php
Normal file
294
_class/class_camp_apply.php
Normal file
@@ -0,0 +1,294 @@
|
||||
<?php
|
||||
|
||||
class camp_apply {
|
||||
private $capp_id;
|
||||
private $capp_camp_kid_ck_id;
|
||||
private $capp_accomodation_type = null;
|
||||
private $capp_shuttle_type = null;
|
||||
private $capp_date = null;
|
||||
private $capp_status = null;
|
||||
private $capp_accept_date = null;
|
||||
private $capp_camp_id = null;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* get_s the value of capp_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_capp_id()
|
||||
{
|
||||
return $this->capp_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of capp_id.
|
||||
*
|
||||
* @param mixed $capp_id the capp id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_capp_id($capp_id)
|
||||
{
|
||||
$this->capp_id = $capp_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_s the value of capp_camp_kid_ck_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_capp_camp_kid_ck_id()
|
||||
{
|
||||
return $this->capp_camp_kid_ck_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of capp_camp_kid_ck_id.
|
||||
*
|
||||
* @param mixed $capp_camp_kid_ck_id the capp camp user ck id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_capp_camp_kid_ck_id($capp_camp_kid_ck_id)
|
||||
{
|
||||
$this->capp_camp_kid_ck_id = $capp_camp_kid_ck_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_s the value of capp_accomodation_type.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_capp_accomodation_type()
|
||||
{
|
||||
return $this->capp_accomodation_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of capp_accomodation_type.
|
||||
*
|
||||
* @param mixed $capp_accomodation_type the capp accomodation type
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_capp_accomodation_type($capp_accomodation_type)
|
||||
{
|
||||
$this->capp_accomodation_type = $capp_accomodation_type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_s the value of capp_shuttle_type.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_capp_shuttle_type()
|
||||
{
|
||||
return $this->capp_shuttle_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of capp_shuttle_type.
|
||||
*
|
||||
* @param mixed $capp_shuttle_type the capp shuttle type
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_capp_shuttle_type($capp_shuttle_type)
|
||||
{
|
||||
$this->capp_shuttle_type = $capp_shuttle_type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_s the value of capp_date.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_capp_date()
|
||||
{
|
||||
return $this->capp_date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of capp_date.
|
||||
*
|
||||
* @param mixed $capp_date the capp date
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_capp_date($capp_date)
|
||||
{
|
||||
$this->capp_date = $capp_date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_s the value of capp_status.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_capp_status()
|
||||
{
|
||||
return $this->capp_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of capp_status.
|
||||
*
|
||||
* @param mixed $capp_status the capp status
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function set_capp_status($capp_status)
|
||||
{
|
||||
$this->capp_status = $capp_status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_s the value of capp_accept_date.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_capp_accept_date()
|
||||
{
|
||||
return $this->capp_accept_date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of capp_accept_date.
|
||||
*
|
||||
* @param mixed $capp_accept_date the capp accept date
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_capp_accept_date($capp_accept_date)
|
||||
{
|
||||
$this->capp_accept_date = $capp_accept_date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_s the value of capp_camp_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_capp_camp_id()
|
||||
{
|
||||
return $this->capp_camp_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of capp_camp_id.
|
||||
*
|
||||
* @param mixed $capp_camp_id the capp camp id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_capp_camp_id($capp_camp_id)
|
||||
{
|
||||
$this->capp_camp_id = $capp_camp_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
//STATIC!
|
||||
public static function has_responsible_contact($_capp_id) {
|
||||
global $sql;
|
||||
return $sql->num_of_rows('SELECT * FROM camp_apply_contact WHERE cac_camp_apply_capp_id = ' . $_capp_id . ' AND cac_is_responsible = 1;');
|
||||
}
|
||||
|
||||
public static function apply_response($_apply_id, $_status_id) {
|
||||
global $sql;
|
||||
$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 function set_capp_data_by_id($_id) {
|
||||
global $sql;
|
||||
$capp_data_assoc_array = $sql->assoc_array("select * from camp_apply where capp_id = " . $_id);
|
||||
$capp_array = $capp_data_assoc_array[0];
|
||||
foreach ($capp_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
if ($field == 'capp_camp_kid_ck_id') {
|
||||
$new_kid = new camp_kid();
|
||||
$new_kid->set_ck_data_by_id($value);
|
||||
$this->$function_name($new_kid);
|
||||
}
|
||||
if ($field == 'capp_accomodation_type') {
|
||||
$new_cat = new camp_accomodation_type();
|
||||
$new_cat->set_cat_data_by_id($value);
|
||||
$this->$function_name($new_cat);
|
||||
}
|
||||
if ($field == 'capp_shuttle_type') {
|
||||
$new_cst = new camp_shuttle_type();
|
||||
$new_cst->set_cst_data_by_id($value);
|
||||
$this->$function_name($new_cst);
|
||||
}
|
||||
if ($field == 'capp_camp_id') {
|
||||
$new_camp = new camp();
|
||||
$new_camp->set_camp_data_by_id($value);
|
||||
$this->$function_name($new_camp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//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;
|
||||
//TODO: itt majd cac objektumot adjunk át, és akkor nem így kell updatelni hanem primary key alapján
|
||||
$sql->update_table('camp_apply_contact',
|
||||
array(
|
||||
'cac_is_responsible' => $_is_responsible
|
||||
),
|
||||
array(
|
||||
'cac_camp_apply_capp_id' => $_apply_id,
|
||||
'cac_camp_contact_cc_id' => $_cc_id
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public static function create_camp_apply($_camp_kid, $_status = 1, $_camp_accom = 'null', $_camp_shuttle = 'null', $_camp_date = 'null', $_camp_accept_date = 'null', $_camp = 'null') {
|
||||
global $sql;
|
||||
return $sql->insert_into('camp_apply', array(
|
||||
'capp_camp_kid_ck_id' => $_camp_kid,
|
||||
'capp_accomodation_type' => $_camp_accom,
|
||||
'capp_shuttle_type' => $_camp_shuttle,
|
||||
'capp_date' => $_camp_date,
|
||||
'capp_accept_date' => $_camp_accept_date,
|
||||
'capp_status' => $_status,
|
||||
'capp_camp_id' => $_camp,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//ezzel nem lehet kid-et updatelni, arra külön function kell
|
||||
public static function update_camp_apply($_apply_id, $_status = 1, $_camp_accom = 'null', $_camp_shuttle = 'null', $_camp_date = 'null', $_camp_accept_date = 'null', $_camp = 'null') {
|
||||
global $sql;
|
||||
$sql->update_table('camp_apply', array(
|
||||
'capp_accomodation_type' => $_camp_accom,
|
||||
'capp_shuttle_type' => $_camp_shuttle,
|
||||
'capp_date' => $_camp_date,
|
||||
'capp_accept_date' => $_camp_accept_date,
|
||||
'capp_status' => $_status,
|
||||
'capp_camp_id' => $_camp,
|
||||
), array('capp_id' => $_apply_id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
327
_class/class_camp_contact.php
Normal file
327
_class/class_camp_contact.php
Normal file
@@ -0,0 +1,327 @@
|
||||
<?php
|
||||
|
||||
class camp_contact {
|
||||
private $cc_id;
|
||||
private $cc_name;
|
||||
private $cc_mobile;
|
||||
private $cc_email;
|
||||
private $cc_facebook;
|
||||
private $cc_camp_contact_type_cct_id;
|
||||
private $cc_camp_contact_type;
|
||||
private $cc_owner_id;
|
||||
private $cc_owner;
|
||||
private $cc_original_id;
|
||||
private $cc_original;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value of cc_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_id()
|
||||
{
|
||||
return $this->cc_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_id.
|
||||
*
|
||||
* @param mixed $cc_id the cc id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_id($cc_id)
|
||||
{
|
||||
$this->cc_id = $cc_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_name()
|
||||
{
|
||||
return $this->cc_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_name.
|
||||
*
|
||||
* @param mixed $cc_name the cc name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_name($cc_name)
|
||||
{
|
||||
$this->cc_name = $cc_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_mobile.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_mobile()
|
||||
{
|
||||
return $this->cc_mobile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_mobile.
|
||||
*
|
||||
* @param mixed $cc_mobile the cc mobile
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_mobile($cc_mobile)
|
||||
{
|
||||
$this->cc_mobile = $cc_mobile;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_email.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_email()
|
||||
{
|
||||
return $this->cc_email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_email.
|
||||
*
|
||||
* @param mixed $cc_email the cc email
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_email($cc_email)
|
||||
{
|
||||
$this->cc_email = $cc_email;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_facebook.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_facebook()
|
||||
{
|
||||
return $this->cc_facebook;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_facebook.
|
||||
*
|
||||
* @param mixed $cc_facebook the cc facebook
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_facebook($cc_facebook)
|
||||
{
|
||||
$this->cc_facebook = $cc_facebook;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_camp_contact_type_cct_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_camp_contact_type_cct_id()
|
||||
{
|
||||
return $this->cc_camp_contact_type_cct_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_camp_contact_type_cct_id.
|
||||
*
|
||||
* @param mixed $cc_camp_contact_type_cct_id the cc camp contact type cct id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_camp_contact_type_cct_id($cc_camp_contact_type_cct_id)
|
||||
{
|
||||
$this->cc_camp_contact_type_cct_id = $cc_camp_contact_type_cct_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_camp_contact_type.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_camp_contact_type()
|
||||
{
|
||||
return $this->cc_camp_contact_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_camp_contact_type.
|
||||
*
|
||||
* @param mixed $cc_camp_contact_type the cc camp contact type
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_camp_contact_type($cc_camp_contact_type)
|
||||
{
|
||||
$this->cc_camp_contact_type = $cc_camp_contact_type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_owner_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_owner_id()
|
||||
{
|
||||
return $this->cc_owner_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_owner_id.
|
||||
*
|
||||
* @param mixed $cc_owner_id the cc owner id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_owner_id($cc_owner_id)
|
||||
{
|
||||
$this->cc_owner_id = $cc_owner_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_owner.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_owner()
|
||||
{
|
||||
return $this->cc_owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_owner.
|
||||
*
|
||||
* @param mixed $cc_owner the cc owner
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_owner($cc_owner)
|
||||
{
|
||||
$this->cc_owner = $cc_owner;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_original_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_original_id()
|
||||
{
|
||||
return $this->cc_original_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_original_id.
|
||||
*
|
||||
* @param mixed $cc_original_id the cc original id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_original_id($cc_original_id)
|
||||
{
|
||||
$this->cc_original_id = $cc_original_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cc_original.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cc_original()
|
||||
{
|
||||
return $this->cc_original;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cc_original.
|
||||
*
|
||||
* @param mixed $cc_original the cc original
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cc_original($cc_original)
|
||||
{
|
||||
$this->cc_original = $cc_original;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function set_cc_data_by_id($_id) {
|
||||
global $sql;
|
||||
$cc_data_assoc_array = $sql->assoc_array("select * from camp_contact where cc_id = " . $_id);
|
||||
$cc_array = $cc_data_assoc_array[0];
|
||||
foreach ($cc_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
if ($field == 'cc_camp_contact_type_cct_id') {
|
||||
$new_cct = new camp_contact_type();
|
||||
$new_cct->set_cct_data_by_id($value);
|
||||
$this->set_cc_camp_contact_type($new_cct);
|
||||
}
|
||||
if ($field == 'cc_owner_id') {
|
||||
$new_cu = new camp_user();
|
||||
$new_cu->set_user_data_by_id($value);
|
||||
$this->set_cc_owner($new_cu);
|
||||
}
|
||||
if ($field == 'cc_original_id' && !empty($value)) {
|
||||
$new_cc = new camp_contact();
|
||||
$new_cc->set_cc_data_by_id($value);
|
||||
$this->set_cc_original($new_cc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static function empty_to_null($str) {
|
||||
return ($str == ""?"null":$str);
|
||||
}
|
||||
|
||||
public static function create_camp_contact($_name, $_mobile, $_email, $_facebook, $_cct_id, $_owner_id, $_original_id) {
|
||||
global $sql;
|
||||
return $sql->insert_into('camp_contact', array(
|
||||
'cc_name' => $_name,
|
||||
'cc_mobile' => $_mobile,
|
||||
'cc_email' => $_email,
|
||||
'cc_facebook' => self::empty_to_null($_facebook),
|
||||
'cc_camp_contact_type_cct_id' => $_cct_id,
|
||||
'cc_owner_id' => $_owner_id,
|
||||
'cc_original_id' => $_original_id,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
53
_class/class_camp_contact_type.php
Normal file
53
_class/class_camp_contact_type.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
|
||||
class camp_contact_type {
|
||||
private $cct_id;
|
||||
private $cct_name;
|
||||
private $cct_owner;
|
||||
private $cct_deleted;
|
||||
|
||||
public function set_cct_id($_item) {
|
||||
$this->cct_id = $_item;
|
||||
}
|
||||
|
||||
public function set_cct_name($_item) {
|
||||
$this->cct_name = $_item;
|
||||
}
|
||||
|
||||
public function set_cct_owner($_item) {
|
||||
$this->cct_owner = $_item;
|
||||
}
|
||||
|
||||
public function set_cct_deleted($_item) {
|
||||
$this->cct_deleted = $_item;
|
||||
}
|
||||
|
||||
public function get_cct_id() {
|
||||
return $this->cct_id;
|
||||
}
|
||||
|
||||
public function get_cct_name() {
|
||||
return $this->cct_name;
|
||||
}
|
||||
|
||||
public function get_cct_owner() {
|
||||
return $this->cct_owner;
|
||||
}
|
||||
|
||||
public function get_cct_deleted() {
|
||||
return $this->cct_deleted;
|
||||
}
|
||||
|
||||
public function set_cct_data_by_id($_id) {
|
||||
global $sql;
|
||||
$ck_data_assoc_array = $sql->assoc_array("select * from camp_contact_type where cct_id = " . $_id);
|
||||
$ck_data_array = $ck_data_assoc_array[0];
|
||||
foreach ($ck_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
516
_class/class_camp_kid.php
Normal file
516
_class/class_camp_kid.php
Normal file
@@ -0,0 +1,516 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* TÁBORBA JELENTKEZŐ GYEREK OSZTÁLY
|
||||
*/
|
||||
class camp_kid
|
||||
{
|
||||
private $ck_id;
|
||||
private $ck_owner_id; //camp_user_id
|
||||
private $ck_owner; //camp_user ojektum
|
||||
private $ck_original_id; //camp_kid ojektum
|
||||
private $ck_original; //camp_kid ojektum
|
||||
private $ck_name;
|
||||
private $ck_birth_year;
|
||||
private $ck_ss_number;
|
||||
private $ck_email;
|
||||
private $ck_mobile;
|
||||
private $ck_badminton_history;
|
||||
private $ck_sport_history;
|
||||
private $ck_shirt_size_id;
|
||||
private $ck_shirt;
|
||||
private $ck_food_info;
|
||||
private $ck_hygiene_info;
|
||||
private $ck_health_info;
|
||||
private $ck_pharma_info;
|
||||
private $ck_other_info;
|
||||
private $ck_deleted;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value of ck_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_id()
|
||||
{
|
||||
return $this->ck_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_id.
|
||||
*
|
||||
* @param mixed $ck_id the ck id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_id($ck_id)
|
||||
{
|
||||
$this->ck_id = $ck_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_name()
|
||||
{
|
||||
return $this->ck_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_name.
|
||||
*
|
||||
* @param mixed $ck_name the ck name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_name($ck_name)
|
||||
{
|
||||
$this->ck_name = $ck_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_birth_year.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_birth_year()
|
||||
{
|
||||
return $this->ck_birth_year;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_birth_year.
|
||||
*
|
||||
* @param mixed $ck_birth_year the ck birth year
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_birth_year($ck_birth_year)
|
||||
{
|
||||
$this->ck_birth_year = $ck_birth_year;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_ss_number.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_ss_number()
|
||||
{
|
||||
return $this->ck_ss_number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_ss_number.
|
||||
*
|
||||
* @param mixed $ck_ss_number the ck ss number
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_ss_number($ck_ss_number)
|
||||
{
|
||||
$this->ck_ss_number = $ck_ss_number;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_email.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_email()
|
||||
{
|
||||
return $this->ck_email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_email.
|
||||
*
|
||||
* @param mixed $ck_email the ck email
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_email($ck_email)
|
||||
{
|
||||
$this->ck_email = $ck_email;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_mobile.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_mobile()
|
||||
{
|
||||
return $this->ck_mobile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_mobile.
|
||||
*
|
||||
* @param mixed $ck_mobile the ck mobile
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_mobile($ck_mobile)
|
||||
{
|
||||
$this->ck_mobile = $ck_mobile;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_badminton_history.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_badminton_history()
|
||||
{
|
||||
return $this->ck_badminton_history;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_badminton_history.
|
||||
*
|
||||
* @param mixed $ck_badminton_history the ck badminton history
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_badminton_history($ck_badminton_history)
|
||||
{
|
||||
$this->ck_badminton_history = $ck_badminton_history;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_sport_history.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_sport_history()
|
||||
{
|
||||
return $this->ck_sport_history;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_sport_history.
|
||||
*
|
||||
* @param mixed $ck_sport_history the ck sport history
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_sport_history($ck_sport_history)
|
||||
{
|
||||
$this->ck_sport_history = $ck_sport_history;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_shirt_size_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_shirt_size_id()
|
||||
{
|
||||
return $this->ck_shirt_size_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_shirt_size_id.
|
||||
*
|
||||
* @param mixed $ck_shirt_size_id the ck shirt size id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_shirt_size_id($ck_shirt_size_id)
|
||||
{
|
||||
$this->ck_shirt_size_id = $ck_shirt_size_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_shirt.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_shirt()
|
||||
{
|
||||
return $this->ck_shirt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_shirt.
|
||||
*
|
||||
* @param mixed $ck_shirt the ck shirt
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_shirt($ck_shirt)
|
||||
{
|
||||
$this->ck_shirt = $ck_shirt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_food_info.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_food_info()
|
||||
{
|
||||
return $this->ck_food_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_food_info.
|
||||
*
|
||||
* @param mixed $ck_food_info the ck food _info
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_food_info($ck_food_info)
|
||||
{
|
||||
$this->ck_food_info = $ck_food_info;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_hygiene_info.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_hygiene_info()
|
||||
{
|
||||
return $this->ck_hygiene_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_hygiene_info.
|
||||
*
|
||||
* @param mixed $ck_hygiene_info the ck hygiene _info
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_hygiene_info($ck_hygiene_info)
|
||||
{
|
||||
$this->ck_hygiene_info = $ck_hygiene_info;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_health_info.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_health_info()
|
||||
{
|
||||
return $this->ck_health_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_health_info.
|
||||
*
|
||||
* @param mixed $ck_health_info the ck health _info
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_health_info($ck_health_info)
|
||||
{
|
||||
$this->ck_health_info = $ck_health_info;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_pharma_info.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_pharma_info()
|
||||
{
|
||||
return $this->ck_pharma_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_pharma_info.
|
||||
*
|
||||
* @param mixed $ck_pharma_info the ck pharma _info
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_pharma_info($ck_pharma_info)
|
||||
{
|
||||
$this->ck_pharma_info = $ck_pharma_info;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_other_info.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_other_info()
|
||||
{
|
||||
return $this->ck_other_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_other_info.
|
||||
*
|
||||
* @param mixed $ck_other_info the ck other _info
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_other_info($ck_other_info)
|
||||
{
|
||||
$this->ck_other_info = $ck_other_info;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_deleted.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_deleted()
|
||||
{
|
||||
return $this->ck_deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_deleted.
|
||||
*
|
||||
* @param mixed $ck_deleted the ck deleted
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_deleted($ck_deleted)
|
||||
{
|
||||
$this->ck_deleted = $ck_deleted;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_ck_owner_id()
|
||||
{
|
||||
return $this->ck_id;
|
||||
}
|
||||
|
||||
private function set_ck_owner_id($ck_id)
|
||||
{
|
||||
$this->ck_owner_id = $ck_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_ck_owner()
|
||||
{
|
||||
return $this->ck_id;
|
||||
}
|
||||
|
||||
private function set_ck_owner($ck_id)
|
||||
{
|
||||
$this->ck_owner = $ck_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_ck_original()
|
||||
{
|
||||
return $this->ck_id;
|
||||
}
|
||||
|
||||
private function set_ck_original($ck_id)
|
||||
{
|
||||
$this->ck_original = $ck_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_ck_original_id()
|
||||
{
|
||||
return $this->ck_id;
|
||||
}
|
||||
|
||||
private function set_ck_original_id($ck_id)
|
||||
{
|
||||
$this->ck_original = $ck_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function set_ck_data_by_id($_id) {
|
||||
global $sql;
|
||||
$ck_data_assoc_array = $sql->assoc_array("select * from camp_kid where ck_id = " . $_id);
|
||||
$ck_data_array = $ck_data_assoc_array[0];
|
||||
foreach ($ck_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
if ($field == 'ck_shirt_size_id') {
|
||||
$new_shirt = new camp_shirt();
|
||||
$new_shirt->set_cshirt_data_by_id($value);
|
||||
$this->set_ck_shirt($new_shirt);
|
||||
}
|
||||
if ($field == 'ck_owner_id') {
|
||||
$new_camp_user = new camp_user();
|
||||
$new_camp_user->set_user_data_by_id($value);
|
||||
$this->set_ck_owner($new_camp_user);
|
||||
}
|
||||
if ($field == 'ck_original_id' && !empty($value)) {
|
||||
$new_camp_kid = new camp_kid();
|
||||
$new_camp_kid->set_ck_data_by_id($value);
|
||||
$this->set_ck_original($new_camp_kid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static function empty_to_null($str) {
|
||||
return ($str == ""?"null":$str);
|
||||
}
|
||||
|
||||
public static function create_camp_kid($_name, $_birth_year, $_ss_number, $_email, $_mobile, $_shirt_id, $_info, $_original_id, $_owner_id) {
|
||||
global $sql;
|
||||
return $sql->insert_into('camp_kid', array(
|
||||
'ck_name' => $_name,
|
||||
'ck_birth_year' => $_birth_year,
|
||||
'ck_ss_number' => $_ss_number,
|
||||
'ck_email' => $_email,
|
||||
'ck_mobile' => $_mobile,
|
||||
'ck_shirt_size_id' => $_shirt_id,
|
||||
'ck_original_id' => $_original_id,
|
||||
'ck_owner_id' => $_owner_id,
|
||||
'ck_sport_history' => self::empty_to_null($_info['ck_sport_history']),
|
||||
'ck_badminton_history' => self::empty_to_null($_info['ck_badminton_history']),
|
||||
'ck_food_info' => self::empty_to_null($_info['ck_food_info']),
|
||||
'ck_hygiene_info' => self::empty_to_null($_info['ck_hygiene_info']),
|
||||
'ck_health_info' => self::empty_to_null($_info['ck_health_info']),
|
||||
'ck_pharma_info' => self::empty_to_null($_info['ck_pharma_info']),
|
||||
'ck_other_info' => self::empty_to_null($_info['ck_other_info']),
|
||||
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
45
_class/class_camp_shirt.php
Normal file
45
_class/class_camp_shirt.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
class camp_shirt {
|
||||
private $cshirt_id;
|
||||
private $cshirt_name;
|
||||
private $cshirt_deleted;
|
||||
|
||||
|
||||
public function set_cshirt_id($_item) {
|
||||
$this->cshirt_id = $_item;
|
||||
}
|
||||
|
||||
public function set_cshirt_name($_item) {
|
||||
$this->cshirt_name = $_item;
|
||||
}
|
||||
|
||||
public function set_cshirt_deleted($_item) {
|
||||
$this->cshirt_deleted = $_item;
|
||||
}
|
||||
|
||||
public function get_cshirt_id() {
|
||||
return $this->cshirt_id;
|
||||
}
|
||||
|
||||
public function get_cshirt_name() {
|
||||
return $this->cshirt_name;
|
||||
}
|
||||
|
||||
public function get_cshirt_deleted() {
|
||||
return $this->cshirt_deleted;
|
||||
}
|
||||
|
||||
public function set_cshirt_data_by_id($_id) {
|
||||
global $sql;
|
||||
$ck_data_assoc_array = $sql->assoc_array("select * from camp_shirt where cshirt_id = " . $_id);
|
||||
$ck_data_array = $ck_data_assoc_array[0];
|
||||
foreach ($ck_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
82
_class/class_camp_shuttle_type.php
Normal file
82
_class/class_camp_shuttle_type.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SHUTTLE
|
||||
*/
|
||||
class camp_shuttle_type
|
||||
{
|
||||
private $cst_id;
|
||||
private $cst_name;
|
||||
private $cst_deleted;
|
||||
|
||||
/**
|
||||
* Gets the value of cst_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cst_id()
|
||||
{
|
||||
return $this->cst_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cst_id.
|
||||
*
|
||||
* @param mixed $cst_id the cst id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cst_id($cst_id)
|
||||
{
|
||||
$this->cst_id = $cst_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cst_name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cst_name()
|
||||
{
|
||||
return $this->cst_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cst_name.
|
||||
*
|
||||
* @param mixed $cst_name the cst name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cst_name($cst_name)
|
||||
{
|
||||
$this->cst_name = $cst_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function set_cst_deleted($_item) {
|
||||
$this->cst_deleted = $_item;
|
||||
}
|
||||
|
||||
public function get_cst_deleted($_item) {
|
||||
return $this->cst_deleted;
|
||||
}
|
||||
|
||||
public function set_cst_data_by_id($_cst_id) {
|
||||
global $sql;
|
||||
$cst_assoc_array = $sql->assoc_array("select * from camp_shuttle_type where cst_id = " . $_cst_id);
|
||||
$cst_array = $cst_assoc_array[0];
|
||||
//alapadatok
|
||||
foreach ($cst_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
98
_class/class_camp_type.php
Normal file
98
_class/class_camp_type.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* Tábor típus osztály
|
||||
*/
|
||||
class camp_type
|
||||
{
|
||||
private $ct_id;
|
||||
private $ct_name;
|
||||
private $ct_deleted;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value of ct_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ct_id()
|
||||
{
|
||||
return $this->ct_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ct_id.
|
||||
*
|
||||
* @param mixed $ct_id the ct id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ct_id($ct_id)
|
||||
{
|
||||
$this->ct_id = $ct_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ct_name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ct_name()
|
||||
{
|
||||
return $this->ct_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ct_name.
|
||||
*
|
||||
* @param mixed $ct_name the ct name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ct_name($ct_name)
|
||||
{
|
||||
$this->ct_name = $ct_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_ct_deleted() {
|
||||
return $this->ct_deleted;
|
||||
}
|
||||
|
||||
private function set_ct_deleted($_item) {
|
||||
$this->ct_deleted = $_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function set_ct_data_by_id($_ct_id) {
|
||||
global $sql;
|
||||
$ct_data_assoc_array = $sql->assoc_array("select * from camp_type where ct_id = " . $_ct_id);
|
||||
$ct_data_array = $ct_data_assoc_array[0];
|
||||
foreach ($ct_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
}
|
||||
}
|
||||
|
||||
public static function create_camp_type($_name) {
|
||||
global $sql;
|
||||
return $sql->insert_into('camp_type', array('ct_name' => $_name));
|
||||
}
|
||||
|
||||
public static function update_camp_type($_id, $_name) {
|
||||
global $sql;
|
||||
$sql->update_table('camp_type', array('ct_name' => $_name), array('ct_id' => $_id));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
197
_class/class_camp_user.php
Normal file
197
_class/class_camp_user.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
|
||||
class camp_user {
|
||||
private $cu_id;
|
||||
private $cu_email;
|
||||
private $cu_password;
|
||||
private $cu_reg_date;
|
||||
private $cu_last_login = null;
|
||||
private $cu_deleted;
|
||||
private $logged_in;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value of cu_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cu_id()
|
||||
{
|
||||
return $this->cu_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cu_id.
|
||||
*
|
||||
* @param mixed $cu_id the cu id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cu_id($cu_id)
|
||||
{
|
||||
$this->cu_id = $cu_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cu_email.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cu_email()
|
||||
{
|
||||
return $this->cu_email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cu_email.
|
||||
*
|
||||
* @param mixed $cu_email the cu email
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cu_email($cu_email)
|
||||
{
|
||||
$this->cu_email = $cu_email;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cu_password.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cu_password()
|
||||
{
|
||||
return $this->cu_password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cu_password.
|
||||
*
|
||||
* @param mixed $cu_password the cu password
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cu_password($cu_password)
|
||||
{
|
||||
$this->cu_password = $cu_password;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cu_reg_date.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cu_reg_date()
|
||||
{
|
||||
return $this->cu_reg_date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cu_reg_date.
|
||||
*
|
||||
* @param mixed $cu_reg_date the cu reg date
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cu_reg_date($cu_reg_date)
|
||||
{
|
||||
$this->cu_reg_date = $cu_reg_date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cu_last_login.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cu_last_login()
|
||||
{
|
||||
return $this->cu_last_login;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cu_last_login.
|
||||
*
|
||||
* @param mixed $cu_last_login the cu last login
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cu_last_login($cu_last_login)
|
||||
{
|
||||
$this->cu_last_login = $cu_last_login;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cu_deleted.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cu_deleted()
|
||||
{
|
||||
return $this->cu_deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cu_deleted.
|
||||
*
|
||||
* @param mixed $cu_deleted the cu deleted
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cu_deleted($cu_deleted)
|
||||
{
|
||||
$this->cu_deleted = $cu_deleted;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function update_login_time($_cu_id = null) {
|
||||
global $sql;
|
||||
//az adott user_id-n updateli a login_time-ot
|
||||
$sql->update_table('camp_user', array('cu_last_login' => date('Y-m-d')), array('cu_id' => (empty($_cu_id)?$this->get_cu_id():$_cu_id)));
|
||||
}
|
||||
|
||||
|
||||
public function set_user_data_by_id($_id) {
|
||||
global $sql;
|
||||
$cu_data_assoc_array = $sql->assoc_array("select * from camp_user where cu_id = " . $_id);
|
||||
$cu_data_array = $cu_data_assoc_array[0];
|
||||
foreach ($cu_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
$this->set_login(true);
|
||||
}
|
||||
}
|
||||
|
||||
public function is_logged_in() {
|
||||
//leellenőrzi cookie alapján h be vagyunk-e jelentkezve
|
||||
//JAVÍTVA: adja vissza az adattag igazságértékét
|
||||
return $this->logged_in;
|
||||
}
|
||||
|
||||
public function set_login($_login) {
|
||||
//bool-t kap paraméterül
|
||||
$this->logged_in = $_login;
|
||||
}
|
||||
|
||||
public static function create_camp_user($_email, $_password, $_reg_date) {
|
||||
global $sql;
|
||||
return $sql->insert_into('camp_user', array(
|
||||
'cu_email' => $_email,
|
||||
'cu_password' => md5($_password),
|
||||
'cu_reg_date' => $_reg_date,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -18,6 +18,7 @@ class log {
|
||||
//ha a user változó objektum, akkor megvizsgáljuk, hogy coach vagy parent
|
||||
if (get_class($user) == 'user') $function_name = 'get_ua_id';
|
||||
elseif(get_class($user) == 'user_kid') $function_name = 'get_uk_id';
|
||||
elseif(get_class($user) == 'camp_user') $function_name = 'get_cu_id';
|
||||
}
|
||||
|
||||
$sql->insert_into('log', array(
|
||||
@@ -117,7 +118,7 @@ class log {
|
||||
elseif (strstr($this->get_log_category()->get_logc_name(), 'delete')) return 'delete';
|
||||
elseif (strstr($this->get_log_category()->get_logc_name(), 'update')) return 'edit';
|
||||
elseif (in_array($this->get_log_category()->get_logc_name(), array('training_close', 'training_open'))) return 'lock';
|
||||
elseif (in_array($this->get_log_category()->get_logc_name(), array('admin_login', 'admin_logout', 'kid_login', 'kid_logout', 'coach_login', 'coach_logout'))) return 'login';
|
||||
elseif (in_array($this->get_log_category()->get_logc_name(), array('admin_login', 'admin_logout', 'kid_login', 'kid_logout', 'coach_login', 'coach_logout', 'camp_user_login', 'camp_user_logout'))) return 'login';
|
||||
}
|
||||
|
||||
public function set_log_data_by_id($_log_id) {
|
||||
@@ -138,6 +139,7 @@ class log {
|
||||
//beállítja a log_user objektumot
|
||||
if ($this->get_log_category()->get_logc_type() == 1) $new_user = new user();
|
||||
elseif($this->get_log_category()->get_logc_type() == 2) $new_user = new user_kid();
|
||||
elseif($this->get_log_category()->get_logc_type() == 3) $new_user = new camp_user();
|
||||
$new_user->set_user_data_by_id($value);
|
||||
$this->set_log_user($new_user);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,21 @@ class login {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function check_camp_login($_user_name, $_user_password) {
|
||||
global $sql;
|
||||
$check_query =
|
||||
"
|
||||
SELECT cu_id FROM camp_user WHERE
|
||||
(cu_email = '" . $_user_name . "' AND
|
||||
cu_password = '" . md5($_user_password ) . "') AND cu_deleted = 0";
|
||||
|
||||
//echo $check_query;
|
||||
|
||||
if ($sql->num_of_rows($check_query)) return $sql->single_variable($check_query);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function login_user($_user_id, $_cookie_name, $_user_type) {
|
||||
//beállítja a belépett user adatait cookieba (ha még nincs)
|
||||
global $sql;
|
||||
@@ -108,6 +123,9 @@ class login {
|
||||
elseif ($_user_type == 3) {
|
||||
$user_login = new user();
|
||||
}
|
||||
elseif ($_user_type == 4) {
|
||||
$user_login = new camp_user();
|
||||
}
|
||||
$user_login->set_user_data_by_id($_user_id);
|
||||
$user_login->update_login_time();
|
||||
setcookie($_cookie_name, $_user_id, time()+60*60*168, '/');
|
||||
|
||||
@@ -38,6 +38,11 @@ class page {
|
||||
$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;";
|
||||
$menu_assoc_array = $sql->assoc_array($menus_query);
|
||||
$smarty->assign('menus', $menu_assoc_array);
|
||||
}
|
||||
|
||||
$smarty->assign('page', $this->get_page());
|
||||
$smarty->display('nav.tpl');
|
||||
@@ -173,6 +178,30 @@ class page {
|
||||
# BIZTONSÁGI MENTÉS LETÖLTÉS
|
||||
include('include_download_backup.php');
|
||||
break;
|
||||
case 'camps':
|
||||
# TÁBOROK
|
||||
include('include_camps.php');
|
||||
break;
|
||||
case 'camp_types':
|
||||
# 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');
|
||||
break;
|
||||
case 'accept_apply':
|
||||
# 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');
|
||||
break;
|
||||
case 'apply':
|
||||
# TÁBORI JELENTKEZŐ ADATAINAK MEGTEKINTÉSE
|
||||
include('include_apply.php');
|
||||
break;
|
||||
case 'delete_training_type':
|
||||
# EDZÉS TÍPUS TÖRLÉS
|
||||
include('include_delete_training_type.php');
|
||||
@@ -213,10 +242,22 @@ class page {
|
||||
# MENTÉS TÖRLÉS
|
||||
include('include_delete_backup.php');
|
||||
break;
|
||||
case 'delete_camp_type':
|
||||
# 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');
|
||||
break;
|
||||
case 'delete_camp_shirt':
|
||||
# TÁBORI PÓLÓ TÖRLÉS
|
||||
include('include_delete_camp_shirt.php');
|
||||
break;
|
||||
case 'logout':
|
||||
# kijelentkezés
|
||||
$from = "admin";
|
||||
include('include_logout.php');
|
||||
include('include_logout.php');
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
@@ -302,8 +343,32 @@ class page {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'tabor':
|
||||
# TÁBOR OLDALAK
|
||||
switch ($this->get_subpage()) {
|
||||
case 'informaciok':
|
||||
# tábori információk
|
||||
include('include_camp_information.php');
|
||||
break;
|
||||
case 'jelentkezes':
|
||||
# jelentkezés
|
||||
include('include_camp_apply.php');
|
||||
break;
|
||||
case 'jelentkezesek':
|
||||
# jelentkezés
|
||||
include('include_camp_applies.php');
|
||||
break;
|
||||
case 'logout':
|
||||
# kijelentkezés
|
||||
$from = "tabor";
|
||||
include('include_logout.php');
|
||||
break;
|
||||
default:
|
||||
include('include_camp_information.php');
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -311,7 +376,16 @@ class page {
|
||||
else {
|
||||
//nincs bejelentkezve
|
||||
$smarty->assign("page", $this->get_page());
|
||||
$smarty->display("login.tpl");
|
||||
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);
|
||||
}
|
||||
$smarty->display("register.tpl");
|
||||
}
|
||||
else {
|
||||
$smarty->display("login.tpl");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
73
_class/class_shuttle.php
Normal file
73
_class/class_shuttle.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SHUTTLE
|
||||
*/
|
||||
class camp_shuttle_type
|
||||
{
|
||||
private $cst_id;
|
||||
private $cst_name;
|
||||
|
||||
/**
|
||||
* Gets the value of cst_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cst_id()
|
||||
{
|
||||
return $this->cst_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cst_id.
|
||||
*
|
||||
* @param mixed $cst_id the cst id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cst_id($cst_id)
|
||||
{
|
||||
$this->cst_id = $cst_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of cst_name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_cst_name()
|
||||
{
|
||||
return $this->cst_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of cst_name.
|
||||
*
|
||||
* @param mixed $cst_name the cst name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_cst_name($cst_name)
|
||||
{
|
||||
$this->cst_name = $cst_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function set_cst_data_by_id($_cst_id) {
|
||||
global $sql;
|
||||
$cst_assoc_array = $sql->assoc_array("select * from camp_shuttle_type where cst_id = " . $_cst_id);
|
||||
$cst_array = $cst_assoc_array[0];
|
||||
//alapadatok
|
||||
foreach ($cst_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
93
_css/camp.css
Normal file
93
_css/camp.css
Normal file
@@ -0,0 +1,93 @@
|
||||
nav {
|
||||
box-shadow: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
ul.topnav {
|
||||
background-color: #0052CC;
|
||||
}
|
||||
|
||||
main #main_content, main #loading {
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 0px 8%;
|
||||
}
|
||||
|
||||
#cct_extra_row {
|
||||
margin-top: 10px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#add_more_cct {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
h1, p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
form table {
|
||||
margin: 0px auto;
|
||||
border-collapse: collapse;
|
||||
border: 2px solid black;
|
||||
background: #e7d6d6;
|
||||
min-width: 400px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
form table td {
|
||||
font-size: 20px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
form table tr:hover td {
|
||||
background-color: #602f2f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.danger {
|
||||
width: 64%;
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.middle {
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.apply_table {
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
min-width: 800px;
|
||||
border-collapse: collapse;
|
||||
margin: 30px auto 50px auto;
|
||||
}
|
||||
|
||||
.smaller {
|
||||
min-width: 588px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.apply_table th {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.apply_table td {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.apply_table tr:hover td{
|
||||
background: #eeeeee;
|
||||
}
|
||||
@@ -35,9 +35,7 @@ main #main_content {
|
||||
background-color: #fff;
|
||||
padding: 30px 10px 10px 10px;
|
||||
|
||||
webkit-box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
-moz-box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -49,9 +47,7 @@ main #loading {
|
||||
background-color: #fff;
|
||||
padding: 30px 10px 10px 10px;
|
||||
|
||||
webkit-box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
-moz-box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
|
||||
|
||||
|
||||
z-index: 100;
|
||||
@@ -77,6 +73,18 @@ main #loading {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.float_left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.shuttle_block {
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.z10 {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.danger {
|
||||
background-color: #ffdddd;
|
||||
border-left: 6px solid #002E4C;
|
||||
@@ -87,6 +95,19 @@ main #loading {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.
|
||||
|
||||
.checkbox_label {
|
||||
position: relative;
|
||||
top: 3px;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
.error_msg {
|
||||
color: #ff0000;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
ul.topnav span {
|
||||
color: #f2f2f2;
|
||||
@@ -491,6 +512,45 @@ table.log tr.delete:hover {
|
||||
filter: alpha(opacity=30); /* For IE8 and earlier */
|
||||
}
|
||||
|
||||
.apply_table {
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
min-width: 800px;
|
||||
border-collapse: collapse;
|
||||
margin: 30px 0px 50px 20px;
|
||||
}
|
||||
|
||||
.smaller {
|
||||
min-width: 588px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.apply_table th {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.apply_table td {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.apply_table tr:hover td{
|
||||
background: #eeeeee;
|
||||
}
|
||||
|
||||
.apply_table img {
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.pending {
|
||||
float: right;
|
||||
}
|
||||
|
||||
h1.apply {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 680px) {
|
||||
|
||||
@@ -568,7 +628,7 @@ table.log tr.delete:hover {
|
||||
}
|
||||
|
||||
main #main_content, main #loading {
|
||||
width: 80%;
|
||||
width: 100%;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
|
||||
45
_css/login.css
Normal file
45
_css/login.css
Normal file
@@ -0,0 +1,45 @@
|
||||
body {
|
||||
background: #eee !important;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
margin-top: 80px;
|
||||
margin-bottom: 80px;
|
||||
}
|
||||
|
||||
.form-signin {
|
||||
max-width: 380px;
|
||||
padding: 15px 35px 45px;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.form-signin .form-signin-heading,
|
||||
.form-signin .checkbox {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.form-signin .checkbox {
|
||||
font-weight: normal;
|
||||
}
|
||||
.form-signin .form-control {
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.form-signin .form-control:focus {
|
||||
z-index: 2;
|
||||
}
|
||||
.form-signin input[type="text"] {
|
||||
margin-bottom: -1px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.form-signin input[type="password"] {
|
||||
margin-bottom: 20px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
92
_css/login_form.css
Normal file
92
_css/login_form.css
Normal file
@@ -0,0 +1,92 @@
|
||||
.login-page {
|
||||
width: 360px;
|
||||
padding: 3% 0 0;
|
||||
margin: auto;
|
||||
}
|
||||
.form {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
background: #FFFFFF;
|
||||
max-width: 360px;
|
||||
margin: 0 auto 100px;
|
||||
padding: 15px 45px 45px 45px;
|
||||
text-align: center;
|
||||
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
|
||||
}
|
||||
.form input[type=text],
|
||||
.form input[type=password]
|
||||
{
|
||||
font-family: sans-serif;
|
||||
outline: 0;
|
||||
background: #f2f2f2;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
margin: 0 0 15px;
|
||||
padding: 15px;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
height: auto;
|
||||
}
|
||||
.form input[type=submit] {
|
||||
font-family: "Roboto", sans-serif;
|
||||
text-transform: uppercase;
|
||||
outline: 0;
|
||||
background: #4C74AF;;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
padding: 15px;
|
||||
color: #FFFFFF;
|
||||
font-size: 14px;
|
||||
-webkit-transition: all 0.3 ease;
|
||||
transition: all 0.3 ease;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
}
|
||||
.form button:hover,.form button:active,.form button:focus {
|
||||
background: #4F40DE;
|
||||
}
|
||||
.form .message {
|
||||
margin: 15px 0 0;
|
||||
color: #b3b3b3;
|
||||
font-size: 12px;
|
||||
}
|
||||
.form .message a {
|
||||
color: #4C74AF;
|
||||
text-decoration: none;
|
||||
}
|
||||
.form .register-form {
|
||||
display: none;
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
max-width: 300px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.container:before, .container:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.container .info {
|
||||
margin: 50px auto;
|
||||
text-align: center;
|
||||
}
|
||||
.container .info h1 {
|
||||
margin: 0 0 15px;
|
||||
padding: 0;
|
||||
font-size: 36px;
|
||||
font-weight: 300;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
.container .info span {
|
||||
color: #4d4d4d;
|
||||
font-size: 12px;
|
||||
}
|
||||
.container .info span a {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
.container .info span .fa {
|
||||
color: #EF3B3A;
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
nav {
|
||||
display: block;
|
||||
width: 80%;
|
||||
width: 100%;
|
||||
margin: 0px auto;
|
||||
height: 50px;
|
||||
webkit-box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
-moz-box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
box-shadow: 0px 0px 11px 4px rgba(0,0,0,0.75);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
BIN
_image/camp.png
Normal file
BIN
_image/camp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
21
_include/include_accept_apply.php
Normal file
21
_include/include_accept_apply.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
50
_include/include_apply.php
Normal file
50
_include/include_apply.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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 {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
57
_include/include_camp_applies.php
Normal file
57
_include/include_camp_applies.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
|
||||
# HA NINCS ID, AKKOR ÁTIRÁNYÍTÉS /1-re
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
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');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
167
_include/include_camp_apply.php
Normal file
167
_include/include_camp_apply.php
Normal file
@@ -0,0 +1,167 @@
|
||||
<?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);
|
||||
|
||||
|
||||
|
||||
//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);
|
||||
|
||||
$smarty->assign('camp_kid', $new_camp_kid);
|
||||
$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");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
18
_include/include_camp_information.php
Normal file
18
_include/include_camp_information.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
28
_include/include_camp_shirt_types.php
Normal file
28
_include/include_camp_shirt_types.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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_name ASC";
|
||||
$shirt_assoc_array = $sql->assoc_array($camp_shirt_query);
|
||||
|
||||
$smarty->assign('shirt_assoc_array',$shirt_assoc_array);
|
||||
$smarty->display('camp_shirt_list.tpl');
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
37
_include/include_camp_types.php
Normal file
37
_include/include_camp_types.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
134
_include/include_camps.php
Normal file
134
_include/include_camps.php
Normal file
@@ -0,0 +1,134 @@
|
||||
<?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());
|
||||
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 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;
|
||||
}
|
||||
|
||||
$smarty->assign('color', $color);
|
||||
$smarty->assign('apply_array', $apply_array);
|
||||
$smarty->assign('pending_apply_array', $apply_array_2);
|
||||
|
||||
$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');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -4,27 +4,45 @@
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
training
|
||||
JOIN
|
||||
training_coach ON trc_training_tr_id = tr_id
|
||||
(SELECT
|
||||
tr_id AS obj_id,
|
||||
TIMESTAMP(tr_date) AS obj_date,
|
||||
'training' AS obj_type
|
||||
FROM
|
||||
training
|
||||
JOIN training_coach ON trc_training_tr_id = tr_id
|
||||
WHERE
|
||||
trc_coach_uc_id = " . $user->get_ua_id() . " AND tr_deleted = 0
|
||||
ORDER BY tr_date DESC) valami
|
||||
UNION (SELECT
|
||||
mox_id AS obj_id,
|
||||
TIMESTAMP(date_add(mox_date, INTERVAL '23:59' HOUR_MINUTE)) AS obj_date,
|
||||
'money_expense' AS obj_type
|
||||
FROM
|
||||
money_expense
|
||||
WHERE
|
||||
trc_coach_uc_id = " . $user->get_ua_id() . "
|
||||
ORDER BY tr_date DESC
|
||||
;
|
||||
mox_user_coach_ua_id = " . $user->get_ua_id() . " AND mox_deleted = 0) ORDER BY obj_date DESC , obj_type ASC;
|
||||
";
|
||||
|
||||
|
||||
$action_assoc_array = $sql->assoc_array($action_list_query);
|
||||
|
||||
$trainings = array();
|
||||
foreach ($action_assoc_array as $action) {
|
||||
$new_training = new training();
|
||||
$new_training->set_training_data_by_id($action['tr_id']);
|
||||
$trainings[] = $new_training;
|
||||
$actions = array();
|
||||
foreach ($action_assoc_array as $action_array) {
|
||||
if ('money_expense' == $action_array['obj_type']) {
|
||||
$action = new $action_array['obj_type']();
|
||||
$action->set_mox_data_by_id($action_array['obj_id']);
|
||||
}
|
||||
elseif ('training' == $action_array['obj_type']) {
|
||||
$action = new $action_array['obj_type']();
|
||||
$action->set_training_data_by_id($action_array['obj_id']);
|
||||
}
|
||||
$actions[] = $action;
|
||||
}
|
||||
|
||||
|
||||
$smarty->assign('trainings', $trainings);
|
||||
//var_dump($actions);
|
||||
|
||||
$smarty->assign('actions',$actions);
|
||||
$smarty->display('coach_diary.tpl');
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ switch ($this->get_id()) {
|
||||
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
||||
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
||||
//COACH ARRAY
|
||||
$coach_data_query = "SELECT * FROM user_coach;";
|
||||
$coach_data_query = "SELECT * FROM user_coach WHERE ua_deleted = 0;";
|
||||
$coach_data_assoc_array = $sql->assoc_array($coach_data_query);
|
||||
|
||||
|
||||
@@ -154,8 +154,52 @@ switch ($this->get_id()) {
|
||||
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;
|
||||
default:
|
||||
# code...
|
||||
|
||||
14
_include/include_delete_camp.php
Normal file
14
_include/include_delete_camp.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
19
_include/include_delete_camp_shirt.php
Normal file
19
_include/include_delete_camp_shirt.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
12
_include/include_delete_camp_type.php
Normal file
12
_include/include_delete_camp_type.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
21
_include/include_deny_apply.php
Normal file
21
_include/include_deny_apply.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -13,6 +13,11 @@ elseif ($from == 'coach') {
|
||||
$log_c = 'coach_logout';
|
||||
$cookie = 'coach';
|
||||
|
||||
}
|
||||
elseif ($from == 'tabor') {
|
||||
$log_c = 'camp_user_logout';
|
||||
$cookie = 'camp';
|
||||
|
||||
}
|
||||
log::register($log_c, $_COOKIE['badminton_'.$cookie.'_user']);
|
||||
setcookie('badminton_'.$cookie.'_user', 'null', time()-60*60*72, '/');
|
||||
|
||||
28
common.php
28
common.php
@@ -47,6 +47,21 @@ $months = array(
|
||||
'12' => 'december',
|
||||
);
|
||||
|
||||
$short_months = array(
|
||||
'01' => 'jan',
|
||||
'02' => 'feb',
|
||||
'03' => 'már',
|
||||
'04' => 'ápr',
|
||||
'05' => 'máj',
|
||||
'06' => 'jún',
|
||||
'07' => 'júl',
|
||||
'08' => 'aug',
|
||||
'09' => 'szept',
|
||||
'10' => 'okt',
|
||||
'11' => 'nov',
|
||||
'12' => 'dec',
|
||||
);
|
||||
|
||||
$days = array(
|
||||
'0' => 'v',
|
||||
'1' => 'h',
|
||||
@@ -57,6 +72,10 @@ $days = array(
|
||||
'6' => 'szo',
|
||||
);
|
||||
|
||||
$error_msg = array(
|
||||
1 => 'Ezzel az e-mail címmel már regisztráltak!',
|
||||
);
|
||||
|
||||
//SMARTY BEÁLLÍTÁSA
|
||||
//require('../Smarty/Smarty.class.php');
|
||||
require('../Smarty/Smarty.class.php');
|
||||
@@ -70,8 +89,10 @@ $smarty->setCacheDir('template/cache');
|
||||
$smarty->setConfigDir('template/configs');
|
||||
|
||||
$smarty->assign('months', $months);
|
||||
$smarty->assign('short_months', $short_months);
|
||||
$smarty->assign('days', $days);
|
||||
$smarty->assign('today', date('Y-m-d'));
|
||||
$smarty->assign('error_msg', $error_msg);
|
||||
|
||||
//SQL KAPCSOLAT BEÁLLÍTÁSA
|
||||
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach');
|
||||
@@ -128,6 +149,13 @@ elseif ($_GET['page'] == 'coach_preview' && (isset($_COOKIE['badminton_admin_use
|
||||
//var_dump($user);
|
||||
}
|
||||
}
|
||||
elseif ($_GET['page'] == 'tabor' && (isset($_COOKIE['badminton_camp_user']))) {
|
||||
$user = new camp_user();
|
||||
$user->set_user_data_by_id($_COOKIE['badminton_camp_user']);
|
||||
$logout = true;
|
||||
$smarty->assign('user_login', $user);
|
||||
//var_dump($user);
|
||||
}
|
||||
|
||||
$smarty->assign('can_logout', $logout);
|
||||
|
||||
|
||||
@@ -5,6 +5,21 @@ if (isset($_POST['action'])) {
|
||||
|
||||
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
switch ($_POST['action']) {
|
||||
case 'user_register':
|
||||
# REGISZTRÁCIÓ
|
||||
$check_user_exists = $sql->num_of_rows("SELECT * FROM camp_user WHERE cu_email = '" . $_POST['user_email'] . "';");
|
||||
if ($check_user_exists) {
|
||||
//van már reg ezzel az email címmel
|
||||
setcookie('bc_reg_error', 1);
|
||||
header("Location: /tabor/regisztracio");
|
||||
}
|
||||
else {
|
||||
//sikeres reg. visszairányítjuk a bejelentkező felületre
|
||||
$new_camp_user = camp_user::create_camp_user($_POST['user_email'], $_POST['user_password'], date("Y-m-d H:i:s"));
|
||||
log::register('new_camp_user', $new_camp_user, date("Y-m-d H:i:s"), $new_camp_user);
|
||||
header("Location: /tabor");
|
||||
}
|
||||
break;
|
||||
case 'login':
|
||||
# login
|
||||
/*
|
||||
@@ -15,10 +30,12 @@ if (isset($_POST['action'])) {
|
||||
$user_admin_id = null;
|
||||
$user_kid_id = null;
|
||||
$user_coach_id = null;
|
||||
$user_camp_id = null;
|
||||
|
||||
if ($_REQUEST['page'] == 'admin') $user_admin_id = $login->check_admin_login($_POST['user_name'], $_POST['user_password']);
|
||||
if ($_REQUEST['page'] == 'view') $user_kid_id = $login->check_kid_login($_POST['user_name'], $_POST['user_password']);
|
||||
if ($_REQUEST['page'] == 'coach') $user_coach_id = $login->check_coach_login($_POST['user_name'], $_POST['user_password']);
|
||||
if ($_REQUEST['page'] == 'tabor') $user_camp_id = $login->check_camp_login($_POST['user_name'], $_POST['user_password']);
|
||||
|
||||
if ($user_admin_id) {
|
||||
//sikeres bejelentkezés adminként
|
||||
@@ -38,6 +55,13 @@ if (isset($_POST['action'])) {
|
||||
log::register('coach_login', $user_coach_id, null, $user_coach_id);
|
||||
header("Location: " . $actual_link);
|
||||
}
|
||||
elseif ($user_camp_id) {
|
||||
//sikeres bejelentkezés szülőként
|
||||
var_dump('itt');
|
||||
$login->login_user($user_camp_id, 'badminton_camp_user', 4);
|
||||
log::register('camp_user_login', $user_camp_id, null, $user_camp_id);
|
||||
header("Location: " . $actual_link);
|
||||
}
|
||||
else {
|
||||
//die($user_coach_id);
|
||||
//sikertelen bejelentkezés
|
||||
@@ -295,7 +319,8 @@ if (isset($_POST['action'])) {
|
||||
case 'settings_data_edit':
|
||||
$sql->update_table('setting_value',
|
||||
array(
|
||||
'setv_'.$_POST['st_name'] => $_POST['set_val']
|
||||
'setv_'.$_POST['st_name'] => $_POST['set_val'],
|
||||
'setv_set_date' => date("Y-m-d H:i:s")
|
||||
),
|
||||
array(
|
||||
'setv_id' => $_POST['setv_id']
|
||||
@@ -303,6 +328,163 @@ if (isset($_POST['action'])) {
|
||||
|
||||
);
|
||||
break;
|
||||
case 'camp_type_create':
|
||||
# tábor típus létrehozása
|
||||
$new_ct_id = camp_type::create_camp_type($_POST['ct_name']);
|
||||
log::register('new_ct', $new_ct_id);
|
||||
header("Location: /admin/camp_types");
|
||||
break;
|
||||
case 'camp_type_update':
|
||||
# tábor típus módosítása
|
||||
unset($_POST['action']);
|
||||
foreach ($_POST as $key => $value) {
|
||||
$key_parts = explode('_', $key);
|
||||
$ct_id = $key_parts[1];
|
||||
//$sql->update_table('region', array('reg_name' => $value), array('reg_id' => $reg_id));
|
||||
camp_type::update_camp_type($ct_id, $value);
|
||||
}
|
||||
log::register('update_ct', 'update all');
|
||||
header("Location: /admin/camp_types");
|
||||
break;
|
||||
case 'camp_create':
|
||||
# tábor létrehozása
|
||||
unset($_POST['action']);
|
||||
//meg kell vizsgálni, hogy a checkboxos mezők léteznek-e
|
||||
$shuttles = array();
|
||||
if (!empty($_POST['shuttles'])) {
|
||||
$shuttles = $_POST['shuttles'];
|
||||
}
|
||||
|
||||
$accoms = array();
|
||||
if (!empty($_POST['accomodations'])) {
|
||||
$accoms = $_POST['accomodations'];
|
||||
}
|
||||
|
||||
camp::create_camp($_POST['camp_city'], $_POST['camp_from'], $_POST['camp_to'], (!empty($_POST['camp_is_open'])?1:0), $_POST['camp_camp_type_ct_id'], $shuttles, $accoms);
|
||||
log::register('new_camp', $_POST['camp_from'] . " (" . $_POST['camp_city'] . ")");
|
||||
break;
|
||||
case 'camp_update':
|
||||
# tábor módosítás
|
||||
$shuttles = array();
|
||||
if (!empty($_POST['shuttles'])) {
|
||||
$shuttles = $_POST['shuttles'];
|
||||
}
|
||||
|
||||
$accoms = array();
|
||||
if (!empty($_POST['accomodations'])) {
|
||||
$accoms = $_POST['accomodations'];
|
||||
}
|
||||
|
||||
camp::update_camp($_POST['camp_city'], $_POST['camp_from'], $_POST['camp_to'], (!empty($_POST['camp_is_open'])?1:0), $_POST['camp_camp_type_ct_id'], $shuttles, $accoms, $_POST['camp_id']);
|
||||
log::register('update_camp', $_POST['camp_from'] . " (" . $_POST['camp_city'] . ")");
|
||||
header('Location: /admin/camps/' . $_POST['camp_id']);
|
||||
|
||||
break;
|
||||
case 'camp_shirt_create':
|
||||
# tábori póló létrehozása
|
||||
//todo: shirt object
|
||||
$new_shirt_id = $sql->insert_into('camp_shirt', array(
|
||||
'cshirt_name' => $_POST['shirt_name']
|
||||
)
|
||||
);
|
||||
log::register('new_camp_shirt', $new_shirt_id);
|
||||
header("Location: /admin/camp_shirt_type");
|
||||
break;
|
||||
case 'camp_shirt_data_edit':
|
||||
# camp shirt update
|
||||
//todo: shirt object
|
||||
$sql->update_table('camp_shirt', array(
|
||||
'cshirt_name' => $_POST['shirt_name'],
|
||||
),
|
||||
array(
|
||||
'cshirt_id' => $_POST['shirt_id']
|
||||
)
|
||||
);
|
||||
log::register('update_camp_shirt', $_POST['shirt_id']);
|
||||
header("Location: /admin/camp_shirt_type");
|
||||
break;
|
||||
case 'apply_1':
|
||||
//jelentkezés 1. lépés - jelentkező adatai
|
||||
|
||||
$new_camp_kid_id = camp_kid::create_camp_kid(
|
||||
$_POST['ck_name'],
|
||||
$_POST['ck_birth_year'],
|
||||
$_POST['ck_ss_number'],
|
||||
$_POST['ck_email'],
|
||||
$_POST['ck_mobile'],
|
||||
$_POST['ck_shirt_size_id'],
|
||||
array(
|
||||
'ck_sport_history' => $_POST['ck_sport_history'],
|
||||
'ck_badminton_history' => $_POST['ck_badminton_history'],
|
||||
'ck_food_info' => $_POST['ck_food_info'],
|
||||
'ck_hygiene_info' => $_POST['ck_hygiene_info'],
|
||||
'ck_health_info' => $_POST['ck_health_info'],
|
||||
'ck_pharma_info' => $_POST['ck_pharma_info'],
|
||||
'ck_other_info' => $_POST['ck_other_info'],
|
||||
),
|
||||
$_POST['ck_list'],
|
||||
$_POST['ck_owner_id']
|
||||
);
|
||||
//létrehozzuk az apply objektumot és berakjuk cookieba az id-t, azzal azonosítjuk a sessiont
|
||||
$new_apply_id = camp_apply::create_camp_apply($new_camp_kid_id);
|
||||
setcookie('badminton_camp_session_id', $new_apply_id, time()+60*60, '/');
|
||||
header('Location: /tabor/jelentkezes/2');
|
||||
break;
|
||||
case 'apply_2':
|
||||
# jelentkezés 2. lépés - kapcsolattartó adatai
|
||||
|
||||
//leellenőrizzük, hogy új kapcsolat típust adott-e meg, ha igen, fetöltjük, és kivesszük az id-t
|
||||
if ($_POST['cc_camp_contact_type_cct_id'] == 'new') {
|
||||
$new_cct_id = $sql->insert_into('camp_contact_type', array('cct_name' => $_POST['cct_add_new'], 'cct_owner' => $_POST['cc_owner_id']));
|
||||
$_POST['cc_camp_contact_type_cct_id'] = $new_cct_id;
|
||||
}
|
||||
|
||||
$new_cc_id = camp_contact::create_camp_contact(
|
||||
$_POST['cc_name'],
|
||||
$_POST['cc_mobile'],
|
||||
$_POST['cc_email'],
|
||||
$_POST['cc_facebook'],
|
||||
$_POST['cc_camp_contact_type_cct_id'],
|
||||
$_POST['cc_owner_id'],
|
||||
$_POST['cc_list']
|
||||
);
|
||||
|
||||
//hozzáadjuk a jelentkezéshez az új contact-ot
|
||||
$sql->insert_into('camp_apply_contact', array(
|
||||
'cac_camp_apply_capp_id' => $_COOKIE['badminton_camp_session_id'],
|
||||
'cac_camp_contact_cc_id' => $new_cc_id,
|
||||
'cac_is_responsible' => (!empty($_POST['cc_is_responsible'])?1:0),
|
||||
)
|
||||
);
|
||||
|
||||
//megnézzük, hogy továbblépünk, vagy vissza a contact megadós oldalra
|
||||
if (1 == $_POST['add_more']) {
|
||||
header('Location: /tabor/jelentkezes/2');
|
||||
}
|
||||
else {
|
||||
//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');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case 'apply_3':
|
||||
# kiválasztott felelős kapcsolattartó beállítása
|
||||
camp_apply::make_contact_responsible($_COOKIE['badminton_camp_session_id'], $_POST['cc_is_responsible'], true);
|
||||
header("Location: /tabor/jelentkezes/4");
|
||||
break;
|
||||
case 'apply_4':
|
||||
# jelentkezés lezárása
|
||||
camp_apply::update_camp_apply($_POST['camp_apply_id'], 2, $_POST['camp_accomodation'], $_POST['camp_shuttle'], date('Y-m-d H:i:s'), 'null', $_POST['camp_id']);
|
||||
header('Location: /tabor/jelentkezes/5');
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
|
||||
@@ -31,6 +31,7 @@ setlocale(LC_ALL, 'hu_HU');
|
||||
<link rel="stylesheet" type="text/css" href="/_css/form.css">
|
||||
<link rel="stylesheet" type="text/css" href="/_css/button.css">
|
||||
<link rel="stylesheet" type="text/css" href="/_css/addbutton.css">
|
||||
<link rel="stylesheet" type="text/css" href="/_css/login_form.css">
|
||||
<?php
|
||||
if ($page->is_page() && in_array($page->get_page(), array('view', 'preview'))) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="/_css/default_view.css">';
|
||||
@@ -44,6 +45,10 @@ setlocale(LC_ALL, 'hu_HU');
|
||||
echo '<link rel="stylesheet" type="text/css" href="/_css/default_coach.css">';
|
||||
}
|
||||
|
||||
if ($page->is_page() && ($page->get_page() == 'tabor')) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="/_css/camp.css">';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
82
template/templates/applies.tpl
Normal file
82
template/templates/applies.tpl
Normal file
@@ -0,0 +1,82 @@
|
||||
<h1 class="apply">Visszaigazolt jelentkezések</h1>
|
||||
<table class="apply_table">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Jelentkező</th>
|
||||
<th>Tábor helye, ideje</th>
|
||||
<th>Jelentkezés ideje</th>
|
||||
<th>Státusz</th>
|
||||
<th>Visszaigazolás dátuma</th>
|
||||
</tr>
|
||||
{if !count($apply_array)}
|
||||
<tr>
|
||||
<td colspan="6" class="no_data">Nincs még visszaigazolt jelentkezése</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $apply_array as $apply}
|
||||
<tr>
|
||||
<td>
|
||||
{$apply->get_capp_id()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_camp_kid_ck_id()->get_ck_name()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_camp_id()->get_camp_city()}
|
||||
({$short_months[$apply->get_capp_camp_id()->get_camp_from()|date_format:"%m"]}. {$apply->get_capp_camp_id()->get_camp_from()|date_format:"%e"}. -
|
||||
{if $apply->get_capp_camp_id()->get_camp_from()|date_format:"%m" != $apply->get_capp_camp_id()->get_camp_to()|date_format:"%m"}
|
||||
{$short_months[$apply->get_capp_camp_id()->get_camp_to()|date_format:"%m"]}.
|
||||
{/if}
|
||||
{$apply->get_capp_camp_id()->get_camp_to()|date_format:"%e"}.)
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_date()|substr:0:16}
|
||||
</td>
|
||||
<td style="color: {$color}; font-weight: bold;">
|
||||
{$apply->get_capp_status()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_accept_date()|substr:0:16}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
|
||||
<h1 class="apply">Függőben lévő jelentkezések</h1>
|
||||
<table class="apply_table smaller">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Jelentkező</th>
|
||||
<th>Tábor helye, ideje</th>
|
||||
<th>Jelentkezés ideje</th>
|
||||
</tr>
|
||||
{if !count($pending_apply_array)}
|
||||
<tr>
|
||||
<td colspan="4" class="no_data">Nincs függőben lévő jelentkezése</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $pending_apply_array as $apply}
|
||||
<tr>
|
||||
<td>
|
||||
{$apply->get_capp_id()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_camp_kid_ck_id()->get_ck_name()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_camp_id()->get_camp_city()}
|
||||
({$short_months[$apply->get_capp_camp_id()->get_camp_from()|date_format:"%m"]}. {$apply->get_capp_camp_id()->get_camp_from()|date_format:"%e"}. -
|
||||
{if $apply->get_capp_camp_id()->get_camp_from()|date_format:"%m" != $apply->get_capp_camp_id()->get_camp_to()|date_format:"%m"}
|
||||
{$short_months[$apply->get_capp_camp_id()->get_camp_to()|date_format:"%m"]}.
|
||||
{/if}
|
||||
{$apply->get_capp_camp_id()->get_camp_to()|date_format:"%e"}.)
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_date()|substr:0:16}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
188
template/templates/apply.tpl
Normal file
188
template/templates/apply.tpl
Normal file
@@ -0,0 +1,188 @@
|
||||
<div class="list">
|
||||
<h1>Jelentkező adatai</h1>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Név:
|
||||
</label>
|
||||
<div>{$apply->get_capp_camp_kid_ck_id()->get_ck_name()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Születés éve:
|
||||
</label>
|
||||
<div>{$apply->get_capp_camp_kid_ck_id()->get_ck_birth_year()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
TAJ-szám:
|
||||
</label>
|
||||
<div>{$apply->get_capp_camp_kid_ck_id()->get_ck_ss_number()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
E-mail cím:
|
||||
</label>
|
||||
<div>{$apply->get_capp_camp_kid_ck_id()->get_ck_email()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Mobilszám:
|
||||
</label>
|
||||
<div>{$apply->get_capp_camp_kid_ck_id()->get_ck_mobile()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Tollaslabda múlt:
|
||||
</label>
|
||||
<div><br>{nl2br($apply->get_capp_camp_kid_ck_id()->get_ck_badminton_history())}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Sport múlt:
|
||||
</label>
|
||||
<div>{$apply->get_capp_camp_kid_ck_id()->get_ck_sport_history()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Pólóméret:
|
||||
</label>
|
||||
<div>{$apply->get_capp_camp_kid_ck_id()->get_ck_shirt()->get_cshirt_name()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Étkezéssel kapcsolatos információk:
|
||||
</label>
|
||||
<div><br>{nl2br($apply->get_capp_camp_kid_ck_id()->get_ck_food_info())}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Tisztálkodással kapcsolatos információk:
|
||||
</label>
|
||||
<div><br>{nl2br($apply->get_capp_camp_kid_ck_id()->get_ck_hygiene_info())}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Egészségügyi információk:
|
||||
</label>
|
||||
<div><br>{nl2br($apply->get_capp_camp_kid_ck_id()->get_ck_health_info())}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Rendszeres vagy alkalmi gyógyszerek:
|
||||
</label>
|
||||
<div><br>{nl2br($apply->get_capp_camp_kid_ck_id()->get_ck_pharma_info())}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Egyéb információk:
|
||||
</label>
|
||||
<div><br>{nl2br($apply->get_capp_camp_kid_ck_id()->get_ck_other_info())}</div>
|
||||
</div>
|
||||
|
||||
<h1>Tábor adatok</h1>
|
||||
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Tábor típus:
|
||||
</label>
|
||||
<div>{$apply->get_capp_accomodation_type()->get_cat_name()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Labda típus:
|
||||
</label>
|
||||
<div>{$apply->get_capp_shuttle_type()->get_cst_name()}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h1>Felelős kapcsolattartó</h1>
|
||||
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Név:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_name()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Mobil:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_mobile()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
E-mail cím:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_email()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Facebook:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_facebook()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Kapcsolat:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_camp_contact_type()->get_cct_name()}</div>
|
||||
</div>
|
||||
|
||||
<h1>További kapcsolattartó(k)</h1>
|
||||
|
||||
{foreach $contacts as $res_cc}
|
||||
|
||||
<h2>{$res_cc->get_cc_name()}</h2>
|
||||
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Mobil:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_mobile()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
E-mail cím:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_email()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Facebook:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_facebook()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
<img src="/_image/person.png">
|
||||
Kapcsolat:
|
||||
</label>
|
||||
<div>{$res_cc->get_cc_camp_contact_type()->get_cct_name()}</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
|
||||
</div>
|
||||
356
template/templates/camp_apply.tpl
Normal file
356
template/templates/camp_apply.tpl
Normal file
@@ -0,0 +1,356 @@
|
||||
{if $step == 1}
|
||||
|
||||
<div class="form_wrapper">
|
||||
<form method="post" id="apply_1">
|
||||
<div><div><h1>1/3. Jelentkező adatainak megadása</h1></div></div>
|
||||
<input type="hidden" name="action" id="action" value="apply_1">
|
||||
<input type="hidden" name="ck_original_id" id="ck_original_id" value="null">
|
||||
<input type="hidden" name="ck_owner_id" id="ck_owner_id" value="{$user_login->get_cu_id()}">
|
||||
<div>
|
||||
<label class="desc" for="ck_list">Korábban megadott adatok:</label>
|
||||
<div>
|
||||
<select name="ck_list" id="ck_list">
|
||||
<option value="null"> - (új adatok megadása) </option>
|
||||
{foreach $kids as $kid}
|
||||
<option value="{$kid->get_ck_id()}">
|
||||
{$kid->get_ck_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<label class="desc" for="ck_name">Jelentkező neve:</label>
|
||||
<div><input type="text" name="ck_name" id="ck_name" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_birth_year">Születési év:</label>
|
||||
<div><input type="text" name="ck_birth_year" id="ck_birth_year" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_ss_number">TAJ szám:</label>
|
||||
<div><input type="text" name="ck_ss_number" id="ck_ss_number" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_email">E-mail cím:</label>
|
||||
<div><input type="text" name="ck_email" id="ck_email"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_mobile">Telefonszám:</label>
|
||||
<div><input type="text" name="ck_mobile" id="ck_mobile"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_badminton_history">Tollaslabda múlt:</label>
|
||||
<div><textarea rows="5" name="ck_badminton_history" id="ck_badminton_history"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_sport_history">Sport múlt:</label>
|
||||
<div><textarea rows="5" name="ck_sport_history" id="ck_sport_history"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_list">Pólóméret:</label>
|
||||
<div>
|
||||
<select name="ck_shirt_size_id" id="ck_shirt_size_id">
|
||||
{foreach $shirts as $shirt}
|
||||
<option value="{$shirt->get_cshirt_id()}">
|
||||
{$shirt->get_cshirt_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_food_info">Étkezéssel kapcsolatos tudnivalók:</label>
|
||||
<div><textarea rows="5" name="ck_food_info" id="ck_food_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_hygiene_info">Tisztálkodással kapcsolatos tudnivalók:</label>
|
||||
<div><textarea rows="5" name="ck_hygiene_info" id="ck_hygiene_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_health_info">Egészségügyi tudnivalók:</label>
|
||||
<div><textarea rows="5" name="ck_health_info" id="ck_health_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_pharma_info">Rendszeres vagy alkalmi gyógyszer:</label>
|
||||
<div><textarea rows="5" name="ck_pharma_info" id="ck_pharma_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_other_info">Egyéb tudnivalók:</label>
|
||||
<div><textarea rows="5" name="ck_other_info" id="ck_other_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Tovább a kapcsolattartó adataihoz">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{elseif $step == 2}
|
||||
|
||||
<div class="form_wrapper">
|
||||
<form method="post" id="apply_2">
|
||||
<div><div><h1>2/3. Kapcsolattartó adatainak megadása</h1></div></div>
|
||||
<input type="hidden" name="action" id="action" value="apply_2">
|
||||
<input type="hidden" name="camp_apply_id" id="camp_apply_id" value="{$camp_apply_id}">
|
||||
<input type="hidden" name="cc_original_id" id="cc_original_id" value="null">
|
||||
<input type="hidden" name="cc_owner_id" id="cc_owner_id" value="{$user_login->get_cu_id()}">
|
||||
<input type="hidden" name="add_more" id="add_more" value="0">
|
||||
<div>
|
||||
<label class="desc" for="ck_list">Korábban megadott adatok:</label>
|
||||
<div>
|
||||
<select name="cc_list" id="cc_list">
|
||||
<option value="null"> - (új adatok megadása) </option>
|
||||
{foreach $contacts as $contact}
|
||||
<option value="{$contact->get_cc_id()}">
|
||||
{$contact->get_cc_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<label class="desc" for="cc_name">Kapcsolattartó neve:</label>
|
||||
<div><input type="text" name="cc_name" id="cc_name" required></div>
|
||||
</div>
|
||||
{if !$has_responsible}
|
||||
<div>
|
||||
<label class="desc" for="cc_is_responsible">Felelős kapcsolattartó (jelentkezőnként 1 felelős kapcsolattartó megadása kötelező!):</label>
|
||||
<div><input type="checkbox" name="cc_is_responsible" id="cc_is_responsible" value="1" checked></div>
|
||||
</div>
|
||||
{/if}
|
||||
<div>
|
||||
<label class="desc" for="cc_mobile">Telefonszám:</label>
|
||||
<div><input type="text" name="cc_mobile" id="cc_mobile" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="cc_email">E-mail cím:</label>
|
||||
<div><input type="text" name="cc_email" id="cc_email" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="cc_facebook">Facebook:</label>
|
||||
<div><input type="text" name="cc_facebook" id="cc_facebook"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_list">Kapcsolat a jelentkezővel:</label>
|
||||
<div>
|
||||
<select name="cc_camp_contact_type_cct_id" id="cc_camp_contact_type_cct_id">
|
||||
{foreach $cct_array as $cct}
|
||||
<option value="{$cct->get_cct_id()}">
|
||||
{$cct->get_cct_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
<option value="new">- új megadása -</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="cct_extra_row"><input type="text" name="cct_add_new" id="cct_add_new" placeholder="Új kapcsolat megadása"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<button class="button black" id="add_more_cct">Mentés és új kapcsolattartó hozzáadása</button>
|
||||
</div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Tovább a tábor adatok megadásához">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{elseif $step == 3}
|
||||
|
||||
<div><h1>2/3. Kapcsolattartó adatainak megadása</h1></div>
|
||||
<div class="danger">Ön nem adott meg felelős kapcsolattartót. Kérjük, a jelentkezéshez válasszon ki 1 felelős kapcsolattartót!</div>
|
||||
<form method="post" id="apply_3">
|
||||
<input type="hidden" name="action" id="action" value="apply_3">
|
||||
<input type="hidden" name="camp_apply_id" id="camp_apply_id" value="{$camp_apply_id}">
|
||||
<table>
|
||||
{foreach $contacts as $contact}
|
||||
<tr>
|
||||
<td>{$contact->get_cc_name()}</td>
|
||||
<td><input type="radio" name="cc_is_responsible" value="{$contact->get_cc_id()}" {if $contact@first} checked{/if}></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<div>
|
||||
<input class="button black middle" type="submit" value="Tovább a tábor adatok megadásához">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{elseif $step == 4}
|
||||
|
||||
<div><h1>3/3. Tábor kiválasztása</h1></div>
|
||||
<form method="post" id="apply_4">
|
||||
<input type="hidden" name="action" id="action" value="apply_4">
|
||||
<input type="hidden" name="camp_apply_id" id="camp_apply_id" value="{$camp_apply_id}">
|
||||
<table>
|
||||
{foreach $camp_array as $camp}
|
||||
<td>{$camp->get_camp_city()}</td>
|
||||
<td>({$short_months[$camp->get_camp_from()|date_format:"%m"]}. {$camp->get_camp_from()|date_format:"%e"}. -
|
||||
{if $camp->get_camp_from()|date_format:"%m" != $camp->get_camp_to()|date_format:"%m"}
|
||||
{$short_months[$camp->get_camp_to()|date_format:"%m"]}.
|
||||
{/if}
|
||||
{$camp->get_camp_to()|date_format:"%e"}., {$camp->get_camp_type()->get_ct_name()})</td>
|
||||
<td><input id="camp_{$camp->get_camp_id()}" class="camp_id" type="radio" name="camp_id" value="{$camp->get_camp_id()}" {if $camp@first} checked{/if}></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<div id="accom_list"></div>
|
||||
<div id="shuttle_list"></div>
|
||||
<div>
|
||||
<input class="button black middle" type="submit" value="Jelentkezés leadása">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
$('.camp_id:checked').trigger('change');
|
||||
});
|
||||
</script>
|
||||
|
||||
{elseif $step == 5}
|
||||
|
||||
<h1>Jelentkezését sikeresen rögzítettük!</h1><br><br>
|
||||
<h2>A jelentkezés állapotát a 'Korábbi jelentkezések' menüpont alatt tekintheti meg!
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#cc_camp_contact_type_cct_id" ).change(function() {
|
||||
if ($(this).val() == 'new') {
|
||||
$("#cct_extra_row" ).show();
|
||||
}
|
||||
else {
|
||||
$("#cct_extra_row" ).hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#add_more_cct" ).click(function() {
|
||||
$("#add_more").val('1');
|
||||
$("#apply_2").submit();
|
||||
});
|
||||
|
||||
$(".camp_id").change(function() {
|
||||
$.post("/_ajax/get_camp_shuttle_list.php",
|
||||
{
|
||||
camp_id: $(this).val()
|
||||
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
console.log(pdata);
|
||||
if (pdata.length >= 2) {
|
||||
var content = '<h2>Kérjük, válassza ki a jelentkező által előnyben részesített labda típust!</h2><table>';
|
||||
$.each(pdata, function(shuttle_id, shuttle_name){
|
||||
content +=
|
||||
'\
|
||||
<tr>\
|
||||
<td>'+shuttle_name['cst_name']+'</td>\
|
||||
<td><input type="radio" name="camp_shuttle" value="'+shuttle_name['cst_id']+ '"' + (shuttle_id==0?' checked':'') +'></td>\
|
||||
</tr>\
|
||||
'
|
||||
});
|
||||
content += '</table>';
|
||||
}
|
||||
else {
|
||||
content = '<input type="hidden" name="camp_shuttle" value="'+pdata[0]['cst_id']+'">';
|
||||
}
|
||||
document.getElementById('shuttle_list').innerHTML = content;
|
||||
});
|
||||
|
||||
$.post("/_ajax/get_camp_accomodation_list.php",
|
||||
{
|
||||
camp_id: $(this).val()
|
||||
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
console.log(pdata);
|
||||
if (pdata.length >= 2) {
|
||||
var content = '<h2>Kérjük, válassza ki a tábor típusát!</h2><table>';
|
||||
$.each(pdata, function(accom_id, accom_data){
|
||||
content +=
|
||||
'\
|
||||
<tr>\
|
||||
<td>'+accom_data['cat_name']+'</td>\
|
||||
<td><input type="radio" name="camp_accomodation" value="'+accom_data['cat_id']+ '"' + (accom_id==0?' checked':'') +'></td>\
|
||||
</tr>\
|
||||
'
|
||||
});
|
||||
content += '</table>';
|
||||
}
|
||||
else {
|
||||
content = '<input type="hidden" name="camp_accomodation" value="'+pdata[0]['cat_id']+'">';
|
||||
}
|
||||
document.getElementById('accom_list').innerHTML = content;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$("#ck_list").change(function() {
|
||||
if ($("#ck_list").val() == 'null') {
|
||||
document.getElementById("apply_1").reset();
|
||||
}
|
||||
else {
|
||||
$.post("/_ajax/get_camp_kid_data.php",
|
||||
{
|
||||
camp_kid_id: $(this).val()
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
console.log(pdata);
|
||||
|
||||
$.each(pdata[0], function(index, ck_data){
|
||||
if (
|
||||
index != 'ck_deleted' &&
|
||||
index != 'ck_id' &&
|
||||
index != 'ck_original_id' &&
|
||||
index != 'ck_owner_id'
|
||||
) {
|
||||
$("#"+index).val(ck_data);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#cc_list").change(function() {
|
||||
if ($("#cc_list").val() == 'null') {
|
||||
document.getElementById("apply_2").reset();
|
||||
}
|
||||
else {
|
||||
$.post("/_ajax/get_camp_contact_data.php",
|
||||
{
|
||||
camp_contact_id: $(this).val()
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
console.log(pdata);
|
||||
$.each(pdata[0], function(index, ck_data){
|
||||
if (
|
||||
index != 'cc_id' &&
|
||||
index != 'cc_original_id' &&
|
||||
index != 'cc_owner_id'
|
||||
|
||||
) {
|
||||
$("#"+index).val(ck_data);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('tr').click(function() {
|
||||
$(this).find("input").attr('checked',true);
|
||||
});
|
||||
|
||||
</script>
|
||||
63
template/templates/camp_create.tpl
Normal file
63
template/templates/camp_create.tpl
Normal file
@@ -0,0 +1,63 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" value="camp_create">
|
||||
|
||||
<div>
|
||||
<label class="desc" for="camp_city">Helyszín:</label>
|
||||
<div><input type="text" name="camp_city" id="camp_city" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="camp_from">Tábor kezdete:</label>
|
||||
<div><input type="text" name="camp_from" id="camp_from" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="camp_to">Tábor vége:</label>
|
||||
<div><input type="text" name="camp_to" id="camp_to" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="camp_is_open">Lehet jelentkezni:</label>
|
||||
<div><input type="checkbox" name="camp_is_open" id="camp_is_open" value="1" checked></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="camp_camp_type_ct_id">Típus:</label>
|
||||
<div>
|
||||
<select name="camp_camp_type_ct_id" id="camp_camp_type_ct_id">
|
||||
{foreach $camp_type_array as $camp_type}
|
||||
<option value="{$camp_type->get_ct_id()}">
|
||||
{$camp_type->get_ct_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="shuttles">Labda típus:</label>
|
||||
<table>
|
||||
{foreach $shuttle_array as $shuttle}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="shuttles[]" value="{$shuttle->get_cst_id()}" class="coach_type"></td>
|
||||
<td class="coach">{$shuttle->get_cst_name()}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="shuttles">Bejárás típusa:</label>
|
||||
<table>
|
||||
{foreach $accomodation_array as $accomodation}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="accomodations[]" value="{$accomodation->get_cat_id()}" class="coach_type"></td>
|
||||
<td class="coach">{$accomodation->get_cat_name()}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Létrehozás">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
149
template/templates/camp_data_update.tpl
Normal file
149
template/templates/camp_data_update.tpl
Normal file
@@ -0,0 +1,149 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<div class="buttons">
|
||||
<a href="/admin/delete_camp/{$camp->get_camp_id()}" class="addbutton delete-big">Tábor törlése</a>
|
||||
</div>
|
||||
<input type="hidden" name="action" value="camp_update">
|
||||
<input type="hidden" name="camp_id" value="{$camp->get_camp_id()}">
|
||||
|
||||
<div>
|
||||
<label class="desc" for="camp_city">Helyszín:</label>
|
||||
<div><input type="text" name="camp_city" id="camp_city" value="{$camp->get_camp_city()}" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="camp_from">Tábor kezdete:</label>
|
||||
<div><input type="text" name="camp_from" id="camp_from" value="{$camp->get_camp_from()}" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="camp_to">Tábor vége:</label>
|
||||
<div><input type="text" name="camp_to" id="camp_to" value="{$camp->get_camp_to()}" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="camp_is_open">Lehet jelentkezni:</label>
|
||||
<div><input type="checkbox" name="camp_is_open" id="camp_is_open" value="1" {if 1==$camp->get_camp_is_open()}checked{/if}></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="camp_camp_type_ct_id">Típus:</label>
|
||||
<div>
|
||||
<select name="camp_camp_type_ct_id" id="camp_camp_type_ct_id">
|
||||
{foreach $camp_type_array as $camp_type}
|
||||
<option value="{$camp_type->get_ct_id()}" {if $camp->get_camp_camp_type_ct_id() == $camp_type->get_ct_id()}selected{/if}>
|
||||
{$camp_type->get_ct_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="shuttles">Labda típus:</label>
|
||||
<table>
|
||||
{foreach $shuttle_array as $shuttle}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="shuttles[]" value="{$shuttle->get_cst_id()}" class="coach_type" {if in_array($shuttle->get_cst_id(), $shuttles)}checked{/if}></td>
|
||||
<td class="coach">{$shuttle->get_cst_name()}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="shuttles">Bejárás típusa:</label>
|
||||
<table>
|
||||
{foreach $accomodation_array as $accomodation}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="accomodations[]" value="{$accomodation->get_cat_id()}" class="coach_type" {if in_array($accomodation->get_cat_id(), $accomodations)}checked{/if}></td>
|
||||
<td class="coach">{$accomodation->get_cat_name()}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Mentés">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h1 class="apply" id="applies">Függőben lévő jelentkezések</h1>
|
||||
<table class="apply_table smaller">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Jelentkező</th>
|
||||
<th>Jelentkezés ideje</th>
|
||||
<th>Elfogadás</th>
|
||||
<th>Elutasítás</th>
|
||||
</tr>
|
||||
{if !count($pending_apply_array)}
|
||||
<tr>
|
||||
<td colspan="4" class="no_data">Nincs függőben lévő jelentkezés</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $pending_apply_array as $apply}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/apply/{$apply->get_capp_id()}" class="bold">{$apply->get_capp_id()}</a>
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_camp_kid_ck_id()->get_ck_name()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_date()|substr:0:16}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/accept_apply/{$apply->get_capp_id()}"><img src="/_image/tick.png"></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/deny_apply/{$apply->get_capp_id()}"><img src="/_image/delete.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<h1 class="apply">Visszaigazolt jelentkezések</h1>
|
||||
<table class="apply_table smaller">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Jelentkező</th>
|
||||
<th>Jelentkezés ideje</th>
|
||||
<th>Státusz</th>
|
||||
<th>Visszaigazolva</th>
|
||||
<th>Módosítás</th>
|
||||
</tr>
|
||||
{if !count($apply_array)}
|
||||
<tr>
|
||||
<td colspan="5" class="no_data">Nincs még visszaigazolt jelentkezés</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $apply_array as $apply}
|
||||
<tr>
|
||||
<td class="bold">
|
||||
<a href="">{$apply->get_capp_id()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_camp_kid_ck_id()->get_ck_name()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_date()|substr:0:16}
|
||||
</td>
|
||||
<td style="color: {$color}; font-weight: bold;">
|
||||
{$apply->get_capp_status()}
|
||||
</td>
|
||||
<td>
|
||||
{$apply->get_capp_accept_date()|substr:0:16}
|
||||
</td>
|
||||
<td>
|
||||
{if $apply->get_capp_status() == 'Elutasítva'}
|
||||
<a href="/admin/accept_apply/{$apply->get_capp_id()}"><img src="/_image/tick.png"></a>
|
||||
{else}
|
||||
<a href="/admin/deny_apply/{$apply->get_capp_id()}"><img src="/_image/delete.png"></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
84
template/templates/camp_list.tpl
Normal file
84
template/templates/camp_list.tpl
Normal file
@@ -0,0 +1,84 @@
|
||||
<div class="buttons">
|
||||
<div class="buttons">
|
||||
<a href="/admin/create/camp" class="addbutton add-big">Új tábor létrehozása</a>
|
||||
<a href="/admin/camp_types" class="addbutton add-big">Tábor típusok</a>
|
||||
<a href="/admin/camp_shirt_type" class="addbutton add-big">Pólók</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list full_width">
|
||||
{foreach $camp_array as $camp}
|
||||
{if
|
||||
$camp@first ||
|
||||
(
|
||||
$camp_array[$camp@index]->get_camp_to()|substr:5:2 != $camp_array[$camp@index-1]->get_camp_to()|substr:5:2
|
||||
)
|
||||
|
||||
}
|
||||
{if !$camp@first &&
|
||||
$camp_array[$camp@index]->get_camp_to()|substr:5:2 != $camp_array[$camp@index-1]->get_camp_to()|substr:5:2
|
||||
}
|
||||
</div>
|
||||
{/if}
|
||||
<span onclick="block_action('block_{$camp->get_camp_to()|substr:0:4}{$camp->get_camp_to()|substr:5:2}');" class="date_separator clickable">{$camp_array[$camp@index]->get_camp_to()|substr:0:4}.
|
||||
{$months[$camp_array[$camp@index]->get_camp_to()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png">
|
||||
</span>
|
||||
<div id="block_{$camp->get_camp_to()|substr:0:4}{$camp->get_camp_to()|substr:5:2}" class="month_block">
|
||||
{/if}
|
||||
<a href="/admin/camps/{$camp->get_camp_id()}">
|
||||
<div class="list_item" {if $camp->has_pending_apply()}style="background-color: #ff9205;"{/if}>
|
||||
<img src="/_image/camp.png">
|
||||
{$camp->get_camp_from()|substr:0:4}.
|
||||
{$months[$camp_array[$camp@index]->get_camp_from()|substr:5:2]}
|
||||
{$camp->get_camp_from_day()}.
|
||||
|
||||
- {$camp->get_camp_to()|substr:0:4}.
|
||||
{$months[$camp_array[$camp@index]->get_camp_to()|substr:5:2]}
|
||||
{$camp->get_camp_to_day()}.
|
||||
|
||||
|
||||
({$camp->get_camp_city()})
|
||||
|
||||
{if $camp->has_pending_apply()}
|
||||
<span class="pending">[{$camp->has_pending_apply()} új jelentkezés]</span>
|
||||
{/if}
|
||||
</div>
|
||||
</a>
|
||||
{if $camp@last}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function open_block(block_id) {
|
||||
$("#"+block_id).slideDown("slow");
|
||||
}
|
||||
|
||||
function close_block(block_id) {
|
||||
$("#"+block_id).slideUp("slow");
|
||||
}
|
||||
|
||||
function block_action(block_id) {
|
||||
if ($("#"+block_id).is(':hidden')) {
|
||||
open_block(block_id);
|
||||
}
|
||||
else {
|
||||
close_block(block_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$( document ).ready(function() {
|
||||
var divs = $( "div[class=month_block]" );
|
||||
$( ".list" ).find( divs ).hide();
|
||||
var div_list = $( ".list" ).find( divs );
|
||||
|
||||
open_block(div_list[0].id);
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
17
template/templates/camp_shirt_create.tpl
Normal file
17
template/templates/camp_shirt_create.tpl
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" value="camp_shirt_create">
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="shirt_name">Póló típus neve:</label>
|
||||
<div><input type="text" name="shirt_name" id="shirt_name" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Létrehozás">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
23
template/templates/camp_shirt_data_edit.tpl
Normal file
23
template/templates/camp_shirt_data_edit.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<div class="buttons">
|
||||
<a href="/admin/delete_camp_shirt/{$camp_shirt_array.cshirt_id}" class="addbutton delete-big">Póló törlése</a>
|
||||
</div>
|
||||
<input type="hidden" name="action" value="camp_shirt_data_edit">
|
||||
<input type="hidden" name="shirt_id" value="{$camp_shirt_array.cshirt_id}">
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="shirt_name">Póló típus neve:</label>
|
||||
<div><input type="text" name="shirt_name" id="shirt_name" value="{$camp_shirt_array.cshirt_name}" required></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Mentés">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
18
template/templates/camp_shirt_list.tpl
Normal file
18
template/templates/camp_shirt_list.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="buttons">
|
||||
|
||||
<a href="/admin/create/camp_shirt" class="addbutton add-big">Új póló hozzáadása</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="list">
|
||||
{foreach $shirt_assoc_array as $shirt}
|
||||
<a href="/admin/camp_shirt_type/{$shirt.cshirt_id}">
|
||||
<div class="list_item">
|
||||
<img src="/_image/shirt.png">
|
||||
{$shirt.cshirt_name}
|
||||
</div>
|
||||
</a>
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
|
||||
17
template/templates/camp_type_create.tpl
Normal file
17
template/templates/camp_type_create.tpl
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" value="camp_type_create">
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="ct_name">Tábor típus neve:</label>
|
||||
<div><input type="text" name="ct_name" id="ct_name" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Létrehozás">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
23
template/templates/camp_type_list.tpl
Normal file
23
template/templates/camp_type_list.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" value="camp_type_update">
|
||||
<div class="buttons">
|
||||
<a href="/admin/create/camp_type" class="addbutton add-big">Új tábor típus hozzáadása</a>
|
||||
</div>
|
||||
{foreach $ct_array as $ct}
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<input type="text" name="ct_{$ct->get_ct_id()}" id="scc_{$ct->get_ct_id()}" value="{$ct->get_ct_name()}">
|
||||
<a href="/admin/delete_camp_type/{$ct->get_ct_id()}" class="addbutton delete">Törlés</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/foreach}
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<input class="button black" type="submit" value="Mentés">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,3 +1,5 @@
|
||||
<div class="info">
|
||||
<p class="info">
|
||||
{$setting->get_setv_text()}
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
@@ -48,6 +48,8 @@
|
||||
{$log->get_log_user()->get_ua_name()}
|
||||
{elseif $log->get_log_category()->get_logc_type() == 2}
|
||||
{$log->get_log_user()->get_uk_name()}
|
||||
{elseif $log->get_log_category()->get_logc_type() == 3}
|
||||
{$log->get_log_user()->get_cu_email()}
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$log->get_log_category()->get_logc_title()}</td>
|
||||
|
||||
@@ -1,23 +1,12 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" id="action" value="login">
|
||||
<input type="hidden" name="user_type" id="user_type" value="1">
|
||||
<input type="hidden" name="page" id="page" value="{$page}">
|
||||
<div>
|
||||
<label class="desc" id="title1" for="user_name">Név:</label>
|
||||
<div><input type="text" name="user_name" id="user_name" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="user_password">Jelszó:</label>
|
||||
<div><input type="password" name="user_password" id="user_password" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Belépés">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="login-page">
|
||||
<div class="form">
|
||||
<form class="login-form" id="login-form" method="post">
|
||||
<h1>Bejelentkezés</h1>
|
||||
<input type="hidden" name="action" value="login">
|
||||
<input type="text" name="user_name" placeholder="{if $page == 'tabor'}email cím{else}név{/if}" required/>
|
||||
<input type="password" name="user_password" placeholder="jelszó" required/>
|
||||
<input type="submit" value="Belépés">
|
||||
{if $page == 'tabor'}<p class="message">Regisztrációhoz kattintsion ide: <a href="/tabor/regisztracio">Regisztráció</a></p>{/if}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
<span class="mobile_logout">
|
||||
{if $page == 'admin' || $page == 'coach' || $page == 'coach_preview'}
|
||||
{$user_login->get_ua_name()}
|
||||
{else}
|
||||
{elseif $page == 'view' || $page == 'preview'}
|
||||
{$user_login->get_uk_name()}
|
||||
{elseif $page == 'tabor'}
|
||||
{$user_login->get_cu_email()}
|
||||
{/if}
|
||||
</span>
|
||||
</li>
|
||||
@@ -23,7 +25,7 @@
|
||||
|
||||
{else}
|
||||
|
||||
<li class="login"><a href="#">Bejelentkezés</a></li>
|
||||
<li class="login"><a href="/{$page}">Badminton Coach{if $page == 'tabor'} - tábori jelentkezés{/if}</a></li>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -33,8 +35,10 @@
|
||||
<span class="name">
|
||||
{if $page == 'admin' || $page == 'coach' || $page == 'coach_preview'}
|
||||
{$user_login->get_ua_name()}
|
||||
{else}
|
||||
{elseif $page == 'view' || $page == 'preview'}
|
||||
{$user_login->get_uk_name()}
|
||||
{elseif $page == 'tabor'}
|
||||
{$user_login->get_cu_email()}
|
||||
{/if}
|
||||
</span>
|
||||
<img src="/_image/logout{if $page == 'view' || $page == 'preview'}_blue{/if}.png">
|
||||
|
||||
38
template/templates/register.tpl
Normal file
38
template/templates/register.tpl
Normal file
@@ -0,0 +1,38 @@
|
||||
<style type="text/css">
|
||||
.form .register-form {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="login-page">
|
||||
<div class="form">
|
||||
<form class="register-form" onsubmit="return check_form();" method="post">
|
||||
<input type="hidden" name="action" value="user_register">
|
||||
<h1>Regisztráció</h1>
|
||||
{if isset($error_code)}
|
||||
<p class="error_msg">
|
||||
{$error_msg[$error_code]}
|
||||
</p>
|
||||
{/if}
|
||||
<input type="text" name="user_email" placeholder="e-mail cím" required />
|
||||
<input type="password" name="user_password" id="user_password" placeholder="jelszó" required />
|
||||
<input type="password" name="user_password_again" id="user_password_again" placeholder="jelszó újra" required />
|
||||
<input type="submit" value="regisztráció">
|
||||
<p class="message">Ha már korábban regisztrált, és szeretne bejelentkezni, akkor kattintson <a href="/tabor">ide</a>!</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_form() {
|
||||
$pswd = $("#user_password").val();
|
||||
$pswd_again = $("#user_password_again").val();
|
||||
|
||||
if ($pswd != $pswd_again) {
|
||||
alert('A két jelszónak egyeznie kell!');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user