206 lines
3.6 KiB
PHP
206 lines
3.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* MILESTONE COMPETITION
|
|
*/
|
|
class milestone_competition
|
|
{
|
|
private $msc_id;
|
|
private $msc_date;
|
|
private $msc_name;
|
|
private $msc_category;
|
|
private $msc_place;
|
|
private $msc_location;
|
|
private $msc_month;
|
|
private $msc_matches = null;
|
|
|
|
|
|
|
|
public function set_msc_data_by_id($_msc_id) {
|
|
global $sql;
|
|
$cat_assoc_array = $sql->assoc_array("select * from milestone_competition where msc_id = " . $_msc_id);
|
|
$cat_array = $cat_assoc_array[0];
|
|
//alapadatok
|
|
foreach ($cat_array as $field => $value) {
|
|
$function_name = "set_" . $field;
|
|
$this->$function_name($value);
|
|
}
|
|
}
|
|
|
|
public static function create_msc($_date, $_name, $_category, $_location, $_place, $_matches = NULL)
|
|
{
|
|
global $sql;
|
|
return $sql->insert_into('milestone_competition', array(
|
|
'msc_date' => $_date,
|
|
'msc_name' => $_name,
|
|
'msc_category' => $_category,
|
|
'msc_location' => $_location,
|
|
'msc_place' => $_place,
|
|
'msc_matches' => $_matches,
|
|
));
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get_msc_id()
|
|
{
|
|
return $this->msc_id;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $msc_id
|
|
*
|
|
* @return self
|
|
*/
|
|
public function set_msc_id($msc_id)
|
|
{
|
|
$this->msc_id = $msc_id;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get_msc_date()
|
|
{
|
|
return $this->msc_date;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $msc_date
|
|
*
|
|
* @return self
|
|
*/
|
|
public function set_msc_date($msc_date)
|
|
{
|
|
$this->msc_date = $msc_date;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get_msc_name()
|
|
{
|
|
return $this->msc_name;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $msc_name
|
|
*
|
|
* @return self
|
|
*/
|
|
public function set_msc_name($msc_name)
|
|
{
|
|
$this->msc_name = $msc_name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get_msc_category()
|
|
{
|
|
return $this->msc_category;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $msc_category
|
|
*
|
|
* @return self
|
|
*/
|
|
public function set_msc_category($msc_category)
|
|
{
|
|
$this->msc_category = $msc_category;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get_msc_place()
|
|
{
|
|
return $this->msc_place;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $msc_place
|
|
*
|
|
* @return self
|
|
*/
|
|
public function set_msc_place($msc_place)
|
|
{
|
|
$this->msc_place = $msc_place;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get_msc_matches()
|
|
{
|
|
return $this->msc_matches;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $msc_matches
|
|
*
|
|
* @return self
|
|
*/
|
|
public function set_msc_matches($msc_matches)
|
|
{
|
|
$this->msc_matches = $msc_matches;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get_msc_month()
|
|
{
|
|
return $this->msc_month;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $msc_month
|
|
*
|
|
* @return self
|
|
*/
|
|
public function set_msc_month($msc_month)
|
|
{
|
|
$this->msc_month = $msc_month;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get_msc_location()
|
|
{
|
|
return $this->msc_location;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $msc_location
|
|
*
|
|
* @return self
|
|
*/
|
|
public function set_msc_location($msc_location)
|
|
{
|
|
$this->msc_location = $msc_location;
|
|
|
|
return $this;
|
|
}
|
|
}
|
|
|
|
|
|
?>
|