diff --git a/.gitignore b/.gitignore index 5b78ccb..78dcf10 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /template/templates_c php_errors.log /_image +/_developer diff --git a/.htaccess b/.htaccess index 6c0ef45..641d8eb 100644 --- a/.htaccess +++ b/.htaccess @@ -5,6 +5,8 @@ RewriteBase / 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 ^\/?(_ajax\/)([a-zA-Z0-9_]+)\.php$ _ajax/$2.php [NC,L] diff --git a/_class/class_money_deposit.php b/_class/class_money_deposit.php index 46c4c41..ae52dee 100644 --- a/_class/class_money_deposit.php +++ b/_class/class_money_deposit.php @@ -10,6 +10,7 @@ class money_deposit { private $mod_user_kid; //OBJECT private $mod_date; private $mod_sum; + private $mod_deleted; public function set_mod_id($_id) { $this->mod_id = $_id; @@ -31,6 +32,10 @@ class money_deposit { $this->mod_sum = $_sum; } + public function set_mod_deleted($_deleted) { + $this->mod_deleted = $_deleted; + } + public function get_mod_id() { return $this->mod_id; } @@ -51,6 +56,10 @@ class money_deposit { return $this->mod_sum; } + public function get_mod_deleted() { + return $this->mod_deleted; + } + public function set_mod_data_by_id($_id) { global $sql; $mod_query = "SELECT * FROM money_deposit WHERE mod_id = " . $_id . ";"; diff --git a/_class/class_page.php b/_class/class_page.php index b7e19cf..4ad28eb 100755 --- a/_class/class_page.php +++ b/_class/class_page.php @@ -161,6 +161,10 @@ class page { # ISKOLA TÖRLÉS include('include_delete_school.php'); break; + case 'delete_money_deposit': + # BEFIZETÉS TÖRLÉS + include('include_delete_money_deposit.php'); + break; case 'logout': # kijelentkezés $from = "coach"; diff --git a/_include/include_delete_money_deposit.php b/_include/include_delete_money_deposit.php new file mode 100644 index 0000000..6667180 --- /dev/null +++ b/_include/include_delete_money_deposit.php @@ -0,0 +1,13 @@ +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"); +} + + +?> \ No newline at end of file diff --git a/_include/include_money_deposit.php b/_include/include_money_deposit.php index 5ae7a4c..a7fa431 100644 --- a/_include/include_money_deposit.php +++ b/_include/include_money_deposit.php @@ -29,7 +29,7 @@ if ($this->is_id()) { } else { # 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_assoc_array = $sql->assoc_array($mod_query); diff --git a/template/templates/money_deposit_update.tpl b/template/templates/money_deposit_update.tpl index 2943556..bf22175 100644 --- a/template/templates/money_deposit_update.tpl +++ b/template/templates/money_deposit_update.tpl @@ -1,5 +1,8 @@