added leader and helpers field to camp
This commit is contained in:
@@ -8,7 +8,9 @@ class camp
|
||||
private $camp_id;
|
||||
private $camp_city;
|
||||
private $camp_from;
|
||||
private $camp_to;
|
||||
private $camp_to;
|
||||
private $camp_leader;
|
||||
private $camp_helpers;
|
||||
private $camp_camp_type_ct_id; //ID
|
||||
private $camp_type; //OBJ
|
||||
private $camp_shuttle = array(); //array
|
||||
@@ -197,6 +199,26 @@ class camp
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_camp_leader() {
|
||||
return $this->camp_leader;
|
||||
}
|
||||
|
||||
private function set_camp_leader($_item) {
|
||||
$this->camp_leader = $_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_camp_helpers() {
|
||||
return $this->camp_helpers;
|
||||
}
|
||||
|
||||
private function set_camp_helpers($_item) {
|
||||
$this->camp_helpers = $_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());
|
||||
@@ -234,13 +256,15 @@ class camp
|
||||
|
||||
}
|
||||
|
||||
public static function create_camp($_city, $_from, $_to, $_is_open, $_ct_id, $_shuttles, $_accoms) {
|
||||
public static function create_camp($_city, $_from, $_to, $_leader, $_helpers, $_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_leader' => $_leader,
|
||||
'camp_helpers' => $_helpers,
|
||||
'camp_is_open' => $_is_open,
|
||||
'camp_camp_type_ct_id' => $_ct_id
|
||||
));
|
||||
@@ -259,13 +283,15 @@ class camp
|
||||
|
||||
}
|
||||
|
||||
public static function update_camp($_city, $_from, $_to, $_is_open, $_ct_id, $_shuttles, $_accoms, $_camp_id) {
|
||||
public static function update_camp($_city, $_from, $_to, $_leader, $_helpers, $_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_leader' => $_leader,
|
||||
'camp_helpers' => $_helpers,
|
||||
'camp_is_open' => $_is_open,
|
||||
'camp_camp_type_ct_id' => $_ct_id
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user