change camp list styling
This commit is contained in:
@@ -169,9 +169,9 @@ class camp
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_camp_from()
|
||||
public function get_camp_from($_formatted = false)
|
||||
{
|
||||
return $this->camp_from;
|
||||
return !$_formatted ? $this->camp_from : date('Y. m. d.', strtotime($this->camp_from));
|
||||
}
|
||||
|
||||
public function get_camp_from_day()
|
||||
@@ -213,9 +213,9 @@ class camp
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_camp_to()
|
||||
public function get_camp_to($_formatted = false)
|
||||
{
|
||||
return $this->camp_to;
|
||||
return !$_formatted ? $this->camp_to : date('Y. m. d.', strtotime($this->camp_to));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -378,19 +378,19 @@ class camp
|
||||
{
|
||||
global $sql;
|
||||
|
||||
if ("" === $_name) {
|
||||
if ('' === $_name) {
|
||||
$_name = 'null';
|
||||
}
|
||||
|
||||
if ("" === $_count) {
|
||||
if ('' === $_count) {
|
||||
$_count = 'null';
|
||||
}
|
||||
|
||||
if ("" === $_price) {
|
||||
if ('' === $_price) {
|
||||
$_price = 'null';
|
||||
}
|
||||
|
||||
if ("" === $_info) {
|
||||
if ('' === $_info) {
|
||||
$_info = 'null';
|
||||
}
|
||||
|
||||
@@ -413,19 +413,19 @@ class camp
|
||||
{
|
||||
global $sql;
|
||||
|
||||
if ("" === $_name) {
|
||||
if ('' === $_name) {
|
||||
$_name = 'null';
|
||||
}
|
||||
|
||||
if ("" === $_count) {
|
||||
if ('' === $_count) {
|
||||
$_count = 'null';
|
||||
}
|
||||
|
||||
if ("" === $_price) {
|
||||
if ('' === $_price) {
|
||||
$_price = 'null';
|
||||
}
|
||||
|
||||
if ("" === $_info) {
|
||||
if ('' === $_info) {
|
||||
$_info = 'null';
|
||||
}
|
||||
|
||||
@@ -447,4 +447,16 @@ class camp
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function get_camp_accepted_applies_count()
|
||||
{
|
||||
global $sql;
|
||||
|
||||
return $sql->single_variable("
|
||||
SELECT count(distinct capp_id) as capp_count
|
||||
FROM camp_apply
|
||||
WHERE capp_camp_id = {$this->get_camp_id()}
|
||||
AND capp_status = 3
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user