extended user diary, added diary entry class, added view deposit option to user list
This commit is contained in:
138
_class/class_diary_entry.php
Normal file
138
_class/class_diary_entry.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class diary_entry {
|
||||
private $de_presence_id;
|
||||
private $de_date;
|
||||
private $de_type; //money deposit or training
|
||||
private $de_training_per_month; //hányadik edzés a hónapban
|
||||
private $de_training_per_day; //hányadik edzés a napon
|
||||
private $de_first_two; //boolean; első két edzés egyike-e
|
||||
private $de_training = null;
|
||||
private $de_money_deposit = null;
|
||||
private $de_transaction = 0; //ez adja meg, hogy mennyivel csökken, vagy nő az egyenleg
|
||||
private $de_balance = 0; //a felhasználóhoz tartozó aktuális egyenleg
|
||||
private $de_has_discount = false; //van-e kedvzemény
|
||||
private $de_discount_id; //kedvezmény ID
|
||||
|
||||
function __construct($_pr_id, $_date, $_type, $_tpm, $_tpd, $_ft, $_tr = null, $_mod = null) {
|
||||
$this->set_de_presence_id($_pr_id);
|
||||
$this->set_de_date($_date);
|
||||
$this->set_de_type($_type);
|
||||
$this->set_de_training_per_month($_tpm);
|
||||
$this->set_de_training_per_day($_tpd);
|
||||
$this->set_de_first_two($_ft);
|
||||
$this->set_de_training($_tr);
|
||||
$this->set_de_money_deposit($_mod);
|
||||
|
||||
}
|
||||
|
||||
public function set_de_presence_id($_item) {
|
||||
$this->de_presence_id = $_item;
|
||||
}
|
||||
|
||||
/* ez majd akkor jöhet, ha lesz presence class
|
||||
public function set_de_presence($_item) {
|
||||
$this->de_presence = $_item;
|
||||
}
|
||||
*/
|
||||
|
||||
public function set_de_date($_item) {
|
||||
$this->de_date = $_item;
|
||||
}
|
||||
|
||||
public function set_de_type($_item) {
|
||||
$this->de_type = $_item;
|
||||
}
|
||||
|
||||
public function set_de_training_per_month($_item) {
|
||||
$this->de_training_per_month = $_item;
|
||||
}
|
||||
|
||||
public function set_de_training_per_day($_item) {
|
||||
$this->de_training_per_day = $_item;
|
||||
}
|
||||
|
||||
public function set_de_first_two($_item) {
|
||||
$this->de_first_two = $_item;
|
||||
}
|
||||
|
||||
public function set_de_training($_item) {
|
||||
$this->de_training = $_item;
|
||||
}
|
||||
|
||||
public function set_de_money_deposit($_item) {
|
||||
$this->de_money_deposit = $_item;
|
||||
}
|
||||
|
||||
public function set_de_transaction($_item) {
|
||||
$this->de_transaction = $_item;
|
||||
}
|
||||
|
||||
public function set_de_balance($_item) {
|
||||
$this->de_balance = $_item;
|
||||
}
|
||||
|
||||
public function set_de_has_discount($_item) {
|
||||
$this->de_has_discount = $_item;
|
||||
}
|
||||
|
||||
public function set_de_discount_id($_item) {
|
||||
$this->de_discount_id = $_item;
|
||||
}
|
||||
|
||||
public function get_de_presence_id() {
|
||||
return $this->de_presence_id;
|
||||
}
|
||||
|
||||
public function get_de_date() {
|
||||
return $this->de_date;
|
||||
}
|
||||
|
||||
public function get_de_type() {
|
||||
return $this->de_type;
|
||||
}
|
||||
|
||||
public function get_de_training_per_month() {
|
||||
return $this->de_training_per_month;
|
||||
}
|
||||
|
||||
public function get_de_training_per_day() {
|
||||
return $this->de_training_per_day;
|
||||
}
|
||||
|
||||
public function get_de_first_two() {
|
||||
return $this->de_first_two;
|
||||
}
|
||||
|
||||
public function get_de_training() {
|
||||
return $this->de_training;
|
||||
}
|
||||
|
||||
public function get_de_money_deposit() {
|
||||
return $this->de_money_deposit;
|
||||
}
|
||||
|
||||
public function get_de_transaction() {
|
||||
return $this->de_transaction;
|
||||
}
|
||||
|
||||
public function get_de_balance() {
|
||||
return $this->de_balance;
|
||||
}
|
||||
|
||||
public function get_de_has_discount() {
|
||||
return $this->de_has_discount;
|
||||
}
|
||||
|
||||
public function get_de_discount_id() {
|
||||
return $this->de_discount_id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -137,6 +137,10 @@ class page {
|
||||
# EDZÉS ZÁROLÁS, FELOLDÁS
|
||||
include('include_lock_training.php');
|
||||
break;
|
||||
case 'view_deposit':
|
||||
# BEFIZETÉSEK / USER
|
||||
include('include_view_deposit.php');
|
||||
break;
|
||||
case 'delete_training_type':
|
||||
# EDZÉS TÍPUS TÖRLÉS
|
||||
include('include_delete_training_type.php');
|
||||
|
||||
@@ -7,6 +7,7 @@ class user_kid extends user_parent {
|
||||
private $user_id;
|
||||
private $user_name;
|
||||
private $user_is_active;
|
||||
private $user_balance;
|
||||
private $user_last_name;
|
||||
private $user_first_name;
|
||||
private $user_password;
|
||||
@@ -242,6 +243,12 @@ class user_kid extends user_parent {
|
||||
public function get_uk_school() {
|
||||
return $this->user_school;
|
||||
}
|
||||
public function set_uk_balance($_balance) {
|
||||
$this->user_balance = $_balance;
|
||||
}
|
||||
public function get_uk_balance() {
|
||||
return $this->user_balance;
|
||||
}
|
||||
public function is_logged_in() {
|
||||
//leellenőrzi cookie alapján h be vagyunk-e jelentkezve
|
||||
//JAVÍTVA: adja vissza az adattag igazságértékét
|
||||
@@ -446,5 +453,59 @@ class user_kid extends user_parent {
|
||||
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));
|
||||
}
|
||||
|
||||
public function calculate_balance(&$_de_obj_array, $_user_obj = null) {
|
||||
//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
|
||||
//ha user_obj null, akkor az aktuális usernél állítja be
|
||||
global $sql;
|
||||
|
||||
//kezdetben 0
|
||||
$balance = 0;
|
||||
foreach ($_de_obj_array as $i => $_de) {
|
||||
//minden lépésben az balance-t be kell állítani az előző lépésben updatelt balance-ra
|
||||
if (isset($_de_obj_array[$i-1])) {
|
||||
$_de->set_de_balance($_de_obj_array[$i-1]->get_de_balance());
|
||||
}
|
||||
if ($_de->get_de_type() == 'training') {
|
||||
//ha edzés, akkor -1000 levonás, kivéve, ha kedvezményes:
|
||||
//1-nél több edzés / nap
|
||||
//8-nál több edzés / hónap
|
||||
//első két alkalom egyike
|
||||
//var_dump($_de);
|
||||
//echo $_de->get_de_first_two() . '<br>';
|
||||
//echo $_de->get_de_training_per_month() . '<br>';
|
||||
//echo $_de->get_de_training_per_day() . '<br><br><br>';
|
||||
if ($_de->get_de_first_two() > 0 || $_de->get_de_training_per_month() > 8 || $_de->get_de_training_per_day() > 1) {
|
||||
//do nothing
|
||||
$_de->set_de_transaction(0);
|
||||
$_de->set_de_has_discount(true);
|
||||
//TODO: ha van már havi 8+ akk ne nézze a duplázót!
|
||||
if ($_de->get_de_first_two() > 0) $_de->set_de_discount_id(1);
|
||||
if ($_de->get_de_training_per_day() > 1) $_de->set_de_discount_id(3);
|
||||
if ($_de->get_de_training_per_month() > 8) $_de->set_de_discount_id(2);
|
||||
}
|
||||
else {
|
||||
//$balance -= 1000;
|
||||
$_de->set_de_transaction(-1000); //beállítjuk, mennyivel csökken az egyenleg
|
||||
$_de->set_de_balance($_de->get_de_balance()+$_de->get_de_transaction()); //beállítjuk az új egyenleget
|
||||
//echo $_de->get_de_date() . " minusz 1000<br><br>";
|
||||
}
|
||||
}
|
||||
elseif ($_de->get_de_type() == 'money_deposit') {
|
||||
$_de->set_de_transaction($_de->get_de_money_deposit()->get_mod_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>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$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);
|
||||
|
||||
return $_de_obj_array;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -211,6 +211,10 @@ td.create a {
|
||||
border-left: 2px solid #000;
|
||||
}
|
||||
|
||||
.side_block:hover {
|
||||
background-color: #B7B7B7;
|
||||
}
|
||||
|
||||
.list .list_item img, .list .name_tag img, .list .name_tag_checked img{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
@@ -263,6 +267,17 @@ td.create a {
|
||||
margin: 10px 0px !important;
|
||||
}
|
||||
|
||||
.balance {
|
||||
clear: both;
|
||||
text-align: center;
|
||||
margin: 10px 0px 15px 0px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
border-bottom: 2px solid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.transp {
|
||||
opacity: 0.5;
|
||||
}
|
||||
@@ -338,26 +353,21 @@ table.log tr.delete:hover {
|
||||
|
||||
@media (min-width: 680px) {
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.list .date_separator {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.balance {
|
||||
clear: both;
|
||||
text-align: left;
|
||||
margin: 10px 0px 15px 0px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding-left: 5px;
|
||||
border-bottom: 2px solid;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -411,4 +421,6 @@ table.log tr.delete:hover {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
45
_css/diary.css
Normal file
45
_css/diary.css
Normal file
@@ -0,0 +1,45 @@
|
||||
@media (min-width: 1000px) {
|
||||
|
||||
.list {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list .list_item {
|
||||
width: 54%;
|
||||
display: inline-block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.side_block {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
width: 35%;
|
||||
clear: right;
|
||||
margin: 10px 0px 10px 11% !important;
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
line-height: 1.4;
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.extra_row {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 999px) {
|
||||
.side_block {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.extra_row {
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
@@ -9,44 +9,135 @@ else {
|
||||
|
||||
$action_list_query = "
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
((SELECT
|
||||
pr_training_tr_id as object_id,
|
||||
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->get_uk_id() . "
|
||||
AND tr_deleted = 0) UNION (SELECT
|
||||
mod_id,
|
||||
mod_date,
|
||||
if(mod_id is not null, 'money_deposit', null) as object_type
|
||||
FROM
|
||||
money_deposit
|
||||
WHERE
|
||||
mod_user_kid_uk_id = ". $user->get_uk_id() . " and mod_deleted = 0)) actions
|
||||
order by object_date DESC;
|
||||
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->get_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->get_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->get_uk_id()."
|
||||
and date(tr_date) = uk_first_training
|
||||
ORDER BY tr_date ASC
|
||||
limit 1)
|
||||
order by tr_id 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->get_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->get_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->get_uk_id()."
|
||||
and date(tr_date) = uk_first_training
|
||||
ORDER BY tr_date ASC
|
||||
limit 1)
|
||||
order by tr_id 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->get_uk_id()."
|
||||
AND tr_deleted = 0) UNION (SELECT
|
||||
mod_id,
|
||||
timestamp(mod_date),
|
||||
if(mod_id is not null, 'money_deposit', null) as object_type
|
||||
FROM
|
||||
money_deposit
|
||||
WHERE
|
||||
mod_user_kid_uk_id = ".$user->get_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;
|
||||
//$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;
|
||||
//$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;
|
||||
|
||||
}
|
||||
$smarty->assign('actions', $actions);
|
||||
|
||||
//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('balance', $balance);
|
||||
$smarty->display('user_diary.tpl');
|
||||
|
||||
}
|
||||
|
||||
31
_include/include_view_deposit.php
Normal file
31
_include/include_view_deposit.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
# HA NINCS ID, AKKOR SEMMI
|
||||
# HA VAN ID, AKKOR BEFIZETÉS / USER
|
||||
|
||||
|
||||
|
||||
if ($this->is_id()) {
|
||||
# USERHEZ TARTOZÓ BEFIZETÉSEK
|
||||
$user_mod_query = "SELECT * FROM money_deposit WHERE mod_user_kid_uk_id = " . $this->get_id() . " and mod_deleted = 0 ORDER BY mod_date DESC;";
|
||||
$umod_assoc_array = $sql->assoc_array($user_mod_query);
|
||||
|
||||
$mods = array();
|
||||
foreach ($umod_assoc_array as $key => $value) {
|
||||
$new_mod = new money_deposit();
|
||||
$new_mod->set_mod_data_by_id($value['mod_id']);
|
||||
$mods[] = $new_mod;
|
||||
}
|
||||
|
||||
$smarty->assign("mod_array", $mods);
|
||||
$smarty->assign("balance", $sql->single_variable('SELECT uk_balance FROM user_kid WHERE uk_id = ' . $this->get_id()));
|
||||
$smarty->assign("mod_user_kid_id", $this->get_id());
|
||||
$smarty->display("view_deposit.tpl");
|
||||
|
||||
}
|
||||
else {
|
||||
# EMPTY
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -35,6 +35,10 @@ setlocale(LC_ALL, 'hu_HU');
|
||||
echo '<link rel="stylesheet" type="text/css" href="/_css/default_view.css">';
|
||||
}
|
||||
|
||||
|
||||
if ($page->is_subpage() && $page->get_subpage() == "diary"|| $page->get_page() == "view" && !$page->is_subpage())
|
||||
echo '<link rel="stylesheet" type="text/css" href="/_css/diary.css">';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{$mod->get_mod_date()}
|
||||
</td>
|
||||
<td class="sum">
|
||||
{$mod->get_mod_sum()} Ft
|
||||
{$mod->get_mod_sum()|number_format:0:'':' '} Ft
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="/admin/edit_training/{$training_data.tr_id}">SZERKESZTÉS</a></td>
|
||||
<td><a href="/admin/delete_training/{$training_data.tr_id}">TÖRLÉS</a></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>Dátum: </td>
|
||||
<td>{$training_data.tr_date}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Típus: </td>
|
||||
<td>
|
||||
<select name="tr_training_type_trt_id" id="tr_training_type_trt_id" disabled>
|
||||
<option value="null"> - </option>
|
||||
{foreach $training_type_assoc_array as $training_type_array}
|
||||
<option value="{$training_type_array.trt_id}"{if $training_type_array.trt_id == $training_data.tr_training_type_trt_id} selected{/if}>
|
||||
{$training_type_array.trt_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edzés időtartama: </td>
|
||||
<td>
|
||||
<input type="text" id="tr_duration" name="tr_duration" size="3" value="{$training_data.tr_duration}" disabled>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edző(k): </td>
|
||||
<td>
|
||||
{foreach $trc_coaches as $coach}
|
||||
{$coach->get_ua_name()}<br>
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1,6 +1,7 @@
|
||||
<div class="form_wrapper">
|
||||
<div class="buttons">
|
||||
<a href="/admin/delete_member/{$user_data.uk_id}" class="addbutton delete-big">Törlés</a>
|
||||
<a href="/admin/view_deposit/{$user_data.uk_id}" class="addbutton flag-big">Befizetések</a>
|
||||
</div>
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" id="action" value="user_data_edit">
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
<form method="post">
|
||||
<input type="hidden" name="action" id="action" value="user_data_edit">
|
||||
<input type="hidden" name="user_type" id="user_type" value="1">
|
||||
<input type="hidden" name="uk_id" id="uk_id" value="{$user_data.uk_id}">
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="/admin/members/{$user_data.uk_id}">MEGTEKINTÉS</a></td>
|
||||
<td><a href="/admin/delete_member/{$user_data.uk_id}">TÖRLÉS</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Név: </td>
|
||||
<td><input type="text" name="uk_name" id="uk_name" value="{$user_data.uk_name}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Aktív: </td>
|
||||
<td><input type="checkbox" name="uk_is_active" id="uk_is_active" value="1" {if 1==$user_data.uk_is_active}checked{/if}></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Utolsó módosítás dátuma: </td>
|
||||
<td><input type="text" name="uk_last_modified" id="uk_last_modified" value="{$user_data.uk_last_modified}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Jelszó: </td>
|
||||
<td><input type="text" name="uk_password" id="uk_password" value="{$user_data.uk_password}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Nem: </td>
|
||||
<td>
|
||||
<input type="radio" name="uk_gender" value="1" {if 1==$user_data.uk_gender}checked{/if}>Fiú
|
||||
|
||||
<input type="radio" name="uk_gender" value="2" {if 2==$user_data.uk_gender}checked{/if}>Lány
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Születési dátum: </td>
|
||||
<td><input type="text" name="uk_birth_date" id="uk_birth_date" value="{$user_data.uk_birth_date}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Lakcím: </td>
|
||||
<td><input type="text" name="uk_address" id="uk_address" value="{$user_data.uk_address}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Első edzés dátuma: </td>
|
||||
<td><input type="text" name="uk_first_training" id="uk_first_training" value="{$user_data.uk_first_training}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Kéz: </td>
|
||||
<td>
|
||||
<input type="radio" name="uk_hand" value="1" {if 1==$user_data.uk_hand}checked{/if}>Balkezes
|
||||
|
||||
<input type="radio" name="uk_hand" value="2" {if 2==$user_data.uk_hand}checked{/if}>Jobbkezes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Email cím: </td>
|
||||
<td><input type="text" name="uk_email" id="uk_email" value="{$user_data.uk_email}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Telefonszám: </td>
|
||||
<td><input type="text" name="uk_phone" id="uk_phone" value="{$user_data.uk_phone}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Facebook: </td>
|
||||
<td><input type="text" name="uk_facebook" id="uk_facebook" value="{$user_data.uk_facebook}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Pólóméret: </td>
|
||||
<td>
|
||||
<select name="uk_shirt_size_ss_id" id="uk_shirt_size_ss_id">
|
||||
<option value="null"> - </option>
|
||||
{foreach $shirt_size_assoc_array as $shirt_size_array}
|
||||
<option value="{$shirt_size_array.shirt_id}"{if $shirt_size_array.shirt_id == $user_data.uk_shirt_size_ss_id} selected{/if}>
|
||||
{$shirt_size_array.shirt_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Iskola neve: </td>
|
||||
<td>
|
||||
<select name="uk_school_sc_id" id="uk_school_sc_id">
|
||||
<option value="null"> - </option>
|
||||
{foreach $school_assoc_array as $school_array}
|
||||
<option value="{$school_array.sc_id}" {if $school_array.sc_id == $user_data.uk_school_sc_id} selected{/if}>
|
||||
{$school_array.sc_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Iskola települése: </td>
|
||||
<td>
|
||||
<select name="uk_school_city_scc_id" id="uk_school_city_scc_id">
|
||||
<option value="null"> - </option>
|
||||
{foreach $school_city_assoc_array as $school_city_array}
|
||||
<option value="{$school_city_array.scc_id}" {if $school_city_array.scc_id == $user_data.uk_school_city_scc_id} selected{/if}>
|
||||
{$school_city_array.scc_city}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Iskola kerülete: </td>
|
||||
<td><input type="text" name="uk_school_district" id="uk_school_district" value="{$user_data.uk_school_district}"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Szülő1: </td>
|
||||
<td>
|
||||
<select name="uk_parent_1" id="uk_parent_1">
|
||||
<option value="null"> - </option>
|
||||
{foreach $parent_assoc_array as $parent_array}
|
||||
<option value="{$parent_array.up_id}"{if $parent_array.up_id == $user_data.uk_parent_1} selected{/if}>
|
||||
{$parent_array.up_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Szülő2: </td>
|
||||
<td>
|
||||
<select name="uk_parent_2" id="uk_parent_2">
|
||||
<option value="null"> - </option>
|
||||
{foreach $parent_assoc_array as $parent_array}
|
||||
<option value="{$parent_array.up_id}"{if $parent_array.up_id == $user_data.uk_parent_2} selected{/if}>
|
||||
{$parent_array.up_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><input type="submit" value="Mentés"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
@@ -1,155 +0,0 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><a href="/admin/edit_member/{$user_data.uk_id}">SZERKESZTÉS</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{$user_data.uk_name}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Aktív: </td>
|
||||
<td><input type="checkbox" name="uk_is_active" id="uk_is_active" value="1" {if 1==$user_data.uk_is_active}checked{/if} disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Utolsó módosítás dátuma: </td>
|
||||
<td><input type="text" name="uk_last_modified" id="uk_last_modified" value="{$user_data.uk_last_modified}"disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Jelszó: </td>
|
||||
<td><input type="text" name="uk_password" id="uk_password" value="{$user_data.uk_password}"disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Nem: </td>
|
||||
<td>
|
||||
<input type="radio" name="uk_gender" value="1" {if 1==$user_data.uk_gender}checked{/if} disabled>Fiú
|
||||
|
||||
<input type="radio" name="uk_gender" value="2" {if 2==$user_data.uk_gender}checked{/if} disabled>Lány
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Születési dátum: </td>
|
||||
<td><input type="text" name="uk_birth_date" id="uk_birth_date" value="{$user_data.uk_birth_date}"disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Születés éve: </td>
|
||||
<td><input type="text" name="uk_birth_year" id="uk_birth_year" value="{$user_data.uk_birth_date|substr:0:4}"disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Lakcím: </td>
|
||||
<td><input type="text" name="uk_address" id="uk_address" value="{$user_data.uk_address}"disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Első edzés dátuma: </td>
|
||||
<td><input type="text" name="uk_first_training" id="uk_first_training" value="{$user_data.uk_first_training}"disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Kéz: </td>
|
||||
<td>
|
||||
<input type="radio" name="uk_hand" value="1" {if 1==$user_data.uk_hand}checked{/if} disabled>Balkezes
|
||||
|
||||
<input type="radio" name="uk_hand" value="2" {if 2==$user_data.uk_hand}checked{/if} disabled>Jobbkezes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Email cím: </td>
|
||||
<td>{$user_data.uk_email}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Telefonszám: </td>
|
||||
<td>{$user_data.uk_phone}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Facebbok: </td>
|
||||
<td>{$user_data.uk_facebook}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Pólóméret: </td>
|
||||
<td>
|
||||
<select name="shirt_size" id="shirt_size" disabled>
|
||||
<option value="null"> - </option>
|
||||
{foreach $shirt_size_assoc_array as $shirt_size_array}
|
||||
<option value="{$shirt_size_array.shirt_id}"{if $shirt_size_array.shirt_id == $user_data.uk_shirt_size_ss_id} selected{/if}>
|
||||
{$shirt_size_array.shirt_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Iskola neve: </td>
|
||||
<td>
|
||||
<select name="uk_school_sc_id" id="uk_school_sc_id" disabled>
|
||||
<option value="null"> - </option>
|
||||
{foreach $school_assoc_array as $school_array}
|
||||
<option value="{$school_array.sc_id}" {if $school_array.sc_id == $user_data.uk_school_sc_id} selected{/if}>
|
||||
{$school_array.sc_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Iskola települése: </td>
|
||||
<td>
|
||||
<select name="uk_school_city_scc_id" id="uk_school_city_scc_id" disabled>
|
||||
<option value="null"> - </option>
|
||||
{foreach $school_city_assoc_array as $school_city_array}
|
||||
<option value="{$school_city_array.scc_id}" {if $school_city_array.scc_id == $user_data.uk_school_city_scc_id} selected{/if}>
|
||||
{$school_city_array.scc_city}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Iskola kerülete: </td>
|
||||
<td><input type="text" name="uk_school_district" id="uk_school_district" value="{$user_data.uk_school_district}" disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Szülő1: </td>
|
||||
<td>
|
||||
<select name="parent1" id="parent1" disabled>
|
||||
<option value="null"> - </option>
|
||||
{foreach $parent_assoc_array as $parent_array}
|
||||
<option value="{$parent_array.up_id}"{if $parent_array.up_id == $user_data.uk_parent_1} selected{/if}>
|
||||
{$parent_array.up_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Szülő2: </td>
|
||||
<td>
|
||||
<select name="parent1" id="parent1" disabled>
|
||||
<option value="null"> - </option>
|
||||
{foreach $parent_assoc_array as $parent_array}
|
||||
<option value="{$parent_array.up_id}"{if $parent_array.up_id == $user_data.uk_parent_2} selected{/if}>
|
||||
{$parent_array.up_name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
@@ -1,98 +1,127 @@
|
||||
<div class="list">
|
||||
{foreach $actions as $action}
|
||||
|
||||
{if $action|is_a:'training'}
|
||||
{if $action->get_de_training()|is_a:'training'}
|
||||
|
||||
{if !$action@first &&
|
||||
$actions[$action@index-1]|is_a:'training' &&
|
||||
$actions[$action@index]->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_tr_date()|substr:5:2
|
||||
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
||||
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
||||
|
||||
||
|
||||
|
||||
!$action@first &&
|
||||
$actions[$action@index-1]|is_a:'money_deposit' &&
|
||||
$actions[$action@index]->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_mod_date()|substr:5:2
|
||||
$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
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<span class="date_separator">{$actions[$action@index]->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_tr_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$action->get_tr_date()|substr:0:4}{$action->get_tr_date()|substr:5:2}');">
|
||||
<span class="date_separator">{$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)
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');">
|
||||
</span>
|
||||
<div id="block_{$action->get_tr_date()|substr:0:4}{$action->get_tr_date()|substr:5:2}" class="month_block">
|
||||
<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 class="date_separator">{$actions[$action@index]->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_tr_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$action->get_tr_date()|substr:0:4}{$action->get_tr_date()|substr:5:2}');">
|
||||
<span class="date_separator">{$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)
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');">
|
||||
</span>
|
||||
<div id="block_{$action->get_tr_date()|substr:0:4}{$action->get_tr_date()|substr:5:2}" class="month_block">
|
||||
<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">
|
||||
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="list_item line_height14 bigger_space">
|
||||
<span class="size20 bold">
|
||||
{$action->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_tr_date()|substr:5:2]}
|
||||
{$action->get_tr_date_day()}.
|
||||
{$days[$action->get_tr_date_day_of_week()]}
|
||||
{$action->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_tr_training_type_trt_id()}{$action->get_tr_type_name_by_id()} edzés{/if}
|
||||
{$action->get_tr_duration()} p
|
||||
{if $action->is_coach()}
|
||||
{foreach $action->get_tr_coaches_name() as $coach_name}
|
||||
{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}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{assign var="discount" value=""}
|
||||
{if $action->get_de_has_discount()}
|
||||
{if $action->get_de_discount_id() == 1}
|
||||
{assign var="discount" value="Próba kedvezmény"}
|
||||
{elseif $action->get_de_discount_id() == 2}
|
||||
{assign var="discount" value="8+/hónap kedvezmény"}
|
||||
{elseif $action->get_de_discount_id() == 3}
|
||||
{assign var="discount" value="Duplázó kedvezmény"}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<div class="extra_row">
|
||||
<span class="bold">Egyenleg: {$action->get_de_balance()|number_format:0:'':' '} Ft</span>
|
||||
{if $discount != ""}<br>{$discount}{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{elseif $action|is_a:'money_deposit'}
|
||||
<div class="side_block">
|
||||
|
||||
|
||||
<span class="bold" style="font-size: 20px;">{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{elseif $action->get_de_money_deposit()|is_a:'money_deposit'}
|
||||
|
||||
{if !$action@first &&
|
||||
$actions[$action@index-1]|is_a:'training' &&
|
||||
$actions[$action@index]->get_mod_date()|substr:5:2 != $actions[$action@index-1]->get_tr_date()|substr:5:2
|
||||
$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
|
||||
|
||||
||
|
||||
|
||||
!$action@first &&
|
||||
$actions[$action@index-1]|is_a:'money_deposit' &&
|
||||
$actions[$action@index]->get_mod_date()|substr:5:2 != $actions[$action@index-1]->get_mod_date()|substr:5:2
|
||||
$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
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<span class="date_separator">{$actions[$action@index]->get_mod_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_mod_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$action->get_mod_date()|substr:0:4}{$action->get_mod_date()|substr:5:2}');">
|
||||
<span class="date_separator">{$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]}
|
||||
<img src="/_image/open_folder.png" 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}');">
|
||||
</span>
|
||||
<div id="block_{$action->get_mod_date()|substr:0:4}{$action->get_mod_date()|substr:5:2}" class="month_block">
|
||||
<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">
|
||||
|
||||
{elseif $action@first}
|
||||
|
||||
<span class="date_separator">{$actions[$action@index]->get_mod_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_mod_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$action->get_mod_date()|substr:0:4}{$action->get_mod_date()|substr:5:2}');">
|
||||
<span class="date_separator">{$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]}
|
||||
<img src="/_image/open_folder.png" 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}');">
|
||||
</span>
|
||||
<div id="block_{$action->get_mod_date()|substr:0:4}{$action->get_mod_date()|substr:5:2}" class="month_block">
|
||||
<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">
|
||||
|
||||
|
||||
{/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()}.
|
||||
</span>
|
||||
<br>
|
||||
befizetés: {$action->get_de_money_deposit()->get_mod_sum(true)} Ft
|
||||
</div>
|
||||
|
||||
<div class="list_item line_height14 bigger_space money_deposit">
|
||||
<span class="size20 bold">
|
||||
{$action->get_mod_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_mod_date()|substr:5:2]}
|
||||
{$action->get_mod_date_day()}.
|
||||
</span>
|
||||
<br>
|
||||
befizetés: {$action->get_mod_sum(true)} Ft
|
||||
<div class="side_block">
|
||||
{assign var="dicount" value=""}
|
||||
<span class="bold" style="font-size: 20px;">{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{/if}
|
||||
|
||||
{if $action@last}
|
||||
|
||||
93
template/templates/view_deposit.tpl
Normal file
93
template/templates/view_deposit.tpl
Normal file
@@ -0,0 +1,93 @@
|
||||
<div class="buttons">
|
||||
<form id="create_submit" action="/admin/create/money_deposit" method="post">
|
||||
<a href="#" class="addbutton add-big" onclick="open_deposit({$mod_user_kid_id})">Új befizetés</a>
|
||||
<input type="hidden" name="mod_user_kid_uk_id" value="{$mod_user_kid_id}">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="balance">
|
||||
Egyenleg: {$balance|number_format:0:'':' '} Ft
|
||||
</div>
|
||||
|
||||
<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}
|
||||
</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 class="date_separator">{$mod_array[$mod@index]->get_mod_date()|substr:0:4}.
|
||||
{$months[$mod_array[$mod@index]->get_mod_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$mod->get_mod_date()|substr:0:4}{$mod->get_mod_date()|substr:5:2}');">
|
||||
</span>
|
||||
<div id="block_{$mod->get_mod_date()|substr:0:4}{$mod->get_mod_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{/if}
|
||||
<a href="/admin/money_deposit/{$mod->get_mod_id()}">
|
||||
<div class="list_item">
|
||||
<table class="money">
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<img src="/_image/deposit.png">
|
||||
</td>
|
||||
<td>
|
||||
{$mod->get_mod_user_kid()->get_uk_name()}
|
||||
</td>
|
||||
<td class="date">
|
||||
{$mod->get_mod_date()}
|
||||
</td>
|
||||
<td class="sum">
|
||||
{$mod->get_mod_sum()|number_format:0:'':' '} Ft
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{if $mod@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);
|
||||
}
|
||||
}
|
||||
|
||||
function open_deposit(user_id) {
|
||||
$("#create_submit").submit();
|
||||
}
|
||||
|
||||
|
||||
$( 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>
|
||||
Reference in New Issue
Block a user