information data merged to master
This commit is contained in:
@@ -152,6 +152,9 @@ class page {
|
||||
case 'money_update':
|
||||
# FRISSÍTÉS
|
||||
include('include_money_update.php');
|
||||
case 'settings':
|
||||
# BEÁLLÍTÁSOK
|
||||
include('include_settings.php');
|
||||
break;
|
||||
case 'delete_training_type':
|
||||
# EDZÉS TÍPUS TÖRLÉS
|
||||
@@ -220,6 +223,10 @@ class page {
|
||||
# napló, edzéslista
|
||||
include('include_diary.php');
|
||||
break;
|
||||
case 'information':
|
||||
# információk
|
||||
include('include_information.php');
|
||||
break;
|
||||
default:
|
||||
include('include_diary.php');
|
||||
break;
|
||||
|
||||
62
_class/class_setting.php
Normal file
62
_class/class_setting.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
class setting {
|
||||
private $set_id;
|
||||
private $set_name;
|
||||
private $set_setting_type_st_id; //id
|
||||
private $set_setting_type; //obj
|
||||
|
||||
public function set_setting_data_by_id($_id) {
|
||||
global $sql;
|
||||
$set_data_assoc_array = $sql->assoc_array("select * from setting where set_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
|
||||
|
||||
if ($field == 'set_setting_type_st_id') {
|
||||
$new_st = new setting_type();
|
||||
$new_st->set_setting_type_data_by_id($value);
|
||||
$this->set_set_setting_type($new_st);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function set_set_id($_item) {
|
||||
$this->set_id = $_item;
|
||||
}
|
||||
|
||||
public function set_set_name($_item) {
|
||||
$this->set_name = $_item;
|
||||
}
|
||||
|
||||
public function set_set_setting_type_st_id($_item) {
|
||||
$this->set_setting_type_st_id = $_item;
|
||||
}
|
||||
|
||||
public function set_set_setting_type($_item) {
|
||||
$this->set_setting_type = $_item;
|
||||
}
|
||||
|
||||
|
||||
public function get_set_id() {
|
||||
return $this->set_id;
|
||||
}
|
||||
|
||||
public function get_set_name() {
|
||||
return $this->set_name;
|
||||
}
|
||||
|
||||
public function get_set_setting_type_st_id() {
|
||||
return $this->set_setting_type_st_id;
|
||||
}
|
||||
|
||||
public function get_set_setting_type() {
|
||||
return $this->set_setting_type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
46
_class/class_setting_type.php
Normal file
46
_class/class_setting_type.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
class setting_type {
|
||||
private $st_id;
|
||||
private $st_name;
|
||||
private $st_setting_data_type; //int, varchar, text, date
|
||||
|
||||
public function set_setting_type_data_by_id($_id) {
|
||||
global $sql;
|
||||
$st_data_assoc_array = $sql->assoc_array("select * from setting_type where st_id = " . $_id);
|
||||
$st_data_array = $st_data_assoc_array[0];
|
||||
foreach ($st_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value); //alapadatok beállítása
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function set_st_id($_item) {
|
||||
$this->st_id = $_item;
|
||||
}
|
||||
|
||||
public function set_st_name($_item) {
|
||||
$this->st_name = $_item;
|
||||
}
|
||||
|
||||
public function set_st_setting_data_type($_item) {
|
||||
$this->st_setting_data_type = $_item;
|
||||
}
|
||||
|
||||
public function get_st_id() {
|
||||
return $this->st_id;
|
||||
}
|
||||
|
||||
public function get_st_name() {
|
||||
return $this->st_name;
|
||||
}
|
||||
|
||||
public function get_st_setting_data_type() {
|
||||
return $this->st_setting_data_type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
100
_class/class_setting_value.php
Normal file
100
_class/class_setting_value.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
class setting_value {
|
||||
private $setv_id;
|
||||
private $setv_set_date;
|
||||
private $setv_setting_set_id; //id
|
||||
private $setv_setting; //obj
|
||||
private $setv_int;
|
||||
private $setv_varchar;
|
||||
private $setv_text;
|
||||
private $setv_date;
|
||||
|
||||
|
||||
public function set_setv_id($_item) {
|
||||
$this->setv_id = $_item;
|
||||
}
|
||||
|
||||
public function set_setv_set_date($_item) {
|
||||
$this->setv_set_date = $_item;
|
||||
}
|
||||
|
||||
public function set_setv_setting_set_id($_item) {
|
||||
$this->setv_setting_set_id = $_item;
|
||||
}
|
||||
|
||||
public function set_setv_setting($_item) {
|
||||
$this->setv_setting = $_item;
|
||||
}
|
||||
|
||||
public function set_setv_int($_item) {
|
||||
$this->setv_int = $_item;
|
||||
}
|
||||
|
||||
public function set_setv_varchar($_item) {
|
||||
$this->setv_varchar = $_item;
|
||||
}
|
||||
|
||||
public function set_setv_text($_item) {
|
||||
$this->setv_text = $_item;
|
||||
}
|
||||
|
||||
public function set_setv_date($_item) {
|
||||
$this->setv_date = $_item;
|
||||
}
|
||||
|
||||
public function get_setv_id() {
|
||||
return $this->setv_id;
|
||||
}
|
||||
|
||||
public function get_setv_set_date() {
|
||||
return $this->setv_set_date;
|
||||
}
|
||||
|
||||
public function get_setv_setting_set_id() {
|
||||
return $this->setv_setting_set_id;
|
||||
}
|
||||
|
||||
public function get_setv_setting() {
|
||||
return $this->setv_setting;
|
||||
}
|
||||
|
||||
public function get_setv_int() {
|
||||
return $this->setv_int;
|
||||
}
|
||||
|
||||
public function get_setv_varchar() {
|
||||
return $this->setv_varchar;
|
||||
}
|
||||
|
||||
public function get_setv_text() {
|
||||
return $this->setv_text;
|
||||
}
|
||||
|
||||
public function get_setv_date() {
|
||||
return $this->setv_date;
|
||||
}
|
||||
|
||||
public function set_setting_value_data_by_id($_id) {
|
||||
//SETTING ID ALAPJÁN KÉRI LE;
|
||||
//HA KELL, LEHET KÜLÖN FUNCTION-T ÍRNI HOGY ID ALAPJÁN KÉRJE
|
||||
global $sql;
|
||||
$set_data_assoc_array = $sql->assoc_array("select * from setting_value where setv_setting_set_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
|
||||
|
||||
if ($field == 'setv_setting_set_id') {
|
||||
$new_set = new setting();
|
||||
$new_set->set_setting_data_by_id($value);
|
||||
$this->set_setv_setting($new_set);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user