camp fixes; cookie box

This commit is contained in:
Ricsi
2017-06-12 00:31:22 +02:00
parent f17adf4850
commit fa0e1a6488
23 changed files with 534 additions and 208 deletions

View File

@@ -216,6 +216,11 @@ class camp_apply {
$sql->update_table('camp_apply', array('capp_status' => $_status_id, 'capp_accept_date' => date("Y-m-d H:i:s")), array('capp_id' => $_apply_id));
}
public static function has_contact($_capp_id) {
global $sql;
return $sql->num_of_rows('SELECT * FROM camp_apply_contact WHERE cac_camp_apply_capp_id = ' . $_capp_id . ';');
}
public function set_capp_data_by_id($_id) {
global $sql;
$capp_data_assoc_array = $sql->assoc_array("select * from camp_apply where capp_id = " . $_id);
@@ -246,6 +251,14 @@ class camp_apply {
}
}
public function get_responsible_contact() {
global $sql;
$cc_id = $sql->single_variable("SELECT cac_camp_contact_cc_id FROM camp_apply_contact WHERE cac_camp_apply_capp_id = " . $this->get_capp_id() . " AND cac_is_responsible = 1;");
$cc = new camp_contact();
$cc->set_cc_data_by_id($cc_id);
return $cc;
}
//egy létező jelentkezésnél felelős kapcsolattartóra állít valakit
public static function make_contact_responsible($_apply_id, $_cc_id, $_is_responsible = false) {
global $sql;