added money delete option
add _developer directorym (ignored)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
/template/templates_c
|
/template/templates_c
|
||||||
php_errors.log
|
php_errors.log
|
||||||
/_image
|
/_image
|
||||||
|
/_developer
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ RewriteBase /
|
|||||||
|
|
||||||
RewriteRule ^$ index.php?page=view [NC,L]
|
RewriteRule ^$ index.php?page=view [NC,L]
|
||||||
|
|
||||||
|
RewriteRule ^\/?(_developer)\/([a-zA-Z0-9\.\_]*) _developer/$2 [NC]
|
||||||
|
|
||||||
RewriteRule ^\/?(_css\/)([a-zA-Z0-9_]+)\.css$ _css/$2.css [NC]
|
RewriteRule ^\/?(_css\/)([a-zA-Z0-9_]+)\.css$ _css/$2.css [NC]
|
||||||
RewriteRule ^\/?(_ajax\/)([a-zA-Z0-9_]+)\.php$ _ajax/$2.php [NC,L]
|
RewriteRule ^\/?(_ajax\/)([a-zA-Z0-9_]+)\.php$ _ajax/$2.php [NC,L]
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class money_deposit {
|
|||||||
private $mod_user_kid; //OBJECT
|
private $mod_user_kid; //OBJECT
|
||||||
private $mod_date;
|
private $mod_date;
|
||||||
private $mod_sum;
|
private $mod_sum;
|
||||||
|
private $mod_deleted;
|
||||||
|
|
||||||
public function set_mod_id($_id) {
|
public function set_mod_id($_id) {
|
||||||
$this->mod_id = $_id;
|
$this->mod_id = $_id;
|
||||||
@@ -31,6 +32,10 @@ class money_deposit {
|
|||||||
$this->mod_sum = $_sum;
|
$this->mod_sum = $_sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function set_mod_deleted($_deleted) {
|
||||||
|
$this->mod_deleted = $_deleted;
|
||||||
|
}
|
||||||
|
|
||||||
public function get_mod_id() {
|
public function get_mod_id() {
|
||||||
return $this->mod_id;
|
return $this->mod_id;
|
||||||
}
|
}
|
||||||
@@ -51,6 +56,10 @@ class money_deposit {
|
|||||||
return $this->mod_sum;
|
return $this->mod_sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_mod_deleted() {
|
||||||
|
return $this->mod_deleted;
|
||||||
|
}
|
||||||
|
|
||||||
public function set_mod_data_by_id($_id) {
|
public function set_mod_data_by_id($_id) {
|
||||||
global $sql;
|
global $sql;
|
||||||
$mod_query = "SELECT * FROM money_deposit WHERE mod_id = " . $_id . ";";
|
$mod_query = "SELECT * FROM money_deposit WHERE mod_id = " . $_id . ";";
|
||||||
|
|||||||
@@ -161,6 +161,10 @@ class page {
|
|||||||
# ISKOLA TÖRLÉS
|
# ISKOLA TÖRLÉS
|
||||||
include('include_delete_school.php');
|
include('include_delete_school.php');
|
||||||
break;
|
break;
|
||||||
|
case 'delete_money_deposit':
|
||||||
|
# BEFIZETÉS TÖRLÉS
|
||||||
|
include('include_delete_money_deposit.php');
|
||||||
|
break;
|
||||||
case 'logout':
|
case 'logout':
|
||||||
# kijelentkezés
|
# kijelentkezés
|
||||||
$from = "coach";
|
$from = "coach";
|
||||||
|
|||||||
13
_include/include_delete_money_deposit.php
Normal file
13
_include/include_delete_money_deposit.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?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());
|
||||||
|
//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() . ')');
|
||||||
|
header("Location: /admin/money_deposit");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -29,7 +29,7 @@ if ($this->is_id()) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# BEFIZETÉS LISTA
|
# BEFIZETÉS LISTA
|
||||||
$mod_query = "SELECT * FROM money_deposit ORDER BY mod_date DESC LIMIT 50;";
|
$mod_query = "SELECT * FROM money_deposit WHERE mod_deleted = 0 ORDER BY mod_date DESC LIMIT 50;";
|
||||||
$mod_array = array();
|
$mod_array = array();
|
||||||
$mod_assoc_array = $sql->assoc_array($mod_query);
|
$mod_assoc_array = $sql->assoc_array($mod_query);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<div class="form_wrapper">
|
<div class="form_wrapper">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
<div class="buttons">
|
||||||
|
<a href="/admin/delete_money_deposit/{$mod->get_mod_id()}" class="addbutton delete-big">Befizetés törlése</a>
|
||||||
|
</div>
|
||||||
<input type="hidden" name="action" value="money_deposit_update">
|
<input type="hidden" name="action" value="money_deposit_update">
|
||||||
<input type="hidden" name="mod_id" value="{$mod->get_mod_id()}">
|
<input type="hidden" name="mod_id" value="{$mod->get_mod_id()}">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user