20161115
This commit is contained in:
@@ -70,6 +70,14 @@ class page {
|
||||
$tpl = "presence";
|
||||
include('include_presence.php');
|
||||
break;
|
||||
case 'training_types':
|
||||
# EDZÉS TÍPUSOK
|
||||
include('include_training_types.php');
|
||||
break;
|
||||
case 'delete_training_type':
|
||||
# EDZÉS TÍPUS TÖRLÉS
|
||||
include('include_delete_training_type.php');
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
@@ -81,7 +89,7 @@ class page {
|
||||
}
|
||||
break;
|
||||
case 'style':
|
||||
var_dump('haha');
|
||||
//var_dump('haha');
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
|
||||
@@ -74,13 +74,14 @@ class training {
|
||||
$last_day = date("t", strtotime($_training_value_array['tr_date']));
|
||||
|
||||
for ($actual_day=date('d', strtotime($_training_value_array['tr_date'])); $actual_day <= $last_day; $actual_day=$actual_day+7) {
|
||||
$sql->insert_into('training',
|
||||
$new_tr_id = $sql->insert_into('training',
|
||||
array(
|
||||
'tr_date' => date('Y-m') . '-' . $actual_day . ' ' . date('H:i', strtotime($_training_value_array['tr_date'])),
|
||||
'tr_training_type_trt_id' => $_training_value_array['tr_training_type_trt_id'],
|
||||
'tr_user_coach_uc_id' => $_training_value_array['tr_user_coach_uc_id']
|
||||
)
|
||||
);
|
||||
//itt kell berakni a coach-okat
|
||||
}
|
||||
//var_dump($day_array);
|
||||
}
|
||||
|
||||
33
_class/class_training_type.php
Normal file
33
_class/class_training_type.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
# EDZÉS TÍPUS OSZTÁLY
|
||||
|
||||
|
||||
class training_type {
|
||||
private $trt_id;
|
||||
private $trt_name;
|
||||
|
||||
public function set_trt_id($_id) {
|
||||
$this->trt_id = $_id;
|
||||
}
|
||||
|
||||
public function set_trt_name($_name) {
|
||||
$this->trt_name = $_name;
|
||||
}
|
||||
|
||||
public function get_trt_id() {
|
||||
return $this->trt_id;
|
||||
}
|
||||
|
||||
public function get_trt_name() {
|
||||
return $this->trt_name;
|
||||
}
|
||||
|
||||
public function create_training_type($_trt_value_array) {
|
||||
global $sql;
|
||||
return $sql->insert_into('training_type', $_trt_value_array);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -11,6 +11,7 @@
|
||||
class user_kid extends user_parent {
|
||||
private $user_id;
|
||||
private $user_name;
|
||||
private $user_is_active;
|
||||
private $user_last_name;
|
||||
private $user_first_name;
|
||||
private $user_password;
|
||||
@@ -41,12 +42,8 @@ class user_kid extends user_parent {
|
||||
$this->user_name = $_uname;
|
||||
}
|
||||
|
||||
public function set_uk_last_name($_u_last_name) {
|
||||
$this->user_last_name = $_u_last_name;
|
||||
}
|
||||
|
||||
public function set_uk_first_name($_u_first_name) {
|
||||
$this->user_first_name = $_u_first_name;
|
||||
public function set_uk_is_active($_active) {
|
||||
$this->user_is_active = $_active;
|
||||
}
|
||||
|
||||
public function set_uk_password($_u_pass) {
|
||||
@@ -260,6 +257,9 @@ class user_kid extends user_parent {
|
||||
|
||||
public function update_user($_user_value_array, $_user_id) {
|
||||
global $sql;
|
||||
//a módosítás dátumát
|
||||
$_user_value_array['uk_last_modified'] = date("Y-m-d");
|
||||
|
||||
//ha nincs bejelölve h aktív akkor nem kapja meg ezt az értéket, manuálisan kell beállítani
|
||||
if (!isset($_user_value_array['uk_is_active'])) $_user_value_array['uk_is_active'] = 0;
|
||||
$sql->update_table('user_kid', $_user_value_array, array('uk_id' => $_user_id));
|
||||
|
||||
Reference in New Issue
Block a user