Esempio n. 1
0
 public function form()
 {
     global $Language;
     $archiveName = 'backup-' . time() . '.zip';
     // Archive name
     $html = '';
     if (file_exists(PATH_BACKUP)) {
         $html .= pluginBackup::list_zipfiles(PATH_BACKUP);
     }
     $html .= '<div class="unit-100">';
     $html .= '<button class="uk-button uk-button-primary" type="submit" name="backup"><i class="uk-icon-life-ring"></i> ' . $Language->get("Make a backup") . '</button>';
     $html .= '</div>';
     $html .= '<style type="text/css" scoped>.uk-form-row button, .uk-form-row a {display:none};</style>';
     if (isset($_POST['backup'])) {
         if (!pluginBackup::zipData(PATH_CONTENT, PATH_BACKUP . $archiveName)) {
             Alert::set($Language->get("there-was-a-problem-writing-the-zip-archive."));
         }
     }
     return $html;
 }
Esempio n. 2
0
 public function form()
 {
     global $Language;
     $archiveName = 'backup-' . time() . '.zip';
     // Archive name
     $html = '';
     if (file_exists(PATH_BACKUP)) {
         $html .= pluginBackup::list_zipfiles(PATH_BACKUP);
     }
     $html .= '<div class="unit-100">';
     $html .= '<button class="btn btn-blue" type="submit" name="backup"><i class="fa fa-life-ring"></i> ' . $Language->get("Make a backup") . '</button>';
     $html .= '</div>';
     $html .= '<style type="text/css" scoped>button[name="publish"] {display:none};</style>';
     if (isset($_POST['backup'])) {
         pluginBackup::zipData(PATH_CONTENT, PATH_BACKUP . $archiveName);
     }
     return $html;
 }