diff --git a/_class/class_backup.php b/_class/class_backup.php index 2a86cab..687dbec 100644 --- a/_class/class_backup.php +++ b/_class/class_backup.php @@ -4,6 +4,7 @@ class backup { private $bu_id; private $bu_name; private $bu_date; + private $bu_deleted; public function set_bu_id($_item) { @@ -18,6 +19,10 @@ class backup { $this->bu_date = $_item; } + public function set_bu_deleted($_item) { + $this->bu_deleted = $_item; + } + public function get_bu_id() { return $this->bu_id; } @@ -30,6 +35,10 @@ class backup { return $this->bu_date; } + public function get_bu_deleted() { + return $this->bu_deleted; + } + public function set_backup_data_by_id($_id) { //SETTING ID ALAPJÁN KÉRI LE; //HA KELL, LEHET KÜLÖN FUNCTION-T ÍRNI HOGY ID ALAPJÁN KÉRJE diff --git a/_class/class_page.php b/_class/class_page.php index 9c6859f..8a684c5 100755 --- a/_class/class_page.php +++ b/_class/class_page.php @@ -204,6 +204,10 @@ class page { # BEFIZETÉS TÖRLÉS include('include_delete_money_expense.php'); break; + case 'delete_backup': + # MENTÉS TÖRLÉS + include('include_delete_backup.php'); + break; case 'logout': # kijelentkezés $from = "coach"; diff --git a/_image/download.png b/_image/download.png new file mode 100644 index 0000000..c1ef285 Binary files /dev/null and b/_image/download.png differ diff --git a/_include/include_delete_backup.php b/_include/include_delete_backup.php new file mode 100644 index 0000000..006dadc --- /dev/null +++ b/_include/include_delete_backup.php @@ -0,0 +1,12 @@ +is_id()) { + //$delete_query = "DELETE FROM user_kid WHERE uk_id = " . $this->get_id() . ";"; + //$sql->execute_query($delete_query); + $sql->update_table('backup', array('bu_deleted' => 1), array('bu_id' => $this->get_id())); + log::register('delete_backup', $this->get_id()); + header("Location: /admin/settings/3"); +} + + +?> \ No newline at end of file diff --git a/_include/include_settings.php b/_include/include_settings.php index 1627141..119f0d6 100644 --- a/_include/include_settings.php +++ b/_include/include_settings.php @@ -23,7 +23,7 @@ if ($this->is_id()) { elseif ($new_setting->get_setv_setting()->get_set_setting_type_st_id() == 2) { //biztonsági mentés - $backup_assoc_array = $sql->assoc_array("SELECT * FROM backup ORDER BY bu_date DESC, bu_id DESC limit 14;"); + $backup_assoc_array = $sql->assoc_array("SELECT * FROM backup WHERE bu_deleted = 0 ORDER BY bu_date DESC, bu_id DESC limit 14;"); $backups = array(); foreach ($backup_assoc_array as $value) { $new_backup = new backup(); diff --git a/backup/.gitkeep b/backup/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/template/templates/setting_data_edit.tpl b/template/templates/setting_data_edit.tpl index ac42951..095d621 100644 --- a/template/templates/setting_data_edit.tpl +++ b/template/templates/setting_data_edit.tpl @@ -1,25 +1,31 @@ -
-
- - - - {if $setting->get_setv_setting()->get_set_setting_type_st_id() == 1} -
-
- -
+
+ + + + + +
+
+ +
+
+ + +
+
+ +
+
+
- -
-
- -
-
+ {elseif $setting->get_setv_setting()->get_set_setting_type_st_id() == 2} @@ -31,20 +37,100 @@
{foreach $backups as $backup} - -
- - {$backup->get_bu_date()|date_format:"%Y.%m.%d %H:%M"} #{$backup->get_bu_id()} -
-
+ {if + $backup@first || + ( + $backups[$backup@index]->get_bu_date()|substr:5:2 != $backups[$backup@index-1]->get_bu_date()|substr:5:2 + ) + + } + {if !$backup@first && + $backups[$backup@index]->get_bu_date()|substr:5:2 != $backups[$backup@index-1]->get_bu_date()|substr:5:2 + } +
+ {/if} + {$backups[$backup@index]->get_bu_date()|substr:0:4}. + {$months[$backups[$backup@index]->get_bu_date()|substr:5:2]} + + +
+ {/if} +
+ + {$backup->get_bu_date()|date_format:"%Y.%m.%d %H:%M"} #{$backup->get_bu_id()} +
+
+
+ Letöltés + +
+
+ Törlés + +
+
+ {if $backup@last} +
+ {/if} {/foreach}
{/if} - -
- \ No newline at end of file diff --git a/template/templates/user_list.tpl b/template/templates/user_list.tpl index f7295dc..345068b 100755 --- a/template/templates/user_list.tpl +++ b/template/templates/user_list.tpl @@ -46,7 +46,6 @@ $("#uk_filter_name").keyup(function() { function open_kid_menu(uk_id) { $("#kid_menu_"+uk_id).slideToggle(); - console.log($(this)); if (!$("#kid_"+uk_id).hasClass('active_kid')) { $("#kid_"+uk_id).addClass('active_kid'); $("#kid_"+uk_id).removeClass('list_item');