send notifications manually

This commit is contained in:
Ricsi
2019-03-02 18:35:14 +00:00
parent 0bc4dfeb04
commit a1c4c27fcb
6 changed files with 250 additions and 103 deletions

View File

@@ -3,35 +3,69 @@
# HA NINCS ID, AKKOR EGYENLEGLISTA
# HA VAN ID, AKKOR RENDEZÉS IS VAN
$where = '';
if ($this->is_id()) {
# RENDEZÉS
# RENDEZÉS
/*
*/
switch ($this->get_id()) {
case 1:
//1 - egyenleg szerint növekvő
$order_by = 'uk_balance ASC, uk_name ASC';
$url_postfix = '/' . $this->get_id();
break;
case 2:
//2 - tartozások
$where = ' AND uk_balance < 0';
$order_by = 'uk_name ASC';
$url_postfix = '/' . $this->get_id();
break;
case 3:
//3 - tartozások csökkenőben
$where = ' AND uk_balance < 0';
$order_by = 'uk_balance ASC, uk_name ASC';
$url_postfix = '/' . $this->get_id();
break;
case 4:
//4 - tartozások növekvőben
$where = ' AND uk_balance < 0';
$order_by = 'uk_balance DESC, uk_name ASC';
$url_postfix = '/' . $this->get_id();
break;
case 5:
//5 - tartozások növekvőben
$where = ' AND uk_balance < 0';
$order_by = 'uk_last_notification DESC, uk_name ASC';
$url_postfix = '/' . $this->get_id();
break;
default:
# code...
break;
}
/*
1 - egyenleg szerint növekvő
*/
$order_by = 'uk_balance ASC, uk_name ASC';
$url_postfix = '/' . $this->get_id();
}
else {
# EGYENLEG LISTA
$order_by = 'uk_name ASC';
$url_postfix = '';
# EGYENLEG LISTA
$order_by = 'uk_name ASC';
$url_postfix = '';
}
$active_kid_assoc_array = $sql->assoc_array('select * from user_kid where uk_deleted = 0 and uk_is_active = 1 order by '. $order_by .';');
$active_kid_assoc_array = $sql->assoc_array('select * from user_kid where uk_deleted = 0 and uk_is_active = 1'.$where.' order by '. $order_by .';');
$user_kids = array();
foreach ($active_kid_assoc_array as $kid) {
$new_kid = new user_kid();
$new_kid->set_user_data_by_id($kid['uk_id']);
$user_kids[] = $new_kid;
$new_kid = new user_kid();
$new_kid->set_user_data_by_id($kid['uk_id']);
$user_kids[] = $new_kid;
}
$smarty->assign('page_id', $this->is_id() ? $this->get_id() : null);
$smarty->assign('user_kids', $user_kids);
$smarty->assign('url_postfix', $url_postfix);
$smarty->display('user_balance_list.tpl');
?>
?>