groups
This commit is contained in:
86
_class/class_user_group_category.php
Normal file
86
_class/class_user_group_category.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
class user_group_category {
|
||||
private $ugc_id;
|
||||
private $ugc_name;
|
||||
private $ugc_user_group_ug_id;
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ugc_id()
|
||||
{
|
||||
return $this->ugc_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $ugc_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function set_ugc_id($ugc_id)
|
||||
{
|
||||
$this->ugc_id = $ugc_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ugc_name()
|
||||
{
|
||||
return $this->ugc_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $ugc_name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function set_ugc_name($ugc_name)
|
||||
{
|
||||
$this->ugc_name = $ugc_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ugc_user_group_ug_id()
|
||||
{
|
||||
return $this->ugc_user_group_ug_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $ugc_user_group_ug_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function set_ugc_user_group_ug_id($ugc_user_group_ug_id)
|
||||
{
|
||||
$this->ugc_user_group_ug_id = $ugc_user_group_ug_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function set_ugc_data_by_id($_id) {
|
||||
global $sql;
|
||||
$set_data_assoc_array = $sql->assoc_array("select * from user_group_category where ugc_id = " . $_id);
|
||||
$set_data_array = $set_data_assoc_array[0];
|
||||
foreach ($set_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value); //alapadatok beállítása
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function get_ugc_by_name($_name, $_group_id) {
|
||||
global $sql;
|
||||
return $sql->single_varible("select ugc_id from user_group_category where ugc_user_group_ug_id = " . $_group_id . " AND ugc_name = '".$_name."';");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user