updates and restart camps
This commit is contained in:
@@ -8,9 +8,8 @@ class money_deposit {
|
||||
private $mod_id;
|
||||
private $mod_user_kid_uk_id; //ID
|
||||
private $mod_user_kid; //OBJECT
|
||||
private $mod_date;
|
||||
private $mod_sum;
|
||||
private $mod_payment_type;
|
||||
private $mod_money_income_mi_id; //ID
|
||||
private $mod_money_income; //OBJECT
|
||||
private $mod_deleted;
|
||||
|
||||
public function set_mod_id($_id) {
|
||||
@@ -25,16 +24,12 @@ class money_deposit {
|
||||
$this->mod_user_kid = $_user_kid;
|
||||
}
|
||||
|
||||
public function set_mod_date($_date) {
|
||||
$this->mod_date = $_date;
|
||||
public function set_mod_money_income_mi_id($_money_income_mi_id) {
|
||||
$this->mod_money_income_mi_id = $_money_income_mi_id;
|
||||
}
|
||||
|
||||
public function set_mod_sum($_sum) {
|
||||
$this->mod_sum = $_sum;
|
||||
}
|
||||
|
||||
public function set_mod_payment_type_pt_id($_payment_type) {
|
||||
$this->mod_payment_type = $_payment_type;
|
||||
public function set_mod_money_income($_money_income) {
|
||||
$this->mod_money_income = $_money_income;
|
||||
}
|
||||
|
||||
public function set_mod_deleted($_deleted) {
|
||||
@@ -53,32 +48,12 @@ class money_deposit {
|
||||
return $this->mod_user_kid;
|
||||
}
|
||||
|
||||
public function get_mod_payment_type_pt_id() {
|
||||
return $this->mod_payment_type;
|
||||
public function get_mod_money_income_mi_id() {
|
||||
return $this->mod_money_income_mi_id;
|
||||
}
|
||||
|
||||
|
||||
public function get_mod_date($_formatted = false) {
|
||||
return !$_formatted ? $this->mod_date : date("Y. m. d.", strtotime($this->mod_date));
|
||||
}
|
||||
|
||||
public function get_mod_date_day() {
|
||||
$day = date("d", strtotime($this->mod_date));
|
||||
if (substr($day, 0, 1) == '0') return substr($day, 1, 1);
|
||||
return date("d", strtotime($this->mod_date));
|
||||
}
|
||||
|
||||
public function get_mod_date_day_of_week() {
|
||||
return date("w", strtotime($this->mod_date));
|
||||
}
|
||||
|
||||
public function get_mod_sum($formatted = null) {
|
||||
if (!$formatted) {
|
||||
return $this->mod_sum;
|
||||
}
|
||||
else {
|
||||
return number_format($this->mod_sum, 0, '', ' ');
|
||||
}
|
||||
public function get_mod_money_income() {
|
||||
return $this->mod_money_income;
|
||||
}
|
||||
|
||||
public function get_mod_deleted() {
|
||||
@@ -98,37 +73,48 @@ class money_deposit {
|
||||
$new_user->set_user_data_by_id($value);
|
||||
$this->set_mod_user_kid($new_user);
|
||||
}
|
||||
if ($field == "mod_payment_type") {
|
||||
$new_pt = new payment_type();
|
||||
$new_pt->set_pt_data_by_id($value);
|
||||
$this->set_mod_payment_type_pt_id($new_pt);
|
||||
if ($field == "mod_money_income_mi_id") {
|
||||
$new_mi = new money_income();
|
||||
$new_mi->set_mi_data_by_id($value);
|
||||
$this->set_mod_money_income($new_mi);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function create_money_deposit($_user_id, $_date, $_sum, $_pt) {
|
||||
global $sql;
|
||||
return $sql->insert_into('money_deposit', array(
|
||||
'mod_user_kid_uk_id' => $_user_id,
|
||||
'mod_date' => $_date,
|
||||
'mod_payment_type_pt_id' => $_pt,
|
||||
'mod_sum' => $_sum
|
||||
|
||||
$income_id = $sql->insert_into('money_income', array(
|
||||
'mi_date' => $_date,
|
||||
'mi_payment_type_pt_id' => $_pt,
|
||||
'mi_sum' => $_sum,
|
||||
'mi_item' => 'Edzésdíj',
|
||||
'mi_money_income_category_mic_id' => 4,
|
||||
)
|
||||
);
|
||||
|
||||
return $sql->insert_into('money_deposit', array(
|
||||
'mod_user_kid_uk_id' => $_user_id,
|
||||
'mod_money_income_mi_id' => $income_id,
|
||||
));
|
||||
}
|
||||
|
||||
public static function update_money_deposit($_user_id, $_date, $_sum, $_mod_id, $_pt) {
|
||||
public static function update_money_deposit($_user_id, $_date, $_sum, $_mod_id, $_pt, $_mi_id) {
|
||||
global $sql;
|
||||
$sql->update_table('money_income', array(
|
||||
//'mod_user_kid_uk_id' => $_user_id,
|
||||
'mi_date' => $_date,
|
||||
'mi_payment_type_pt_id' => $_pt,
|
||||
'mi_sum' => $_sum
|
||||
), array(
|
||||
'mi_id' => $_mi_id
|
||||
));
|
||||
|
||||
$sql->update_table('money_deposit', array(
|
||||
'mod_user_kid_uk_id' => $_user_id,
|
||||
'mod_date' => $_date,
|
||||
'mod_payment_type_pt_id' => $_pt,
|
||||
'mod_sum' => $_sum
|
||||
), array(
|
||||
'mod_id' => $_mod_id
|
||||
));
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ class money_expense {
|
||||
private $mox_sum;
|
||||
private $mox_moxc_id = null;
|
||||
private $mox_moxc = null;
|
||||
private $mox_payment_type;
|
||||
private $mox_deleted;
|
||||
|
||||
|
||||
@@ -45,6 +46,9 @@ class money_expense {
|
||||
$this->mox_coach = $_item;
|
||||
}
|
||||
|
||||
public function set_mox_payment_type_pt_id($_payment_type) {
|
||||
$this->mox_payment_type = $_payment_type;
|
||||
}
|
||||
|
||||
public function set_mox_deleted($_item) {
|
||||
$this->mox_deleted = $_item;
|
||||
@@ -54,6 +58,10 @@ class money_expense {
|
||||
return $this->mox_id;
|
||||
}
|
||||
|
||||
public function get_mox_payment_type_pt_id() {
|
||||
return $this->mox_payment_type;
|
||||
}
|
||||
|
||||
public function get_mox_user_coach_ua_id() {
|
||||
return $this->mox_user_coach_ua_id;
|
||||
}
|
||||
@@ -64,7 +72,7 @@ class money_expense {
|
||||
|
||||
public function get_mox_date_day() {
|
||||
$day = date("d", strtotime($this->mox_date));
|
||||
if (substr($day, 0, 1) == '0') return substr($day, 1, 1);
|
||||
if (substr($day, 0, 1) == '0') return substr($day, 1, 1);
|
||||
return date("d", strtotime($this->mox_date));
|
||||
}
|
||||
|
||||
@@ -125,11 +133,17 @@ class money_expense {
|
||||
$new_user->set_user_data_by_id($value);
|
||||
$this->set_mox_coach($new_user);
|
||||
}
|
||||
|
||||
if ($field == "mox_payment_type") {
|
||||
$new_pt = new payment_type();
|
||||
$new_pt->set_pt_data_by_id($value);
|
||||
$this->set_mox_payment_type_pt_id($new_pt);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function create_money_expense($_name, $_date, $_item, $_sum, $_moxc_id) {
|
||||
public static function create_money_expense($_name, $_date, $_item, $_sum, $_moxc_id, $_pt) {
|
||||
global $sql;
|
||||
|
||||
return $sql->insert_into('money_expense', array(
|
||||
@@ -137,19 +151,21 @@ class money_expense {
|
||||
'mox_date' => $_date,
|
||||
'mox_item' => $_item,
|
||||
'mox_sum' => $_sum,
|
||||
'mox_payment_type_pt_id' => $_pt,
|
||||
'mox_money_expense_category_moxc_id' => $_moxc_id
|
||||
));
|
||||
}
|
||||
|
||||
public static function update_money_expense($_name, $_date, $_item, $_sum, $_moxc_id, $_id) {
|
||||
public static function update_money_expense($_name, $_date, $_item, $_sum, $_moxc_id, $_id, $_pt) {
|
||||
global $sql;
|
||||
|
||||
$sql->update_table('money_expense',
|
||||
$sql->update_table('money_expense',
|
||||
array(
|
||||
'mox_user_coach_ua_id' => (empty($_name)?'null':self::name_to_ua_id($_name)),
|
||||
'mox_date' => $_date,
|
||||
'mox_item' => $_item,
|
||||
'mox_sum' => $_sum,
|
||||
'mox_payment_type_pt_id' => $_pt,
|
||||
'mox_money_expense_category_moxc_id' => $_moxc_id
|
||||
),
|
||||
array(
|
||||
@@ -162,4 +178,4 @@ class money_expense {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
140
_class/class_money_income.php
Normal file
140
_class/class_money_income.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
|
||||
|
||||
class money_income {
|
||||
private $mi_id;
|
||||
private $mi_date;
|
||||
private $mi_item;
|
||||
private $mi_sum;
|
||||
private $mi_mic_id = null;
|
||||
private $mi_mic = null;
|
||||
private $mi_payment_type;
|
||||
private $mi_deleted;
|
||||
|
||||
|
||||
public function set_mi_id($_item) {
|
||||
$this->mi_id = $_item;
|
||||
}
|
||||
|
||||
public function set_mi_date($_item) {
|
||||
$this->mi_date = $_item;
|
||||
}
|
||||
|
||||
public function set_mi_item($_item) {
|
||||
$this->mi_item = $_item;
|
||||
}
|
||||
|
||||
public function set_mi_sum($_item) {
|
||||
$this->mi_sum = $_item;
|
||||
}
|
||||
|
||||
public function set_mi_money_income_category_mic_id($_item) {
|
||||
$this->mi_mic_id = $_item;
|
||||
}
|
||||
|
||||
public function set_mi_mic($_item) {
|
||||
$this->mi_mic = $_item;
|
||||
}
|
||||
|
||||
public function set_mi_payment_type_pt_id($_payment_type) {
|
||||
$this->mi_payment_type = $_payment_type;
|
||||
}
|
||||
|
||||
public function set_mi_deleted($_item) {
|
||||
$this->mi_deleted = $_item;
|
||||
}
|
||||
|
||||
public function get_mi_id() {
|
||||
return $this->mi_id;
|
||||
}
|
||||
|
||||
public function get_mi_date($_formatted = false) {
|
||||
return !$_formatted ? $this->mi_date : date("Y. m. d.", strtotime($this->mi_date));
|
||||
}
|
||||
|
||||
public function get_mi_date_day() {
|
||||
$day = date("d", strtotime($this->mi_date));
|
||||
if (substr($day, 0, 1) == '0') return substr($day, 1, 1);
|
||||
return date("d", strtotime($this->mi_date));
|
||||
}
|
||||
|
||||
public function get_mi_item() {
|
||||
return $this->mi_item;
|
||||
}
|
||||
|
||||
public function get_mi_sum() {
|
||||
return $this->mi_sum;
|
||||
}
|
||||
|
||||
public function get_mi_mic() {
|
||||
return $this->mi_mic;
|
||||
}
|
||||
|
||||
public function get_mi_money_income_category_mic_id() {
|
||||
return $this->mi_mic_id;
|
||||
}
|
||||
|
||||
public function get_mi_payment_type_pt_id() {
|
||||
return $this->mi_payment_type;
|
||||
}
|
||||
|
||||
public function get_mi_deleted() {
|
||||
return $this->mi_deleted;
|
||||
}
|
||||
|
||||
public function set_mi_data_by_id($_id) {
|
||||
global $sql;
|
||||
$set_data_assoc_array = $sql->assoc_array("select * from money_income where mi_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 == 'mi_money_income_category_mic_id' && $value != null) {
|
||||
$new_mic = new money_income_category();
|
||||
$new_mic->set_mic_data_by_id($value);
|
||||
$this->set_mi_mic($new_mic);
|
||||
}
|
||||
if ($field == "mi_payment_type") {
|
||||
$new_pt = new payment_type();
|
||||
$new_pt->set_pt_data_by_id($value);
|
||||
$this->set_mi_payment_type_pt_id($new_pt);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function create_money_income($_date, $_item, $_sum, $_mic_id, $_pt) {
|
||||
global $sql;
|
||||
|
||||
return $sql->insert_into('money_income', array(
|
||||
'mi_date' => $_date,
|
||||
'mi_item' => $_item,
|
||||
'mi_sum' => $_sum,
|
||||
'mi_money_income_category_mic_id' => $_mic_id,
|
||||
'mi_payment_type_pt_id' => $_pt
|
||||
));
|
||||
}
|
||||
|
||||
public static function update_money_income($_date, $_item, $_sum, $_mic_id, $_id, $_pt) {
|
||||
global $sql;
|
||||
|
||||
$sql->update_table('money_income',
|
||||
array(
|
||||
'mi_date' => $_date,
|
||||
'mi_item' => $_item,
|
||||
'mi_sum' => $_sum,
|
||||
'mi_money_income_category_mic_id' => $_mic_id,
|
||||
'mi_payment_type_pt_id' => $_pt
|
||||
),
|
||||
array(
|
||||
'mi_id' => $_id
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
59
_class/class_money_income_category.php
Normal file
59
_class/class_money_income_category.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
class money_income_category {
|
||||
private $mic_id;
|
||||
private $mic_name;
|
||||
private $mic_deleted;
|
||||
|
||||
public function set_mic_id($_item) {
|
||||
$this->mic_id = $_item;
|
||||
}
|
||||
|
||||
public function set_mic_name($_item) {
|
||||
$this->mic_name = $_item;
|
||||
}
|
||||
|
||||
public function set_mic_deleted($_item) {
|
||||
$this->mic_deleted = $_item;
|
||||
}
|
||||
|
||||
public function get_mic_id() {
|
||||
return $this->mic_id;
|
||||
}
|
||||
|
||||
public function get_mic_name() {
|
||||
return $this->mic_name;
|
||||
}
|
||||
|
||||
public function get_mic_deleted() {
|
||||
return $this->mic_deleted;
|
||||
}
|
||||
|
||||
public function set_mic_data_by_id($_id) {
|
||||
global $sql;
|
||||
$set_data_assoc_array = $sql->assoc_array("select * from money_income_category where mic_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 create_money_income_category($_name) {
|
||||
global $sql;
|
||||
|
||||
return $sql->insert_into('money_income_category', array('mic_name' => $_name));
|
||||
}
|
||||
|
||||
public static function update_money_income_category($_name, $_id) {
|
||||
global $sql;
|
||||
|
||||
$sql->update_table('money_income_category', array('mic_name' => $_name), array('mic_id' => $_id));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
81
_class/class_page.php
Executable file → Normal file
81
_class/class_page.php
Executable file → Normal file
@@ -9,10 +9,10 @@
|
||||
|
||||
|
||||
class page {
|
||||
|
||||
|
||||
private $page = null;
|
||||
private $subpage = null;
|
||||
private $id = null;
|
||||
private $id = null;
|
||||
|
||||
function __construct() {
|
||||
if (isset($_GET['page'])) $this->set_page($_GET['page']);
|
||||
@@ -48,7 +48,7 @@ class page {
|
||||
$menu_assoc_array = $sql->assoc_array($menus_query);
|
||||
$smarty->assign('menus', $menu_assoc_array);
|
||||
}
|
||||
|
||||
|
||||
$smarty->assign('page', $this->get_page());
|
||||
$smarty->display('nav.tpl');
|
||||
}
|
||||
@@ -142,16 +142,16 @@ class page {
|
||||
break;
|
||||
case 'log':
|
||||
# NAPLÓ
|
||||
include('include_log.php');
|
||||
include('include_log.php');
|
||||
break;
|
||||
case 'money_deposit':
|
||||
# BEFIZETÉSEK
|
||||
include('include_money_deposit.php');
|
||||
include('include_money_deposit.php');
|
||||
break;
|
||||
case 'lock_training':
|
||||
# EDZÉS ZÁROLÁS, FELOLDÁS
|
||||
include('include_lock_training.php');
|
||||
break;
|
||||
break;
|
||||
case 'view_deposit':
|
||||
# BEFIZETÉSEK / USER
|
||||
include('include_view_deposit.php');
|
||||
@@ -164,6 +164,14 @@ class page {
|
||||
# KIADÁS KATEGÓRIÁK
|
||||
include('include_money_expense_category.php');
|
||||
break;
|
||||
case 'money_income_category':
|
||||
# BEVÉTEL KATEGÓRIÁK
|
||||
include('include_money_income_category.php');
|
||||
break;
|
||||
case 'money_income':
|
||||
# BEVÉTELEK
|
||||
include('include_money_income.php');
|
||||
break;
|
||||
case 'money_update':
|
||||
# FRISSÍTÉS
|
||||
include('include_money_update.php');
|
||||
@@ -181,15 +189,15 @@ class page {
|
||||
break;
|
||||
case 'download_backup':
|
||||
# BIZTONSÁGI MENTÉS LETÖLTÉS
|
||||
include('include_download_backup.php');
|
||||
include('include_download_backup.php');
|
||||
break;
|
||||
case 'camps':
|
||||
# TÁBOROK
|
||||
include('include_camps.php');
|
||||
include('include_camps.php');
|
||||
break;
|
||||
case 'camp_types':
|
||||
# TÁBOR TÍPUSOK
|
||||
include('include_camp_types.php');
|
||||
include('include_camp_types.php');
|
||||
break;
|
||||
case 'camp_shirt_type':
|
||||
# TÁBOR PÓLÓ TÍPUSOK
|
||||
@@ -201,27 +209,27 @@ class page {
|
||||
break;
|
||||
case 'deny_apply':
|
||||
# TÁBOR JELENTKEZÉS ELUTASÍTÁSA
|
||||
include('include_deny_apply.php');
|
||||
include('include_deny_apply.php');
|
||||
break;
|
||||
case 'remove_apply':
|
||||
# TÁBOR JELENTKEZÉS ELTÁVOLÍTÁSA A LISTÁBÓL
|
||||
include('include_remove_apply.php');
|
||||
include('include_remove_apply.php');
|
||||
break;
|
||||
case 'apply':
|
||||
# TÁBORI JELENTKEZŐ ADATAINAK MEGTEKINTÉSE
|
||||
include('include_apply.php');
|
||||
include('include_apply.php');
|
||||
break;
|
||||
case 'camp_user':
|
||||
# táborvezetők
|
||||
include('include_user_camp_leader.php');
|
||||
include('include_user_camp_leader.php');
|
||||
break;
|
||||
case 'camp_details':
|
||||
# turnusok
|
||||
include('include_camp_details.php');
|
||||
include('include_camp_details.php');
|
||||
break;
|
||||
case 'user_groups':
|
||||
# csoportok
|
||||
include('include_user_groups.php');
|
||||
include('include_user_groups.php');
|
||||
break;
|
||||
case 'delete_training_type':
|
||||
# EDZÉS TÍPUS TÖRLÉS
|
||||
@@ -259,6 +267,14 @@ class page {
|
||||
# BEFIZETÉS TÖRLÉS
|
||||
include('include_delete_money_expense.php');
|
||||
break;
|
||||
case 'delete_money_income_category':
|
||||
# BEVÉTEL KATEGÓRIA TÖRLÉS
|
||||
include('include_delete_money_income_category.php');
|
||||
break;
|
||||
case 'delete_money_income':
|
||||
# BEVÉTEL TÖRLÉS
|
||||
include('include_delete_money_income.php');
|
||||
break;
|
||||
case 'delete_backup':
|
||||
# MENTÉS TÖRLÉS
|
||||
include('include_delete_backup.php');
|
||||
@@ -283,6 +299,9 @@ class page {
|
||||
# CSOPORT TÖRLÉS
|
||||
include('include_delete_user_group.php');
|
||||
break;
|
||||
case 'diary_report':
|
||||
include('include_diary_report.php');
|
||||
break;
|
||||
case 'logout':
|
||||
# kijelentkezés
|
||||
$from = "admin";
|
||||
@@ -304,15 +323,15 @@ class page {
|
||||
case 'logout':
|
||||
# kijelentkezés
|
||||
$from = "view";
|
||||
include('include_logout.php');
|
||||
include('include_logout.php');
|
||||
break;
|
||||
case 'overview':
|
||||
# áttekintő oldal adatokkal
|
||||
include('include_overview.php');
|
||||
include('include_overview.php');
|
||||
break;
|
||||
case 'diary':
|
||||
# napló, edzéslista
|
||||
include('include_diary.php');
|
||||
include('include_diary.php');
|
||||
break;
|
||||
case 'information':
|
||||
# információk
|
||||
@@ -328,11 +347,11 @@ class page {
|
||||
switch ($this->get_subpage()) {
|
||||
case 'overview':
|
||||
# áttekintő oldal adatokkal
|
||||
include('include_overview.php');
|
||||
include('include_overview.php');
|
||||
break;
|
||||
case 'diary':
|
||||
# napló, edzéslista
|
||||
include('include_diary.php');
|
||||
include('include_diary.php');
|
||||
break;
|
||||
case 'information':
|
||||
# információk
|
||||
@@ -348,12 +367,12 @@ class page {
|
||||
switch ($this->get_subpage()) {
|
||||
case 'diary':
|
||||
# napló, edzéslista
|
||||
include('include_coach_diary.php');
|
||||
include('include_coach_diary.php');
|
||||
break;
|
||||
case 'logout':
|
||||
# kijelentkezés
|
||||
$from = "coach";
|
||||
include('include_logout.php');
|
||||
include('include_logout.php');
|
||||
break;
|
||||
default:
|
||||
include('include_coach_diary.php');
|
||||
@@ -365,7 +384,7 @@ class page {
|
||||
switch ($this->get_subpage()) {
|
||||
case 'diary':
|
||||
# napló, edzéslista
|
||||
include('include_coach_diary.php');
|
||||
include('include_coach_diary.php');
|
||||
break;
|
||||
default:
|
||||
include('include_coach_diary.php');
|
||||
@@ -377,15 +396,15 @@ class page {
|
||||
switch ($this->get_subpage()) {
|
||||
case 'informaciok':
|
||||
# tábori információk
|
||||
include('include_camp_information.php');
|
||||
include('include_camp_information.php');
|
||||
break;
|
||||
case 'jelentkezes':
|
||||
# jelentkezés
|
||||
include('include_camp_apply.php');
|
||||
include('include_camp_apply.php');
|
||||
break;
|
||||
case 'jelentkezesek':
|
||||
# jelentkezések
|
||||
include('include_camp_applies.php');
|
||||
include('include_camp_applies.php');
|
||||
break;
|
||||
case 'move_next':
|
||||
# továbblépés mentés nélkül
|
||||
@@ -394,11 +413,11 @@ class page {
|
||||
case 'logout':
|
||||
# kijelentkezés
|
||||
$from = "tabor";
|
||||
include('include_logout.php');
|
||||
include('include_logout.php');
|
||||
break;
|
||||
case 'delete_apply':
|
||||
# jelentkezés törlése
|
||||
include('include_delete_apply.php');
|
||||
include('include_delete_apply.php');
|
||||
break;
|
||||
default:
|
||||
include('include_camp_information.php');
|
||||
@@ -410,11 +429,11 @@ class page {
|
||||
switch ($this->get_subpage()) {
|
||||
case 'taborok':
|
||||
# turnusok
|
||||
include('include_camp_details.php');
|
||||
include('include_camp_details.php');
|
||||
break;
|
||||
case 'jelentkezes':
|
||||
# turnusok
|
||||
include('include_apply.php');
|
||||
include('include_apply.php');
|
||||
break;
|
||||
case 'logout':
|
||||
# kijelentkezés
|
||||
@@ -494,4 +513,4 @@ class page {
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
66
_class/class_sql.php
Executable file → Normal file
66
_class/class_sql.php
Executable file → Normal file
@@ -86,76 +86,76 @@ class sql extends mysqli {
|
||||
}
|
||||
|
||||
function export_database($tables=false, $backup_name=false )
|
||||
{
|
||||
{
|
||||
$name = "badminton_coach";
|
||||
$this->query("SET NAMES 'utf8'");
|
||||
|
||||
$queryTables = $this->query('SHOW TABLES');
|
||||
while($row = $queryTables->fetch_row())
|
||||
{
|
||||
$target_tables[] = $row[0];
|
||||
}
|
||||
if($tables !== false)
|
||||
{
|
||||
$target_tables = array_intersect( $target_tables, $tables);
|
||||
$queryTables = $this->query('SHOW TABLES');
|
||||
while($row = $queryTables->fetch_row())
|
||||
{
|
||||
$target_tables[] = $row[0];
|
||||
}
|
||||
if($tables !== false)
|
||||
{
|
||||
$target_tables = array_intersect( $target_tables, $tables);
|
||||
}
|
||||
foreach($target_tables as $table)
|
||||
{
|
||||
$result = $this->query('SELECT * FROM '.$table);
|
||||
$fields_amount = $result->field_count;
|
||||
$rows_num=$this->affected_rows;
|
||||
$res = $this->query('SHOW CREATE TABLE '.$table);
|
||||
$result = $this->query('SELECT * FROM '.$table);
|
||||
$fields_amount = $result->field_count;
|
||||
$rows_num=$this->affected_rows;
|
||||
$res = $this->query('SHOW CREATE TABLE '.$table);
|
||||
$TableMLine = $res->fetch_row();
|
||||
$content = (!isset($content) ? '' : $content) . "\n\n".$TableMLine[1].";\n\n";
|
||||
|
||||
for ($i = 0, $st_counter = 0; $i < $fields_amount; $i++, $st_counter=0)
|
||||
for ($i = 0, $st_counter = 0; $i < $fields_amount; $i++, $st_counter=0)
|
||||
{
|
||||
while($row = $result->fetch_row())
|
||||
while($row = $result->fetch_row())
|
||||
{ //when started (and every after 100 command cycle):
|
||||
if ($st_counter%100 == 0 || $st_counter == 0 )
|
||||
if ($st_counter%100 == 0 || $st_counter == 0 )
|
||||
{
|
||||
$content .= "\nINSERT INTO ".$table." VALUES";
|
||||
}
|
||||
$content .= "\n(";
|
||||
for($j=0; $j<$fields_amount; $j++)
|
||||
{
|
||||
$row[$j] = str_replace("\n","\\n", addslashes($row[$j]) );
|
||||
for($j=0; $j<$fields_amount; $j++)
|
||||
{
|
||||
$row[$j] = str_replace("\n","\\n", addslashes($row[$j]) );
|
||||
if (isset($row[$j]))
|
||||
{
|
||||
$content .= '"'.$row[$j].'"' ;
|
||||
$content .= '"'.$row[$j].'"' ;
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
$content .= '""';
|
||||
}
|
||||
}
|
||||
if ($j<($fields_amount-1))
|
||||
{
|
||||
$content.= ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
$content .=")";
|
||||
//every after 100 command cycle [or at last line] ....p.s. but should be inserted 1 cycle eariler
|
||||
if ( (($st_counter+1)%100==0 && $st_counter!=0) || $st_counter+1==$rows_num)
|
||||
{
|
||||
if ( (($st_counter+1)%100==0 && $st_counter!=0) || $st_counter+1==$rows_num)
|
||||
{
|
||||
$content .= ";";
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
$content .= ",";
|
||||
}
|
||||
}
|
||||
$st_counter=$st_counter+1;
|
||||
}
|
||||
} $content .="\n\n\n";
|
||||
}
|
||||
//$backup_name = $backup_name ? $backup_name : $name."___(".date('H-i-s')."_".date('d-m-Y').")__rand".rand(1,11111111).".sql";
|
||||
$backup_name = $backup_name ? $backup_name : $name.".sql";
|
||||
//header('Content-Type: application/octet-stream');
|
||||
//header("Content-Transfer-Encoding: Binary");
|
||||
//header("Content-disposition: attachment; filename=\"".$backup_name."\"");
|
||||
//header('Content-Type: application/octet-stream');
|
||||
//header("Content-Transfer-Encoding: Binary");
|
||||
//header("Content-disposition: attachment; filename=\"".$backup_name."\"");
|
||||
return $content;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -468,7 +468,7 @@ class user_kid extends user_parent {
|
||||
$sql->update_table('user_kid', $_user_value_array, array('uk_id' => $_user_id));
|
||||
}
|
||||
|
||||
public function calculate_balance(&$_de_obj_array, $_user_obj = null) {
|
||||
public function calculate_balance(&$_de_obj_array, $_user_obj = null, $update = true) {
|
||||
//kiszámolja az egyenleget a diary entry-k alapján, amik tömbben érkeznek
|
||||
//a tömbben feltölti a pénzmozgást, és minden lépésben befrissíti az egyenleget
|
||||
//az update-elt tömböt adja vissza
|
||||
@@ -508,17 +508,17 @@ class user_kid extends user_parent {
|
||||
}
|
||||
}
|
||||
elseif ($_de->get_de_type() == 'money_deposit') {
|
||||
$_de->set_de_transaction($_de->get_de_money_deposit()->get_mod_sum());
|
||||
$_de->set_de_transaction($_de->get_de_money_deposit()->get_mod_money_income()->get_mi_sum());
|
||||
$_de->set_de_balance($_de->get_de_balance()+$_de->get_de_transaction());
|
||||
//$balance += $_de->get_de_money_deposit()->get_mod_sum();
|
||||
//echo $_de->get_de_date() . " plussz " . $_de->get_de_money_deposit()->get_mod_sum() . "<br><br>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isset($_de)) $sql->update_table('user_kid', (array('uk_balance' => $_de->get_de_balance())), array('uk_id' => (is_object($_user_obj)?$_user_obj->get_uk_id():$this->get_uk_id())), false);
|
||||
else $sql->update_table('user_kid', (array('uk_balance' => 0)), array('uk_id' => (is_object($_user_obj)?$_user_obj->get_uk_id():$this->get_uk_id())), false);
|
||||
if ($update) {
|
||||
if (isset($_de)) $sql->update_table('user_kid', (array('uk_balance' => $_de->get_de_balance())), array('uk_id' => (is_object($_user_obj)?$_user_obj->get_uk_id():$this->get_uk_id())), false);
|
||||
else $sql->update_table('user_kid', (array('uk_balance' => 0)), array('uk_id' => (is_object($_user_obj)?$_user_obj->get_uk_id():$this->get_uk_id())), false);
|
||||
}
|
||||
|
||||
return $_de_obj_array;
|
||||
}
|
||||
|
||||
BIN
_image/income.png
Normal file
BIN
_image/income.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
23
_include/include_create.php
Executable file → Normal file
23
_include/include_create.php
Executable file → Normal file
@@ -133,6 +133,9 @@ switch ($this->get_id()) {
|
||||
$moxc_array[] = $new_moxc;
|
||||
}
|
||||
|
||||
$pt_assoc_array = $sql->assoc_array('SELECT * FROM payment_type ORDER BY pt_id ASC;');
|
||||
|
||||
$smarty->assign('pt_assoc_array', $pt_assoc_array);
|
||||
$smarty->assign('moxc_array', $moxc_array);
|
||||
$smarty->display('money_expense_create.tpl');
|
||||
break;
|
||||
@@ -140,6 +143,26 @@ switch ($this->get_id()) {
|
||||
# ÚJ KIADÁS KATEGÓRIA
|
||||
$smarty->display('money_expense_category_create.tpl');
|
||||
break;
|
||||
case 'money_income_category':
|
||||
# ÚJ BEVÉTEL KATEGÓRIA
|
||||
$smarty->display('money_income_category_create.tpl');
|
||||
break;
|
||||
case 'money_income':
|
||||
# ÚJ KIADÁS
|
||||
$mic_assoc_array = $sql->assoc_array('SELECT * FROM money_income_category WHERE mic_deleted = 0 AND mic_id != 4 ORDER BY mic_name ASC;');
|
||||
$mic_array = array();
|
||||
foreach ($mic_assoc_array as $key => $mic) {
|
||||
$new_mic = new money_income_category();
|
||||
$new_mic->set_mic_data_by_id($mic['mic_id']);
|
||||
$mic_array[] = $new_mic;
|
||||
}
|
||||
|
||||
$pt_assoc_array = $sql->assoc_array('SELECT * FROM payment_type ORDER BY pt_id ASC;');
|
||||
|
||||
$smarty->assign('pt_assoc_array', $pt_assoc_array);
|
||||
$smarty->assign('mic_array', $mic_array);
|
||||
$smarty->display('money_income_create.tpl');
|
||||
break;
|
||||
case 'backup':
|
||||
# BACKUP
|
||||
//létrehozzá, és hozzáfűzi az ID-t a dátumhoz
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$sql->update_table('money_deposit', array('mod_deleted' => 1), array('mod_id' => $this->get_id()));
|
||||
$new_mod = new money_deposit();
|
||||
$new_mod->set_mod_data_by_id($this->get_id());
|
||||
$sql->update_table('money_deposit', array('mod_deleted' => 1), array('mod_id' => $this->get_id()));
|
||||
$new_mod = new money_deposit();
|
||||
$new_mod->set_mod_data_by_id($this->get_id());
|
||||
$sql->update_table('money_income', array('mi_deleted' => 1), array('mi_id' => $new_mod->get_mod_money_income_mi_id()));
|
||||
//log::register('update_money_deposit', $tmp_user->get_uk_name() . ': ' . $_POST['mod_sum']. ' Ft (' . $_POST['mod_date'] . ')');
|
||||
log::register('delete_money_deposit', $new_mod->get_mod_user_kid()->get_uk_name() . ': ' . $new_mod->get_mod_sum() . ' Ft (' . $new_mod->get_mod_date() . ')');
|
||||
log::register('delete_money_deposit', $new_mod->get_mod_user_kid()->get_uk_name() . ': ' . $new_mod->get_mod_money_income()->get_mi_sum() . ' Ft (' . $new_mod->get_mod_money_income()->get_mi_date() . ')');
|
||||
header("Location: /admin/money_deposit");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
12
_include/include_delete_money_income.php
Normal file
12
_include/include_delete_money_income.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$sql->update_table('money_income', array('mi_deleted' => 1), array('mi_id' => $this->get_id()));
|
||||
$mi = new money_income();
|
||||
$mi->set_mi_data_by_id($this->get_id());
|
||||
log::register('delete_mi', $mi->get_mi_item() . ": " . $mi->get_mi_sum() . " Ft");
|
||||
header("Location: /admin/money_income");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
18
_include/include_delete_money_income_category.php
Normal file
18
_include/include_delete_money_income_category.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
if ($this->is_id()) {
|
||||
$sql->update_table('money_income_category', array('mic_deleted' => 1), array('mic_id' => $this->get_id()));
|
||||
log::register('delete_mic', $this->get_id());
|
||||
|
||||
//akiknek ez a mic_id van beállítva, azoknál null-ra állítjuk
|
||||
$mi_query = "SELECT mi_id FROM money_income WHERE mi_money_income_category_mic_id = " . $this->get_id();
|
||||
$mi_assoc_array = $sql->assoc_array($mi_query);
|
||||
foreach ($mi_assoc_array as $uk_id) {
|
||||
$sql->update_table('money_income', array('mi_money_income_category_mic_id' => 'null'), array('mi_id' => $uk_id['mi_id']));
|
||||
}
|
||||
|
||||
header("Location: /admin/money_income_category");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
|
||||
$action_list_query = "
|
||||
SELECT
|
||||
SELECT
|
||||
object_id,
|
||||
timestamp(object_date) as object_date,
|
||||
object_type,
|
||||
(SELECT
|
||||
(SELECT
|
||||
count(distinct date(tr_date))
|
||||
FROM
|
||||
presence
|
||||
@@ -18,12 +18,12 @@
|
||||
AND MONTH(tr_date) = MONTH(object_date)
|
||||
AND tr_date <= object_date
|
||||
AND pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
AND tr_date > (select
|
||||
AND tr_date > (select
|
||||
if(max(trd) is null,
|
||||
'1900-01-01',
|
||||
max(trd))
|
||||
from
|
||||
(select
|
||||
(select
|
||||
tr_date trd
|
||||
from
|
||||
presence
|
||||
@@ -31,7 +31,7 @@
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
and tr_date >= (SELECT
|
||||
and tr_date >= (SELECT
|
||||
tr_date
|
||||
from
|
||||
presence
|
||||
@@ -44,7 +44,7 @@
|
||||
limit 1)
|
||||
order by tr_date ASC
|
||||
limit 2) as elso_ket_edzes)) as 'training_per_month',
|
||||
(SELECT
|
||||
(SELECT
|
||||
count(pr_id)
|
||||
FROM
|
||||
presence
|
||||
@@ -54,12 +54,12 @@
|
||||
DATE(tr_date) = DATE(object_date)
|
||||
AND tr_date <= object_date
|
||||
AND pr_user_kid_uk_id = ".$user->get_uk_id().") as 'training_per_day',
|
||||
(select
|
||||
(select
|
||||
if(sum(if(trd = object_date, 1, 0)) > 0,
|
||||
1,
|
||||
0)
|
||||
from
|
||||
(select
|
||||
(select
|
||||
tr_date trd
|
||||
from
|
||||
presence
|
||||
@@ -67,7 +67,7 @@
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
and tr_date >= (SELECT
|
||||
and tr_date >= (SELECT
|
||||
tr_date
|
||||
from
|
||||
presence
|
||||
@@ -81,7 +81,7 @@
|
||||
order by tr_date ASC
|
||||
limit 2) elso2edzes) as 'first_two'
|
||||
FROM
|
||||
((SELECT
|
||||
((SELECT
|
||||
pr_training_tr_id as object_id,
|
||||
timestamp(tr_date) as object_date,
|
||||
if(pr_training_tr_id is not null, 'training', null) as object_type
|
||||
@@ -90,12 +90,14 @@ FROM
|
||||
JOIN training ON tr_id = pr_training_tr_id
|
||||
WHERE
|
||||
pr_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
AND tr_deleted = 0) UNION (SELECT
|
||||
AND tr_deleted = 0) UNION (SELECT
|
||||
mod_id,
|
||||
timestamp(mod_date),
|
||||
timestamp(mi_date),
|
||||
if(mod_id is not null, 'money_deposit', null) as object_type
|
||||
FROM
|
||||
money_deposit
|
||||
JOIN
|
||||
money_income ON mi_id = mod_money_income_mi_id
|
||||
WHERE
|
||||
mod_user_kid_uk_id = ".$user->get_uk_id()."
|
||||
and mod_deleted = 0)) actions
|
||||
@@ -134,7 +136,7 @@ order by object_date ASC;
|
||||
$smarty->assign('actions', $de_array);
|
||||
//$smarty->assign('balance', $balance);
|
||||
$smarty->display('user_diary.tpl');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
|
||||
158
_include/include_diary_report.php
Normal file
158
_include/include_diary_report.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
$res = array();
|
||||
$users_q = "SELECT * FROM user_kid WHERE uk_deleted = 0 AND uk_is_active = 1 ORDER BY uk_name ASC";
|
||||
$users = $sql->assoc_array($users_q);
|
||||
|
||||
foreach ($users as $key => $user) {
|
||||
# code...
|
||||
|
||||
|
||||
$action_list_query = "
|
||||
SELECT
|
||||
object_id,
|
||||
timestamp(object_date) as object_date,
|
||||
object_type,
|
||||
(SELECT
|
||||
count(distinct date(tr_date))
|
||||
FROM
|
||||
presence
|
||||
JOIN
|
||||
training ON tr_id = pr_training_tr_id
|
||||
WHERE
|
||||
YEAR(tr_date) = YEAR(object_date)
|
||||
AND MONTH(tr_date) = MONTH(object_date)
|
||||
AND tr_date <= object_date
|
||||
AND pr_user_kid_uk_id = ".$user['uk_id']."
|
||||
AND tr_date > (select
|
||||
if(max(trd) is null,
|
||||
'1900-01-01',
|
||||
max(trd))
|
||||
from
|
||||
(select
|
||||
tr_date trd
|
||||
from
|
||||
presence
|
||||
join training ON tr_id = pr_training_tr_id
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user['uk_id']."
|
||||
and tr_date >= (SELECT
|
||||
tr_date
|
||||
from
|
||||
presence
|
||||
join training ON tr_id = pr_training_tr_id
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user['uk_id']."
|
||||
and date(tr_date) = uk_first_training
|
||||
ORDER BY tr_date ASC
|
||||
limit 1)
|
||||
order by tr_date ASC
|
||||
limit 2) as elso_ket_edzes)) as 'training_per_month',
|
||||
(SELECT
|
||||
count(pr_id)
|
||||
FROM
|
||||
presence
|
||||
JOIN
|
||||
training ON tr_id = pr_training_tr_id
|
||||
WHERE
|
||||
DATE(tr_date) = DATE(object_date)
|
||||
AND tr_date <= object_date
|
||||
AND pr_user_kid_uk_id = ".$user['uk_id'].") as 'training_per_day',
|
||||
(select
|
||||
if(sum(if(trd = object_date, 1, 0)) > 0,
|
||||
1,
|
||||
0)
|
||||
from
|
||||
(select
|
||||
tr_date trd
|
||||
from
|
||||
presence
|
||||
join training ON tr_id = pr_training_tr_id
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user['uk_id']."
|
||||
and tr_date >= (SELECT
|
||||
tr_date
|
||||
from
|
||||
presence
|
||||
join training ON tr_id = pr_training_tr_id
|
||||
join user_kid ON uk_id = pr_user_kid_uk_id
|
||||
where
|
||||
pr_user_kid_uk_id = ".$user['uk_id']."
|
||||
and date(tr_date) = uk_first_training
|
||||
ORDER BY tr_date ASC
|
||||
limit 1)
|
||||
order by tr_date ASC
|
||||
limit 2) elso2edzes) as 'first_two'
|
||||
FROM
|
||||
((SELECT
|
||||
pr_training_tr_id as object_id,
|
||||
timestamp(tr_date) as object_date,
|
||||
if(pr_training_tr_id is not null, 'training', null) as object_type
|
||||
FROM
|
||||
presence
|
||||
JOIN training ON tr_id = pr_training_tr_id
|
||||
WHERE
|
||||
pr_user_kid_uk_id = ".$user['uk_id']."
|
||||
AND tr_deleted = 0) UNION (SELECT
|
||||
mod_id,
|
||||
timestamp(mi_date),
|
||||
if(mod_id is not null, 'money_deposit', null) as object_type
|
||||
FROM
|
||||
money_deposit
|
||||
JOIN
|
||||
money_income ON mi_id = mod_money_income_mi_id
|
||||
WHERE
|
||||
mod_user_kid_uk_id = ".$user['uk_id']."
|
||||
and mod_deleted = 0)) actions
|
||||
order by object_date ASC;
|
||||
";
|
||||
|
||||
$action_assoc_array = $sql->assoc_array($action_list_query);
|
||||
|
||||
$actions = array();
|
||||
$de_array = array();
|
||||
foreach ($action_assoc_array as $action) {
|
||||
|
||||
if ($action['object_type'] == 'training') {
|
||||
$new_training = new training;
|
||||
$new_training->set_training_data_by_id($action['object_id']);
|
||||
//$actions[] = $new_training;
|
||||
$new_diary_entry = new diary_entry($action['object_id'], $action['object_date'], $action['object_type'], $action['training_per_month'], $action['training_per_day'], $action['first_two'], $new_training);
|
||||
}
|
||||
elseif ($action['object_type'] == 'money_deposit') {
|
||||
$new_mod = new money_deposit;
|
||||
$new_mod->set_mod_data_by_id($action['object_id']);
|
||||
//$actions[] = $new_mod;
|
||||
$new_diary_entry = new diary_entry($action['object_id'], $action['object_date'], $action['object_type'], $action['training_per_month'], $action['training_per_day'], $action['first_two'], null, $new_mod);
|
||||
}
|
||||
|
||||
$de_array[] = $new_diary_entry;
|
||||
|
||||
//var_dump($de_array);
|
||||
|
||||
}
|
||||
$user_obj = new user_kid();
|
||||
$user_obj->set_user_data_by_id($user['uk_id']);
|
||||
$user_obj->calculate_balance($de_array, $user_obj, false);
|
||||
$res[$user['uk_name']] = $de_array;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//itt csak hivatkozással adjuk át a tömböt, a calculate_balance kiszámolja, belerakja és visszadja
|
||||
//$user->calculate_balance($de_array, $user);
|
||||
//var_dump($de_array);
|
||||
//$smarty->assign('actions', $actions);
|
||||
$de_array = array_reverse($de_array);
|
||||
$smarty->assign('actions', $de_array);
|
||||
$smarty->assign('res', $res);
|
||||
//$smarty->assign('balance', $balance);
|
||||
|
||||
//$smarty->display('user_diary.tpl');
|
||||
$smarty->display('diary_report.tpl');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -32,7 +32,7 @@ if ($this->is_id()) {
|
||||
}
|
||||
else {
|
||||
# BEFIZETÉS LISTA
|
||||
$mod_query = "SELECT * FROM money_deposit WHERE mod_deleted = 0 ORDER BY mod_date DESC, mod_id DESC;";
|
||||
$mod_query = "SELECT * FROM money_deposit JOIN money_income ON mod_money_income_mi_id = mi_id WHERE mod_deleted = 0 ORDER BY mi_date DESC, mi_id DESC;";
|
||||
$mod_array = array();
|
||||
$mod_assoc_array = $sql->assoc_array($mod_query);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
if ($this->is_id()) {
|
||||
# ADOTT KIADÁS ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
|
||||
|
||||
$new_mox = new money_expense();
|
||||
$new_mox->set_mox_data_by_id($this->get_id());
|
||||
|
||||
@@ -21,14 +21,16 @@ if ($this->is_id()) {
|
||||
$new_moxc = new money_expense_category();
|
||||
$new_moxc->set_moxc_data_by_id($mox['moxc_id']);
|
||||
$moxc_array[] = $new_moxc;
|
||||
}
|
||||
}
|
||||
|
||||
$pt_assoc_array = $sql->assoc_array('SELECT * FROM payment_type ORDER BY pt_id ASC;');
|
||||
|
||||
|
||||
$smarty->assign("moxc_array", $moxc_array);
|
||||
|
||||
$smarty->assign('pt_assoc_array', $pt_assoc_array);
|
||||
$smarty->assign("mox", $new_mox);
|
||||
$smarty->display("money_expense_data_edit.tpl");
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
# KIADÁS LISTA
|
||||
@@ -40,11 +42,11 @@ else {
|
||||
$new_mox = new money_expense();
|
||||
$new_mox->set_mox_data_by_id($mod['mox_id']);
|
||||
$mox_array[] = $new_mox;
|
||||
}
|
||||
}
|
||||
|
||||
$smarty->assign("mox_array", $mox_array);
|
||||
$smarty->display("money_expense.tpl");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<?php
|
||||
|
||||
# HA NINCS ID, AKKOR KIADÁS KATEGÓRIA LISTA
|
||||
# HA VAN ID, AKKOR KIADÁS KATEGÓRIA ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
# HA NINCS ID, AKKOR BEVÉTEL KATEGÓRIA LISTA
|
||||
# HA VAN ID, AKKOR BEVÉTEL KATEGÓRIA ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
# ADOTT KIADÁS KATEGÓRIA ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
# ADOTT BEVÉTEL KATEGÓRIA ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
|
||||
$new_moxc = new money_expense_category();
|
||||
$new_moxc->set_moxc_data_by_id($this->get_id());
|
||||
|
||||
$smarty->assign("moxc", $new_moxc);
|
||||
$smarty->display("money_expense_category_data_edit.tpl");
|
||||
|
||||
$smarty->display("money_expense_category_data_edit.tpl");
|
||||
|
||||
}
|
||||
else {
|
||||
# KIADÁS KATEGÓRIA LISTA
|
||||
# BEVÉTEL KATEGÓRIA LISTA
|
||||
$moxc_query = "SELECT * FROM money_expense_category WHERE moxc_deleted = 0 ORDER BY moxc_name ASC;";
|
||||
$moxc_array = array();
|
||||
$moxc_assoc_array = $sql->assoc_array($moxc_query);
|
||||
@@ -27,11 +27,11 @@ else {
|
||||
$new_moxc = new money_expense_category();
|
||||
$new_moxc->set_moxc_data_by_id($mox['moxc_id']);
|
||||
$moxc_array[] = $new_moxc;
|
||||
}
|
||||
}
|
||||
|
||||
$smarty->assign("moxc_assoc_array", $moxc_array);
|
||||
$smarty->display("money_expense_category.tpl");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
52
_include/include_money_income.php
Normal file
52
_include/include_money_income.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
# HA NINCS ID, AKKOR BEVÉTEL LISTA
|
||||
# HA VAN ID, AKKOR BEVÉTEL ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
# ADOTT BEVÉTEL ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
|
||||
$new_mi = new money_income();
|
||||
$new_mi->set_mi_data_by_id($this->get_id());
|
||||
|
||||
$mic_query = "SELECT * FROM money_income_category WHERE mic_deleted = 0 AND mic_id != 4 ORDER BY mic_name ASC;";
|
||||
$mic_array = array();
|
||||
$mic_assoc_array = $sql->assoc_array($mic_query);
|
||||
|
||||
foreach ($mic_assoc_array as $mi) {
|
||||
$new_mic = new money_income_category();
|
||||
$new_mic->set_mic_data_by_id($mi['mic_id']);
|
||||
$mic_array[] = $new_mic;
|
||||
}
|
||||
|
||||
$pt_assoc_array = $sql->assoc_array('SELECT * FROM payment_type ORDER BY pt_id ASC;');
|
||||
|
||||
|
||||
$smarty->assign("mic_array", $mic_array);
|
||||
$smarty->assign('pt_assoc_array', $pt_assoc_array);
|
||||
$smarty->assign("mi", $new_mi);
|
||||
$smarty->display("money_income_data_edit.tpl");
|
||||
|
||||
}
|
||||
else {
|
||||
# BEVÉTEL LISTA
|
||||
$mi_query = "SELECT * FROM money_income WHERE mi_deleted = 0 AND mi_money_income_category_mic_id != 4 ORDER BY mi_date DESC, mi_id DESC;";
|
||||
$mi_array = array();
|
||||
$mi_assoc_array = $sql->assoc_array($mi_query);
|
||||
|
||||
foreach ($mi_assoc_array as $mod) {
|
||||
$new_mi = new money_income();
|
||||
$new_mi->set_mi_data_by_id($mod['mi_id']);
|
||||
$mi_array[] = $new_mi;
|
||||
}
|
||||
|
||||
$smarty->assign("mi_array", $mi_array);
|
||||
$smarty->display("money_income.tpl");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
37
_include/include_money_income_category.php
Normal file
37
_include/include_money_income_category.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
# HA NINCS ID, AKKOR BEVÉTEL KATEGÓRIA LISTA
|
||||
# HA VAN ID, AKKOR BEVÉTEL KATEGÓRIA ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
# ADOTT BEVÉTEL KATEGÓRIA ADATINAK MEGTEKINTÉSE/MÓDOSÍTÁSA
|
||||
|
||||
$new_mic = new money_income_category();
|
||||
$new_mic->set_mic_data_by_id($this->get_id());
|
||||
|
||||
$smarty->assign("mic", $new_mic);
|
||||
$smarty->display("money_income_category_data_edit.tpl");
|
||||
|
||||
}
|
||||
else {
|
||||
# BEVÉTEL KATEGÓRIA LISTA
|
||||
$mic_query = "SELECT * FROM money_income_category WHERE mic_deleted = 0 AND mic_id != 4 ORDER BY mic_name ASC;";
|
||||
$mic_array = array();
|
||||
$mic_assoc_array = $sql->assoc_array($mic_query);
|
||||
|
||||
foreach ($mic_assoc_array as $mi) {
|
||||
$new_mic = new money_income_category();
|
||||
$new_mic->set_mic_data_by_id($mi['mic_id']);
|
||||
$mic_array[] = $new_mic;
|
||||
}
|
||||
|
||||
$smarty->assign("mic_assoc_array", $mic_array);
|
||||
$smarty->display("money_income_category.tpl");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -10,12 +10,31 @@ if ($this->is_id()) {
|
||||
# todo: stat_group-ok és stat_value-k
|
||||
|
||||
if (1 == $this->get_id()) {
|
||||
/* adatok:
|
||||
bevétel kp + utalás
|
||||
kiadás kp + utalás
|
||||
összebevétel
|
||||
összkiadás
|
||||
totál balance
|
||||
*/
|
||||
$in_cash_query = "SELECT sum(mi_sum) FROM money_income WHERE mi_deleted = 0 AND mi_payment_type_pt_id = 1";
|
||||
$in_transfer_query = "SELECT sum(mi_sum) FROM money_income WHERE mi_deleted = 0 AND mi_payment_type_pt_id = 2";
|
||||
|
||||
$out_cash_query = "SELECT sum(mox_sum) FROM money_expense WHERE mox_deleted = 0 AND mox_payment_type_pt_id = 1";
|
||||
$out_transfer_query = "SELECT sum(mox_sum) FROM money_expense WHERE mox_deleted = 0 AND mox_payment_type_pt_id = 2";
|
||||
|
||||
$in_cash = $sql->single_variable($in_cash_query);
|
||||
$out_cash = $sql->single_variable($out_cash_query);
|
||||
|
||||
$in_transfer = $sql->single_variable($in_transfer_query);
|
||||
$out_transfer = $sql->single_variable($out_transfer_query);
|
||||
|
||||
$balance_query = "
|
||||
select
|
||||
(select
|
||||
sum(mod_sum)
|
||||
select
|
||||
(select
|
||||
sum(mi_sum)
|
||||
from
|
||||
money_deposit where mod_deleted = 0) - (select
|
||||
money_income where mi_deleted = 0) - (select
|
||||
sum(mox_sum)
|
||||
from
|
||||
money_expense where mox_deleted = 0) as diff
|
||||
@@ -24,6 +43,10 @@ if ($this->is_id()) {
|
||||
|
||||
$balance = $sql->single_variable($balance_query);
|
||||
|
||||
$smarty->assign('in_cash',$in_cash);
|
||||
$smarty->assign('out_cash',$out_cash);
|
||||
$smarty->assign('in_transfer',$in_transfer);
|
||||
$smarty->assign('out_transfer',$out_transfer);
|
||||
$smarty->assign('balance',$balance);
|
||||
$smarty->display('stat_balance.tpl');
|
||||
}
|
||||
@@ -31,7 +54,7 @@ if ($this->is_id()) {
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
|
||||
# STAT LISTA
|
||||
|
||||
$stat_query = "SELECT * FROM statistics WHERE stat_deleted = 0 ORDER BY stat_order ASC;";
|
||||
@@ -46,11 +69,11 @@ else {
|
||||
|
||||
$smarty->assign('stats',$stats);
|
||||
$smarty->display('stat_list.tpl');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -304,36 +304,60 @@ if (isset($_POST['action'])) {
|
||||
break;
|
||||
case 'money_deposit_update':
|
||||
# befizetés módosítás
|
||||
money_deposit::update_money_deposit($_POST['mod_user_kid_uk_id'], $_POST['mod_date'], $_POST['mod_sum'], $_POST['mod_id'], $_POST['mod_payment_type']);
|
||||
money_deposit::update_money_deposit($_POST['mod_user_kid_uk_id'], $_POST['mod_date'], $_POST['mod_sum'], $_POST['mod_id'], $_POST['mod_payment_type'], $_POST['mi_id']);
|
||||
$tmp_user = new user_kid();
|
||||
$tmp_user->set_user_data_by_id($_POST['mod_user_kid_uk_id']);
|
||||
log::register('update_money_deposit', $tmp_user->get_uk_name() . ': ' . $_POST['mod_sum']. ' Ft (' . $_POST['mod_date'] . ')');
|
||||
header("Location: /admin/money_deposit");
|
||||
break;
|
||||
case 'moxc_create':
|
||||
# befizetés kategória létrehozása
|
||||
# kiadás kategória létrehozása
|
||||
$new_moxc_id = money_expense_category::create_money_expense_category($_POST['moxc_name']);
|
||||
log::register('new_moxc', $new_moxc_id);
|
||||
header("Location: /admin/money_expense_category");
|
||||
break;
|
||||
case 'moxc_update':
|
||||
# befizetés kategória módosítása
|
||||
# kiadás kategória módosítása
|
||||
money_expense_category::update_money_expense_category($_POST['moxc_name'], $_POST['moxc_id']);
|
||||
log::register('update_moxc', $_POST['moxc_id']);
|
||||
header("Location: /admin/money_expense_category");
|
||||
break;
|
||||
case 'mox_create':
|
||||
# befizetés létrehozása
|
||||
$new_mox_id = money_expense::create_money_expense($_POST['mox_name'], $_POST['mox_date'], $_POST['mox_item'], $_POST['mox_sum'], $_POST['mox_moxc_id']);
|
||||
# kiadás létrehozása
|
||||
$new_mox_id = money_expense::create_money_expense($_POST['mox_name'], $_POST['mox_date'], $_POST['mox_item'], $_POST['mox_sum'], $_POST['mox_moxc_id'], $_POST['mox_payment_type']);
|
||||
log::register('new_mox', $_POST['mox_item'] . ": " . $_POST['mox_sum'] . " Ft");
|
||||
header("Location: /admin/money_expense");
|
||||
break;
|
||||
case 'mox_update':
|
||||
# befizetés módosítása
|
||||
money_expense::update_money_expense($_POST['mox_name'], $_POST['mox_date'], $_POST['mox_item'], $_POST['mox_sum'], $_POST['mox_moxc_id'], $_POST['mox_id']);
|
||||
# kiadás módosítása
|
||||
money_expense::update_money_expense($_POST['mox_name'], $_POST['mox_date'], $_POST['mox_item'], $_POST['mox_sum'], $_POST['mox_moxc_id'], $_POST['mox_id'], $_POST['mox_payment_type']);
|
||||
log::register('update_mox', $_POST['mox_item'] . ": " . $_POST['mox_sum'] . " Ft");
|
||||
header("Location: /admin/money_expense");
|
||||
break;
|
||||
case 'mic_create':
|
||||
# bevétel kategória létrehozása
|
||||
$new_mic_id = money_income_category::create_money_income_category($_POST['mic_name']);
|
||||
log::register('new_mic', $new_mic_id);
|
||||
header("Location: /admin/money_income_category");
|
||||
break;
|
||||
case 'mi_create':
|
||||
# bevétel létrehozása
|
||||
$new_mi_id = money_income::create_money_income($_POST['mi_date'], $_POST['mi_item'], $_POST['mi_sum'], $_POST['mi_mic_id'], $_POST['mi_payment_type']);
|
||||
log::register('new_mi', $_POST['mi_item'] . ": " . $_POST['mi_sum'] . " Ft");
|
||||
header("Location: /admin/money_income");
|
||||
break;
|
||||
case 'mic_update':
|
||||
# bevétel kategória módosítása
|
||||
money_income_category::update_money_income_category($_POST['mic_name'], $_POST['mic_id']);
|
||||
log::register('update_mic', $_POST['mic_id']);
|
||||
header("Location: /admin/money_income_category");
|
||||
break;
|
||||
case 'mi_update':
|
||||
# bevétel módosítása
|
||||
money_income::update_money_income($_POST['mi_date'], $_POST['mi_item'], $_POST['mi_sum'], $_POST['mi_mic_id'], $_POST['mi_id'], $_POST['mi_payment_type']);
|
||||
log::register('update_mi', $_POST['mi_item'] . ": " . $_POST['mi_sum'] . " Ft");
|
||||
header("Location: /admin/money_income");
|
||||
break;
|
||||
case 'settings_data_edit':
|
||||
$sql->update_table('setting_value',
|
||||
array(
|
||||
@@ -381,6 +405,7 @@ if (isset($_POST['action'])) {
|
||||
|
||||
camp::create_camp($_POST['camp_city'], $_POST['camp_from'], $_POST['camp_to'], $_POST['camp_leader'], $_POST['camp_helpers'], (!empty($_POST['camp_is_open'])?1:0), $_POST['camp_camp_type_ct_id'], $shuttles, $accoms);
|
||||
log::register('new_camp', $_POST['camp_from'] . " (" . $_POST['camp_city'] . ")");
|
||||
header("Location: /admin/camps");
|
||||
break;
|
||||
case 'camp_update':
|
||||
# tábor módosítás
|
||||
|
||||
@@ -10,6 +10,7 @@ setlocale(LC_ALL, 'hu_HU');
|
||||
?>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -33,7 +34,6 @@ setlocale(LC_ALL, 'hu_HU');
|
||||
<meta name="msapplication-TileImage" content="/_image/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<?php
|
||||
@@ -75,7 +75,7 @@ setlocale(LC_ALL, 'hu_HU');
|
||||
<title>
|
||||
<?php
|
||||
if ($page->is_page() && ($page->get_page() == 'tabor')) {
|
||||
echo "Tollaslabda táborok 2017. nyár";
|
||||
echo "Tollaslabda táborok 2018. nyár";
|
||||
}
|
||||
else {
|
||||
echo "Badminton Coach";
|
||||
|
||||
27
template/templates/diary_report.tpl
Normal file
27
template/templates/diary_report.tpl
Normal file
@@ -0,0 +1,27 @@
|
||||
{foreach $res as $key => $resi}
|
||||
|
||||
{foreach $resi as $key_ => $resii}
|
||||
{if $resii->get_de_training()|is_a:'training'}
|
||||
{$key}<br>
|
||||
{$resii->get_de_training()->get_tr_date()}<br>
|
||||
{$resii->get_de_training()->get_tr_type_name_by_id()}<br>
|
||||
{$resii->get_de_training()->get_tr_duration()} perc<br>
|
||||
{if $resii->get_de_has_discount()}
|
||||
{if $resii->get_de_discount_id() == 1}
|
||||
Próba kedvezmény<br>
|
||||
{elseif $resii->get_de_discount_id() == 2}
|
||||
Havi 8+ kedvezmény<br>
|
||||
{elseif $resii->get_de_discount_id() == 3}
|
||||
Duplázó kedvezmény<br>
|
||||
{/if}
|
||||
|
||||
{else}
|
||||
Fizetős<br>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
<br>
|
||||
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
@@ -8,16 +8,16 @@
|
||||
<div class="list half_width">
|
||||
{foreach $mod_array as $mod}
|
||||
|
||||
{if !$mod@first && $mod_array[$mod@index]->get_mod_date()|substr:5:2 != $mod_array[$mod@index-1]->get_mod_date()|substr:5:2}
|
||||
{if !$mod@first && $mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:5:2 != $mod_array[$mod@index-1]->get_mod_money_income()->get_mi_date()|substr:5:2}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $mod@first || $mod_array[$mod@index]->get_mod_date()|substr:5:2 != $mod_array[$mod@index-1]->get_mod_date()|substr:5:2}
|
||||
<span onclick="block_action('block_{$mod->get_mod_date()|substr:0:4}{$mod->get_mod_date()|substr:5:2}');" class="date_separator clickable">{$mod_array[$mod@index]->get_mod_date()|substr:0:4}.
|
||||
{$months[$mod_array[$mod@index]->get_mod_date()|substr:5:2]}
|
||||
{if $mod@first || $mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:5:2 != $mod_array[$mod@index-1]->get_mod_money_income()->get_mi_date()|substr:5:2}
|
||||
<span onclick="block_action('block_{$mod->get_mod_money_income()->get_mi_date()|substr:0:4}{$mod->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||
{$months[$mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png">
|
||||
</span>
|
||||
<div id="block_{$mod->get_mod_date()|substr:0:4}{$mod->get_mod_date()|substr:5:2}" class="month_block">
|
||||
<div id="block_{$mod->get_mod_money_income()->get_mi_date()|substr:0:4}{$mod->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{/if}
|
||||
<a href="/admin/money_deposit/{$mod->get_mod_id()}">
|
||||
@@ -25,7 +25,7 @@
|
||||
<table class="money">
|
||||
<tr>
|
||||
<td class="icon">
|
||||
{if $mod->get_mod_payment_type_pt_id() == 1}
|
||||
{if $mod->get_mod_money_income()->get_mi_payment_type_pt_id() == 1}
|
||||
<img src="/_image/deposit.png">
|
||||
{else}
|
||||
<img src="/_image/transaction.png">
|
||||
@@ -35,10 +35,10 @@
|
||||
{$mod->get_mod_user_kid()->get_uk_name()}
|
||||
</td>
|
||||
<td class="date">
|
||||
{$mod->get_mod_date(true)}
|
||||
{$mod->get_mod_money_income()->get_mi_date(true)}
|
||||
</td>
|
||||
<td class="sum">
|
||||
{$mod->get_mod_sum()|number_format:0:'':' '} Ft
|
||||
{$mod->get_mod_money_income()->get_mi_sum()|number_format:0:'':' '} Ft
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="desc" for="mod_payment_type">Befizetés típusa:</label>
|
||||
<label class="desc" for="mod_payment_type">Fizetés típusa:</label>
|
||||
<div>
|
||||
<select name="mod_payment_type" id="mod_payment_type">
|
||||
{foreach $pt_assoc_array as $pt_array}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
</div>
|
||||
<input type="hidden" name="action" value="money_deposit_update">
|
||||
<input type="hidden" name="mod_id" value="{$mod->get_mod_id()}">
|
||||
<input type="hidden" name="mi_id" value="{$mod->get_mod_money_income_mi_id()}">
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="mod_user_kid_uk_id">Befizető:</label>
|
||||
@@ -18,11 +19,11 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="desc" for="mod_payment_type">Típus:</label>
|
||||
<label class="desc" for="mod_payment_type">Fizetés típusa:</label>
|
||||
<div>
|
||||
<select name="mod_payment_type" id="mod_payment_type">
|
||||
{foreach $pt_assoc_array as $pt_array}
|
||||
<option value="{$pt_array.pt_id}"{if $pt_array.pt_id == $mod->get_mod_payment_type_pt_id()} selected{/if}>
|
||||
<option value="{$pt_array.pt_id}"{if $pt_array.pt_id == $mod->get_mod_money_income()->get_mi_payment_type_pt_id()} selected{/if}>
|
||||
{$pt_array.pt_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
@@ -32,12 +33,12 @@
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="mod_date">Dátum:</label>
|
||||
<div><input type="text" name="mod_date" id="mod_date" value="{$mod->get_mod_date()}" required></div>
|
||||
<div><input type="text" name="mod_date" id="mod_date" value="{$mod->get_mod_money_income()->get_mi_date()}" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="mod_sum">Összeg:</label>
|
||||
<div><input type="text" name="mod_sum" id="mod_sum" value="{$mod->get_mod_sum()}" required></div>
|
||||
<div><input type="text" name="mod_sum" id="mod_sum" value="{$mod->get_mod_money_income()->get_mi_sum()}" required></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{/if}
|
||||
|
||||
{if $mox@first || $mox_array[$mox@index]->get_mox_date()|substr:5:2 != $mox_array[$mox@index-1]->get_mox_date()|substr:5:2}
|
||||
<span onclick="block_action('block_{$mox->get_mox_date()|substr:0:4}{$mox->get_mox_date()|substr:5:2}');" class="date_separator clickable">{$mox_array[$mox@index]->get_mox_date()|substr:0:4}.
|
||||
<span onclick="block_action('block_{$mox->get_mox_date()|substr:0:4}{$mox->get_mox_date()|substr:5:2}');" class="date_separator clickable">{$mox_array[$mox@index]->get_mox_date()|substr:0:4}.
|
||||
{$months[$mox_array[$mox@index]->get_mox_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png">
|
||||
</span>
|
||||
@@ -25,7 +25,11 @@
|
||||
<table class="money">
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<img src="/_image/expense.png">
|
||||
{if $mox->get_mox_payment_type_pt_id() == 1}
|
||||
<img src="/_image/expense.png">
|
||||
{else}
|
||||
<img src="/_image/transaction.png">
|
||||
{/if}
|
||||
</td>
|
||||
<td class="quarter_width">
|
||||
{$mox->get_mox_date()}
|
||||
@@ -45,7 +49,7 @@
|
||||
{$mox->get_mox_sum()|number_format:0:'':' '} Ft
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</a>
|
||||
@@ -85,8 +89,8 @@ $( document ).ready(function() {
|
||||
var div_list = $( ".list" ).find( divs );
|
||||
|
||||
open_block(div_list[0].id);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -16,6 +16,19 @@
|
||||
<div><input type="text" name="mox_item" id="mox_item" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="desc" for="mox_payment_type">Fizetés típusa:</label>
|
||||
<div>
|
||||
<select name="mox_payment_type" id="mox_payment_type">
|
||||
{foreach $pt_assoc_array as $pt_array}
|
||||
<option value="{$pt_array.pt_id}">
|
||||
{$pt_array.pt_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mox_összeg">Összeg:</label>
|
||||
<div><input type="text" name="mox_sum" id="mox_sum" required></div>
|
||||
@@ -27,12 +40,12 @@
|
||||
<select name="mox_moxc_id">
|
||||
<option value='null'>- nincs beállítva -</option>
|
||||
{foreach $moxc_array as $moxc}
|
||||
<option value='{$moxc->get_moxc_id()}'>{$moxc->get_moxc_name()}</option>
|
||||
<option value='{$moxc->get_moxc_id()}'>{$moxc->get_moxc_name()}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Létrehozás">
|
||||
@@ -40,4 +53,4 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,6 +21,19 @@
|
||||
<div><input type="text" name="mox_item" id="mox_item" value="{$mox->get_mox_item()}" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="desc" for="mox_payment_type">Fizetés típusa:</label>
|
||||
<div>
|
||||
<select name="mox_payment_type" id="mox_payment_type">
|
||||
{foreach $pt_assoc_array as $pt_array}
|
||||
<option value="{$pt_array.pt_id}"{if $pt_array.pt_id == $mox->get_mox_payment_type_pt_id()} selected{/if}>
|
||||
{$pt_array.pt_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mox_összeg">Összeg:</label>
|
||||
<div><input type="text" name="mox_sum" id="mox_sum" value="{$mox->get_mox_sum()}" required></div>
|
||||
@@ -32,12 +45,12 @@
|
||||
<select name="mox_moxc_id">
|
||||
<option value='null'>- nincs beállítva -</option>
|
||||
{foreach $moxc_array as $moxc}
|
||||
<option value='{$moxc->get_moxc_id()}'{if $moxc->get_moxc_id() == $mox->get_mox_money_expense_category_moxc_id()} selected{/if}>{$moxc->get_moxc_name()}</option>
|
||||
<option value='{$moxc->get_moxc_id()}'{if $moxc->get_moxc_id() == $mox->get_mox_money_expense_category_moxc_id()} selected{/if}>{$moxc->get_moxc_name()}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Mentés">
|
||||
@@ -45,4 +58,4 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
91
template/templates/money_income.tpl
Normal file
91
template/templates/money_income.tpl
Normal file
@@ -0,0 +1,91 @@
|
||||
<div class="buttons">
|
||||
|
||||
<a href="/admin/create/money_income" class="addbutton add-big">Új bevétel</a>
|
||||
<a href="/admin/money_income_category" class="addbutton add-big">Bevétel kategóriák kezelése</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="list full_width">
|
||||
{foreach $mi_array as $mi}
|
||||
|
||||
{if !$mi@first && $mi_array[$mi@index]->get_mi_date()|substr:5:2 != $mi_array[$mi@index-1]->get_mi_date()|substr:5:2}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $mi@first || $mi_array[$mi@index]->get_mi_date()|substr:5:2 != $mi_array[$mi@index-1]->get_mi_date()|substr:5:2}
|
||||
<span onclick="block_action('block_{$mi->get_mi_date()|substr:0:4}{$mi->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$mi_array[$mi@index]->get_mi_date()|substr:0:4}.
|
||||
{$months[$mi_array[$mi@index]->get_mi_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png">
|
||||
</span>
|
||||
<div id="block_{$mi->get_mi_date()|substr:0:4}{$mi->get_mi_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{/if}
|
||||
<a href="/admin/money_income/{$mi->get_mi_id()}">
|
||||
<div class="list_item">
|
||||
<table class="money">
|
||||
<tr>
|
||||
<td class="icon">
|
||||
{if $mi->get_mi_payment_type_pt_id() == 1}
|
||||
<img src="/_image/income.png">
|
||||
{else}
|
||||
<img src="/_image/transaction.png">
|
||||
{/if}
|
||||
</td>
|
||||
<td class="quarter_width">
|
||||
{$mi->get_mi_date()}
|
||||
</td>
|
||||
<td class="no_mobile_show quarter_width">
|
||||
{if $mi->get_mi_money_income_category_mic_id()}{$mi->get_mi_mic()->get_mic_name()}{else}<span class="italic">nincs megadva</span>{/if}
|
||||
</td>
|
||||
<td class="quarter_width">
|
||||
{$mi->get_mi_item()}
|
||||
</td>
|
||||
<td class="sum">
|
||||
{$mi->get_mi_sum()|number_format:0:'':' '} Ft
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{if $mi@last}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function open_block(block_id) {
|
||||
$("#"+block_id).slideDown("slow");
|
||||
}
|
||||
|
||||
function close_block(block_id) {
|
||||
$("#"+block_id).slideUp("slow");
|
||||
}
|
||||
|
||||
function block_action(block_id) {
|
||||
if ($("#"+block_id).is(':hidden')) {
|
||||
open_block(block_id);
|
||||
}
|
||||
else {
|
||||
close_block(block_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$( document ).ready(function() {
|
||||
var divs = $( "div[class=month_block]" );
|
||||
$( ".list" ).find( divs ).hide();
|
||||
var div_list = $( ".list" ).find( divs );
|
||||
|
||||
open_block(div_list[0].id);
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
18
template/templates/money_income_category.tpl
Normal file
18
template/templates/money_income_category.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="buttons">
|
||||
|
||||
<a href="/admin/create/money_income_category" class="addbutton add-big">Új bevétel kategória</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="list">
|
||||
{foreach $mic_assoc_array as $mic}
|
||||
<a href="/admin/money_income_category/{$mic->get_mic_id()}">
|
||||
<div class="list_item">
|
||||
<img src="/_image/income.png">
|
||||
{$mic->get_mic_name()}
|
||||
</div>
|
||||
</a>
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
|
||||
17
template/templates/money_income_category_create.tpl
Normal file
17
template/templates/money_income_category_create.tpl
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" value="mic_create">
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="mic_name">Bevétel kategória neve:</label>
|
||||
<div><input type="text" name="mic_name" id="mic_name" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Létrehozás">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
21
template/templates/money_income_category_data_edit.tpl
Normal file
21
template/templates/money_income_category_data_edit.tpl
Normal file
@@ -0,0 +1,21 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<div class="buttons">
|
||||
<a href="/admin/delete_money_income_category/{$mic->get_mic_id()}" class="addbutton delete-big">Kategória törlése</a>
|
||||
</div>
|
||||
<input type="hidden" name="action" value="mic_update">
|
||||
<input type="hidden" name="mic_id" value="{$mic->get_mic_id()}">
|
||||
|
||||
<div>
|
||||
<label class="desc" id="title1" for="mic_name">Kiadás kategória neve:</label>
|
||||
<div><input type="text" name="mic_name" id="mic_name" value="{$mic->get_mic_name()}" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Mentés">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
51
template/templates/money_income_create.tpl
Normal file
51
template/templates/money_income_create.tpl
Normal file
@@ -0,0 +1,51 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" value="mi_create">
|
||||
|
||||
<div>
|
||||
<label for="mi_date">Dátum:</label>
|
||||
<div><input type="text" name="mi_date" id="mi_date" placeholder="ÉÉÉÉ-HH-NN" value="{$today}" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="mi_item">Tétel:</label>
|
||||
<div><input type="text" name="mi_item" id="mi_item" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="desc" for="mi_payment_type">Fizetés típusa:</label>
|
||||
<div>
|
||||
<select name="mi_payment_type" id="mi_payment_type">
|
||||
{foreach $pt_assoc_array as $pt_array}
|
||||
<option value="{$pt_array.pt_id}">
|
||||
{$pt_array.pt_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mi_sum">Összeg:</label>
|
||||
<div><input type="text" name="mi_sum" id="mi_sum" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mi_item">Kategória:</label>
|
||||
<div>
|
||||
<select name="mi_mic_id">
|
||||
<option value='null'>- nincs beállítva -</option>
|
||||
{foreach $mic_array as $mic}
|
||||
<option value='{$mic->get_mic_id()}'>{$mic->get_mic_name()}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Létrehozás">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
56
template/templates/money_income_data_edit.tpl
Normal file
56
template/templates/money_income_data_edit.tpl
Normal file
@@ -0,0 +1,56 @@
|
||||
<div class="form_wrapper">
|
||||
<form method="post">
|
||||
<div class="buttons">
|
||||
<a href="/admin/delete_money_income/{$mi->get_mi_id()}" class="addbutton delete-big">Bevétel törlése</a>
|
||||
</div>
|
||||
<input type="hidden" name="action" value="mi_update">
|
||||
<input type="hidden" name="mi_id" value="{$mi->get_mi_id()}">
|
||||
|
||||
<div>
|
||||
<label for="mi_date">Dátum:</label>
|
||||
<div><input type="text" name="mi_date" id="mi_date" placeholder="ÉÉÉÉ-HH-NN" value="{$mi->get_mi_date()}" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mi_item">Tétel:</label>
|
||||
<div><input type="text" name="mi_item" id="mi_item" value="{$mi->get_mi_item()}" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="desc" for="mi_payment_type">Fizetés típusa:</label>
|
||||
<div>
|
||||
<select name="mi_payment_type" id="mi_payment_type">
|
||||
{foreach $pt_assoc_array as $pt_array}
|
||||
<option value="{$pt_array.pt_id}"{if $pt_array.pt_id == $mi->get_mi_payment_type_pt_id()} selected{/if}>
|
||||
{$pt_array.pt_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mi_összeg">Összeg:</label>
|
||||
<div><input type="text" name="mi_sum" id="mi_sum" value="{$mi->get_mi_sum()}" required></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mi_item">Kategória:</label>
|
||||
<div>
|
||||
<select name="mi_mic_id">
|
||||
<option value='null'>- nincs beállítva -</option>
|
||||
{foreach $mic_array as $mic}
|
||||
<option value='{$mic->get_mic_id()}'{if $mic->get_mic_id() == $mi->get_mi_money_income_category_mic_id()} selected{/if}>{$mic->get_mic_name()}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Mentés">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
12
template/templates/nav.tpl
Executable file → Normal file
12
template/templates/nav.tpl
Executable file → Normal file
@@ -18,16 +18,16 @@
|
||||
</li>
|
||||
{foreach $menus as $menu}
|
||||
<li><a href="/{$page}/{$menu.spage_url}{if $page == 'preview'}/{$user_login->get_uk_id()}{elseif $page == 'coach_preview'}/{$user_login->get_ua_id()}{/if}">
|
||||
|
||||
|
||||
{$menu.spage_title}
|
||||
|
||||
</a></li>
|
||||
{/foreach}
|
||||
|
||||
|
||||
|
||||
|
||||
{else}
|
||||
|
||||
<li class="login"><a href="/{$page}">{if $page == 'tabor' || $page == 'taborvezeto'}Tollaslabda táborok 2017. nyár{else}Badminton Coach{/if}</a></li>
|
||||
|
||||
<li class="login"><a href="/{$page}">{if $page == 'tabor' || $page == 'taborvezeto'}Tollaslabda táborok 2018. nyár{else}Badminton Coach{/if}</a></li>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -69,4 +69,4 @@ function myFunction() {
|
||||
x.className = "topnav";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -7,8 +7,41 @@
|
||||
<a href="#">
|
||||
<div class="list_item">
|
||||
<img src="/_image/stat.png">
|
||||
Egyenleg: {$balance|number_format:0:'':' '} Ft
|
||||
Készpénz bevétel: {$in_cash|number_format:0:'':' '} Ft
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<img src="/_image/stat.png">
|
||||
Készpénz kiadás: {$out_cash|number_format:0:'':' '} Ft
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<img src="/_image/stat.png">
|
||||
Készpénz egyenleg: {($in_cash - $out_cash)|number_format:0:'':' '} Ft
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="list" style="margin-top: 30px;">
|
||||
<a href="#">
|
||||
<div class="list_item">
|
||||
<img src="/_image/stat.png">
|
||||
Utalás bevétel: {$in_transfer|number_format:0:'':' '} Ft
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<img src="/_image/stat.png">
|
||||
Utalás kiadás: {$out_transfer|number_format:0:'':' '} Ft
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<img src="/_image/stat.png">
|
||||
Utalás egyenleg: {($in_transfer - $out_transfer)|number_format:0:'':' '} Ft
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="list" style="margin-top: 30px;">
|
||||
<a href="#">
|
||||
<div class="list_item">
|
||||
<img src="/_image/stat.png">
|
||||
Egyenleg: {(($in_cash + $in_transfer)-($out_cash + $out_transfer))|number_format:0:'':' '} Ft
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
|
||||
!$action@first &&
|
||||
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
||||
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_date()|substr:5:2
|
||||
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_training()->get_tr_date()|substr:0:4},{$action->get_de_training()->get_tr_date()|substr:5:2})} edzés)
|
||||
<div class="diary_header">
|
||||
@@ -27,7 +27,7 @@
|
||||
<div id="block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{elseif $action@first}
|
||||
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_training()->get_tr_date()|substr:0:4},{$action->get_de_training()->get_tr_date()|substr:5:2})} edzés)
|
||||
<div class="diary_header">
|
||||
@@ -41,15 +41,15 @@
|
||||
<div class="row">
|
||||
<div class="list_item line_height14 bigger_space">
|
||||
<span class="size20 bold">
|
||||
{$action->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||
{$action->get_de_training()->get_tr_date_day()}.
|
||||
{$days[$action->get_de_training()->get_tr_date_day_of_week()]}
|
||||
{$action->get_de_training()->get_tr_date_time()}
|
||||
{$action->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||
{$action->get_de_training()->get_tr_date_day()}.
|
||||
{$days[$action->get_de_training()->get_tr_date_day_of_week()]}
|
||||
{$action->get_de_training()->get_tr_date_time()}
|
||||
</span>
|
||||
<br>
|
||||
{if $action->get_de_training()->get_tr_training_type_trt_id()}{$action->get_de_training()->get_tr_type_name_by_id()} edzés{/if}
|
||||
{$action->get_de_training()->get_tr_duration()} p
|
||||
{if $action->get_de_training()->get_tr_training_type_trt_id()}{$action->get_de_training()->get_tr_type_name_by_id()} edzés{/if}
|
||||
{$action->get_de_training()->get_tr_duration()} p
|
||||
{if $action->get_de_training()->is_coach()}
|
||||
{foreach $action->get_de_training()->get_tr_coaches_name() as $coach_name}
|
||||
{if $coach_name@first}({/if}{$coach_name}{if $coach_name@last}){else}, {/if}
|
||||
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
|
||||
<div class="side_block">
|
||||
|
||||
|
||||
|
||||
<span class="bold" style="font-size: 20px;">{if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
||||
</div>
|
||||
@@ -85,44 +85,44 @@
|
||||
|
||||
{if !$action@first &&
|
||||
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
||||
$actions[$action@index]->get_de_money_deposit()->get_mod_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
||||
$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
||||
|
||||
||
|
||||
|
||||
!$action@first &&
|
||||
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
||||
$actions[$action@index]->get_de_money_deposit()->get_mod_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_date()|substr:5:2
|
||||
$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_date()|substr:5:2})} edzés)
|
||||
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2})} edzés)
|
||||
<img src="/_image/open_folder.png">
|
||||
</span>
|
||||
<div id="block_{$action->get_de_money_deposit()->get_mod_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_date()|substr:5:2}" class="month_block">
|
||||
<div id="block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{elseif $action@first}
|
||||
|
||||
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_date()|substr:5:2})} edzés)
|
||||
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2})} edzés)
|
||||
<img src="/_image/open_folder.png">
|
||||
</span>
|
||||
<div id="block_{$action->get_de_money_deposit()->get_mod_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_date()|substr:5:2}" class="month_block">
|
||||
<div id="block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
||||
|
||||
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="list_item line_height14 bigger_space money_deposit">
|
||||
<span class="size20 bold">
|
||||
{$action->get_de_money_deposit()->get_mod_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_date()|substr:5:2]}
|
||||
{$action->get_de_money_deposit()->get_mod_date_day()}.
|
||||
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date_day()}.
|
||||
</span>
|
||||
<br>
|
||||
befizetés: {$action->get_de_money_deposit()->get_mod_sum(true)} Ft
|
||||
befizetés: {$action->get_de_money_deposit()->get_mod_money_income()->get_mi_sum(true)} Ft
|
||||
</div>
|
||||
|
||||
<div class="side_block">
|
||||
@@ -171,8 +171,8 @@ $( document ).ready(function() {
|
||||
var div_list = $( ".list" ).find( divs );
|
||||
|
||||
open_block(div_list[0].id);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user