BackWPup – WordPress Backup Plugin - Version 3.0.1

Version Description

= After an upgrade from version 2 =

Please check all settings after the update:

  • Dropbox authentication must be done again
  • SugarSync authentication must be done again
  • S3 Settings
  • Google Storage is now in S3
  • Check all your passwords
Download this release

Release Info

Developer danielhuesken
Plugin Icon 128x128 BackWPup – WordPress Backup Plugin
Version 3.0.1
Comparing to
See all releases

Code changes from version 2.1.17 to 3.0.1

Files changed (116) hide show
  1. backwpup-functions.php +0 -1083
  2. backwpup.php +330 -88
  3. css/BackWPup16.png +0 -0
  4. css/BackWPup32.png +0 -0
  5. css/admin.css +1 -0
  6. css/admin.dev.css +93 -0
  7. css/adminbar.css +1 -0
  8. css/adminbar.dev.css +110 -0
  9. css/backwpup.css +0 -12
  10. css/backwpupbackups.css +0 -6
  11. css/backwpupeditjob.css +0 -48
  12. css/backwpuplogs.css +0 -12
  13. css/backwpupsettings.css +0 -3
  14. css/backwpuptools.css +0 -3
  15. css/backwpupworking.css +0 -72
  16. css/general.css +1 -0
  17. css/general.dev.css +251 -0
  18. css/page_about.css +1 -0
  19. css/page_about.dev.css +330 -0
  20. css/page_edit_tab_cron.css +1 -0
  21. css/page_edit_tab_cron.dev.css +21 -0
  22. css/page_jobs.css +1 -0
  23. css/page_jobs.dev.css +103 -0
  24. css/page_wizard.css +1 -0
  25. css/page_wizard.dev.css +137 -0
  26. images/BackWPup16.png +0 -0
  27. images/BackWPup16_2x.png +0 -0
  28. images/BackWPup20.png +0 -0
  29. images/BackWPup20_2x.png +0 -0
  30. images/BackWPup32.png +0 -0
  31. images/BackWPup64.png +0 -0
  32. images/backwpupbanner-free.png +0 -0
  33. images/backwpupbanner-pro.png +0 -0
  34. images/current.png +0 -0
  35. images/erroreven.png +0 -0
  36. images/errorhover.png +0 -0
  37. images/errorodd.png +0 -0
  38. images/even.png +0 -0
  39. images/execute.png +0 -0
  40. images/help.png +0 -0
  41. images/hgbox.png +0 -0
  42. images/hgboxleft.png +0 -0
  43. images/hgbtgreen.png +0 -0
  44. images/hgbtgreenhover.png +0 -0
  45. images/hgbtred.png +0 -0
  46. images/hgbtredhover.png +0 -0
  47. images/hginfotxt.png +0 -0
  48. images/hgtopgreen.png +0 -0
  49. images/hover.png +0 -0
  50. images/imagecloud.png +0 -0
  51. images/imagedata.png +0 -0
  52. images/imagerepair.png +0 -0
  53. images/imagesave.png +0 -0
  54. images/imagesec.png +0 -0
  55. images/imagexml.png +0 -0
  56. images/inpsyde.png +0 -0
  57. images/iplogo.png +0 -0
  58. images/odd.png +0 -0
  59. images/progressbarhg.jpg +0 -0
  60. images/progresshg.jpg +0 -0
  61. images/screen.png +0 -0
  62. images/tickeven.png +0 -0
  63. images/tickhover.png +0 -0
  64. images/tickodd.png +0 -0
  65. inc/cacert.pem +3895 -0
  66. inc/class-admin.php +433 -0
  67. inc/class-adminbar.php +166 -0
  68. inc/class-create-archive.php +447 -0
  69. inc/class-cron.php +301 -0
  70. inc/class-destination-dropbox.php +825 -0
  71. inc/class-destination-email.php +448 -0
  72. inc/class-destination-folder.php +229 -0
  73. inc/class-destination-ftp.php +411 -0
  74. inc/class-destination-msazure.php +402 -0
  75. inc/class-destination-rsc.php +473 -0
  76. inc/class-destination-s3.php +620 -0
  77. inc/class-destination-sugarsync.php +889 -0
  78. inc/class-destinations.php +158 -0
  79. inc/class-encryption.php +78 -0
  80. inc/class-file.php +77 -0
  81. inc/class-frontend.php +81 -0
  82. inc/class-help.php +60 -0
  83. inc/class-install.php +303 -0
  84. inc/class-job.php +1783 -0
  85. inc/class-jobtype-dbcheck.php +165 -0
  86. inc/class-jobtype-dbdump.php +244 -0
  87. inc/class-jobtype-dboptimize.php +168 -0
  88. inc/class-jobtype-file.php +525 -0
  89. inc/class-jobtype-wpexp.php +152 -0
  90. inc/class-jobtype-wpplugin.php +146 -0
  91. inc/class-jobtypes.php +111 -0
  92. inc/class-mysqldump.php +400 -0
  93. inc/class-option.php +310 -0
  94. inc/class-page-about.php +366 -0
  95. inc/class-page-backups.php +426 -0
  96. inc/class-page-backwpup.php +288 -0
  97. inc/class-page-editjob.php +873 -0
  98. inc/class-page-jobs.php +612 -0
  99. inc/class-page-logs.php +374 -0
  100. inc/class-page-settings.php +420 -0
  101. inc/class-wp-cli.php +119 -0
  102. job/backup_create.php +0 -188
  103. job/db_check.php +0 -64
  104. job/db_dump.php +0 -158
  105. job/db_optimize.php +0 -47
  106. job/dest_dropbox.php +0 -72
  107. job/dest_folder.php +0 -30
  108. job/dest_ftp.php +0 -149
  109. job/dest_gstorage.php +0 -71
  110. job/dest_mail.php +0 -63
  111. job/dest_msazure.php +0 -59
  112. job/dest_rsc.php +0 -96
  113. job/dest_s3.php +0 -74
  114. job/dest_sugarsync.php +0 -70
  115. job/file_list.php +0 -133
  116. job/job_functions.php +0 -415
backwpup-functions.php DELETED
@@ -1,1083 +0,0 @@
1
- <?PHP
2
- //Option menu entry
3
- function backwpup_admin_menu() {
4
- add_menu_page( __('BackWPup','backwpup'), __('BackWPup','backwpup'), BACKWPUP_USER_CAPABILITY, 'backwpup', 'backwpup_menu_page', BACKWPUP_PLUGIN_BASEURL.'/css/BackWPup16.png');
5
- $hook = add_submenu_page( 'backwpup', __('Jobs','backwpup'), __('Jobs','backwpup'), BACKWPUP_USER_CAPABILITY, 'backwpup', 'backwpup_menu_page' );
6
- add_action('load-'.$hook, 'backwpup_menu_page_header');
7
- $hook = add_submenu_page( 'backwpup', __('Add New','backwpup'), __('Add New','backwpup'), BACKWPUP_USER_CAPABILITY, 'backwpupeditjob', 'backwpup_menu_page' );
8
- add_action('load-'.$hook, 'backwpup_menu_page_header');
9
- $hook = add_submenu_page( 'backwpup', __('Working','backwpup'), __('Working','backwpup'), BACKWPUP_USER_CAPABILITY, 'backwpupworking', 'backwpup_menu_page' );
10
- add_action('load-'.$hook, 'backwpup_menu_page_header',1);
11
- $hook = add_submenu_page( 'backwpup', __('Logs','backwpup'), __('Logs','backwpup'), BACKWPUP_USER_CAPABILITY, 'backwpuplogs', 'backwpup_menu_page' );
12
- add_action('load-'.$hook, 'backwpup_menu_page_header');
13
- $hook = add_submenu_page( 'backwpup', __('Backups','backwpup'), __('Backups','backwpup'), BACKWPUP_USER_CAPABILITY, 'backwpupbackups', 'backwpup_menu_page' );
14
- add_action('load-'.$hook, 'backwpup_menu_page_header');
15
- $hook = add_submenu_page( 'backwpup', __('Tools','backwpup'), __('Tools','backwpup'), BACKWPUP_USER_CAPABILITY, 'backwpuptools', 'backwpup_menu_page' );
16
- add_action('load-'.$hook, 'backwpup_menu_page_header');
17
- $hook = add_submenu_page( 'backwpup', __('Settings','backwpup'), __('Settings','backwpup'), BACKWPUP_USER_CAPABILITY, 'backwpupsettings', 'backwpup_menu_page' );
18
- add_action('load-'.$hook, 'backwpup_menu_page_header');
19
- }
20
-
21
- function backwpup_menu_page() {
22
- global $backwpup_message,$backwpup_listtable,$current_screen;
23
- //check user premessions
24
- if (!current_user_can(BACKWPUP_USER_CAPABILITY))
25
- return;
26
- //Set pages that exists
27
- $menupages=array('backwpup','backwpupeditjob','backwpupworking','backwpuplogs','backwpupbackups','backwpuptools','backwpupsettings');
28
- //check called page exists
29
- if (!empty($_REQUEST['page']) and in_array($_REQUEST['page'],$menupages))
30
- require_once(dirname(__FILE__).'/pages/page_'.$_REQUEST['page'].'.php');
31
- }
32
-
33
- function backwpup_menu_page_header() {
34
- global $wp_version,$backwpup_message,$backwpup_listtable,$current_screen;
35
- //check user premessions
36
- if (!current_user_can(BACKWPUP_USER_CAPABILITY))
37
- return;
38
- //Set pages that exists
39
- $menupages=array('backwpup','backwpupeditjob','backwpupworking','backwpuplogs','backwpupbackups','backwpuptools','backwpupsettings');
40
- //check called page exists
41
- $page=$_REQUEST['page'];
42
- if (!empty($page) and in_array($page,$menupages)) {
43
- //Css for Admin Section
44
- if (is_file(dirname(__FILE__).'/css/'.$page.'.css')) {
45
- if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
46
- wp_enqueue_style($page,BACKWPUP_PLUGIN_BASEURL.'/css/'.$page.'.css','',time(),'screen');
47
- else
48
- wp_enqueue_style($page,BACKWPUP_PLUGIN_BASEURL.'/css/'.$page.'.css','',BACKWPUP_VERSION,'screen');
49
- }
50
- //add java
51
- if (is_file(dirname(__FILE__).'/js/31'.$page.'.js') and version_compare($wp_version, '3.2', '<')) {
52
- if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
53
- wp_enqueue_script($page,BACKWPUP_PLUGIN_BASEURL.'/js/31'.$page.'.js','',time(),true);
54
- else
55
- wp_enqueue_script($page,BACKWPUP_PLUGIN_BASEURL.'/js/31'.$page.'.js','',BACKWPUP_VERSION,true);
56
- } elseif (is_file(dirname(__FILE__).'/js/'.$page.'.js')) {
57
- if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
58
- wp_enqueue_script($page,BACKWPUP_PLUGIN_BASEURL.'/js/'.$page.'.js','',time(),true);
59
- else
60
- wp_enqueue_script($page,BACKWPUP_PLUGIN_BASEURL.'/js/'.$page.'.js','',BACKWPUP_VERSION,true);
61
- }
62
- //incude functions
63
- if (is_file(dirname(__FILE__).'/pages/func_'.$page.'.php'))
64
- require_once(dirname(__FILE__).'/pages/func_'.$page.'.php');
65
- //include code
66
- if (is_file(dirname(__FILE__).'/pages/header_'.$page.'.php'))
67
- require_once(dirname(__FILE__).'/pages/header_'.$page.'.php');
68
- }
69
- }
70
-
71
- function backwpup_load_ajax() {
72
- //Set pages that exists
73
- $menupages=array('backwpup','backwpupeditjob','backwpupworking','backwpuplogs','backwpupbackups','backwpuptools','backwpupsettings');
74
- if (!empty($_POST['backwpupajaxpage']) and in_array($_POST['backwpupajaxpage'],$menupages)) {
75
- $page=$_POST['backwpupajaxpage'];
76
- //incude functions
77
- if (is_file(dirname(__FILE__).'/pages/func_'.$page.'.php'))
78
- require_once(dirname(__FILE__).'/pages/func_'.$page.'.php');
79
- }
80
- }
81
-
82
- function backwpup_contextual_help($help='') {
83
- global $current_screen;
84
- $help='<p>'.$help.'</p>';
85
-
86
- if ( method_exists( $current_screen, 'add_help_tab' ) ) {
87
- $current_screen->add_help_tab( array(
88
- 'id' => 'plugininfo',
89
- 'title' => __( 'Plugin Info', 'backwpup' ),
90
- 'content' =>
91
- '<p><a href="http://backwpup.com" target="_blank">BackWPup</a> v. ' . BACKWPUP_VERSION . ', <a href="http://www.gnu.org/licenses/gpl-3.0" target="_blank">GPLv3</a> &copy 2012-' . date( 'Y' ) . ' <a href="http://inpsyde.com" target="_blank">Inpsyde GmbH</a> '.__( 'Author:','backwpup').' <a href="http://danielhuesken.de" target="_blank">Daniel H&uuml;sken</a></p><p>' . __( 'BackWPup comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.', 'backwpup' ) . '</p>'
92
- ) );
93
- $current_screen->add_help_tab( array(
94
- 'id' => 'overview',
95
- 'title' => __( 'Overview', 'backwpup' ),
96
- 'content' => $help
97
- ) );
98
- $current_screen->set_help_sidebar(
99
- '<p><strong>' . __( 'For more information:', 'backwpup' ) . '</strong></p>' .
100
- '<p><a href="http://backwpup.com" target="_blank">BackWPup</a></p>' .
101
- '<p><a href="http://inpsyde.com" target="_blank">Inpsyde GmbH</a></p>' .
102
- '<p><a href="http://wordpress.org/extend/plugins/backwpup/faq/" target="_blank">'.__('FAQ','backwpup').'</a></p>' .
103
- '<p><a href="http://wordpress.org/support/plugin/backwpup/" target="_blank"'.__('Support Forums','backwpup').'</a></p>' .
104
- '<p><a href="https://plus.google.com/112659782148359984250/" target="_blank">'.__('Google+','backwpup').'</a></p>'
105
- );
106
-
107
- } elseif ( function_exists( 'add_contextual_help' ) ) { //for WP < 3.3 help
108
- add_contextual_help( $current_screen,$help.
109
- '<p><a href="http://backwpup.de" target="_blank">BackWPup</a> v. ' . BACKWPUP_VERSION . ', <a href="http://www.gnu.org/licenses/gpl-2.0" target="_blank">GPLv2</a> &copy 2009-' . date( 'Y' ) . ' <a href="http://danielhuesken.de" target="_blank">Daniel H&uuml;sken</a></p><p>' . __( 'BackWPup comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.', 'backwpup' ) . '</p>' .
110
- '<p><strong>' . __( 'For more information:', 'backwpup' ) . '</strong></p><p>' .
111
- ' <a href="http://backwpup.com" target="_blank">BackWPup</a> |' .
112
- ' <a href="http://inpsyde.com" target="_blank">Inpsyde GmbH</a> |' .
113
- ' <a href="http://wordpress.org/extend/plugins/backwpup/faq/" target="_blank">'.__('FAQ', 'backwpup').'</a> |' .
114
- ' <a href="http://wordpress.org/support/plugin/backwpup/" target="_blank">'.__('Support Forums', 'backwpup').'</a> |' .
115
- ' <a href="https://plus.google.com/112659782148359984250/" target="_blank">'.__('Google+', 'backwpup').'</a> ' .
116
- '</p>'
117
- );
118
- }
119
- }
120
-
121
- //On activate function
122
- function backwpup_plugin_activate() {
123
- //Load Settings
124
- $cfg=get_option('backwpup');
125
- //Check only run once on update
126
- if ($cfg['last_activate']==BACKWPUP_VERSION or !is_main_site())
127
- return;
128
- else
129
- $cfg['last_activate']=BACKWPUP_VERSION;
130
- //check jobs
131
- $jobs=get_option('backwpup_jobs');
132
- if (isset($jobs[0]))
133
- unset($jobs[0]); //Delete old false job
134
- if (!empty($jobs)) {
135
- foreach ($jobs as $jobid => $jobvalue) {
136
- $checktjobs[$jobid]=backwpup_get_job_vars($jobid); //check jobvaules
137
- }
138
- //save job values
139
- update_option('backwpup_jobs',$checktjobs);
140
- }
141
- //remove old cron jobs
142
- wp_clear_scheduled_hook('backwpup_cron');
143
- //make new schedule round
144
- wp_schedule_event(time(), 'backwpup_int', 'backwpup_cron');
145
- //Set settings defaults
146
- if (empty($cfg['mailsndemail'])) $cfg['mailsndemail']=sanitize_email(get_bloginfo( 'admin_email' ));
147
- if (empty($cfg['mailsndname'])) $cfg['mailsndname']='BackWPup '.get_bloginfo( 'name' );
148
- if (empty($cfg['mailmethod'])) $cfg['mailmethod']='mail';
149
- if (empty($cfg['mailsendmail'])) $cfg['mailsendmail']=substr(ini_get('sendmail_path'),0,strpos(ini_get('sendmail_path'),' -'));
150
- if (isset($cfg['mailhost']) && false !== strpos($cfg['mailhost'],':'))
151
- list($cfg['mailhost'],$cfg['mailhostport'])=explode(':',$cfg['mailhost'],2);
152
- if (!isset($cfg['mailhost'])) $cfg['mailhost']='';
153
- if (!isset($cfg['mailhostport'])) $cfg['mailhostport']=25;
154
- if (!isset($cfg['mailsecure'])) $cfg['mailsecure']='';
155
- if (!isset($cfg['mailuser'])) $cfg['mailuser']='';
156
- if (!isset($cfg['mailpass'])) $cfg['mailpass']='';
157
- if (!isset($cfg['showadminbar'])) $cfg['showadminbar']=true;
158
- if (!isset($cfg['jobstepretry']) or !is_int($cfg['jobstepretry']) or 100<$cfg['jobstepretry'] or empty($cfg['jobstepretry'])) $cfg['jobstepretry']=3;
159
- if (!isset($cfg['jobscriptretry']) or !is_int($cfg['jobscriptretry']) or 100<$cfg['jobscriptretry'] or empty($cfg['jobscriptretry'])) $cfg['jobscriptretry']=5;
160
- if (!isset($cfg['maxlogs']) or !is_int($cfg['maxlogs'])) $cfg['maxlogs']=50;
161
- if (!function_exists('gzopen') or !isset($cfg['gzlogs'])) $cfg['gzlogs']=false;
162
- if (!class_exists('ZipArchive') or !isset($cfg['phpzip'])) $cfg['phpzip']=false;
163
- if (!isset($cfg['dirlogs']) or empty($cfg['dirlogs']) or !is_dir($cfg['dirlogs'])) {
164
- $rand = substr( md5( md5( SECURE_AUTH_KEY ) ), -5 );
165
- $cfg['dirlogs']=str_replace('\\','/',trailingslashit(WP_CONTENT_DIR)).'backwpup-'.$rand.'-logs/';
166
- }
167
- if (!isset($cfg['httpauthuser'])) $cfg['httpauthuser']='';
168
- if (!isset($cfg['httpauthpassword'])) $cfg['httpauthpassword']='';
169
- //remove old option
170
- unset($cfg['dirtemp']);
171
- unset($cfg['logfilelist']);
172
- unset($cfg['jobscriptruntime']);
173
- unset($cfg['jobscriptruntimelong']);
174
- unset($cfg['apicronservice']);
175
- unset($cfg['disablewpcron']);
176
- update_option('backwpup',$cfg);
177
- //delete not longer used options
178
- delete_option('backwpup_backups_chache');
179
- delete_option('backwpup_last_activate');
180
- }
181
-
182
- //on Plugin deaktivate
183
- function backwpup_plugin_deactivate() {
184
- wp_clear_scheduled_hook('backwpup_cron'); //delete cron
185
- $cfg=get_option('backwpup');
186
- $cfg['last_activate']=''; //set to not activated
187
- update_option('backwpup',$cfg);
188
- }
189
-
190
- //get temp dir
191
- function backwpup_get_temp() {
192
- $backwpuptmpfolder=str_replace('\\','/',dirname(__FILE__).'/tmp/');
193
- return trailingslashit($backwpuptmpfolder);
194
- }
195
- //checks the dir is in openbasedir
196
- function backwpup_check_open_basedir($dir) {
197
- if (!ini_get('open_basedir'))
198
- return true;
199
- $openbasedirarray=explode(PATH_SEPARATOR,ini_get('open_basedir'));
200
- $dir=rtrim(str_replace('\\','/',$dir),'/').'/';
201
- if (!empty($openbasedirarray)) {
202
- foreach ($openbasedirarray as $basedir) {
203
- if (stripos($dir,rtrim(str_replace('\\','/',$basedir),'/').'/')==0)
204
- return true;
205
- }
206
- }
207
- return false;
208
- }
209
-
210
- //add edit setting to plugins page
211
- function backwpup_plugin_options_link($links) {
212
- if (!current_user_can(BACKWPUP_USER_CAPABILITY))
213
- return $links;
214
- $settings_link='<a href="'.backwpup_admin_url('admin.php').'?page=backwpup" title="' . __('Go to Settings Page','backwpup') . '" class="edit">' . __('Settings','backwpup') . '</a>';
215
- array_unshift( $links, $settings_link );
216
- return $links;
217
- }
218
-
219
- //add links on plugins page
220
- function backwpup_plugin_links($links, $file) {
221
- if (!current_user_can('install_plugins'))
222
- return $links;
223
- if ($file == BACKWPUP_PLUGIN_BASEDIR.'/backwpup.php') {
224
- $links[] = '<a href="http://inpsyde.com" target="_blank">Inpsyde GmbH</a>';
225
- $links[] = '<a href="http://wordpress.org/extend/plugins/backwpup/faq/" target="_blank">' . __('FAQ','backwpup') . '</a>';
226
- $links[] = '<a href="http://wordpress.org/support/plugin/backwpup/" target="_blank">' . __('Support','backwpup') . '</a>';
227
- }
228
- return $links;
229
- }
230
-
231
- //Add cron interval
232
- function backwpup_intervals($schedules) {
233
- $intervals['backwpup_int']=array('interval' => '60', 'display' => __('BackWPup', 'backwpup'));
234
- $schedules=array_merge($intervals,$schedules);
235
- return $schedules;
236
- }
237
-
238
- //
239
- function backwpup_date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
240
- if ($unixtimestamp)
241
- $unixtimestamp=$unixtimestamp+get_option('gmt_offset')*3600;
242
- return date_i18n( $dateformatstring, $unixtimestamp, $gmt);
243
- }
244
-
245
- //cron work
246
- function backwpup_cron() {
247
- if (is_file(backwpup_get_temp().'.running')) {
248
- $cfg=get_option('backwpup');
249
- $revtime=time()-600; //10 min no progress.
250
- $infile=backwpup_get_working_file();
251
- $httpauthheader='';
252
- if (!empty($cfg['httpauthuser']) and !empty($cfg['httpauthpassword']))
253
- $httpauthheader=array( 'Authorization' => 'Basic '.base64_encode($cfg['httpauthuser'].':'.backwpup_base64($cfg['httpauthpassword'])));
254
- if (!empty($infile['timestamp']) and $infile['timestamp']<$revtime) {
255
- wp_remote_post(BACKWPUP_PLUGIN_BASEURL.'/job/job_run.php', array('timeout' => 3, 'blocking' => false, 'sslverify' => false,'headers'=>$httpauthheader, 'body'=>array('nonce'=> $infile['WORKING']['NONCE'],'type'=>'restarttime'), 'user-agent'=>'BackWPup') );
256
- }
257
- } else {
258
- $jobs=get_option('backwpup_jobs');
259
- if (!empty($jobs)) {
260
- foreach ($jobs as $jobid => $jobvalue) {
261
- if (!isset($jobvalue['activated']) or !$jobvalue['activated'])
262
- continue;
263
- if ($jobvalue['cronnextrun']<=current_time('timestamp')) {
264
- require_once(dirname(__FILE__).'/job/job_start.php');
265
- backwpup_jobstart($jobid,true);
266
- }
267
- }
268
- }
269
- }
270
- }
271
-
272
- //file size
273
- function backwpup_formatBytes($bytes, $precision = 2) {
274
- $units = array('B', 'KB', 'MB', 'GB', 'TB');
275
- $bytes = max($bytes, 0);
276
- $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
277
- $pow = min($pow, count($units) - 1);
278
- $bytes /= pow(1024, $pow);
279
- return round($bytes, $precision) . ' ' . $units[$pow];
280
- }
281
-
282
- //echo long backup type name
283
- function backwpup_backup_types($type='',$echo=false) {
284
- $typename='';
285
- if (!empty($type)) {
286
- $todo=explode('+',$type);
287
- foreach($todo as $key => $value) {
288
- switch($value) {
289
- case 'WPEXP':
290
- $typename.=__('WP XML Export','backwpup')."<br />";
291
- break;
292
- case 'FILE':
293
- $typename.=__('File Backup','backwpup')."<br />";
294
- break;
295
- case 'DB':
296
- $typename.=__('Database Backup','backwpup')."<br />";
297
- break;
298
- case 'OPTIMIZE':
299
- $typename.=__('Optimize Database Tables','backwpup')."<br />";
300
- break;
301
- case 'CHECK':
302
- $typename.=__('Check Database Tables','backwpup')."<br />";
303
- break;
304
- }
305
- }
306
- } else {
307
- $typename=array('WPEXP','DB','FILE','OPTIMIZE','CHECK');
308
- }
309
-
310
- if ($echo)
311
- echo $typename;
312
- else
313
- return $typename;
314
- }
315
-
316
- //read log file header
317
- function backwpup_read_logheader($logfile) {
318
- $headers=array("backwpup_version" => "version","backwpup_logtime" => "logtime","backwpup_errors" => "errors","backwpup_warnings" => "warnings","backwpup_jobid" => "jobid","backwpup_jobname" => "name","backwpup_jobtype" => "type","backwpup_jobruntime" => "runtime","backwpup_backupfilesize" => "backupfilesize");
319
- if (!is_readable($logfile))
320
- return false;
321
- //Read file
322
- if (strtolower(substr($logfile,-3))==".gz") {
323
- $fp = gzopen( $logfile, 'r' );
324
- $file_data = gzread( $fp, 1536 ); // Pull only the first 1,5kiB of the file in.
325
- gzclose( $fp );
326
- } else {
327
- $fp = fopen( $logfile, 'r' );
328
- $file_data = fread( $fp, 1536 ); // Pull only the first 1,5kiB of the file in.
329
- fclose( $fp );
330
- }
331
- //get data form file
332
- foreach ($headers as $keyword => $field) {
333
- preg_match('/(<meta name="'.$keyword.'" content="(.*)" \/>)/i',$file_data,$content);
334
- if (!empty($content))
335
- $joddata[$field]=$content[2];
336
- else
337
- $joddata[$field]='';
338
- }
339
- if (empty($joddata['logtime']))
340
- $joddata['logtime']=filectime($logfile);
341
- return $joddata;
342
- }
343
-
344
- //Dashboard widget for Logs
345
- function backwpup_dashboard_logs() {
346
- $cfg=get_option('backwpup');
347
- $widgets = get_option( 'dashboard_widget_options' );
348
- if (!isset($widgets['backwpup_dashboard_logs']) or $widgets['backwpup_dashboard_logs']<1 or $widgets['backwpup_dashboard_logs']>20)
349
- $widgets['backwpup_dashboard_logs'] =5;
350
- //get log files
351
- $logfiles=array();
352
- if ( $dir = @opendir( $cfg['dirlogs'] ) ) {
353
- while (($file = readdir( $dir ) ) !== false ) {
354
- if (is_file($cfg['dirlogs'].'/'.$file) and 'backwpup_log_' == substr($file,0,strlen('backwpup_log_')) and ('.html' == substr($file,-5) or '.html.gz' == substr($file,-8)))
355
- $logfiles[]=$file;
356
- }
357
- closedir( $dir );
358
- rsort($logfiles);
359
- }
360
- echo '<ul>';
361
- if (count($logfiles)>0) {
362
- $count=0;
363
- foreach ($logfiles as $logfile) {
364
- $logdata=backwpup_read_logheader($cfg['dirlogs'].'/'.$logfile);
365
- echo '<li>';
366
- echo '<span>'.backwpup_date_i18n(get_option('date_format').' @ '.get_option('time_format'),$logdata['logtime']).'</span> ';
367
- echo '<a href="'.wp_nonce_url(backwpup_admin_url('admin.php').'?page=backwpupworking&logfile='.$cfg['dirlogs'].'/'.$logfile, 'view-log_'.$logfile).'" title="'.__('View Log:','backwpup').' '.basename($logfile).'">'.$logdata['name'].'</i></a>';
368
- if ($logdata['errors']>0)
369
- printf(' <span style="color:red;font-weight:bold;">'._n("%d ERROR", "%d ERRORS", $logdata['errors'],'backwpup').'</span>', $logdata['errors']);
370
- if ($logdata['warnings']>0)
371
- printf(' <span style="color:#e66f00;font-weight:bold;">'._n("%d WARNING", "%d WARNINGS", $logdata['warnings'],'backwpup').'</span>', $logdata['warnings']);
372
- if($logdata['errors']==0 and $logdata['warnings']==0)
373
- echo ' <span style="color:green;font-weight:bold;">'.__('O.K.','backwpup').'</span>';
374
- echo '</li>';
375
- $count++;
376
- if ($count>=$widgets['backwpup_dashboard_logs'])
377
- break;
378
- }
379
- echo '</ul>';
380
- } else {
381
- echo '<i>'.__('none','backwpup').'</i>';
382
- }
383
- }
384
-
385
- //Dashboard widget for Logs config
386
- function backwpup_dashboard_logs_config() {
387
- if ( !$widget_options = get_option( 'dashboard_widget_options' ) )
388
- $widget_options = array();
389
-
390
- if ( !isset($widget_options['backwpup_dashboard_logs']) )
391
- $widget_options['backwpup_dashboard_logs'] = 5;
392
-
393
- if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['backwpup_dashboard_logs']) ) {
394
- $number = absint( $_POST['backwpup_dashboard_logs'] );
395
- $widget_options['backwpup_dashboard_logs'] = $number;
396
- update_option( 'dashboard_widget_options', $widget_options );
397
- }
398
-
399
- echo '<p><label for="backwpup-logs">'.__('How many of the lastes logs would you like to display?','backwpup').'</label>';
400
- echo '<select id="backwpup-logs" name="backwpup_dashboard_logs">';
401
- for ($i=0;$i<=20;$i++)
402
- echo '<option value="'.$i.'" '.selected($i,$widget_options['backwpup_dashboard_logs']).'>'.$i.'</option>';
403
- echo '</select>';
404
-
405
- }
406
-
407
- //Dashboard widget for Jobs
408
- function backwpup_dashboard_activejobs() {
409
- $jobs=get_option('backwpup_jobs');
410
- if (empty($jobs)) {
411
- echo '<ul><li><i>'.__('none','backwpup').'</i></li></ul>';
412
- return;
413
- }
414
- $runningfile=backwpup_get_working_file();
415
- $tmp = Array();
416
- foreach($jobs as &$ma)
417
- $tmp[] = &$ma["cronnextrun"];
418
- array_multisort($tmp, SORT_DESC, $jobs);
419
- $count=0;
420
- echo '<ul>';
421
- foreach ($jobs as $jobid => $jobvalue) {
422
- if (!empty($runningfile['JOBID']) and $runningfile['JOBID']==$jobvalue['jobid']) {
423
- $runtime=time()-$jobvalue['starttime'];
424
- echo '<li><span style="font-weight:bold;">'.$jobvalue['jobid'].'. '.$jobvalue['name'].': </span>';
425
- printf('<span style="color:#e66f00;">'.__('working since %d sec.','backwpup').'</span>',$runtime);
426
- echo " <a style=\"color:green;\" href=\"" . backwpup_admin_url('admin.php').'?page=backwpupworking' . "\">" . __('View!','backwpup') . "</a>";
427
- echo " <a style=\"color:red;\" href=\"" . wp_nonce_url(backwpup_admin_url('admin.php').'?page=backwpup&action=abort', 'abort-job') . "\">" . __('Abort!','backwpup') . "</a>";
428
- echo "</li>";
429
- $count++;
430
- } elseif ($jobvalue['activated']) {
431
- echo '<li><span>'.date_i18n(get_option('date_format'),$jobvalue['cronnextrun']).' @ '.date_i18n(get_option('time_format'),$jobvalue['cronnextrun']).'</span>';
432
- echo ' <a href="'.wp_nonce_url(backwpup_admin_url('admin.php').'?page=backwpupeditjob&jobid='.$jobvalue['jobid'], 'edit-job').'" title="'.__('Edit Job','backwpup').'">'.$jobvalue['name'].'</a><br />';
433
- echo "</li>";
434
- $count++;
435
- }
436
- }
437
-
438
- if ($count==0)
439
- echo '<li><i>'.__('none','backwpup').'</i></li>';
440
- echo '</ul>';
441
- }
442
-
443
- //add dashboard widget
444
- function backwpup_add_dashboard() {
445
- if (!current_user_can(BACKWPUP_USER_CAPABILITY))
446
- return;
447
- wp_add_dashboard_widget( 'backwpup_dashboard_widget_logs', __('BackWPup Logs','backwpup'), 'backwpup_dashboard_logs' , 'backwpup_dashboard_logs_config');
448
- wp_add_dashboard_widget( 'backwpup_dashboard_widget_activejobs', __('BackWPup Active Jobs','backwpup'), 'backwpup_dashboard_activejobs' );
449
- }
450
-
451
- //add admin bar menu
452
- function backwpup_add_adminbar() {
453
- global $wp_admin_bar;
454
- $cfg=get_option('backwpup'); //Load Settings
455
- if (!$cfg['showadminbar'] || !current_user_can(BACKWPUP_USER_CAPABILITY) || !is_super_admin() || !is_admin_bar_showing())
456
- return;
457
- /* Add the main siteadmin menu item */
458
- $wp_admin_bar->add_menu(array( 'id' => 'backwpup', 'title' => __( 'BackWPup', 'backwpup' ), 'href' => backwpup_admin_url('admin.php').'?page=backwpup'));
459
- if (backwpup_get_working_file())
460
- $wp_admin_bar->add_menu(array( 'id' => 'backwpup_working','parent' => 'backwpup', 'title' => __('See Working!','backwpup'), 'href' => backwpup_admin_url('admin.php').'?page=backwpupworking'));
461
- $wp_admin_bar->add_menu(array( 'id' => 'backwpup_jobs', 'parent' => 'backwpup', 'title' => __('Jobs','backwpup'), 'href' => backwpup_admin_url('admin.php').'?page=backwpup'));
462
- $wp_admin_bar->add_menu(array( 'id' => 'backwpup_logs', 'parent' => 'backwpup', 'title' => __('Logs','backwpup'), 'href' => backwpup_admin_url('admin.php').'?page=backwpuplogs'));
463
- $wp_admin_bar->add_menu(array( 'id' => 'backwpup_backups', 'parent' => 'backwpup', 'title' => __('Backups','backwpup'), 'href' => backwpup_admin_url('admin.php').'?page=backwpupbackups'));
464
- $wp_admin_bar->add_menu(array( 'id' => 'backwpup_newjob', 'parent' => 'new-content', 'title' => __('BackWPup Job','backwpup'), 'href' => backwpup_admin_url('admin.php').'?page=backwpupeditjob'));
465
- }
466
-
467
- function backwpup_get_upload_dir() {
468
- $upload_path = get_option('upload_path');
469
- $upload_path = trim($upload_path);
470
- if ( empty($upload_path) ) {
471
- $dir = WP_CONTENT_DIR . '/uploads';
472
- } else {
473
- $dir = $upload_path;
474
- if ( 'wp-content/uploads' == $upload_path ) {
475
- $dir = WP_CONTENT_DIR . '/uploads';
476
- } elseif ( 0 !== strpos($dir, ABSPATH) ) {
477
- // $dir is absolute, $upload_path is (maybe) relative to ABSPATH
478
- $dir = path_join( ABSPATH, $dir );
479
- }
480
- }
481
- if (defined('UPLOADS') && !is_multisite()) {
482
- $dir = ABSPATH . UPLOADS;
483
- }
484
- if (is_multisite()) {
485
- $dir = untrailingslashit(WP_CONTENT_DIR).'/blogs.dir';
486
- }
487
- return str_replace('\\','/',trailingslashit($dir));
488
- }
489
-
490
- function backwpup_get_exclude_wp_dirs($folder) {
491
- $cfg=get_option('backwpup'); //Load Settings
492
- $folder=trailingslashit(str_replace('\\','/',$folder));
493
- $excludedir=array();
494
- $excludedir[]=backwpup_get_temp(); //exclude temp
495
- $excludedir[]=rtrim(str_replace('\\','/',$cfg['dirlogs']),'/').'/'; //exclude logfiles
496
- if (false !== strpos(trailingslashit(str_replace('\\','/',ABSPATH)),$folder) and trailingslashit(str_replace('\\','/',ABSPATH))!=$folder)
497
- $excludedir[]=trailingslashit(str_replace('\\','/',ABSPATH));
498
- if (false !== strpos(trailingslashit(str_replace('\\','/',WP_CONTENT_DIR)),$folder) and trailingslashit(str_replace('\\','/',WP_CONTENT_DIR))!=$folder)
499
- $excludedir[]=trailingslashit(str_replace('\\','/',WP_CONTENT_DIR));
500
- if (false !== strpos(trailingslashit(str_replace('\\','/',WP_PLUGIN_DIR)),$folder) and trailingslashit(str_replace('\\','/',WP_PLUGIN_DIR))!=$folder)
501
- $excludedir[]=trailingslashit(str_replace('\\','/',WP_PLUGIN_DIR));
502
- if (false !== strpos(str_replace('\\','/',trailingslashit(WP_CONTENT_DIR).'themes/'),$folder) and str_replace('\\','/',trailingslashit(WP_CONTENT_DIR).'themes/')!=$folder)
503
- $excludedir[]=str_replace('\\','/',trailingslashit(WP_CONTENT_DIR).'themes/');
504
- if (false !== strpos(backwpup_get_upload_dir(),$folder) and backwpup_get_upload_dir()!=$folder)
505
- $excludedir[]=backwpup_get_upload_dir();
506
- //Exclude Backup dirs
507
- $jobs=get_option('backwpup_jobs');
508
- if (!empty($jobs)) {
509
- foreach($jobs as $jobsvale) {
510
- if (!empty($jobsvale['backupdir']) and $jobsvale['backupdir']!='/')
511
- $excludedir[]=$jobsvale['backupdir'];
512
- }
513
- }
514
- return $excludedir;
515
- }
516
-
517
- //Calcs next run for a cron string as timestamp
518
- function backwpup_cron_next($cronstring) {
519
- //Cronstring zerlegen
520
- list($cronstr['minutes'],$cronstr['hours'],$cronstr['mday'],$cronstr['mon'],$cronstr['wday'])=explode(' ',$cronstring,5);
521
-
522
- //make arrys form string
523
- foreach ($cronstr as $key => $value) {
524
- if (strstr($value,','))
525
- $cronarray[$key]=explode(',',$value);
526
- else
527
- $cronarray[$key]=array(0=>$value);
528
- }
529
- //make arrys complete with ranges and steps
530
- foreach ($cronarray as $cronarraykey => $cronarrayvalue) {
531
- $cron[$cronarraykey]=array();
532
- foreach ($cronarrayvalue as $key => $value) {
533
- //steps
534
- $step=1;
535
- if (strstr($value,'/'))
536
- list($value,$step)=explode('/',$value,2);
537
- //replase weekday 7 with 0 for sundays
538
- if ($cronarraykey=='wday')
539
- $value=str_replace('7','0',$value);
540
- //ranges
541
- if (strstr($value,'-')) {
542
- list($first,$last)=explode('-',$value,2);
543
- if (!is_numeric($first) or !is_numeric($last) or $last>60 or $first>60) //check
544
- return 2147483647;
545
- if ($cronarraykey=='minutes' and $step<5) //set step ninimum to 5 min.
546
- $step=5;
547
- $range=array();
548
- for ($i=$first;$i<=$last;$i=$i+$step)
549
- $range[]=$i;
550
- $cron[$cronarraykey]=array_merge($cron[$cronarraykey],$range);
551
- } elseif ($value=='*') {
552
- $range=array();
553
- if ($cronarraykey=='minutes') {
554
- if ($step<5) //set step ninimum to 5 min.
555
- $step=5;
556
- for ($i=0;$i<=59;$i=$i+$step)
557
- $range[]=$i;
558
- }
559
- if ($cronarraykey=='hours') {
560
- for ($i=0;$i<=23;$i=$i+$step)
561
- $range[]=$i;
562
- }
563
- if ($cronarraykey=='mday') {
564
- for ($i=$step;$i<=31;$i=$i+$step)
565
- $range[]=$i;
566
- }
567
- if ($cronarraykey=='mon') {
568
- for ($i=$step;$i<=12;$i=$i+$step)
569
- $range[]=$i;
570
- }
571
- if ($cronarraykey=='wday') {
572
- for ($i=0;$i<=6;$i=$i+$step)
573
- $range[]=$i;
574
- }
575
- $cron[$cronarraykey]=array_merge($cron[$cronarraykey],$range);
576
- } else {
577
- //Month names
578
- if (strtolower($value)=='jan')
579
- $value=1;
580
- if (strtolower($value)=='feb')
581
- $value=2;
582
- if (strtolower($value)=='mar')
583
- $value=3;
584
- if (strtolower($value)=='apr')
585
- $value=4;
586
- if (strtolower($value)=='may')
587
- $value=5;
588
- if (strtolower($value)=='jun')
589
- $value=6;
590
- if (strtolower($value)=='jul')
591
- $value=7;
592
- if (strtolower($value)=='aug')
593
- $value=8;
594
- if (strtolower($value)=='sep')
595
- $value=9;
596
- if (strtolower($value)=='oct')
597
- $value=10;
598
- if (strtolower($value)=='nov')
599
- $value=11;
600
- if (strtolower($value)=='dec')
601
- $value=12;
602
- //Week Day names
603
- if (strtolower($value)=='sun')
604
- $value=0;
605
- if (strtolower($value)=='sat')
606
- $value=6;
607
- if (strtolower($value)=='mon')
608
- $value=1;
609
- if (strtolower($value)=='tue')
610
- $value=2;
611
- if (strtolower($value)=='wed')
612
- $value=3;
613
- if (strtolower($value)=='thu')
614
- $value=4;
615
- if (strtolower($value)=='fri')
616
- $value=5;
617
- if (!is_numeric($value) or $value>60) //check
618
- return 2147483647;
619
- $cron[$cronarraykey]=array_merge($cron[$cronarraykey],array(0=>$value));
620
- }
621
- }
622
- }
623
- //generate next 10 years
624
- for ($i=date('Y');$i<2038;$i++)
625
- $cron['year'][]=$i;
626
-
627
- //calc next timestamp
628
- $currenttime=current_time('timestamp');
629
- foreach ($cron['year'] as $year) {
630
- foreach ($cron['mon'] as $mon) {
631
- foreach ($cron['mday'] as $mday) {
632
- foreach ($cron['hours'] as $hours) {
633
- foreach ($cron['minutes'] as $minutes) {
634
- $timestamp=mktime($hours,$minutes,0,$mon,$mday,$year);
635
- if ($timestamp and in_array(date('j',$timestamp),$cron['mday']) and in_array(date('w',$timestamp),$cron['wday']) and $timestamp>$currenttime) {
636
- return $timestamp;
637
- }
638
- }
639
- }
640
- }
641
- }
642
- }
643
- return 2147483647;
644
- }
645
-
646
- function backwpup_get_working_file() {
647
- $tempdir=backwpup_get_temp();
648
- if (is_file($tempdir.'.running')) {
649
- if ($runningfile=file_get_contents($tempdir.'.running'))
650
- return unserialize(trim($runningfile));
651
- else
652
- return false;
653
- } else {
654
- return false;
655
- }
656
- }
657
-
658
- function backwpup_admin_url($url) {
659
- if (is_multisite()) {
660
- if (is_super_admin())
661
- return network_admin_url($url);
662
- } else {
663
- return admin_url($url);
664
- }
665
- }
666
-
667
- function backwpup_base64($data) {
668
- if (preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $data))
669
- $data=base64_decode($data);
670
- return $data;
671
- }
672
-
673
- function backwpup_env_checks() {
674
- global $wp_version,$backwpup_admin_message;
675
- $message='';
676
- $checks=true;
677
- $cfg=get_option('backwpup');
678
- if (version_compare($wp_version, BACKWPUP_MIN_WORDPRESS_VERSION, '<')) { // check WP Version
679
- $message.=str_replace('%d',BACKWPUP_MIN_WORDPRESS_VERSION,__('- WordPress %d or higher is needed!','backwpup')) . '<br />';
680
- $checks=false;
681
- }
682
- if (version_compare(phpversion(), '5.2.4', '<')) { // check PHP Version
683
- $message.=__('- PHP 5.2.4 or higher is needed!','backwpup') . '<br />';
684
- $checks=false;
685
- }
686
- if (!is_dir(backwpup_get_temp())) { // create logs folder if it not exists
687
- @mkdir(untrailingslashit(backwpup_get_temp()),0777,true);
688
- }
689
- if (!is_dir(backwpup_get_temp())) { // check logs folder
690
- $message.=sprintf(__("- Temp folder '%s' does not exists!",'backwpup'),backwpup_get_temp()).'<br />';
691
- }
692
- if (!is_writable(backwpup_get_temp())) { // check logs folder
693
- $message.=sprintf(__("- Temp folder '%s' is not writeable!",'backwpup'),backwpup_get_temp()).'<br />';
694
- }
695
- if (!empty($cfg['dirlogs']) and !is_dir($cfg['dirlogs'])) { // create logs folder if it not exists
696
- @mkdir(untrailingslashit($cfg['dirlogs']),0777,true);
697
- }
698
- if (!is_dir($cfg['dirlogs'])) { // check logs folder
699
- $message.=sprintf(__("- Log folder '%s' does not exists!",'backwpup'),$cfg['dirlogs']).'<br />';
700
- }
701
- if (!is_writable($cfg['dirlogs'])) { // check logs folder
702
- $message.=sprintf(__("- Log folder '%s' is not writeable!",'backwpup'),$cfg['dirlogs']).'<br />';
703
- }
704
- if (!backwpup_check_open_basedir($cfg['dirlogs'])) { // check logs folder
705
- $message.=sprintf(__("- Log folder '%s' is not in open_basedir path!",'backwpup'),$cfg['dirlogs']).'<br />';
706
- }
707
- if (strtolower(substr(WP_CONTENT_URL,0,7))!='http://' and strtolower(substr(WP_CONTENT_URL,0,8))!='https://') { // check logs folder
708
- $message.=sprintf(__("- WP_CONTENT_URL '%s' must set as a full URL!",'backwpup'),WP_CONTENT_URL).'<br />';
709
- }
710
- if (strtolower(substr(WP_PLUGIN_URL,0,7))!='http://' and strtolower(substr(WP_PLUGIN_URL,0,8))!='https://') { // check logs folder
711
- $message.=sprintf(__("- WP_PLUGIN_URL '%s' must set as a full URL!",'backwpup'),WP_PLUGIN_URL).'<br />';
712
- }
713
- //if (false !== $nextrun=wp_next_scheduled('backwpup_cron')) {
714
- // if (empty($nextrun) or $nextrun<(time()-(3600*24))) { //check cron jobs work
715
- // $message.=__("- WP-Cron isn't working, please check it!","backwpup") .'<br />';
716
- // }
717
- //}
718
- //put massage if one
719
- if (!empty($message))
720
- $backwpup_admin_message = '<div id="message" class="error fade"><strong>BackWPup:</strong><br />'.$message.'</div>';
721
- return $checks;
722
- }
723
-
724
- function backwpup_admin_notice() {
725
- global $backwpup_admin_message;
726
- if (current_user_can(BACKWPUP_USER_CAPABILITY))
727
- echo $backwpup_admin_message;
728
- return;
729
- }
730
-
731
- //Checking,upgrade and default job setting
732
- function backwpup_get_job_vars($jobid='',$jobnewsettings='') {
733
- global $wpdb;
734
- //get job data
735
- $jobs=get_option('backwpup_jobs'); //load jobs
736
- if (!empty($jobid)) {
737
- if (isset($jobs[$jobid]))
738
- $jobsettings=$jobs[$jobid];
739
- $jobsettings['jobid']=$jobid;
740
- } else {
741
- if (empty($jobsettings['jobid'])) { //generate jobid if not exists
742
- $heighestid=0;
743
- if (is_array($jobs)) {
744
- foreach ($jobs as $jobkey => $jobvalue) {
745
- if ($jobkey>$heighestid)
746
- $heighestid=$jobkey;
747
- }
748
- }
749
- $jobsettings['jobid']=$heighestid+1;
750
- }
751
- }
752
- unset($jobs);
753
- unset($jobid);
754
- if (!empty($jobnewsettings) && is_array($jobnewsettings)) { //overwrite with new settings
755
- $jobsettings=array_merge($jobsettings,$jobnewsettings);
756
- }
757
-
758
- //check job type
759
- if (!isset($jobsettings['type']) or !is_string($jobsettings['type']))
760
- $jobsettings['type']='DB+FILE';
761
- $todo=explode('+',strtoupper($jobsettings['type']));
762
- foreach($todo as $key => $value) {
763
- if (!in_array($value,backwpup_backup_types()))
764
- unset($todo[$key]);
765
- }
766
- $jobsettings['type']=implode('+',$todo);
767
- if (empty($jobsettings['type']))
768
- $jobsettings['type']='DB+FILE';
769
-
770
- if (empty($jobsettings['name']) or !is_string($jobsettings['name']))
771
- $jobsettings['name']= __('New', 'backwpup');
772
-
773
- if (!isset($jobsettings['activated']) or !is_bool($jobsettings['activated']))
774
- $jobsettings['activated']=false;
775
-
776
- if (!isset($jobsettings['cronselect']) and !isset($jobsettings['cron']))
777
- $jobsettings['cronselect']='basic';
778
- elseif (!isset($jobsettings['cronselect']) and isset($jobsettings['cron']))
779
- $jobsettings['cronselect']='advanced';
780
-
781
- if ($jobsettings['cronselect']!='advanced' and $jobsettings['cronselect']!='basic')
782
- $jobsettings['cronselect']='advanced';
783
-
784
- if (!isset($jobsettings['cron']) or !is_string($jobsettings['cron']))
785
- $jobsettings['cron']='0 3 * * *';
786
-
787
- if (!isset($jobsettings['cronnextrun']) or !is_numeric($jobsettings['cronnextrun']))
788
- $jobsettings['cronnextrun']=backwpup_cron_next($jobsettings['cron']);
789
-
790
- if (!isset($jobsettings['mailaddresslog']) or !is_string($jobsettings['mailaddresslog']))
791
- $jobsettings['mailaddresslog']=get_option('admin_email');
792
-
793
- if (!isset($jobsettings['mailerroronly']) or !is_bool($jobsettings['mailerroronly']))
794
- $jobsettings['mailerroronly']=true;
795
-
796
-
797
- //Tables to backup (old)
798
- if (isset($jobsettings['dbtables']) and is_array($jobsettings['dbtables'])) {
799
- $tables=$wpdb->get_col('SHOW TABLES FROM `'.DB_NAME.'`');
800
- foreach ($tables as $table) {
801
- if (!in_array($table,$jobsettings['dbtables']))
802
- $jobsettings['dbexclude'][]=$table;
803
- }
804
- }
805
-
806
- //don not backup tables
807
- if (!isset($jobsettings['dbexclude']) or !is_array($jobsettings['dbexclude'])) {
808
- $jobsettings['dbexclude']=array();
809
- $tables=$wpdb->get_col('SHOW TABLES FROM `'.DB_NAME.'`');
810
- foreach ($tables as $table) {
811
- if (substr($table,0,strlen($wpdb->prefix))!=$wpdb->prefix)
812
- $jobsettings['dbexclude'][]=$table;
813
- }
814
- }
815
-
816
- if (!isset($jobsettings['dbshortinsert']) or !is_bool($jobsettings['dbshortinsert']))
817
- $jobsettings['dbshortinsert']=false;
818
-
819
- if (!isset($jobsettings['maintenance']) or !is_bool($jobsettings['maintenance']))
820
- $jobsettings['maintenance']=false;
821
-
822
- if (!isset($jobsettings['fileexclude']) or !is_string($jobsettings['fileexclude']))
823
- $jobsettings['fileexclude']='';
824
- $fileexclude=explode(',',$jobsettings['fileexclude']);
825
- foreach($fileexclude as $key => $value) {
826
- $fileexclude[$key]=str_replace('//','/',str_replace('\\','/',trim($value)));
827
- if (empty($fileexclude[$key]))
828
- unset($fileexclude[$key]);
829
- }
830
- sort($fileexclude);
831
- $jobsettings['fileexclude']=implode(',',$fileexclude);
832
-
833
- if (!isset($jobsettings['dirinclude']) or !is_string($jobsettings['dirinclude']))
834
- $jobsettings['dirinclude']='';
835
- $dirinclude=explode(',',$jobsettings['dirinclude']);
836
- foreach($dirinclude as $key => $value) {
837
- $dirinclude[$key]=trailingslashit(str_replace('//','/',str_replace('\\','/',trim($value))));
838
- if ($dirinclude[$key]=='/' or empty($dirinclude[$key]) or !is_dir($dirinclude[$key]))
839
- unset($dirinclude[$key]);
840
- }
841
- sort($dirinclude);
842
- $jobsettings['dirinclude']=implode(',',$dirinclude);
843
-
844
- if (!isset($jobsettings['backuproot']) or !is_bool($jobsettings['backuproot']))
845
- $jobsettings['backuproot']=true;
846
-
847
- if (!isset($jobsettings['backupcontent']) or !is_bool($jobsettings['backupcontent']))
848
- $jobsettings['backupcontent']=true;
849
-
850
- if (!isset($jobsettings['backupplugins']) or !is_bool($jobsettings['backupplugins']))
851
- $jobsettings['backupplugins']=true;
852
-
853
- if (!isset($jobsettings['backupthemes']) or !is_bool($jobsettings['backupthemes']))
854
- $jobsettings['backupthemes']=true;
855
-
856
- if (!isset($jobsettings['backupuploads']) or !is_bool($jobsettings['backupuploads']))
857
- $jobsettings['backupuploads']=true;
858
-
859
- if (!isset($jobsettings['backuprootexcludedirs']) or !is_array($jobsettings['backuprootexcludedirs']))
860
- $jobsettings['backuprootexcludedirs']=array();
861
- foreach($jobsettings['backuprootexcludedirs'] as $key => $value) {
862
- $jobsettings['backuprootexcludedirs'][$key]=str_replace('//','/',str_replace('\\','/',trim($value)));
863
- if (empty($jobsettings['backuprootexcludedirs'][$key]) or $jobsettings['backuprootexcludedirs'][$key]=='/' or !is_dir($jobsettings['backuprootexcludedirs'][$key]))
864
- unset($jobsettings['backuprootexcludedirs'][$key]);
865
- }
866
- sort($jobsettings['backuprootexcludedirs']);
867
-
868
- if (!isset($jobsettings['backupcontentexcludedirs']) or !is_array($jobsettings['backupcontentexcludedirs']))
869
- $jobsettings['backupcontentexcludedirs']=array();
870
- foreach($jobsettings['backupcontentexcludedirs'] as $key => $value) {
871
- $jobsettings['backupcontentexcludedirs'][$key]=str_replace('//','/',str_replace('\\','/',trim($value)));
872
- if (empty($jobsettings['backupcontentexcludedirs'][$key]) or $jobsettings['backupcontentexcludedirs'][$key]=='/' or !is_dir($jobsettings['backupcontentexcludedirs'][$key]))
873
- unset($jobsettings['backupcontentexcludedirs'][$key]);
874
- }
875
- sort($jobsettings['backupcontentexcludedirs']);
876
-
877
- if (!isset($jobsettings['backuppluginsexcludedirs']) or !is_array($jobsettings['backuppluginsexcludedirs']))
878
- $jobsettings['backuppluginsexcludedirs']=array();
879
- foreach($jobsettings['backuppluginsexcludedirs'] as $key => $value) {
880
- $jobsettings['backuppluginsexcludedirs'][$key]=str_replace('//','/',str_replace('\\','/',trim($value)));
881
- if (empty($jobsettings['backuppluginsexcludedirs'][$key]) or $jobsettings['backuppluginsexcludedirs'][$key]=='/' or !is_dir($jobsettings['backuppluginsexcludedirs'][$key]))
882
- unset($jobsettings['backuppluginsexcludedirs'][$key]);
883
- }
884
- sort($jobsettings['backuppluginsexcludedirs']);
885
-
886
- if (!isset($jobsettings['backupthemesexcludedirs']) or !is_array($jobsettings['backupthemesexcludedirs']))
887
- $jobsettings['backupthemesexcludedirs']=array();
888
- foreach($jobsettings['backupthemesexcludedirs'] as $key => $value) {
889
- $jobsettings['backupthemesexcludedirs'][$key]=str_replace('//','/',str_replace('\\','/',trim($value)));
890
- if (empty($jobsettings['backupthemesexcludedirs'][$key]) or $jobsettings['backupthemesexcludedirs'][$key]=='/' or !is_dir($jobsettings['backupthemesexcludedirs'][$key]))
891
- unset($jobsettings['backupthemesexcludedirs'][$key]);
892
- }
893
- sort($jobsettings['backupthemesexcludedirs']);
894
-
895
- if (!isset($jobsettings['backupuploadsexcludedirs']) or !is_array($jobsettings['backupuploadsexcludedirs']))
896
- $jobsettings['backupuploadsexcludedirs']=array();
897
- foreach($jobsettings['backupuploadsexcludedirs'] as $key => $value) {
898
- $jobsettings['backupuploadsexcludedirs'][$key]=str_replace('//','/',str_replace('\\','/',trim($value)));
899
- if (empty($jobsettings['backupuploadsexcludedirs'][$key]) or $jobsettings['backupuploadsexcludedirs'][$key]=='/' or !is_dir($jobsettings['backupuploadsexcludedirs'][$key]))
900
- unset($jobsettings['backupuploadsexcludedirs'][$key]);
901
- }
902
- sort($jobsettings['backupuploadsexcludedirs']);
903
-
904
- $fileformarts=array('.zip','.tar.gz','.tar.bz2','.tar');
905
- if (!isset($jobsettings['fileformart']) or !in_array($jobsettings['fileformart'],$fileformarts))
906
- $jobsettings['fileformart']='.zip';
907
-
908
- if (!isset($jobsettings['fileprefix']) or !is_string($jobsettings['fileprefix']))
909
- $jobsettings['fileprefix']='backwpup_'.$jobsettings['jobid'].'_';
910
-
911
- if (!isset($jobsettings['mailefilesize']) or !is_float($jobsettings['mailefilesize']))
912
- $jobsettings['mailefilesize']=0;
913
-
914
- if (!isset($jobsettings['backupdir']))
915
- $jobsettings['backupdir']='';
916
- if (substr($jobsettings['backupdir'],0,1)!='/' and substr($jobsettings['backupdir'],1,1)!=':' and !empty($jobsettings['backupdir'])) //add abspath if not absolute
917
- $jobsettings['backupdir']=rtrim(str_replace('\\','/',ABSPATH),'/').'/'.$jobsettings['backupdir'];
918
- $jobsettings['backupdir']=trailingslashit(str_replace('//','/',str_replace('\\','/',trim($jobsettings['backupdir']))));
919
- if ( $jobsettings[ 'backupdir' ] == '/' || $jobsettings[ 'backupdir' ] == trailingslashit( str_replace( '\\', '/', WP_CONTENT_DIR ) ) || $jobsettings[ 'backupdir' ] == trailingslashit( str_replace( '\\', '/', ABSPATH ) ) )
920
- $jobsettings['backupdir']='';
921
-
922
- if (!isset($jobsettings['maxbackups']) or !is_int($jobsettings['maxbackups']))
923
- $jobsettings['maxbackups']=0;
924
-
925
- if (!empty($jobsettings['ftphost']) and false !== strpos($jobsettings['ftphost'],':'))
926
- list($jobsettings['ftphost'],$jobsettings['ftphostport'])=explode(':',$jobsettings['ftphost'],2);
927
-
928
- if (!isset($jobsettings['ftphost']) or !is_string($jobsettings['ftphost']))
929
- $jobsettings['ftphost']='';
930
-
931
- $jobsettings['ftphost']=str_replace(array('http://','ftp://'),'',$jobsettings['ftphost']);
932
-
933
- if (!isset($jobsettings['ftphostport']) or !is_int($jobsettings['ftphostport']))
934
- $jobsettings['ftphostport']=21;
935
-
936
- if (!isset($jobsettings['ftpuser']) or !is_string($jobsettings['ftpuser']))
937
- $jobsettings['ftpuser']='';
938
-
939
- if (!isset($jobsettings['ftppass']) or !is_string($jobsettings['ftppass']))
940
- $jobsettings['ftppass']='';
941
-
942
- if (!isset($jobsettings['ftpdir']) or !is_string($jobsettings['ftpdir']))
943
- $jobsettings['ftpdir']='';
944
- if (!empty($jobsettings['ftpdir']))
945
- $jobsettings['ftpdir']=trailingslashit(ltrim(str_replace('//','/',str_replace('\\','/',trim($jobsettings['ftpdir'])))),'/');
946
-
947
- if (!isset($jobsettings['ftpmaxbackups']) or !is_int($jobsettings['ftpmaxbackups']))
948
- $jobsettings['ftpmaxbackups']=0;
949
-
950
- if (!isset($jobsettings['ftppasv']) or !is_bool($jobsettings['ftppasv']))
951
- $jobsettings['ftppasv']=true;
952
-
953
- if (!isset($jobsettings['ftpssl']) or !is_bool($jobsettings['ftpssl']))
954
- $jobsettings['ftpssl']=false;
955
-
956
- if (!isset($jobsettings['awsAccessKey']) or !is_string($jobsettings['awsAccessKey']))
957
- $jobsettings['awsAccessKey']='';
958
-
959
- if (!isset($jobsettings['awsSecretKey']) or !is_string($jobsettings['awsSecretKey']))
960
- $jobsettings['awsSecretKey']='';
961
-
962
- if (!isset($jobsettings['awsrrs']) or !is_bool($jobsettings['awsrrs']))
963
- $jobsettings['awsrrs']=false;
964
-
965
- if (!isset($jobsettings['awsBucket']) or !is_string($jobsettings['awsBucket']))
966
- $jobsettings['awsBucket']='';
967
-
968
- if (!isset($jobsettings['awsdir']) or !is_string($jobsettings['awsdir']) or $jobsettings['awsdir']=='/')
969
- $jobsettings['awsdir']='';
970
- $jobsettings['awsdir']=trailingslashit(str_replace('//','/',str_replace('\\','/',trim($jobsettings['awsdir']))));
971
- if (substr($jobsettings['awsdir'],0,1)=='/')
972
- $jobsettings['awsdir']=substr($jobsettings['awsdir'],1);
973
-
974
- if (!isset($jobsettings['awsmaxbackups']) or !is_int($jobsettings['awsmaxbackups']))
975
- $jobsettings['awsmaxbackups']=0;
976
-
977
- if (!isset($jobsettings['GStorageAccessKey']) or !is_string($jobsettings['GStorageAccessKey']))
978
- $jobsettings['GStorageAccessKey']='';
979
-
980
- if (!isset($jobsettings['GStorageSecret']) or !is_string($jobsettings['GStorageSecret']))
981
- $jobsettings['GStorageSecret']='';
982
-
983
- if (!isset($jobsettings['GStorageBucket']) or !is_string($jobsettings['GStorageBucket']))
984
- $jobsettings['GStorageBucket']='';
985
-
986
- if (!isset($jobsettings['GStoragedir']) or !is_string($jobsettings['GStoragedir']) or $jobsettings['GStoragedir']=='/')
987
- $jobsettings['GStoragedir']='';
988
- $jobsettings['GStoragedir']=trailingslashit(str_replace('//','/',str_replace('\\','/',trim($jobsettings['GStoragedir']))));
989
- if (substr($jobsettings['GStoragedir'],0,1)=='/')
990
- $jobsettings['GStoragedir']=substr($jobsettings['GStoragedir'],1);
991
-
992
- if (!isset($jobsettings['GStoragemaxbackups']) or !is_int($jobsettings['GStoragemaxbackups']))
993
- $jobsettings['GStoragemaxbackups']=0;
994
-
995
- if (!isset($jobsettings['msazureHost']) or !is_string($jobsettings['msazureHost']))
996
- $jobsettings['msazureHost']='blob.core.windows.net';
997
-
998
- if (!isset($jobsettings['msazureAccName']) or !is_string($jobsettings['msazureAccName']))
999
- $jobsettings['msazureAccName']='';
1000
-
1001
- if (!isset($jobsettings['msazureKey']) or !is_string($jobsettings['msazureKey']))
1002
- $jobsettings['msazureKey']='';
1003
-
1004
- if (!isset($jobsettings['msazureContainer']) or !is_string($jobsettings['msazureContainer']))
1005
- $jobsettings['msazureContainer']='';
1006
-
1007
- if (!isset($jobsettings['msazuredir']) or !is_string($jobsettings['msazuredir']) or $jobsettings['msazuredir']=='/')
1008
- $jobsettings['msazuredir']='';
1009
- $jobsettings['msazuredir']=trailingslashit(str_replace('//','/',str_replace('\\','/',trim($jobsettings['msazuredir']))));
1010
- if (substr($jobsettings['msazuredir'],0,1)=='/')
1011
- $jobsettings['msazuredir']=substr($jobsettings['msazuredir'],1);
1012
-
1013
- if (!isset($jobsettings['msazuremaxbackups']) or !is_int($jobsettings['msazuremaxbackups']))
1014
- $jobsettings['msazuremaxbackups']=0;
1015
-
1016
- if (!isset($jobsettings['rscUsername']) or !is_string($jobsettings['rscUsername']))
1017
- $jobsettings['rscUsername']='';
1018
-
1019
- if (!isset($jobsettings['rscAPIKey']) or !is_string($jobsettings['rscAPIKey']))
1020
- $jobsettings['rscAPIKey']='';
1021
-
1022
- if (!isset($jobsettings['rscContainer']) or !is_string($jobsettings['rscContainer']))
1023
- $jobsettings['rscContainer']='';
1024
-
1025
- if (!isset($jobsettings['rscdir']) or !is_string($jobsettings['rscdir']) or $jobsettings['rscdir']=='/')
1026
- $jobsettings['rscdir']='';
1027
- $jobsettings['rscdir']=trailingslashit(str_replace('//','/',str_replace('\\','/',trim($jobsettings['rscdir']))));
1028
- if (substr($jobsettings['rscdir'],0,1)=='/')
1029
- $jobsettings['rscdir']=substr($jobsettings['rscdir'],1);
1030
-
1031
- if (!isset($jobsettings['rscmaxbackups']) or !is_int($jobsettings['rscmaxbackups']))
1032
- $jobsettings['rscmaxbackups']=0;
1033
-
1034
- if (!isset($jobsettings['dropetoken']) or !is_string($jobsettings['dropetoken']))
1035
- $jobsettings['dropetoken']='';
1036
-
1037
- if (!isset($jobsettings['dropesecret']) or !is_string($jobsettings['dropesecret']))
1038
- $jobsettings['dropesecret']='';
1039
-
1040
- if (!isset($jobsettings['dropedir']) or !is_string($jobsettings['dropedir']) or $jobsettings['dropedir']=='/')
1041
- $jobsettings['dropedir']='';
1042
- $jobsettings['dropedir']=trailingslashit(str_replace('//','/',str_replace('\\','/',trim($jobsettings['dropedir']))));
1043
- if (substr($jobsettings['dropedir'],0,1)=='/')
1044
- $jobsettings['dropedir']=substr($jobsettings['dropedir'],1);
1045
-
1046
- if (!isset($jobsettings['droperoot']) or ($jobsettings['droperoot']!='dropbox' and $jobsettings['droperoot']!='sandbox'))
1047
- $jobsettings['droperoot']='dropbox';
1048
-
1049
- if (!isset($jobsettings['dropemaxbackups']) or !is_int($jobsettings['dropemaxbackups']))
1050
- $jobsettings['dropemaxbackups']=0;
1051
-
1052
- if (!isset($jobsettings['sugarrefreshtoken']) or !is_string($jobsettings['sugarrefreshtoken']))
1053
- $jobsettings['sugarrefreshtoken']='';
1054
-
1055
- if (!isset($jobsettings['sugarroot']) or !is_string($jobsettings['sugarroot']))
1056
- $jobsettings['sugarroot']='';
1057
-
1058
- if (!isset($jobsettings['sugardir']) or !is_string($jobsettings['sugardir']) or $jobsettings['sugardir']=='/')
1059
- $jobsettings['sugardir']='';
1060
- $jobsettings['sugardir']=trailingslashit(str_replace('//','/',str_replace('\\','/',trim($jobsettings['sugardir']))));
1061
- if (substr($jobsettings['sugardir'],0,1)=='/')
1062
- $jobsettings['sugardir']=substr($jobsettings['sugardir'],1);
1063
-
1064
- if (!isset($jobsettings['sugarmaxbackups']) or !is_int($jobsettings['sugarmaxbackups']))
1065
- $jobsettings['sugarmaxbackups']=0;
1066
-
1067
- if (!isset($jobsettings['mailaddress']) or !is_string($jobsettings['mailaddress']))
1068
- $jobsettings['mailaddress']='';
1069
-
1070
- //unset old not nedded vars
1071
- unset($jobsettings['scheduletime']);
1072
- unset($jobsettings['scheduleintervaltype']);
1073
- unset($jobsettings['scheduleintervalteimes']);
1074
- unset($jobsettings['scheduleinterval']);
1075
- unset($jobsettings['dropemail']);
1076
- unset($jobsettings['dropepass']);
1077
- unset($jobsettings['dbtables']);
1078
- unset($jobsettings['dropesignmethod']);
1079
- unset($jobsettings['sugarpass']);
1080
- unset($jobsettings['sugaruser']);
1081
-
1082
- return $jobsettings;
1083
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
backwpup.php CHANGED
@@ -1,90 +1,332 @@
1
  <?php
2
- /*
3
- Plugin Name: BackWPup
4
- Plugin URI: http://backwpup.com
5
- Description: WordPress Backup and more...
6
- Author: Daniel H&uuml;sken
7
- Version: 2.1.17
8
- Author URI: http://danielhuesken.de
9
- Text Domain: backwpup
10
- Domain Path: /lang/
11
- */
12
-
13
- /*
14
- Copyright (C) 2012 Inpsyde GmbH (email: info@inpsyde.com)
15
-
16
- This program is free software; you can redistribute it and/or
17
- modify it under the terms of the GNU General Public License
18
- as published by the Free Software Foundation; either version 2
19
- of the License, or (at your option) any later version.
20
-
21
- This program is distributed in the hope that it will be useful,
22
- but WITHOUT ANY WARRANTY; without even the implied warranty of
23
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
- GNU General Public License for more details.
25
-
26
- You should have received a copy of the GNU General Public License
27
- along with this program; if not, write to the Free Software
28
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
- */
30
- if (!defined('ABSPATH'))
31
- die();
32
-
33
- //Set plugin dirname
34
- define('BACKWPUP_PLUGIN_BASEDIR', dirname(plugin_basename(__FILE__)));
35
- define('BACKWPUP_PLUGIN_BASEURL', plugins_url(BACKWPUP_PLUGIN_BASEDIR));
36
- //Set Plugin Version
37
- define('BACKWPUP_VERSION', '2.1.17');
38
- //Set Min Wordpress Version
39
- define('BACKWPUP_MIN_WORDPRESS_VERSION', '3.1');
40
- //Set User Capability
41
- define('BACKWPUP_USER_CAPABILITY', 'export');
42
- //Set useable destinations
43
- if (!defined('BACKWPUP_DESTS')) {
44
- if (!function_exists('curl_init'))
45
- define('BACKWPUP_DESTS', 'FTP,MSAZURE');
46
- else
47
- define('BACKWPUP_DESTS', 'FTP,DROPBOX,SUGARSYNC,S3,GSTORAGE,RSC,MSAZURE');
48
- }
49
- //load Text Domain
50
- load_plugin_textdomain('backwpup', false, BACKWPUP_PLUGIN_BASEDIR.'/lang');
51
- //Load functions file
52
- require_once(dirname(__FILE__).'/backwpup-functions.php');
53
- //Plugin deactivate
54
- register_deactivation_hook(__FILE__, 'backwpup_plugin_deactivate');
55
- //Admin message
56
- if (is_multisite())
57
- add_action('network_admin_notices', 'backwpup_admin_notice');
58
- else
59
- add_action('admin_notices', 'backwpup_admin_notice');
60
- //add cron intervals
61
- add_filter('cron_schedules', 'backwpup_intervals',20);
62
- //call activation settings
63
- backwpup_plugin_activate();
64
- //Check if plugin can activated
65
- if (backwpup_env_checks()) {
66
- if (is_multisite()) { //For multisite
67
- //add Menu
68
- add_action('network_admin_menu','backwpup_admin_menu');
69
- //add Dashboard widget
70
- add_action('wp_network_dashboard_setup', 'backwpup_add_dashboard');
71
- if (is_main_site())
72
- add_action('plugins_loaded','backwpup_plugin_activate');
73
- //Additional links on the plugin page
74
- add_filter('plugin_row_meta', 'backwpup_plugin_links',10,2);
75
- } else {
76
- //add Menu
77
- add_action('admin_menu', 'backwpup_admin_menu');
78
- //add Dashboard widget
79
- add_action('wp_dashboard_setup', 'backwpup_add_dashboard');
80
- //Additional links on the plugin page
81
- add_filter('plugin_action_links_'.BACKWPUP_PLUGIN_BASEDIR.'/backwpup.php', 'backwpup_plugin_options_link');
82
- add_filter('plugin_row_meta', 'backwpup_plugin_links',10,2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
- //Actions for Cron job
85
- add_action('backwpup_cron', 'backwpup_cron',1);
86
- //add Admin Bar menu
87
- add_action('admin_bar_menu', 'backwpup_add_adminbar',100);
88
- //load ajax functions
89
- backwpup_load_ajax();
90
- }
1
  <?php
2
+ /**
3
+ * Plugin Name: BackWPup
4
+ * Plugin URI: https://marketpress.com/product/backwpup-pro/
5
+ * Description: WordPress Backup and more...
6
+ * Author: Inpsyde GmbH
7
+ * Author URI: http://inpsyde.com
8
+ * Version: 3.0.1
9
+ * Text Domain: backwpup
10
+ * Domain Path: /languages/
11
+ * Network: true
12
+ * License: GPLv3
13
+ * License URI: http://www.gnu.org/licenses/gpl-3.0
14
+ * Slug: backwpup
15
+ */
16
+
17
+ /**
18
+ * Copyright (C) 2012-2013 Inpsyde GmbH (email: info@inpsyde.com)
19
+ *
20
+ * This program is free software; you can redistribute it and/or
21
+ * modify it under the terms of the GNU General Public License
22
+ * as published by the Free Software Foundation; either version 2
23
+ * of the License, or (at your option) any later version.
24
+ *
25
+ * This program is distributed in the hope that it will be useful,
26
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ * GNU General Public License for more details.
29
+ *
30
+ * You should have received a copy of the GNU General Public License
31
+ * along with this program; if not, write to the Free Software
32
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33
+ */
34
+
35
+ if ( ! class_exists( 'BackWPup' ) ) {
36
+
37
+ // Don't activate on anything less than PHP 5.2.4 or WordPress 3.1
38
+ if ( version_compare( phpversion(), '5.2.6', '<' ) || version_compare( get_bloginfo( 'version' ), '3.2', '<' ) ) {
39
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
40
+ deactivate_plugins( basename( __FILE__ ) );
41
+ if ( isset( $_GET['action'] ) && ( $_GET['action'] == 'activate' || $_GET['action'] == 'error_scrape' ) )
42
+ die( __( 'BackWPup requires PHP version 5.2.6 or greater and WordPress 3.2 or greater.', 'backwpup' ) );
43
+ }
44
+
45
+ //Start Plugin
46
+ if ( function_exists( 'add_filter' ) )
47
+ add_action( 'plugins_loaded', array( 'BackWPup', 'getInstance' ), 11 );
48
+
49
+ /**
50
+ * Main BackWPup Plugin Class
51
+ */
52
+ final class BackWPup {
53
+
54
+ private static $instance = NULL;
55
+ private static $plugin_data = array();
56
+ private static $destinations = array();
57
+ private static $job_types = array();
58
+ private static $wizards = array();
59
+
60
+ /**
61
+ * Set needed filters and actions and load
62
+ */
63
+ private function __construct() {
64
+
65
+ // Nothing else matters if we're on WP-MS and not on the main site
66
+ if ( is_multisite() && ! is_main_site() )
67
+ return;
68
+ //auto loader
69
+ if ( function_exists( 'spl_autoload_register' ) ) //register auto load
70
+ spl_autoload_register( array( $this, 'autoloader' ) );
71
+ else //auto loader fallback
72
+ $this->autoloader_fallback();
73
+ //WP-Cron
74
+ add_action( 'backwpup_cron', array( 'BackWPup_Cron', 'run' ) );
75
+ add_action( 'backwpup_check_cleanup', array( 'BackWPup_Cron', 'check_cleanup' ) );
76
+ //deactivation hook
77
+ register_deactivation_hook( __FILE__, array( 'BackWPup_Install', 'deactivate' ) );
78
+ //Things that must do in plugin init
79
+ add_action( 'init', array( $this, 'plugin_init' ) );
80
+ //start upgrade if needed
81
+ if ( get_site_option( 'backwpup_version' ) != self::get_plugin_data( 'Version' ) && class_exists( 'BackWPup_Install' ) )
82
+ BackWPup_Install::activate();
83
+ //Frontend
84
+ if ( ! is_admin() && is_main_site() && class_exists( 'BackWPup_FrontEnd' ) )
85
+ BackWPup_FrontEnd::getInstance();
86
+ //load Pro Features
87
+ if ( is_file( dirname( __FILE__ ) . '/inc/features/class-features.php' ) )
88
+ require dirname( __FILE__ ) . '/inc/features/class-features.php';
89
+ //only in backend
90
+ if ( is_admin() && current_user_can( 'backwpup' ) && class_exists( 'BackWPup_Admin' ) )
91
+ BackWPup_Admin::getInstance();
92
+ //work with wp-cli
93
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
94
+ require dirname( __FILE__ ) . '/inc/class-wp-cli.php';
95
+ WP_CLI::addCommand( 'backwpup', 'BackWPup_WP_CLI' );
96
+ }
97
+ }
98
+
99
+ /**
100
+ * @static
101
+ *
102
+ * @return self
103
+ */
104
+ public static function getInstance() {
105
+
106
+ if (NULL === self::$instance) {
107
+ self::$instance = new self;
108
+ }
109
+ return self::$instance;
110
+ }
111
+
112
+
113
+ private function __clone() {}
114
+
115
+ /**
116
+ * get information about the Plugin
117
+ *
118
+ * @param string $name Name of info to get or NULL to get all
119
+ * @return string|array
120
+ */
121
+ public static function get_plugin_data( $name = NULL ) {
122
+
123
+ if ( $name )
124
+ $name = strtolower( $name );
125
+
126
+ if ( empty( self::$plugin_data ) ) {
127
+ self::$plugin_data = get_file_data( __FILE__, array(
128
+ 'name' => 'Plugin Name',
129
+ 'pluginuri' => 'Plugin URI',
130
+ 'version' => 'Version',
131
+ 'description' => 'Description',
132
+ 'author' => 'Author',
133
+ 'authoruri' => 'Author URI',
134
+ 'textdomain' => 'Text Domain',
135
+ 'domainpath' => 'Domain Path',
136
+ 'slug' => 'Slug',
137
+ 'license' => 'License',
138
+ 'licenseuri' => 'License URI'
139
+ ), 'plugin' );
140
+ //Translate some vars
141
+ self::$plugin_data[ 'name' ] = trim( self::$plugin_data[ 'name' ] );
142
+ self::$plugin_data[ 'pluginuri' ] = trim( self::$plugin_data[ 'pluginuri' ] );
143
+ self::$plugin_data[ 'description' ] = trim( self::$plugin_data[ 'description' ] );
144
+ self::$plugin_data[ 'author' ] = trim( self::$plugin_data[ 'author' ] );
145
+ self::$plugin_data[ 'authoruri' ] = trim( self::$plugin_data[ 'authoruri' ] );
146
+ //set some extra vars
147
+ self::$plugin_data[ 'basename' ] = plugin_basename( dirname( __FILE__ ) );
148
+ self::$plugin_data[ 'mainfile' ] = __FILE__ ;
149
+ self::$plugin_data[ 'plugindir' ] = untrailingslashit( dirname( __FILE__ ) ) ;
150
+ if ( defined( 'WP_TEMP_DIR' ) && is_dir( WP_TEMP_DIR ) ) {
151
+ self::$plugin_data[ 'temp' ] = trailingslashit( str_replace( '\\', '/', WP_TEMP_DIR ) ) . 'backwpup-' . substr( md5( md5( SECURE_AUTH_KEY ) ), - 5 ) . '/';
152
+ } else {
153
+ $upload_dir = wp_upload_dir();
154
+ self::$plugin_data[ 'temp' ] = trailingslashit( str_replace( '\\', '/',$upload_dir[ 'basedir' ] ) ) . 'backwpup-' . substr( md5( md5( SECURE_AUTH_KEY ) ), - 5 ) . '-temp/';
155
+ }
156
+ self::$plugin_data[ 'running_file' ] = self::$plugin_data[ 'temp' ] . 'backwpup-' . substr( md5( NONCE_SALT ), 13, 6 ) . '-working.php';
157
+ self::$plugin_data[ 'url' ] = plugins_url( '', __FILE__ );
158
+ //get unmodified WP Versions
159
+ include ABSPATH . WPINC . '/version.php';
160
+ /** @var $wp_version string */
161
+ self::$plugin_data[ 'wp_version' ] = $wp_version;
162
+ //Build User Agent
163
+ self::$plugin_data[ 'user-agent' ] = self::$plugin_data[ 'name' ].'/' . self::$plugin_data[ 'version' ] . '; WordPress/' . self::$plugin_data[ 'wp_version' ] . '; ' . home_url();
164
+ }
165
+
166
+ if ( ! empty( $name ) )
167
+ return self::$plugin_data[ $name ];
168
+ else
169
+ return self::$plugin_data;
170
+ }
171
+
172
+
173
+ /**
174
+ * include not existing classes automatically
175
+ *
176
+ * @param string $class_name Class to load from file
177
+ */
178
+ private function autoloader( $class_name ) {
179
+
180
+ //BackWPup classes to load
181
+ if ( strstr( $class_name, 'BackWPup_' ) ) {
182
+ $class_file_name = DIRECTORY_SEPARATOR . 'class-' . strtolower( str_replace( array( 'BackWPup_', '_' ), array( '', '-' ), $class_name ) ) . '.php';
183
+ if ( class_exists( 'BackWPup_Features', FALSE ) && is_file( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'features' . $class_file_name ) )
184
+ require dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'features' . $class_file_name;
185
+ elseif ( is_file( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'inc' . $class_file_name ) )
186
+ require dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'inc' . $class_file_name;
187
+ }
188
+ }
189
+
190
+ /**
191
+ * load all classes if spl auto loader not exists
192
+ */
193
+ private function autoloader_fallback() {
194
+
195
+ //add class files that should excluded that ar classes that extra loaded with require or needs spl_autoload_register to work
196
+ $loaded_class_files = array( 'class-auto-update.php', 'class-documentation.php', 'class-features.php',
197
+ 'class-destination-msazure.php', 'class-destination-msazure-pro.php',
198
+ 'class-destination-email.php', 'class-destination-email-pro.php',
199
+ 'class-destination-rsc.php', 'class-destination-rsc-pro.php',
200
+ 'class-destination-s3.php', 'class-destination-s3-pro.php',
201
+ 'class-destinations.php', 'class-jobtypes.php', 'class-wizards.php',
202
+ 'class-wp-cli.php' );
203
+
204
+ //load first abstraction classes
205
+ require dirname( __FILE__ ) . '/inc/class-destinations.php';
206
+ require dirname( __FILE__ ) . '/inc/class-jobtypes.php';
207
+ if ( is_file( dirname( __FILE__ ) . '/inc/features/class-features.php' ) )
208
+ require dirname( __FILE__ ) . '/inc/features/class-wizards.php';
209
+ require_once ABSPATH . '/wp-admin/includes/class-wp-list-table.php';
210
+
211
+ //load normal classes
212
+ foreach( glob( dirname( __FILE__ ) . '/inc/class-*.php' ) as $class ) {
213
+ if ( ! in_array( basename( $class ), $loaded_class_files ) )
214
+ require $class;
215
+ }
216
+
217
+ //load features
218
+ if ( is_file( dirname( __FILE__ ) . '/inc/features/class-features.php' ) ) {
219
+ foreach( glob( dirname( __FILE__ ) . '/inc/features/class-*.php' ) as $class ) {
220
+ if ( ! in_array( basename( $class ), $loaded_class_files ) )
221
+ require $class;
222
+ }
223
+ }
224
+ }
225
+
226
+ /**
227
+ * Plugin init function
228
+ *
229
+ * @return void
230
+ */
231
+ public function plugin_init() {
232
+
233
+ //Add Admin Bar
234
+ if ( ! defined( 'DOING_CRON' ) && current_user_can( 'backwpup' ) && current_user_can( 'backwpup' ) && is_admin_bar_showing() && get_site_option( 'backwpup_cfg_showadminbar', TRUE ) && class_exists( 'BackWPup_Adminbar', TRUE ) )
235
+ BackWPup_Adminbar::getInstance();
236
+ }
237
+
238
+ /**
239
+ * Get a array of instances for Backup Destination's
240
+ *
241
+ * @return array
242
+ */
243
+ public static function get_destinations() {
244
+
245
+ if ( ! empty( self::$destinations ) )
246
+ return self::$destinations;
247
+
248
+ //add BackWPup Destinations
249
+ self::$destinations[ 'FOLDER' ] = new BackWPup_Destination_Folder;
250
+ if ( class_exists( 'BackWPup_Destination_Email' ) )
251
+ self::$destinations[ 'EMAIL' ] = new BackWPup_Destination_Email;
252
+ if ( function_exists( 'ftp_login' ) )
253
+ self::$destinations[ 'FTP' ] = new BackWPup_Destination_Ftp;
254
+ if ( function_exists( 'curl_exec' ) )
255
+ self::$destinations[ 'DROPBOX' ] = new BackWPup_Destination_Dropbox;
256
+ if ( function_exists( 'curl_exec' ) && version_compare( '5.3.3', PHP_VERSION, '<=' ) && class_exists( 'BackWPup_Destination_S3' ) )
257
+ self::$destinations[ 'S3' ] = new BackWPup_Destination_S3;
258
+ if ( version_compare( '5.3.2', PHP_VERSION, '<=' ) && class_exists( 'BackWPup_Destination_MSAzure' ) )
259
+ self::$destinations[ 'MSAZURE' ] = new BackWPup_Destination_MSAzure;
260
+ if ( function_exists( 'curl_exec' ) && version_compare( '5.3.0', PHP_VERSION, '<=' ) && class_exists( 'BackWPup_Destination_RSC' ) )
261
+ self::$destinations[ 'RSC' ] = new BackWPup_Destination_RSC;
262
+ if ( function_exists( 'curl_exec' ) )
263
+ self::$destinations[ 'SUGARSYNC' ] = new BackWPup_Destination_SugarSync;
264
+
265
+ self::$destinations = apply_filters( 'backwpup_destinations', self::$destinations );
266
+
267
+ //remove destinations can't load
268
+ foreach ( self::$destinations as $key => $destination ) {
269
+ if ( empty( $destination ) || ! is_object( $destination ) )
270
+ unset( self::$destinations[ $key ] );
271
+ }
272
+
273
+ return self::$destinations;
274
+ }
275
+
276
+
277
+ /**
278
+ * Gets a array of instances from Job types
279
+ *
280
+ * @return array
281
+ */
282
+ public static function get_job_types() {
283
+
284
+ if ( !empty( self::$job_types ) )
285
+ return self::$job_types;
286
+
287
+ if ( class_exists( 'mysqli' ) )
288
+ self::$job_types[ 'DBDUMP' ]= new BackWPup_JobType_DBDump;
289
+ self::$job_types[ 'FILE' ] = new BackWPup_JobType_File;
290
+ self::$job_types[ 'WPEXP' ] = new BackWPup_JobType_WPEXP;
291
+ self::$job_types[ 'WPPLUGIN' ] = new BackWPup_JobType_WPPlugin;
292
+ self::$job_types[ 'DBOPTIMIZE' ]= new BackWPup_JobType_DBOptimize;
293
+ self::$job_types[ 'DBCHECK' ] = new BackWPup_JobType_DBCheck;
294
+
295
+ self::$job_types = apply_filters( 'backwpup_job_types', self::$job_types );
296
+
297
+ //remove types can't load
298
+ foreach ( self::$job_types as $key => $job_type ) {
299
+ if ( empty( $job_type ) || ! is_object( $job_type ) )
300
+ unset( self::$job_types[ $key ] );
301
+ }
302
+
303
+ return self::$job_types;
304
+ }
305
+
306
+
307
+
308
+ /**
309
+ * Gets a array of instances from Wizards Pro version Only
310
+ *
311
+ * @return array
312
+ */
313
+ public static function get_wizards() {
314
+
315
+ if ( !empty( self::$wizards ) )
316
+ return self::$wizards;
317
+
318
+ self::$wizards = apply_filters( 'backwpup_wizards', self::$wizards );
319
+
320
+ //remove wizards can't load
321
+ foreach ( self::$wizards as $key => $wizard ) {
322
+ if ( empty( $wizard ) || ! is_object( $wizard ) )
323
+ unset( self::$wizards[ $key ] );
324
+ }
325
+
326
+ return self::$wizards;
327
+
328
+ }
329
+
330
  }
331
+
332
+ }
 
 
 
 
 
css/BackWPup16.png DELETED
Binary file
css/BackWPup32.png DELETED
Binary file
css/admin.css ADDED
@@ -0,0 +1 @@
 
1
+ #toplevel_page_backwpup .wp-menu-image{background-image:url(../images/BackWPup16.png);background-repeat:no-repeat;background-size:16px 32px;background-position:bottom center;width:16px!important;height:16px!important;margin:5px 5px 0 7px;-khtml-opacity:.70;-moz-opacity:.70;-ms-filter:"alpha(opacity=70)";filter:alpha(opacity=70);filter:alpha(opacity=0.7);opacity:.70}#toplevel_page_backwpup:hover .wp-menu-image{background-image:url(../images/BackWPup16.png);background-repeat:no-repeat;background-size:16px 32px;background-position:bottom center;width:16px!important;height:16px!important;margin:5px 5px 0 7px;-khtml-opacity:.5;-moz-opacity:.5;-ms-filter:"alpha(opacity=5)";filter:alpha(opacity=5);filter:alpha(opacity=5.0);opacity:.5}li.wp-has-current-submenu#toplevel_page_backwpup .wp-menu-image{background-image:url(../images/BackWPup16.png);background-repeat:no-repeat;background-size:16px 32px;background-position:top center;width:16px!important;height:16px!important;margin:5px 5px 0 7px}#toplevel_page_backwpup .wp-menu-image img{display:none}@media only screen and (-webkit-min-device-pixel-ratio:2){#toplevel_page_backwpup .wp-menu-image{background-image:url(../images/BackWPup16_2x.png);background-repeat:no-repeat;background-size:16px 32px;background-position:bottom center;width:16px!important;height:16px!important;margin:5px 5px 0 7px}#toplevel_page_backwpup .wp-menu-image{background-image:url(../images/BackWPup16_2x.png);background-repeat:no-repeat;background-size:16px 32px;background-position:bottom center;width:16px!important;height:16px!important;margin:5px 5px 0 7px;-khtml-opacity:.70;-moz-opacity:.70;-ms-filter:"alpha(opacity=70)";filter:alpha(opacity=70);filter:alpha(opacity=0.7);opacity:.70}#toplevel_page_backwpup:hover .wp-menu-image{background-image:url(../images/BackWPup16_2x.png);background-repeat:no-repeat;background-size:16px 32px;background-position:bottom center;width:16px!important;height:16px!important;margin:5px 5px 0 7px;-khtml-opacity:.5;-moz-opacity:.5;-ms-filter:"alpha(opacity=5)";filter:alpha(opacity=5);filter:alpha(opacity=5.0);opacity:.5}li.wp-has-current-submenu#toplevel_page_backwpup .wp-menu-image{background-image:url(../images/BackWPup16_2x.png);background-repeat:no-repeat;background-size:16px 32px;background-position:top center;width:16px!important;height:16px!important;margin:5px 5px 0 7px}}
css/admin.dev.css ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #toplevel_page_backwpup .wp-menu-image {
2
+ background-image: url(../images/BackWPup16.png);
3
+ background-repeat: no-repeat;
4
+ background-size: 16px 32px;
5
+ background-position:bottom center;
6
+ width:16px !important;
7
+ height:16px !important;
8
+ margin:5px 5px 0px 7px;
9
+ -khtml-opacity:.70;
10
+ -moz-opacity:.70;
11
+ -ms-filter:"alpha(opacity=70)";
12
+ filter:alpha(opacity=70);
13
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.7);
14
+ opacity:.70;
15
+ }
16
+ #toplevel_page_backwpup:hover .wp-menu-image {
17
+ background-image: url(../images/BackWPup16.png);
18
+ background-repeat: no-repeat;
19
+ background-size: 16px 32px;
20
+ background-position:bottom center;
21
+ width:16px !important;
22
+ height:16px !important;
23
+ margin:5px 5px 0px 7px;
24
+ -khtml-opacity:.5;
25
+ -moz-opacity:.5;
26
+ -ms-filter:"alpha(opacity=5)";
27
+ filter:alpha(opacity=5);
28
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=5.0);
29
+ opacity:.5;
30
+ }
31
+ li.wp-has-current-submenu#toplevel_page_backwpup .wp-menu-image {
32
+ background-image: url(../images/BackWPup16.png);
33
+ background-repeat: no-repeat;
34
+ background-size: 16px 32px;
35
+ background-position:top center;
36
+ width:16px !important;
37
+ height:16px !important;
38
+ margin:5px 5px 0px 7px;
39
+ }
40
+ #toplevel_page_backwpup .wp-menu-image img {
41
+ display: none;
42
+ }
43
+
44
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
45
+ #toplevel_page_backwpup .wp-menu-image {
46
+ background-image: url(../images/BackWPup16_2x.png);
47
+ background-repeat: no-repeat;
48
+ background-size: 16px 32px;
49
+ background-position:bottom center;
50
+ width:16px !important;
51
+ height:16px !important;
52
+ margin:5px 5px 0px 7px;
53
+ }
54
+ #toplevel_page_backwpup .wp-menu-image {
55
+ background-image: url(../images/BackWPup16_2x.png);
56
+ background-repeat: no-repeat;
57
+ background-size: 16px 32px;
58
+ background-position:bottom center;
59
+ width:16px !important;
60
+ height:16px !important;
61
+ margin:5px 5px 0px 7px;
62
+ -khtml-opacity:.70;
63
+ -moz-opacity:.70;
64
+ -ms-filter:"alpha(opacity=70)";
65
+ filter:alpha(opacity=70);
66
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.7);
67
+ opacity:.70;
68
+ }
69
+ #toplevel_page_backwpup:hover .wp-menu-image {
70
+ background-image: url(../images/BackWPup16_2x.png);
71
+ background-repeat: no-repeat;
72
+ background-size: 16px 32px;
73
+ background-position:bottom center;
74
+ width:16px !important;
75
+ height:16px !important;
76
+ margin:5px 5px 0px 7px;
77
+ -khtml-opacity:.5;
78
+ -moz-opacity:.5;
79
+ -ms-filter:"alpha(opacity=5)";
80
+ filter:alpha(opacity=5);
81
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=5.0);
82
+ opacity:.5;
83
+ }
84
+ li.wp-has-current-submenu#toplevel_page_backwpup .wp-menu-image {
85
+ background-image: url(../images/BackWPup16_2x.png);
86
+ background-repeat: no-repeat;
87
+ background-size: 16px 32px;
88
+ background-position:top center;
89
+ width:16px !important;
90
+ height:16px !important;
91
+ margin:5px 5px 0px 7px;
92
+ }
93
+ }
css/adminbar.css ADDED
@@ -0,0 +1 @@
 
1
+ #wp-admin-bar-backwpup.menupop>.ab-item .ab-icon,#wp-admin-bar-backwpup.menupop>a>span .ab-icon{background-image:url(../images/BackWPup20.png);background-repeat:no-repeat;position:relative;float:left;width:20px;height:20px;margin-top:3px;margin-right:5px;background-position:top center}#wp-admin-bar-backwpup.menupop.hover>.ab-item .ab-icon,#wp-admin-bar-backwpup.menupop.hover>a>span .ab-icon:hover{background-image:url(../images/BackWPup20.png);background-repeat:no-repeat;background-position:bottom center}#wp-admin-bar-backwpup .blink{-webkit-animation:blink .75s linear infinite;-moz-animation:blink .75s linear infinite;-ms-animation:blink .75s linear infinite;-o-animation:blink .75s linear infinite;animation:blink .75s linear infinite}@-webkit-keyframes blink{0%{opacity:1}50%{opacity:1}50.01%{opacity:0}100%{opacity:0}}@-moz-keyframes blink{0%{opacity:1}50%{opacity:1}50.01%{opacity:0}100%{opacity:0}}@-ms-keyframes blink{0%{opacity:1}50%{opacity:1}50.01%{opacity:0}100%{opacity:0}}@-o-keyframes blink{0%{opacity:1}50%{opacity:1}50.01%{opacity:0}100%{opacity:0}}@keyframes blink{0%{opacity:1}50%{opacity:1}50.01%{opacity:0}100%{opacity:0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#wp-admin-bar-backwpup.menupop>.ab-item .ab-icon,#wp-admin-bar-backwpup.menupop>a>span .ab-icon{background-image:url(../images/BackWPup20_2x.png);background-repeat:no-repeat;background-size:20px 40px;background-position:top center;position:relative}#wp-admin-bar-backwpup.menupop.hover>.ab-item .ab-icon,#wp-admin-bar-backwpup.menupop.hover>a>span .ab-icon:hover{background-image:url(../images/BackWPup20_2x.png);background-repeat:no-repeat;background-position:bottom center}}
css/adminbar.dev.css ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wp-admin-bar-backwpup.menupop > .ab-item .ab-icon,
2
+ #wp-admin-bar-backwpup.menupop > a > span .ab-icon {
3
+ background-image: url(../images/BackWPup20.png);
4
+ background-repeat: no-repeat;
5
+ position: relative;
6
+ /* for WP lower 3.3 */
7
+ float: left;
8
+ width: 20px;
9
+ height: 20px;
10
+ margin-top: 3px;
11
+ margin-right:5px;
12
+ background-position:top center;
13
+ }
14
+ #wp-admin-bar-backwpup.menupop.hover > .ab-item .ab-icon,
15
+ #wp-admin-bar-backwpup.menupop.hover > a > span .ab-icon:hover {
16
+ background-image: url(../images/BackWPup20.png);
17
+ background-repeat: no-repeat;
18
+ background-position:bottom center;
19
+ }
20
+ #wp-admin-bar-backwpup .blink {
21
+ -webkit-animation: blink .75s linear infinite;
22
+ -moz-animation: blink .75s linear infinite;
23
+ -ms-animation: blink .75s linear infinite;
24
+ -o-animation: blink .75s linear infinite;
25
+ animation: blink .75s linear infinite;
26
+ }
27
+
28
+ @-webkit-keyframes blink {
29
+ 0% {
30
+ opacity: 1;
31
+ }
32
+ 50% {
33
+ opacity: 1;
34
+ }
35
+ 50.01% {
36
+ opacity: 0;
37
+ }
38
+ 100% {
39
+ opacity: 0;
40
+ }
41
+ }
42
+
43
+ @-moz-keyframes blink {
44
+ 0% {
45
+ opacity: 1;
46
+ }
47
+ 50% {
48
+ opacity: 1;
49
+ }
50
+ 50.01% {
51
+ opacity: 0;
52
+ }
53
+ 100% {
54
+ opacity: 0;
55
+ }
56
+ }
57
+
58
+ @-ms-keyframes blink {
59
+ 0% { opacity: 1; }
60
+ 50% { opacity: 1; }
61
+ 50.01% { opacity: 0; }
62
+ 100% { opacity: 0; }
63
+ }
64
+
65
+ @-o-keyframes blink {
66
+ 0% {
67
+ opacity: 1;
68
+ }
69
+ 50% {
70
+ opacity: 1;
71
+ }
72
+ 50.01% {
73
+ opacity: 0;
74
+ }
75
+ 100% {
76
+ opacity: 0;
77
+ }
78
+ }
79
+
80
+ @keyframes blink {
81
+ 0% {
82
+ opacity: 1;
83
+ }
84
+ 50% {
85
+ opacity: 1;
86
+ }
87
+ 50.01% {
88
+ opacity: 0;
89
+ }
90
+ 100% {
91
+ opacity: 0;
92
+ }
93
+ }
94
+
95
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
96
+ #wp-admin-bar-backwpup.menupop > .ab-item .ab-icon,
97
+ #wp-admin-bar-backwpup.menupop > a > span .ab-icon {
98
+ background-image: url(../images/BackWPup20_2x.png);
99
+ background-repeat: no-repeat;
100
+ background-size: 20px 40px;
101
+ background-position:top center;
102
+ position: relative;
103
+ }
104
+ #wp-admin-bar-backwpup.menupop.hover > .ab-item .ab-icon,
105
+ #wp-admin-bar-backwpup.menupop.hover > a > span .ab-icon:hover {
106
+ background-image: url(../images/BackWPup20_2x.png);
107
+ background-repeat: no-repeat;
108
+ background-position:bottom center;
109
+ }
110
+ }
css/backwpup.css DELETED
@@ -1,12 +0,0 @@
1
- #icon-backwpup {
2
- background: url('BackWPup32.png') no-repeat;
3
- }
4
- .column-id {
5
- width:5%;text-align:center;
6
- }
7
- .column-last, .column-next , .column-type {
8
- width:15%;
9
- }
10
- .column-info {
11
- width:20%;
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
css/backwpupbackups.css DELETED
@@ -1,6 +0,0 @@
1
- #icon-backwpup {
2
- background: url('BackWPup32.png') no-repeat;
3
- }
4
- .column-size, .column-time {
5
- width:10%;
6
- }
 
 
 
 
 
 
css/backwpupeditjob.css DELETED
@@ -1,48 +0,0 @@
1
- #icon-backwpup {
2
- background: url('BackWPup32.png') no-repeat;
3
- }
4
-
5
- #cron-min, #cron-hour, #cron-day, #cron-month, #cron-weekday {
6
- overflow:auto;
7
- white-space:nowrap;
8
- height:7em;
9
- }
10
- #cron-min-box , #cron-hour-box, #cron-day-box, #cron-month-box, #cron-weekday-box {
11
- border-color:#CEE1EF;
12
- border-style:solid;
13
- border-width:2px;
14
- margin:5px 0px 5px 5px;
15
- padding:2px 2px;
16
- width:85px;
17
- float:left;
18
- }
19
- #dbtables {
20
- border-color:#CEE1EF;
21
- border-style:solid;
22
- border-width:2px;
23
- height:10em;
24
- margin:3px 15px 3px 15px;
25
- overflow:auto;
26
- padding:0.5em 0.5em;
27
- white-space:nowrap;
28
- }
29
- .dests {
30
- float:left;
31
- width:80%;
32
- }
33
- .destlinks {
34
- font-style:italic;
35
- letter-spacing:1px;
36
- font-weight:bold;
37
- line-height:20px;
38
- white-space:nowrap;
39
- }
40
- #cron-text {
41
- line-height:20px;
42
- color:#804000;
43
- }
44
- #schedbasic {
45
- border-color:#CEE1EF;
46
- border-style:solid;
47
- border-width:2px;
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/backwpuplogs.css DELETED
@@ -1,12 +0,0 @@
1
- #icon-backwpup {
2
- background: url('BackWPup32.png') no-repeat;
3
- }
4
- .column-id {
5
- width:5%;text-align:center;
6
- }
7
- .column-runtime, .column-status , .column-size {
8
- width:8%;
9
- }
10
- .column-type {
11
- width:15%;
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
css/backwpupsettings.css DELETED
@@ -1,3 +0,0 @@
1
- #icon-backwpup {
2
- background: url('BackWPup32.png') no-repeat;
3
- }
 
 
 
css/backwpuptools.css DELETED
@@ -1,3 +0,0 @@
1
- #icon-backwpup {
2
- background: url('BackWPup32.png') no-repeat;
3
- }
 
 
 
css/backwpupworking.css DELETED
@@ -1,72 +0,0 @@
1
- #icon-backwpup {
2
- background: url('BackWPup32.png') no-repeat;
3
- }
4
- #showworking, #showlogfile{
5
- background-color:black;
6
- color:white;
7
- font-family:fixedsys, monospace, Courier, monospace;
8
- line-height: 15px;
9
- font-size:12px;
10
- border-color:#CEE1EF;
11
- border-style:solid;
12
- border-width:5px;
13
- height:480px;
14
- width:800px;
15
- padding:2px 2px 2px 2px;
16
- overflow:auto;
17
- white-space:nowrap;
18
- float:left;
19
- }
20
- .timestamp {
21
- background-color:darkgrey;
22
- }
23
- .warning {
24
- background-color:tan;
25
- }
26
- .error {
27
- background-color:red;
28
- }
29
- #warningsid {
30
- margin-left:10px;
31
- margin-bottom:5px;
32
- color:yellow;
33
- font-size:20px;
34
- }
35
- #errorid {
36
- margin-left:10px;
37
- margin-bottom:5px;
38
- color:red;
39
- font-size:20px;
40
- }
41
- .progressbar {
42
- margin-top:10px;
43
- border-color:#CEE1EF;
44
- border-style:solid;
45
- border-width:2px;
46
- height:20px;
47
- width:800px;
48
- -moz-border-radius: 3px;
49
- -webkit-border-radius: 3px;
50
- -khtml-border-radius: 3px;
51
- border-radius: 3px;
52
- }
53
- #progressstep {
54
- height:20px;
55
- background-color:gray;
56
- color:black;
57
- text-align:center;
58
- -moz-border-radius: 3px;
59
- -webkit-border-radius: 3px;
60
- -khtml-border-radius: 3px;
61
- border-radius: 3px;
62
- }
63
- #progresssteps {
64
- height:20px;
65
- background-color:yellow;
66
- color:black;
67
- text-align:center;
68
- -moz-border-radius: 3px;
69
- -webkit-border-radius: 3px;
70
- -khtml-border-radius: 3px;
71
- border-radius: 3px;
72
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/general.css ADDED
@@ -0,0 +1 @@
 
1
+ #icon-backwpup{background:url('../images/BackWPup32.png') no-repeat}@media only screen and (-webkit-min-device-pixel-ratio:2){#icon-backwpup{background:url('../images/BackWPup64.png') no-repeat;-webkit-background-size:32px 32px;background-size:32px 32px}}img.help_tip{padding:0;margin:-4px 0 0 5px;vertical-align:middle;cursor:help;line-height:1}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_left{padding-right:5px}#tiptip_content{font-size:11px;color:#fff;text-shadow:0 0 2px #000;padding:4px 8px;border:1px solid rgba(255,255,255,0.25);background-color:#191919;background-color:rgba(25,25,25,0.92);background-image:-webkit-gradient(linear,0% 0,0% 100%,from(transparent),to(#000));border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;box-shadow:0 0 3px #555;-webkit-box-shadow:0 0 3px #555;-moz-box-shadow:0 0 3px #555}#tiptip_content code{background:#1d94cf;color:#fff;text-shadow:none;padding:2px;font-size:12px}#tiptip_content a{color:#0CF}#tiptip_content a:hover{color:#F93}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border:6px solid transparent;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow{border-top-color:#fff;border-top-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_bottom #tiptip_arrow{border-bottom-color:#fff;border-bottom-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_right #tiptip_arrow{border-right-color:#fff;border-right-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_left #tiptip_arrow{border-left-color:#fff;border-left-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}@media screen and (-webkit-min-device-pixel-ratio:0){#tiptip_content{padding:4px 8px 5px 8px;background-color:rgba(45,45,45,0.88)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:rgba(45,45,45,0.88)}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:rgba(20,20,20,0.92)}}.backwpup-welcome{font-family:sans-serif,"Arial";font-size:14px;position:relative;margin-bottom:50px}.backwpup-welcome p{line-height:28px;font-size:16px}.backwpup-welcome h3{font-family:sans-serif,"Arial";font-size:44px;font-weight:normal;color:#333;line-height:44px;margin:20px 0}.wizardbox{float:left;width:200px;margin:25px 25px 25px 0;padding:15px;height:200px;font-family:sans-serif,"Arial";font-size:14px;line-height:22px;position:relative;color:#fff;background:#1d94cf url(../images/hgbox.png) no-repeat right bottom}.wizardbox:hover{background-color:#0f79ae}.wizardbox input.button-primary-bwp{float:left;padding:5px 10px;font-size:14px;font-family:sans-serif,"Arial";text-decoration:none;background-color:#38b0eb;color:#fff;border:0;cursor:pointer}.wizardbox input.button-primary-bwp:hover{background-color:#064565;cursor:pointer}.wizardbox .wizardbox_name{font-size:22px;font-family:sans-serif,"Arial";margin-bottom:30px}.wizardbox .wizardbox_start{position:absolute;bottom:10px;left:10px}.wizardbox select{width:200px}.inpsyde{width:79px;height:119px;background:url(../images/inpsyde.png) no-repeat;position:absolute;top:0;right:10px;z-index:1}.inpsyde a{float:left;font-size:14px;color:#fff;text-decoration:none;padding:65px 15px 15px 15px;text-align:center}.ip_logo{background-image:url(../images/iplogo.png);background-repeat:no-repeat;padding-left:30px;height:25px;float:left;margin-right:15px!important}#documentation_content p{font-size:14px;line-height:20px;color:#333}#documentation_content h3{padding:7px 0;font-size:22px}#documentation_content h4{padding:7px 0;font-size:18px}#documentation_content img.size-full{border:10px #f6f6f6 solid}
css/general.dev.css ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #icon-backwpup {
2
+ background: url('../images/BackWPup32.png') no-repeat;
3
+ }
4
+
5
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
6
+ #icon-backwpup {
7
+ background: url('../images/BackWPup64.png') no-repeat;
8
+ -webkit-background-size: 32px 32px;
9
+ background-size: 32px 32px;
10
+ }
11
+ }
12
+
13
+ img.help_tip {
14
+ padding: 0;
15
+ margin: -4px 0 0 5px;
16
+ vertical-align: middle;
17
+ cursor: help;
18
+ line-height: 1;
19
+ }
20
+
21
+ /* TipTip CSS - Version 1.3 */
22
+
23
+ #tiptip_holder {
24
+ display: none;
25
+ position: absolute;
26
+ top: 0;
27
+ left: 0;
28
+ z-index: 99999;
29
+ }
30
+
31
+ #tiptip_holder.tip_top {
32
+ padding-bottom: 5px;
33
+ }
34
+
35
+ #tiptip_holder.tip_bottom {
36
+ padding-top: 5px;
37
+ }
38
+
39
+ #tiptip_holder.tip_right {
40
+ padding-left: 5px;
41
+ }
42
+
43
+ #tiptip_holder.tip_left {
44
+ padding-right: 5px;
45
+ }
46
+
47
+ #tiptip_content {
48
+ font-size: 11px;
49
+ color: #fff;
50
+ text-shadow: 0 0 2px #000;
51
+ padding: 4px 8px;
52
+ border: 1px solid rgba(255, 255, 255, 0.25);
53
+ background-color: rgb(25, 25, 25);
54
+ background-color: rgba(25, 25, 25, 0.92);
55
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
56
+ border-radius: 3px;
57
+ -webkit-border-radius: 3px;
58
+ -moz-border-radius: 3px;
59
+ box-shadow: 0 0 3px #555;
60
+ -webkit-box-shadow: 0 0 3px #555;
61
+ -moz-box-shadow: 0 0 3px #555;
62
+ }
63
+ #tiptip_content code {
64
+ background:#1d94cf;
65
+ color:#fff;
66
+ text-shadow:none;
67
+ padding:2px;
68
+ font-size:12px;
69
+ }
70
+ #tiptip_content a{
71
+ color: #0CF;
72
+ }
73
+ #tiptip_content a:hover{
74
+ color: #F93;
75
+ }
76
+ #tiptip_arrow, #tiptip_arrow_inner {
77
+ position: absolute;
78
+ border: 6px solid transparent;
79
+ height: 0;
80
+ width: 0;
81
+ }
82
+
83
+ #tiptip_holder.tip_top #tiptip_arrow {
84
+ border-top-color: #fff;
85
+ border-top-color: rgba(255, 255, 255, 0.35);
86
+ }
87
+
88
+ #tiptip_holder.tip_bottom #tiptip_arrow {
89
+ border-bottom-color: #fff;
90
+ border-bottom-color: rgba(255, 255, 255, 0.35);
91
+ }
92
+
93
+ #tiptip_holder.tip_right #tiptip_arrow {
94
+ border-right-color: #fff;
95
+ border-right-color: rgba(255, 255, 255, 0.35);
96
+ }
97
+
98
+ #tiptip_holder.tip_left #tiptip_arrow {
99
+ border-left-color: #fff;
100
+ border-left-color: rgba(255, 255, 255, 0.35);
101
+ }
102
+
103
+ #tiptip_holder.tip_top #tiptip_arrow_inner {
104
+ margin-top: -7px;
105
+ margin-left: -6px;
106
+ border-top-color: rgb(25, 25, 25);
107
+ border-top-color: rgba(25, 25, 25, 0.92);
108
+ }
109
+
110
+ #tiptip_holder.tip_bottom #tiptip_arrow_inner {
111
+ margin-top: -5px;
112
+ margin-left: -6px;
113
+ border-bottom-color: rgb(25, 25, 25);
114
+ border-bottom-color: rgba(25, 25, 25, 0.92);
115
+ }
116
+
117
+ #tiptip_holder.tip_right #tiptip_arrow_inner {
118
+ margin-top: -6px;
119
+ margin-left: -5px;
120
+ border-right-color: rgb(25, 25, 25);
121
+ border-right-color: rgba(25, 25, 25, 0.92);
122
+ }
123
+
124
+ #tiptip_holder.tip_left #tiptip_arrow_inner {
125
+ margin-top: -6px;
126
+ margin-left: -7px;
127
+ border-left-color: rgb(25, 25, 25);
128
+ border-left-color: rgba(25, 25, 25, 0.92);
129
+ }
130
+
131
+ /* Webkit Hacks */
132
+ @media screen and (-webkit-min-device-pixel-ratio:0) {
133
+ #tiptip_content {
134
+ padding: 4px 8px 5px 8px;
135
+ background-color: rgba(45, 45, 45, 0.88);
136
+ }
137
+
138
+ #tiptip_holder.tip_bottom #tiptip_arrow_inner {
139
+ border-bottom-color: rgba(45, 45, 45, 0.88);
140
+ }
141
+
142
+ #tiptip_holder.tip_top #tiptip_arrow_inner {
143
+ border-top-color: rgba(20, 20, 20, 0.92);
144
+ }
145
+ }
146
+ /* Dashboard Design */
147
+ .backwpup-welcome {
148
+ font-family: sans-serif,"Arial";
149
+ font-size:14px;
150
+ position:relative;
151
+ }
152
+ .backwpup-welcome p{
153
+ line-height:28px;
154
+ font-size:16px;
155
+ }
156
+ .backwpup-welcome h3{
157
+ font-family: sans-serif,"Arial";
158
+ font-size:44px;
159
+ font-weight:normal;
160
+ color:#333;
161
+ line-height:44px;
162
+ margin:20px 0;
163
+ }
164
+ .wizardbox {
165
+ float: left;
166
+ width: 200px;
167
+ margin:25px 25px 25px 0px;
168
+ padding: 15px;
169
+ height: 200px;
170
+ font-family: sans-serif,"Arial";
171
+ font-size:14px;
172
+ line-height:22px;
173
+ position:relative;
174
+ color:#fff;
175
+ background: #1d94cf url(../images/hgbox.png) no-repeat right bottom;
176
+ }
177
+ .wizardbox:hover {
178
+ background-color: #0f79ae;
179
+ }
180
+ .wizardbox input.button-primary-bwp {
181
+ float:left;
182
+ padding:5px 10px;
183
+ font-size:14px;
184
+ font-family: sans-serif,"Arial";
185
+ text-decoration:none;
186
+ background-color:#38b0eb;
187
+ color:#fff;
188
+ border:none;
189
+ cursor:pointer;
190
+ }
191
+ .wizardbox input.button-primary-bwp:hover {
192
+ background-color:#064565;
193
+ cursor:pointer;
194
+ }
195
+ .wizardbox .wizardbox_name {
196
+ font-size:22px;
197
+ font-family: sans-serif,"Arial";
198
+ margin-bottom:30px;
199
+ }
200
+ .wizardbox .wizardbox_start {
201
+ position:absolute;
202
+ bottom:10px;
203
+ left:10px;
204
+ }
205
+ .wizardbox select{
206
+ width:200px;
207
+ }
208
+ .inpsyde {
209
+ width:79px;
210
+ height:119px;
211
+ background: url(../images/inpsyde.png) no-repeat;
212
+ position:absolute;
213
+ top:0;
214
+ right:10px;
215
+ z-index: 1;
216
+ }
217
+ .inpsyde a{
218
+ float:left;
219
+ font-size:14px;
220
+ color:#fff;
221
+ text-decoration:none;
222
+ padding:65px 15px 15px 15px;
223
+ text-align:center;
224
+ }
225
+
226
+ .ip_logo {
227
+ background-image:url(../images/iplogo.png);
228
+ background-repeat:no-repeat;
229
+ padding-left:30px;
230
+ height:25px;
231
+ float:left;
232
+ margin-right:15px !important;
233
+ }
234
+
235
+ /* DOKU */
236
+ #documentation_content p{
237
+ font-size:14px;
238
+ line-height:20px;
239
+ color:#333;
240
+ }
241
+ #documentation_content h3{
242
+ padding:7px 0;
243
+ font-size:22px;
244
+ }
245
+ #documentation_content h4{
246
+ padding:7px 0;
247
+ font-size:18px;
248
+ }
249
+ #documentation_content img.size-full {
250
+ border:10px #f6f6f6 solid;
251
+ }
css/page_about.css ADDED
@@ -0,0 +1 @@
 
1
+ .welcome{float:left;font-family:sans-serif,"Arial",sans-serif;max-width:1050px}.welcome .welcome_inner{margin:0 auto;width:100%}.welcome .welcome_inner h3{font-size:42px}.welcome .welcome_inner .welcometxt{float:left;width:100%;margin-bottom:25px;border-bottom:1px #ccc dotted;text-align:center}.welcome .welcome_inner .welcometxt p{line-height:20px;font-size:18px}.welcome .welcome_inner .welcometxt .backwpup-welcome .banner{margin:0 auto;background:url(../images/backwpupbanner-free.png) no-repeat top center;width:637px;height:294px}.welcome .welcome_inner .welcometxt .backwpup-welcome .banner-pro{margin:0 auto;background:url(../images/backwpupbanner-pro.png) no-repeat top center;width:637px;height:294px}.welcome .welcome_inner .feature_box{float:left;width:100%;margin-bottom:15px}.welcome .welcome_inner .feature_box .feature_image.alignleft{width:18%;height:auto;margin-right:1%;margin-left:2%}.welcome .welcome_inner .feature_box .feature_image.alignright{width:18%;height:auto;margin-right:2%;margin-left:1%}.welcome .welcome_inner .feature_box .feature_image img{width:100%;height:auto;max-width:350px}.welcome .welcome_inner .feature_box .feature_text{width:72%;font-size:18px;line-height:32px;margin:0 0 20px 0}.welcome .welcome_inner .feature_box .feature_text h3{color:#009bcc;font-weight:normal;font-size:24px;margin:0 0 10px 0;text-align:left}.welcome .welcome_inner .feature_box .left{float:left}.welcome .welcome_inner .feature_box .right{float:right}.welcome .welcome_inner .featuretitle h3{font-size:28px;font-weight:normal;text-align:left;margin-bottom:25px}.welcome .button-primary-bwp{float:left;padding:15px;font-size:18px;font-family:sans-serif,"Arial",sans-serif;text-decoration:none;background-color:#38b0eb;color:#fff;border:0;cursor:pointer;margin:35px 0}.welcome .button-primary-bwp:hover{background-color:#064565;cursor:pointer}@media only screen and (max-width:1100px),only screen and (max-device-width:1100px){.welcome .welcome_inner h3{font-size:32px}.welcome .welcome_inner .featuretitle h3{font-size:22px;font-weight:normal;text-align:left;margin-bottom:25px}.welcome .welcome_inner .welcometxt p{line-height:20px;font-size:14px}.welcome .welcome_inner .feature_box .feature_text h3{font-weight:normal;font-size:20px;margin:0 0 10px 0;text-align:left}.welcome .welcome_inner .feature_box .feature_text{width:72%;font-size:14px;line-height:20px}.welcome .button-primary-bwp{float:left;padding:10px;font-size:16px;font-family:"Arial",sans-serif;text-decoration:none;background-color:#38b0eb;color:#fff;border:0;cursor:pointer;margin:35px 0}}@media only screen and (max-width:780px),only screen and (max-device-width:780px){.welcome .welcome_inner h3{font-size:22px}.welcome .welcome_inner .featuretitle h3{font-size:22px;font-weight:normal;text-align:left}.welcome .welcome_inner .welcometxt p{line-height:20px;font-size:14px}.welcome .welcome_inner .feature_box .feature_text h3{font-weight:normal;font-size:16px;margin:0 0 10px 0}.welcome .welcome_inner .feature_box .feature_text{width:72%;font-size:12px;line-height:16px;text-align:left}.welcome .button-primary-bwp{float:left;padding:10px;font-size:16px;font-family:"Arial",sans-serif;text-decoration:none;background-color:#38b0eb;color:#fff;border:0;cursor:pointer;margin:35px 0}}.backwpup_comp{margin:20px auto;width:100%;font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-size:16px}.backwpup_comp table{border:0}.backwpup_comp table tbody tr.even td{border:0;background:0;padding:15px;margin:0}.backwpup_comp table tbody tr.odd td{border:0;background:0;padding:15px;margin:0}.backwpup_comp h3{font-family:"Arial",sans-serif;font-size:42px;text-align:center;font-weight:normal;color:#333;line-height:44px;margin:20px 0}.backwpup_comp table tbody tr.ub{font-family:'MisoRegular',"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-size:26px}.backwpup_comp table tbody tr.ubdown{font-family:'MisoRegular',"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;font-size:26px;background:none!important}.backwpup_comp table tbody tr.even{background-image:url(../images/even.png)}.backwpup_comp table tbody tr.odd{background-image:url(../images/odd.png)}.backwpup_comp table tbody tr.ub td.pro{height:50px;text-align:center;background:url(../images/hgtopgreen.png) no-repeat bottom center;color:#fff;border-left:1px solid #112a32}.backwpup_comp table tbody tr.ub td.free{height:50px;text-align:center;background:url(../images/hgtopgreen.png) no-repeat bottom center;color:#fff}.backwpup_comp table tbody tr.ubdown td.pro{height:50px;text-align:center;background:url(../images/hgbtgreen.png) no-repeat top center;color:#fff;border-left:1px solid #1c3e49}.backwpup_comp table tbody tr.ubdown td.pro a{color:#fff;text-decoration:none;cursor:auto;font-weight:300;line-height:1.4em;font-size:18px}.backwpup_comp table tbody tr.ubdown td.free{height:50px;text-align:center;background:url(../images/hgbtred.png) no-repeat top center;color:#fff}.backwpup_comp table tbody tr.ubdown td.free a{color:#fff}.backwpup_comp table tbody tr.even td.tick{width:100px;background:url(../images/tickeven.png) no-repeat center;border-bottom:1px solid #799e14;border-top:1px solid #a2d123;border-left:1px solid #799e14}.backwpup_comp table tbody tr.odd td.tick{width:100px;background:url(../images/tickodd.png) no-repeat center;border-left:1px solid #799e14}.backwpup_comp table tbody tr.even td.error{width:100px;background:url(../images/erroreven.png) no-repeat center;border-bottom:1px solid #b13020;border-top:1px solid #e84936}.backwpup_comp table tbody tr.odd td.error{width:100px;background:url(../images/errorodd.png) no-repeat center}.backwpup_comp table tbody tr.even:hover{background-image:url(../images/hover.png)}.backwpup_comp table tbody tr.odd:hover{background-image:url(../images/hover.png)}.backwpup_comp table tbody tr.even:hover td.tick{background:url(../images/tickhover.png) center}.backwpup_comp table tbody tr.odd:hover td.tick{background:url(../images/tickhover.png) center}.backwpup_comp table tbody tr.even:hover td.error{background:url(../images/errorhover.png) center}.backwpup_comp table tbody tr.odd:hover td.error{background:url(../images/errorhover.png) center}.backwpup_comp table tbody tr.ubdown:hover td.pro:hover{background:url(../images/hgbtgreenhover.png) no-repeat top center}.backwpup_comp table tbody tr.ubdown:hover td.free:hover{background:url(../images/hgbtredhover.png) no-repeat top center}
css/page_about.dev.css ADDED
@@ -0,0 +1,330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .welcome {
2
+ float:left;
3
+ font-family: sans-serif,"Arial",sans-serif;
4
+ max-width:1050px;
5
+ }
6
+ .welcome .welcome_inner {
7
+ margin:0 auto;
8
+ width:100%;
9
+ }
10
+ .welcome .welcome_inner h3{
11
+ font-size:42px;
12
+ }
13
+ .welcome .welcome_inner .welcometxt {
14
+ float:left;
15
+ width:100%;
16
+ margin-bottom:25px;
17
+ border-bottom:1px #ccc dotted;
18
+ text-align:center;
19
+ }
20
+ .welcome .welcome_inner .welcometxt p{
21
+ line-height:20px;
22
+ font-size:18px;
23
+ }
24
+ .welcome .welcome_inner .welcometxt .backwpup-welcome .banner{
25
+ margin:0 auto;
26
+ background: url(../images/backwpupbanner-free.png) no-repeat top center;
27
+ width:637px;
28
+ height:294px;
29
+ }
30
+
31
+ .welcome .welcome_inner .welcometxt .backwpup-welcome .banner-pro {
32
+ margin:0 auto;
33
+ background: url(../images/backwpupbanner-pro.png) no-repeat top center;
34
+ width:637px;
35
+ height:294px;
36
+ }
37
+
38
+ .welcome .welcome_inner .feature_box{
39
+ float:left;
40
+ width:100%;
41
+ margin-bottom:15px;
42
+ }
43
+ .welcome .welcome_inner .feature_box .feature_image.alignleft{
44
+ width:18%;
45
+ height:auto;
46
+ margin-right:1%;
47
+ margin-left:2%;
48
+ }
49
+ .welcome .welcome_inner .feature_box .feature_image.alignright{
50
+ width:18%;
51
+ height:auto;
52
+ margin-right:2%;
53
+ margin-left:1%;
54
+ }
55
+ .welcome .welcome_inner .feature_box .feature_image img{
56
+ width:100%;
57
+ height:auto;
58
+ max-width:350px;
59
+ }
60
+ .welcome .welcome_inner .feature_box .feature_text{
61
+ width:72%;
62
+ font-size:18px;
63
+ line-height:32px;
64
+ margin:0 0 20px 0;
65
+ }
66
+ .welcome .welcome_inner .feature_box .feature_text h3{
67
+ color:rgb(0, 155, 204);
68
+ font-weight:normal;
69
+ font-size:24px;
70
+ margin:0 0 10px 0;
71
+ text-align:left;
72
+ }
73
+ .welcome .welcome_inner .feature_box .left {
74
+ float:left;
75
+ }
76
+ .welcome .welcome_inner .feature_box .right {
77
+ float:right;
78
+ }
79
+ .welcome .welcome_inner .featuretitle h3 {
80
+ font-size:28px;
81
+ font-weight:normal;
82
+ text-align:left;
83
+ margin-bottom:25px;
84
+ }
85
+ .welcome .button-primary-bwp {
86
+ float:left;
87
+ padding:15px;
88
+ font-size:18px;
89
+ font-family: sans-serif,"Arial",sans-serif;
90
+ text-decoration:none;
91
+ background-color:#38b0eb;
92
+ color:#fff;
93
+ border:none;
94
+ cursor:pointer;
95
+ margin: 35px 0;
96
+ }
97
+ .welcome .button-primary-bwp:hover {
98
+ background-color:#064565;
99
+ cursor:pointer;
100
+ }
101
+ @media only screen and (max-width: 1100px), only screen and (max-device-width: 1100px) {
102
+ .welcome .welcome_inner h3{
103
+ font-size:32px;
104
+ }
105
+ .welcome .welcome_inner .featuretitle h3 {
106
+ font-size:22px;
107
+ font-weight:normal;
108
+ text-align:left;
109
+ margin-bottom:25px;
110
+ }
111
+ .welcome .welcome_inner .welcometxt p{
112
+ line-height:20px;
113
+ font-size:14px;
114
+ }
115
+ .welcome .welcome_inner .feature_box .feature_text h3{
116
+ font-weight:normal;
117
+ font-size:20px;
118
+ margin:0 0 10px 0;
119
+ text-align:left;
120
+ }
121
+ .welcome .welcome_inner .feature_box .feature_text{
122
+ width:72%;
123
+ font-size:14px;
124
+ line-height:20px;
125
+ }
126
+ .welcome .button-primary-bwp {
127
+ float:left;
128
+ padding:10px;
129
+ font-size:16px;
130
+ font-family: "Arial", sans-serif;
131
+ text-decoration:none;
132
+ background-color:#38b0eb;
133
+ color:#fff;
134
+ border:none;
135
+ cursor:pointer;
136
+ margin: 35px 0;
137
+ }
138
+ }
139
+ @media only screen and (max-width: 780px), only screen and (max-device-width: 780px) {
140
+ .welcome .welcome_inner h3{
141
+ font-size:22px;
142
+ }
143
+ .welcome .welcome_inner .featuretitle h3 {
144
+ font-size:22px;
145
+ font-weight:normal;
146
+ text-align:left;
147
+ }
148
+ .welcome .welcome_inner .welcometxt p{
149
+ line-height:20px;
150
+ font-size:14px;
151
+ }
152
+ .welcome .welcome_inner .feature_box .feature_text h3{
153
+ font-weight:normal;
154
+ font-size:16px;
155
+ margin:0 0 10px 0;
156
+ }
157
+ .welcome .welcome_inner .feature_box .feature_text{
158
+ width:72%;
159
+ font-size:12px;
160
+ line-height:16px;
161
+ text-align:left;
162
+ }
163
+ .welcome .button-primary-bwp {
164
+ float:left;
165
+ padding:10px;
166
+ font-size:16px;
167
+ font-family: "Arial", sans-serif;
168
+ text-decoration:none;
169
+ background-color:#38b0eb;
170
+ color:#fff;
171
+ border:none;
172
+ cursor:pointer;
173
+ margin: 35px 0;
174
+ }
175
+ }
176
+
177
+ .backwpup_comp {
178
+ margin: 20px auto;
179
+ width: 100%;
180
+ font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
181
+ font-size: 16px;
182
+ }
183
+
184
+ .backwpup_comp table {
185
+ border: none;
186
+ }
187
+
188
+ .backwpup_comp table tbody tr.even td {
189
+ border: none;
190
+ background: none;
191
+ padding: 15px;
192
+ margin: 0;
193
+ }
194
+
195
+ .backwpup_comp table tbody tr.odd td {
196
+ border: none;
197
+ background: none;
198
+ padding: 15px;
199
+ margin: 0;
200
+ }
201
+
202
+ .backwpup_comp h3 {
203
+ font-family: "Arial", sans-serif;
204
+ font-size: 42px;
205
+ text-align: center;
206
+ font-weight: normal;
207
+ color: #333;
208
+ line-height: 44px;
209
+ margin: 20px 0;
210
+ }
211
+
212
+ .backwpup_comp table tbody tr.ub {
213
+ font-family: 'MisoRegular', "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
214
+ font-size: 26px;
215
+ }
216
+
217
+ .backwpup_comp table tbody tr.ubdown {
218
+ font-family: 'MisoRegular', "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
219
+ font-size: 26px;
220
+ background: none !important;
221
+ }
222
+
223
+ .backwpup_comp table tbody tr.even {
224
+ background-image: url(../images/even.png);
225
+ }
226
+
227
+ .backwpup_comp table tbody tr.odd {
228
+ background-image: url(../images/odd.png);
229
+ }
230
+
231
+ .backwpup_comp table tbody tr.ub td.pro {
232
+ height: 50px;
233
+ text-align: center;
234
+ background: url(../images/hgtopgreen.png) no-repeat bottom center;
235
+ color: #fff;
236
+ border-left: 1px solid #112a32;
237
+ }
238
+
239
+ .backwpup_comp table tbody tr.ub td.free {
240
+ height: 50px;
241
+ text-align: center;
242
+ background: url(../images/hgtopgreen.png) no-repeat bottom center;
243
+ color: #fff;
244
+ }
245
+
246
+ .backwpup_comp table tbody tr.ubdown td.pro {
247
+ height: 50px;
248
+ text-align: center;
249
+ background: url(../images/hgbtgreen.png) no-repeat top center;
250
+ color: #fff;
251
+ border-left: 1px solid #1c3e49;
252
+ }
253
+
254
+ .backwpup_comp table tbody tr.ubdown td.pro a {
255
+ color: #fff;
256
+ text-decoration: none;
257
+ cursor: auto;
258
+ font-weight: 300;
259
+ line-height: 1.4em;
260
+ font-size: 18px;
261
+ }
262
+
263
+ .backwpup_comp table tbody tr.ubdown td.free {
264
+ height: 50px;
265
+ text-align: center;
266
+ background: url(../images/hgbtred.png) no-repeat top center;
267
+ color: #fff;
268
+ }
269
+
270
+ .backwpup_comp table tbody tr.ubdown td.free a {
271
+ color: #fff;
272
+ }
273
+
274
+ .backwpup_comp table tbody tr.even td.tick {
275
+ width: 100px;
276
+ background: url(../images/tickeven.png) no-repeat center;
277
+ border-bottom: 1px solid #799e14;
278
+ border-top: 1px solid #a2d123;
279
+ border-left: 1px solid #799e14;
280
+ }
281
+
282
+ .backwpup_comp table tbody tr.odd td.tick {
283
+ width: 100px;
284
+ background: url(../images/tickodd.png) no-repeat center;
285
+ border-left: 1px solid #799e14;
286
+ }
287
+
288
+ .backwpup_comp table tbody tr.even td.error {
289
+ width: 100px;
290
+ background: url(../images/erroreven.png) no-repeat center;
291
+ border-bottom: 1px solid #b13020;
292
+ border-top: 1px solid #e84936;
293
+ }
294
+
295
+ .backwpup_comp table tbody tr.odd td.error {
296
+ width: 100px;
297
+ background: url(../images/errorodd.png) no-repeat center;
298
+ }
299
+
300
+ .backwpup_comp table tbody tr.even:hover {
301
+ background-image: url(../images/hover.png);
302
+ }
303
+
304
+ .backwpup_comp table tbody tr.odd:hover {
305
+ background-image: url(../images/hover.png);
306
+ }
307
+
308
+ .backwpup_comp table tbody tr.even:hover td.tick {
309
+ background: url(../images/tickhover.png) center;
310
+ }
311
+
312
+ .backwpup_comp table tbody tr.odd:hover td.tick {
313
+ background: url(../images/tickhover.png) center;
314
+ }
315
+
316
+ .backwpup_comp table tbody tr.even:hover td.error {
317
+ background: url(../images/errorhover.png) center;
318
+ }
319
+
320
+ .backwpup_comp table tbody tr.odd:hover td.error {
321
+ background: url(../images/errorhover.png) center;
322
+ }
323
+
324
+ .backwpup_comp table tbody tr.ubdown:hover td.pro:hover {
325
+ background: url(../images/hgbtgreenhover.png) no-repeat top center;
326
+ }
327
+
328
+ .backwpup_comp table tbody tr.ubdown:hover td.free:hover {
329
+ background: url(../images/hgbtredhover.png) no-repeat top center;
330
+ }
css/page_edit_tab_cron.css ADDED
@@ -0,0 +1 @@
 
1
+ #cron-min,#cron-hour,#cron-day,#cron-month,#cron-weekday{overflow:auto;white-space:nowrap;height:7em}#cron-min-box,#cron-hour-box,#cron-day-box,#cron-month-box,#cron-weekday-box{border-color:gray;border-style:solid;border-width:1px;margin:10px 0 10px 10px;padding:2px 2px;width:100px;float:left}#wpcronbasic{border-collapse:collapse}#wpcronbasic th,#wpcronbasic td{width:80px;border-bottom:1px solid gray}
css/page_edit_tab_cron.dev.css ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #cron-min, #cron-hour, #cron-day, #cron-month, #cron-weekday {
2
+ overflow: auto;
3
+ white-space: nowrap;
4
+ height: 7em;
5
+ }
6
+ #cron-min-box, #cron-hour-box, #cron-day-box, #cron-month-box, #cron-weekday-box {
7
+ border-color: gray;
8
+ border-style: solid;
9
+ border-width: 1px;
10
+ margin: 10px 0px 10px 10px;
11
+ padding: 2px 2px;
12
+ width: 100px;
13
+ float: left;
14
+ }
15
+ #wpcronbasic {
16
+ border-collapse: collapse;
17
+ }
18
+ #wpcronbasic th, #wpcronbasic td {
19
+ width:80px;
20
+ border-bottom: 1px solid gray;
21
+ }
css/page_jobs.css ADDED
@@ -0,0 +1 @@
 
1
+ .column-id{width:3%;text-align:center}.column-last,.column-next,.column-type,.column-dest{width:15%}#showworking{margin-top:10px;background-color:black;color:white;font-family:Fixedsys,Courier,monospace;line-height:15px;font-size:12px;border-color:#cee1ef;border-style:solid;border-width:5px;height:95%;padding:2px;overflow:auto;white-space:pre;display:block}#runningjob{padding:10px;background-image:url(../images/progresshg.jpg);position:relative;margin:15px 0 25px 0;padding-bottom:25px}#runniginfos{font-size:14px;font-family:sans-serif,"Arial"}h2#runnigtitle{font-size:18px;margin-bottom:15px;padding:0}#warningsid{margin-right:10px}#errorid{margin-left:10px}.infobuttons{position:absolute;right:10px;bottom:10px}a#showworkingbutton{float:left;padding:10px;font-size:12px;font-family:sans-serif,"Arial";text-decoration:none;background-color:#93b509;color:#fff;border:0}a#abortbutton,a#showworkingclose{float:left;margin-left:10px;padding:10px;font-size:12px;font-family:sans-serif,"Arial";text-decoration:none;background-color:#cd1212;color:#fff;border:0}.progressbar{margin-top:20px;height:auto;background-color:#f6f6f6;background-image:url(../images/progressbarhg.jpg)}#lastmsg,#onstep{text-align:center;margin-bottom:20px}#progressstep{background-color:#1d94cf;color:#fff;padding:5px 0;text-align:center;font-size:14px;font-family:sans-serif,"Arial"}#progresssteps{background-color:#007fb6;color:#fff;padding:5px 0;text-align:center;font-size:14px;font-family:sans-serif,"Arial"}
css/page_jobs.dev.css ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .column-id {
2
+ width: 3%;
3
+ text-align: center;
4
+ }
5
+
6
+ .column-last, .column-next, .column-type, .column-dest {
7
+ width: 15%;
8
+ }
9
+
10
+ #showworking {
11
+ margin-top: 10px;
12
+ background-color: black;
13
+ color: white;
14
+ font-family: Fixedsys, Courier, monospace;
15
+ line-height: 15px;
16
+ font-size: 12px;
17
+ border-color: #CEE1EF;
18
+ border-style: solid;
19
+ border-width: 5px;
20
+ height: 95%;
21
+ padding: 2px;
22
+ overflow: auto;
23
+ white-space: pre;
24
+ display: block;
25
+ }
26
+ #runningjob {
27
+ padding:10px;
28
+ background-image:url(../images/progresshg.jpg);
29
+ position:relative;
30
+ margin: 15px 0 25px 0;
31
+ padding-bottom:25px;
32
+ }
33
+ #runniginfos {
34
+ font-size: 14px;
35
+ font-family: sans-serif,"Arial";
36
+ }
37
+ h2#runnigtitle {
38
+ font-size: 18px;
39
+ margin-bottom: 15px;
40
+ padding: 0;
41
+ }
42
+ #warningsid {
43
+ margin-right: 10px;
44
+ }
45
+
46
+ #errorid {
47
+ margin-left: 10px;
48
+ }
49
+ .infobuttons {
50
+ position: absolute;
51
+ right: 10px;
52
+ bottom: 10px;
53
+ }
54
+ a#showworkingbutton {
55
+ float: left;
56
+ padding: 10px;
57
+ font-size: 12px;
58
+ font-family: sans-serif,"Arial";
59
+ text-decoration :none;
60
+ background-color: #93b509;
61
+ color: #fff;
62
+ border: none;
63
+ }
64
+ a#abortbutton, a#showworkingclose {
65
+ float: left;
66
+ margin-left: 10px;
67
+ padding: 10px;
68
+ font-size: 12px;
69
+ font-family: sans-serif,"Arial";
70
+ text-decoration: none;
71
+ background-color: #cd1212;
72
+ color: #fff;
73
+ border: none;
74
+ }
75
+ .progressbar {
76
+ margin-top: 20px;
77
+ height: auto;
78
+ background-color: #f6f6f6;
79
+ background-image: url(../images/progressbarhg.jpg);
80
+ }
81
+
82
+ #lastmsg, #onstep {
83
+ text-align: center;
84
+ margin-bottom: 20px;
85
+ }
86
+
87
+ #progressstep {
88
+ background-color: #1d94cf;
89
+ color: #fff;
90
+ padding: 5px 0;
91
+ text-align: center;
92
+ font-size: 14px;
93
+ font-family: sans-serif,"Arial";
94
+ }
95
+
96
+ #progresssteps {
97
+ background-color: #007fb6;
98
+ color: #fff;
99
+ padding: 5px 0;
100
+ text-align: center;
101
+ font-size: 14px;
102
+ font-family: sans-serif,"Arial";
103
+ }
css/page_wizard.css ADDED
@@ -0,0 +1 @@
 
1
+ #wizard_description{width:775px;margin-left:25px}#wizard_description h3{margin-top:15px;margin-left:20px;margin-bottom:15px;font-family:sans-serif,"Arial";font-weight:normal;font-size:16px}h3.title{font-family:sans-serif,"Arial";font-weight:normal;font-size:18px;margin-bottom:35px}#wizard{width:850px;height:500px}#wizard_navigation{float:left;width:225px;height:500px;background:#1d94cf;overflow:hidden;background-image:url(../images/hgboxleft.png);background-position:left bottom;background-repeat:no-repeat}#wizard_navigation ul{margin:0;padding-left:20px;padding-top:15px;list-style:none}#wizard_navigation ul li{font-size:14px;font-family:sans-serif,"Arial";color:#fff;padding:10px;text-decoration:none}#wizard_navigation ul li a{font-size:14px;font-family:sans-serif,"Arial";color:#fff;text-decoration:none}#wizard_navigation ul li.current{background-color:#007fb6;background-image:url(../images/current.png);background-position:right center;background-repeat:no-repeat;font-weight:bold}#wizard_settings{width:620px;height:auto;float:left}#wizard_settings_area{margin-left:30px;margin-top:15px;width:590px;height:auto;font-size:14px;font-family:sans-serif,"Arial"}#wizard_settings_area span.wizard_settings_area_options{float:left;margin-bottom:25px;clear:both}#wizard_settings_area span.wizard_settings_area_options input{float:left;margin-bottom:0}#wizard_settings_area input{margin-bottom:25px}#wizard_settings_area span.wizard_settings_area_options label{float:left;margin-left:10px;width:560px}#wizard_settings_area div.table_planung table#wpcronbasic{width:540px}#wizard_settings_area div.table_planung th{text-align:left;border-bottom:1px dotted #ccc}#wizard_settings_area div.table_planung td{border-bottom:1px dotted #ccc}#wizard_settings_area div.table_planung tr{line-height:60px}#wizard_settings_area pre{height:455px;overflow:scroll}#wizard_navbuttons{width:800px;text-align:right}#wizard_navbuttons a.button-bwp,#wizard_navbuttons input.button-bwp{padding:10px;font-size:12px;font-family:sans-serif,"Arial";text-decoration:none;background-color:#1d94cf;color:#fff;border:0}#wizard_navbuttons a.button-bwp,#wizard_navbuttons input.button-bwp{cursor:pointer}.execute{background-color:#1d485d!important}li.execute{background-image:url(../images/execute.png);background-repeat:no-repeat;background-position:center right}p.good{padding:10px;font-size:16px;text-align:center;color:#fff;background-color:#a8c100}
css/page_wizard.dev.css ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wizard_description {
2
+ width: 775px;
3
+ margin-left:25px;
4
+ }
5
+
6
+ #wizard_description h3 {
7
+ margin-top: 15px;
8
+ margin-left: 20px;
9
+ margin-bottom: 15px;
10
+ font-family: sans-serif,"Arial";
11
+ font-weight:normal;
12
+ font-size:16px;
13
+ }
14
+ h3.title {
15
+ font-family: sans-serif,"Arial";
16
+ font-weight:normal;
17
+ font-size:18px;
18
+ margin-bottom:35px;
19
+ }
20
+ #wizard {
21
+ width: 850px;
22
+ height: 500px;
23
+ }
24
+
25
+ #wizard_navigation {
26
+ float: left;
27
+ width: 225px;
28
+ height: 500px;
29
+ background: #1d94cf;
30
+ overflow: hidden;
31
+ background-image:url(../images/hgboxleft.png);
32
+ background-position:left bottom;
33
+ background-repeat:no-repeat;
34
+ }
35
+
36
+ #wizard_navigation ul {
37
+ margin: 0;
38
+ padding-left: 20px;
39
+ padding-top: 15px;
40
+ list-style: none;
41
+ }
42
+ #wizard_navigation ul li{
43
+ font-size:14px;
44
+ font-family: sans-serif,"Arial";
45
+ color:#fff;
46
+ padding:10px;
47
+ text-decoration: none;
48
+ }
49
+ #wizard_navigation ul li a{
50
+ font-size:14px;
51
+ font-family: sans-serif,"Arial";
52
+ color:#fff;
53
+ text-decoration: none;
54
+ }
55
+
56
+ #wizard_navigation ul li.current{
57
+ background-color:#007fb6;
58
+ background-image:url(../images/current.png);
59
+ background-position:right center;
60
+ background-repeat:no-repeat;
61
+ font-weight: bold;
62
+ }
63
+ #wizard_settings {
64
+ width: 620px;
65
+ height: auto;
66
+ float: left;
67
+ }
68
+ #wizard_settings_area {
69
+ margin-left: 30px;
70
+ margin-top: 15px;
71
+ width: 590px;
72
+ height: auto;
73
+ font-size:14px;
74
+ font-family: sans-serif,"Arial";
75
+ }
76
+ #wizard_settings_area span.wizard_settings_area_options {
77
+ float:left;
78
+ margin-bottom:25px;
79
+ clear:both;
80
+ }
81
+ #wizard_settings_area span.wizard_settings_area_options input{
82
+ float:left;
83
+ margin-bottom:0px;
84
+ }
85
+ #wizard_settings_area input{
86
+ margin-bottom:25px;
87
+ }
88
+ #wizard_settings_area span.wizard_settings_area_options label{
89
+ float:left;
90
+ margin-left:10px;
91
+ width:560px;
92
+ }
93
+ #wizard_settings_area div.table_planung table#wpcronbasic{
94
+ width:540px;
95
+ }
96
+ #wizard_settings_area div.table_planung th{
97
+ text-align:left;
98
+ border-bottom:1px dotted #ccc;
99
+ }
100
+ #wizard_settings_area div.table_planung td{
101
+ border-bottom:1px dotted #ccc;
102
+ }
103
+ #wizard_settings_area div.table_planung tr{
104
+ line-height:60px;
105
+ }
106
+ #wizard_settings_area pre {
107
+ height:455px;
108
+ overflow:scroll;
109
+ }
110
+ #wizard_navbuttons {
111
+ width: 800px;
112
+ text-align: right;
113
+ }
114
+ #wizard_navbuttons a.button-bwp,
115
+ #wizard_navbuttons input.button-bwp{
116
+ padding:10px;
117
+ font-size:12px;
118
+ font-family: sans-serif,"Arial";
119
+ text-decoration:none;
120
+ background-color:#1d94cf;
121
+ color:#fff;
122
+ border:none;
123
+ }
124
+ #wizard_navbuttons a.button-bwp,
125
+ #wizard_navbuttons input.button-bwp{
126
+ cursor:pointer;
127
+ }
128
+
129
+ .execute {
130
+ background-color: #1d485d !important;
131
+ }
132
+ li.execute {
133
+ background-image:url(../images/execute.png);
134
+ background-repeat:no-repeat;
135
+ background-position:center right;
136
+ }
137
+ p.good { padding:10px; font-size:16px; text-align:center; color:#fff; background-color:#a8c100; }
images/BackWPup16.png ADDED
Binary file
images/BackWPup16_2x.png ADDED
Binary file
images/BackWPup20.png ADDED
Binary file
images/BackWPup20_2x.png ADDED
Binary file
images/BackWPup32.png ADDED
Binary file
images/BackWPup64.png ADDED
Binary file
images/backwpupbanner-free.png ADDED
Binary file
images/backwpupbanner-pro.png ADDED
Binary file
images/current.png ADDED
Binary file
images/erroreven.png ADDED
Binary file
images/errorhover.png ADDED
Binary file
images/errorodd.png ADDED
Binary file
images/even.png ADDED
Binary file
images/execute.png ADDED
Binary file
images/help.png ADDED
Binary file
images/hgbox.png ADDED
Binary file
images/hgboxleft.png ADDED
Binary file
images/hgbtgreen.png ADDED
Binary file
images/hgbtgreenhover.png ADDED
Binary file
images/hgbtred.png ADDED
Binary file
images/hgbtredhover.png ADDED
Binary file
images/hginfotxt.png ADDED
Binary file
images/hgtopgreen.png ADDED
Binary file
images/hover.png ADDED
Binary file
images/imagecloud.png ADDED
Binary file
images/imagedata.png ADDED
Binary file
images/imagerepair.png ADDED
Binary file
images/imagesave.png ADDED
Binary file
images/imagesec.png ADDED
Binary file
images/imagexml.png ADDED
Binary file
images/inpsyde.png ADDED
Binary file
images/iplogo.png ADDED
Binary file
images/odd.png ADDED
Binary file
images/progressbarhg.jpg ADDED
Binary file
images/progresshg.jpg ADDED
Binary file
images/screen.png ADDED
Binary file
images/tickeven.png ADDED
Binary file
images/tickhover.png ADDED
Binary file
images/tickodd.png ADDED
Binary file
inc/cacert.pem ADDED
@@ -0,0 +1,3895 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
1
+ ##
2
+ ## ca-bundle.crt -- Bundle of CA Root Certificates
3
+ ##
4
+ ## Certificate data from Mozilla as of: Sat Dec 29 20:03:40 2012
5
+ ##
6
+ ## This is a bundle of X.509 certificates of public Certificate Authorities
7
+ ## (CA). These were automatically extracted from Mozilla's root certificates
8
+ ## file (certdata.txt). This file can be found in the mozilla source tree:
9
+ ## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
10
+ ##
11
+ ## It contains the certificates in PEM format and therefore
12
+ ## can be directly used with curl / libcurl / php_curl, or with
13
+ ## an Apache+mod_ssl webserver for SSL client authentication.
14
+ ## Just configure this file as the SSLCACertificateFile.
15
+ ##
16
+
17
+ # @(#) $RCSfile: certdata.txt,v $ $Revision: 1.87 $ $Date: 2012/12/29 16:32:45 $
18
+
19
+ GTE CyberTrust Global Root
20
+ ==========================
21
+ -----BEGIN CERTIFICATE-----
22
+ MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg
23
+ Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG
24
+ A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz
25
+ MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL
26
+ Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0
27
+ IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u
28
+ sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql
29
+ HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X404Wqk2kmhXBIgD8SFcd5tB8FLztimQID
30
+ AQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMW
31
+ M4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OF
32
+ NMQkpw0PlZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
33
+ -----END CERTIFICATE-----
34
+
35
+ Thawte Server CA
36
+ ================
37
+ -----BEGIN CERTIFICATE-----
38
+ MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
39
+ DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs
40
+ dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UE
41
+ AxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5j
42
+ b20wHhcNOTYwODAxMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNV
43
+ BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29u
44
+ c3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcG
45
+ A1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0
46
+ ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl
47
+ /Kj0R1HahbUgdJSGHg91yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg7
48
+ 1CcEJRCXL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGjEzAR
49
+ MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG7oWDTSEwjsrZqG9J
50
+ GubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6eQNuozDJ0uW8NxuOzRAvZim+aKZuZ
51
+ GCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZqdq5snUb9kLy78fyGPmJvKP/iiMucEc=
52
+ -----END CERTIFICATE-----
53
+
54
+ Thawte Premium Server CA
55
+ ========================
56
+ -----BEGIN CERTIFICATE-----
57
+ MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgT
58
+ DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs
59
+ dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UE
60
+ AxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZl
61
+ ckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYT
62
+ AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU
63
+ VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2V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2gRvE4RiIcPR
82
+ fM6fBeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+AcJkVV5MW
83
+ 8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kCAwEAAaOCAQkwggEFMHAG
84
+ A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UE
85
+ CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG
86
+ A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS
87
+ spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB
88
+ Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961
89
+ zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB
90
+ BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95
91
+ 70+sB3c4
92
+ -----END CERTIFICATE-----
93
+
94
+ Digital Signature Trust Co. Global CA 1
95
+ =======================================
96
+ -----BEGIN CERTIFICATE-----
97
+ MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE
98
+ ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMTAeFw05ODEy
99
+ MTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs
100
+ IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUA
101
+ A4GLADCBhwKBgQCgbIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJE
102
+ NySZj9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlVSn5JTe2i
103
+ o74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo
104
+ BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
105
+ dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw
106
+ IoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQY
107
+ MBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAM
108
+ BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
109
+ ACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEq
110
+ kzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4
111
+ RbyhkwS7hp86W0N6w4pl
112
+ -----END CERTIFICATE-----
113
+
114
+ Digital Signature Trust Co. Global CA 3
115
+ =======================================
116
+ -----BEGIN CERTIFICATE-----
117
+ MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJ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HhEngj1
131
+ mPnHfxsb1gYgAlihw6ID
132
+ -----END CERTIFICATE-----
133
+
134
+ Verisign Class 3 Public Primary Certification Authority
135
+ =======================================================
136
+ -----BEGIN CERTIFICATE-----
137
+ MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx
138
+ FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
139
+ IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow
140
+ XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
141
+ IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
142
+ A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
143
+ f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
144
+ hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA
145
+ TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah
146
+ WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf
147
+ Tqj/ZA1k
148
+ -----END CERTIFICATE-----
149
+
150
+ Verisign Class 1 Public Primary Certification Authority - G2
151
+ ============================================================
152
+ -----BEGIN CERTIFICATE-----
153
+ MIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQ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-----END CERTIFICATE-----
168
+
169
+ Verisign Class 2 Public Primary Certification Authority - G2
170
+ ============================================================
171
+ -----BEGIN CERTIFICATE-----
172
+ MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQswCQYDVQQGEwJV
173
+ UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGljIFByaW1h
174
+ cnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNp
175
+ Z24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1
176
+ c3QgTmV0d29yazAeFw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJV
177
+ UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGljIFByaW1h
178
+ cnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNp
179
+ Z24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1
180
+ c3QgTmV0d29yazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjx
181
+ nNuX6Zr8wgQGE75fUsjMHiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRC
182
+ wiNPStjwDqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cCAwEA
183
+ ATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9jinb3/7aHmZuovCfTK
184
+ 1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAXrXfMSTWqz9iP0b63GJZHc2pUIjRk
185
+ LbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnInjBJ7xUS0rg==
186
+ -----END CERTIFICATE-----
187
+
188
+ Verisign Class 3 Public Primary Certification Authority - G2
189
+ ============================================================
190
+ -----BEGIN CERTIFICATE-----
191
+ MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT
192
+ MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
193
+ eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
194
+ biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
195
+ dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT
196
+ MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
197
+ eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
198
+ biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
199
+ dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO
200
+ FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71
201
+ lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB
202
+ MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT
203
+ 1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD
204
+ Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9
205
+ -----END CERTIFICATE-----
206
+
207
+ GlobalSign Root CA
208
+ ==================
209
+ -----BEGIN CERTIFICATE-----
210
+ MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx
211
+ GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds
212
+ b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV
213
+ BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD
214
+ VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa
215
+ DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc
216
+ THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb
217
+ Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP
218
+ c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX
219
+ gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
220
+ HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF
221
+ AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj
222
+ Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG
223
+ j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH
224
+ hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC
225
+ X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
226
+ -----END CERTIFICATE-----
227
+
228
+ GlobalSign Root CA - R2
229
+ =======================
230
+ -----BEGIN CERTIFICATE-----
231
+ MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv
232
+ YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
233
+ bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
234
+ aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
235
+ bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6
236
+ ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp
237
+ s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN
238
+ S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL
239
+ TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C
240
+ ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
241
+ FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i
242
+ YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN
243
+ BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp
244
+ 9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
245
+ 01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
246
+ 9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
247
+ TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
248
+ -----END CERTIFICATE-----
249
+
250
+ ValiCert Class 1 VA
251
+ ===================
252
+ -----BEGIN CERTIFICATE-----
253
+ MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp
254
+ b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
255
+ YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh
256
+ bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIy
257
+ MjM0OFoXDTE5MDYyNTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0
258
+ d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEg
259
+ UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0
260
+ LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA
261
+ A4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9YLqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIi
262
+ GQj4/xEjm84H9b9pGib+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCm
263
+ DuJWBQ8YTfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0LBwG
264
+ lN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLWI8sogTLDAHkY7FkX
265
+ icnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPwnXS3qT6gpf+2SQMT2iLM7XGCK5nP
266
+ Orf1LXLI
267
+ -----END CERTIFICATE-----
268
+
269
+ ValiCert Class 2 VA
270
+ ===================
271
+ -----BEGIN CERTIFICATE-----
272
+ MIIC5zCCAlACAQEwDQYJ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ATE-----
287
+
288
+ RSA Root Certificate 1
289
+ ======================
290
+ -----BEGIN CERTIFICATE-----
291
+ MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp
292
+ b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
293
+ YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh
294
+ bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw
295
+ MjIzM1oXDTE5MDYyNjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0
296
+ d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMg
297
+ UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0
298
+ LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA
299
+ A4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td
300
+ 3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89H
301
+ BFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs
302
+ 3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjF
303
+ V9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5r
304
+ on+jjBXu
305
+ -----END CERTIFICATE-----
306
+
307
+ Verisign Class 1 Public Primary Certification Authority - G3
308
+ ============================================================
309
+ -----BEGIN CERTIFICATE-----
310
+ MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
311
+ UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
312
+ cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
313
+ IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
314
+ dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
315
+ CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
316
+ dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
317
+ cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDEgUHVibGljIFByaW1hcnkg
318
+ Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
319
+ ggEBAN2E1Lm0+afY8wR4nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/E
320
+ bRrsC+MO8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjVojYJ
321
+ rKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjbPG7PoBMAGrgnoeS+
322
+ Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP26KbqxzcSXKMpHgLZ2x87tNcPVkeB
323
+ FQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vrn5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
324
+ q2aN17O6x5q25lXQBfGfMY1aqtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/N
325
+ y9Sn2WCVhDr4wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3
326
+ ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrspSCAaWihT37h
327
+ a88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4E1Z5T21Q6huwtVexN2ZYI/Pc
328
+ D98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g==
329
+ -----END CERTIFICATE-----
330
+
331
+ Verisign Class 2 Public Primary Certification Authority - G3
332
+ ============================================================
333
+ -----BEGIN CERTIFICATE-----
334
+ MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJBgNVBAYTAlVT
335
+ MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29y
336
+ azE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ug
337
+ b25seTFFMEMGA1UEAxM8VmVyaVNpZ24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0
338
+ aW9uIEF1dGhvcml0eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNT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
352
+ GHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q
353
+ -----END CERTIFICATE-----
354
+
355
+ Verisign Class 3 Public Primary Certification Authority - G3
356
+ ============================================================
357
+ -----BEGIN CERTIFICATE-----
358
+ MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
359
+ UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
360
+ cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
361
+ IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
362
+ dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
363
+ CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
364
+ dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
365
+ cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
366
+ Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
367
+ ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
368
+ EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
369
+ cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
370
+ EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
371
+ 055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
372
+ ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
373
+ j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
374
+ /Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
375
+ xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
376
+ t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
377
+ -----END CERTIFICATE-----
378
+
379
+ Verisign Class 4 Public Primary Certification Authority - G3
380
+ ============================================================
381
+ -----BEGIN CERTIFICATE-----
382
+ MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
383
+ UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
384
+ cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
385
+ IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
386
+ dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
387
+ CQYDVQQGEwJVUz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rDNWCRzg==
401
+ -----END CERTIFICATE-----
402
+
403
+ Entrust.net Secure Server CA
404
+ ============================
405
+ -----BEGIN CERTIFICATE-----
406
+ MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNV
407
+ BAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5uZXQvQ1BTIGluY29ycC4gYnkg
408
+ cmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRl
409
+ ZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhv
410
+ cml0eTAeFw05OTA1MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIG
411
+ A1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBi
412
+ eSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1p
413
+ dGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0
414
+ aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQ
415
+ aO2f55M28Qpku0f1BBc/I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5
416
+ gXpa0zf3wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OCAdcw
417
+ ggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHboIHYpIHVMIHSMQsw
418
+ CQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5l
419
+ dC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
420
+ bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENl
421
+ cnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
422
+ dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0MFqBDzIwMTkw
423
+ NTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8BdiE1U9s/8KAGv7UISX8+1i0Bow
424
+ HQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAaMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA
425
+ BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyN
426
+ Ewr75Ji174z4xRAN95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9
427
+ n9cd2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
428
+ -----END CERTIFICATE-----
429
+
430
+ Entrust.net Premium 2048 Secure Server CA
431
+ =========================================
432
+ -----BEGIN CERTIFICATE-----
433
+ MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
434
+ ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
435
+ bWl0cyBsaWF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euoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo
449
+ oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQh7A6tcOdBTcS
450
+ o8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18f3v/rxzP5tsHrV7bhZ3QKw0z
451
+ 2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfNB/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjX
452
+ OP/swNlQ8C5LWK5Gb9Auw2DaclVyvUxFnmG6v4SBkgPR0ml8xQ==
453
+ -----END CERTIFICATE-----
454
+
455
+ Baltimore CyberTrust Root
456
+ =========================
457
+ -----BEGIN CERTIFICATE-----
458
+ MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE
459
+ ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li
460
+ ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC
461
+ SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs
462
+ dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME
463
+ uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB
464
+ UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C
465
+ G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9
466
+ XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr
467
+ l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI
468
+ VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB
469
+ BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh
470
+ cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5
471
+ hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa
472
+ Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H
473
+ RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
474
+ -----END CERTIFICATE-----
475
+
476
+ Equifax Secure Global eBusiness CA
477
+ ==================================
478
+ -----BEGIN CERTIFICATE-----
479
+ MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
480
+ RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp
481
+ bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx
482
+ HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds
483
+ b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV
484
+ PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN
485
+ qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn
486
+ hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j
487
+ BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs
488
+ MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN
489
+ I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY
490
+ NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
491
+ -----END CERTIFICATE-----
492
+
493
+ Equifax Secure eBusiness CA 1
494
+ =============================
495
+ -----BEGIN CERTIFICATE-----
496
+ MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
497
+ RXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENB
498
+ LTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQwMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UE
499
+ ChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNz
500
+ IENBLTEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ
501
+ 1MRoRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBuWqDZQu4a
502
+ IZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKwEnv+j6YDAgMBAAGjZjBk
503
+ MBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kW
504
+ Nl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRKeDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQF
505
+ AAOBgQB1W6ibAxHm6VZMzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5
506
+ lSE/9dR+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN/Bf+
507
+ KpYrtWKmpj29f5JZzVoqgrI3eQ==
508
+ -----END CERTIFICATE-----
509
+
510
+ Equifax Secure eBusiness CA 2
511
+ =============================
512
+ -----BEGIN CERTIFICATE-----
513
+ MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEXMBUGA1UE
514
+ ChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0y
515
+ MB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoT
516
+ DkVxdWlmYXggU2VjdXJlMSYwJAYDVQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCB
517
+ nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn
518
+ 2Z0GvxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/BPO3QSQ5
519
+ BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0CAwEAAaOCAQkwggEFMHAG
520
+ A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUx
521
+ JjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoG
522
+ A1UdEAQTMBGBDzIwMTkwNjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9e
523
+ uSBIplBqy/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQFMAMB
524
+ Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAAyGgq3oThr1
525
+ jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia
526
+ 78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUm
527
+ V+GRMOrN
528
+ -----END CERTIFICATE-----
529
+
530
+ AddTrust Low-Value Services Root
531
+ ================================
532
+ -----BEGIN CERTIFICATE-----
533
+ MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
534
+ QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRU
535
+ cnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMwMTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQsw
536
+ CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFk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71SJlpz/+0WatC7xr
550
+ mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj
551
+ ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
552
+ -----END CERTIFICATE-----
553
+
554
+ AddTrust External Root
555
+ ======================
556
+ -----BEGIN CERTIFICATE-----
557
+ MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
558
+ QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
559
+ VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
560
+ NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
561
+ cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
562
+ Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821
563
+ +iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw
564
+ Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo
565
+ aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy
566
+ 2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7
567
+ 7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P
568
+ BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL
569
+ VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk
570
+ VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
571
+ IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl
572
+ j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
573
+ 6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355
574
+ e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u
575
+ G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
576
+ -----END CERTIFICATE-----
577
+
578
+ AddTrust Public Services Root
579
+ =============================
580
+ -----BEGIN CERTIFICATE-----
581
+ MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
582
+ QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSAwHgYDVQQDExdBZGRU
583
+ cnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAxMDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJ
584
+ BgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVF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Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H
599
+ EufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
600
+ -----END CERTIFICATE-----
601
+
602
+ AddTrust Qualified Certificates Root
603
+ ====================================
604
+ -----BEGIN CERTIFICATE-----
605
+ MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
606
+ QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU
607
+ cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx
608
+ CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ
609
+ IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG
610
+ 9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwqxBb/4Oxx
611
+ 64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G87B4pfYOQnrjfxvM0PC3
612
+ KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i2O+tCBGaKZnhqkRFmhJePp1tUvznoD1o
613
+ L/BLcHwTOK28FSXx1s6rosAx1i+f4P8UWfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GR
614
+ wVY18BTcZTYJbqukB8c10cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HU
615
+ MIHRMB0GA1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/
616
+ BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6FrpGkwZzELMAkGA1UE
617
+ BhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29y
618
+ azEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlmaWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQAD
619
+ ggEBABmrder4i2VhlRO6aQTvhsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxG
620
+ GuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
621
+ dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9ze
622
+ RXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDB
623
+ iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE=
624
+ -----END CERTIFICATE-----
625
+
626
+ Entrust Root Certification Authority
627
+ ====================================
628
+ -----BEGIN CERTIFICATE-----
629
+ MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
630
+ BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
631
+ b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG
632
+ A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0
633
+ MloXDTI2MTEyNz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9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa
647
+ v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS
648
+ W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0
649
+ tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8
650
+ -----END CERTIFICATE-----
651
+
652
+ RSA Security 2048 v3
653
+ ====================
654
+ -----BEGIN CERTIFICATE-----
655
+ MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6MRkwFwYDVQQK
656
+ ExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJpdHkgMjA0OCBWMzAeFw0wMTAy
657
+ MjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAXBgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAb
658
+ BgNVBAsTFFJTQSBTZWN1cml0eSAyMDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
659
+ AQEAt49VcdKA3XtpeafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7
660
+ Jylg/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGlwSMiuLgb
661
+ WhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnhAMFRD0xS+ARaqn1y07iH
662
+ KrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP
663
+ +Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpuAWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/
664
+ MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4E
665
+ FgQUB8NRMKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYcHnmY
666
+ v/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/Zb5gEydxiKRz44Rj
667
+ 0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+f00/FGj1EVDVwfSQpQgdMWD/YIwj
668
+ VAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVOrSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395
669
+ nzIlQnQFgCi/vcEkllgVsRch6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kA
670
+ pKnXwiJPZ9d37CAFYd4=
671
+ -----END CERTIFICATE-----
672
+
673
+ GeoTrust Global CA
674
+ ==================
675
+ -----BEGIN CERTIFICATE-----
676
+ MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
677
+ Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw
678
+ MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
679
+ LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
680
+ CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo
681
+ BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet
682
+ 8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc
683
+ T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU
684
+ vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD
685
+ AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk
686
+ DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q
687
+ zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4
688
+ d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2
689
+ mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p
690
+ XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm
691
+ Mw==
692
+ -----END CERTIFICATE-----
693
+
694
+ GeoTrust Global CA 2
695
+ ====================
696
+ -----BEGIN CERTIFICATE-----
697
+ MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
698
+ R2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwHhcNMDQwMzA0MDUw
699
+ MDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR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X9f5NAEC7S8O08
731
+ ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0
732
+ XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB
733
+ hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
734
+ aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2
735
+ qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL
736
+ oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK
737
+ xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF
738
+ KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2
739
+ DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK
740
+ xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU
741
+ p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI
742
+ P/rmMuGNG2+k5o7Y+SlIis5z/iw=
743
+ -----END CERTIFICATE-----
744
+
745
+ GeoTrust Universal CA 2
746
+ =======================
747
+ -----BEGIN CERTIFICATE-----
748
+ MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEw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QWBBR281Xh+qQ2
762
+ +/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E
763
+ BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
764
+ dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ
765
+ 4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+
766
+ mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq
767
+ A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg
768
+ Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP
769
+ pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d
770
+ FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp
771
+ gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm
772
+ X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
773
+ -----END CERTIFICATE-----
774
+
775
+ UTN-USER First-Network Applications
776
+ ===================================
777
+ -----BEGIN CERTIFICATE-----
778
+ MIIEZDCCA0ygAwIBAgIQRL4Mi1AAJLQR0zYwS8AzdzANBgkqhkiG9w0BAQUFADCBozELMAkGA1UE
779
+ BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQ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U5ldHdvcmtBcHBsaWNhdGlvbnMuY3JsMA0G
793
+ CSqGSIb3DQEBBQUAA4IBAQCk8yXM0dSRgyLQzDKrm5ZONJFUICU0YV8qAhXhi6r/fWRRzwr/vH3Y
794
+ IWp4yy9Rb/hCHTO967V7lMPDqaAt39EpHx3+jz+7qEUqf9FuVSTiuwL7MT++6LzsQCv4AdRWOOTK
795
+ RIK1YSAhZ2X28AvnNPilwpyjXEAfhZOVBt5P1CeptqX8Fs1zMT+4ZSfP1FMa8Kxun08FDAOBp4Qp
796
+ xFq9ZFdyrTvPNximmMatBrTcCKME1SmklpoSZ0qMYEWd8SOasACcaLWYUNPvji6SZbFIPiG+FTAq
797
+ DbUMo2s/rn9X9R+WfN9v3YIwLGUbQErNaLly7HF27FSOH4UMAWr6pjisH8SE
798
+ -----END CERTIFICATE-----
799
+
800
+ America Online Root Certification Authority 1
801
+ =============================================
802
+ -----BEGIN CERTIFICATE-----
803
+ MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
804
+ QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp
805
+ Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG
806
+ A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg
807
+ T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD
808
+ ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG
809
+ v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z
810
+ DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh
811
+ sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP
812
+ 8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T
813
+ AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z
814
+ o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf
815
+ GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF
816
+ VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft
817
+ 3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g
818
+ Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
819
+ sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
820
+ -----END CERTIFICATE-----
821
+
822
+ America Online Root Certification Authority 2
823
+ =============================================
824
+ -----BEGIN CERTIFICATE-----
825
+ MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
826
+ QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp
827
+ Y2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2MDAwMFoXDTM3MDkyOT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QE
841
+ AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmnxPBUlgtk87FY
842
+ T15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2LHo1YGwRgJfMqZJS5ivmae2p
843
+ +DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzcccobGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXg
844
+ JXUjhx5c3LqdsKyzadsXg8n33gy8CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//Zoy
845
+ zH1kUQ7rVyZ2OuMeIjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgO
846
+ ZtMADjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2FAjgQ5ANh
847
+ 1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUXOm/9riW99XJZZLF0Kjhf
848
+ GEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPbAZO1XB4Y3WRayhgoPmMEEf0cjQAPuDff
849
+ Z4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQlZvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuP
850
+ cX/9XhmgD0uRuMRUvAawRY8mkaKO/qk=
851
+ -----END CERTIFICATE-----
852
+
853
+ Visa eCommerce Root
854
+ ===================
855
+ -----BEGIN CERTIFICATE-----
856
+ MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG
857
+ EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug
858
+ QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJ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C3euiInlhBx6yLt
872
+ 398znM/jra6O1I7mT1GvFpLgXPYHDw==
873
+ -----END CERTIFICATE-----
874
+
875
+ Certum Root CA
876
+ ==============
877
+ -----BEGIN CERTIFICATE-----
878
+ MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQK
879
+ ExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQTAeFw0wMjA2MTExMDQ2Mzla
880
+ Fw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8u
881
+ by4xEjAQBgNVBAMTCUNlcnR1bSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6x
882
+ wS7TT3zNJc4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL
883
+ kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ
884
+ 89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K
885
+ Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P
886
+ NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq
887
+ hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+
888
+ GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg
889
+ GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/
890
+ 0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS
891
+ qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw==
892
+ -----END CERTIFICATE-----
893
+
894
+ Comodo AAA Services root
895
+ ========================
896
+ -----BEGIN CERTIFICATE-----
897
+ MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
898
+ R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
899
+ TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw
900
+ MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl
901
+ c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV
902
+ BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
903
+ ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG
904
+ C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs
905
+ i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW
906
+ Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH
907
+ Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK
908
+ Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f
909
+ BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl
910
+ cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz
911
+ LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm
912
+ 7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
913
+ Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z
914
+ 8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C
915
+ 12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
916
+ -----END CERTIFICATE-----
917
+
918
+ Comodo Secure Services root
919
+ ===========================
920
+ -----BEGIN CERTIFICATE-----
921
+ MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
922
+ R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
923
+ TGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw
924
+ MDAwMFoXDTI4MTIzMTIz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hr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRL
938
+ DXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw
939
+ pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H
940
+ RR3B7Hzs/Sk=
941
+ -----END CERTIFICATE-----
942
+
943
+ Comodo Trusted Services root
944
+ ============================
945
+ -----BEGIN CERTIFICATE-----
946
+ MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
947
+ R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
948
+ TGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEw
949
+ MDAwMDBaFw0yODEyMzEyMzU5NTlaMH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1h
950
+ bmNoZXN0ZXIxEDAOBgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUw
951
+ IwYDVQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOC
952
+ AQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWWfnJSoBVC21ndZHoa0Lh7
953
+ 3TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMtTGo87IvDktJTdyR0nAducPy9C1t2ul/y
954
+ /9c3S0pgePfw+spwtOpZqqPOSC+pw7ILfhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6
955
+ juljatEPmsbS9Is6FARW1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsS
956
+ ivnkBbA7kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0GA1Ud
957
+ DgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
958
+ /zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21vZG9jYS5jb20vVHJ1c3RlZENlcnRp
959
+ ZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRodHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENl
960
+ cnRpZmljYXRlU2VydmljZXMuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8Ntw
961
+ uleGFTQQuS9/HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
962
+ pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxISjBc/lDb+XbDA
963
+ BHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+xqFx7D+gIIxmOom0jtTYsU0l
964
+ R+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/AtyjcndBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O
965
+ 9y5Xt5hwXsjEeLBi
966
+ -----END CERTIFICATE-----
967
+
968
+ QuoVadis Root CA
969
+ ================
970
+ -----BEGIN CERTIFICATE-----
971
+ MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE
972
+ ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
973
+ eTEuMCwGA1UEAxMlUXVvVmFk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1c2UsIGNlcnRpZmljYXRpb24gcHJh
987
+ Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW
988
+ Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu
989
+ BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw
990
+ FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0
991
+ aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6
992
+ tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo
993
+ fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul
994
+ LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x
995
+ gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi
996
+ 5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi
997
+ 5nrQNiOKSnQ2+Q==
998
+ -----END CERTIFICATE-----
999
+
1000
+ QuoVadis Root CA 2
1001
+ ==================
1002
+ -----BEGIN CERTIFICATE-----
1003
+ MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
1004
+ EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1Z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SEwzJQTU7tD2A8QZRtGU
1018
+ a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
1019
+ ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv
1020
+ Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3
1021
+ UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm
1022
+ VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK
1023
+ +JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW
1024
+ IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1
1025
+ WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X
1026
+ f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II
1027
+ 4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8
1028
+ VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
1029
+ -----END CERTIFICATE-----
1030
+
1031
+ QuoVadis Root CA 3
1032
+ ==================
1033
+ -----BEGIN CERTIFICATE-----
1034
+ MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
1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YjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
1062
+ vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
1063
+ qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
1064
+ -----END CERTIFICATE-----
1065
+
1066
+ Security Communication Root CA
1067
+ ==============================
1068
+ -----BEGIN CERTIFICATE-----
1069
+ MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
1070
+ U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
1071
+ HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
1072
+ U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
1073
+ ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw
1074
+ 8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM
1075
+ DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX
1076
+ 5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd
1077
+ DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2
1078
+ JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw
1079
+ DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g
1080
+ 0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a
1081
+ mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ
1082
+ s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
1083
+ 6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi
1084
+ FL39vmwLAw==
1085
+ -----END CERTIFICATE-----
1086
+
1087
+ Sonera Class 1 Root CA
1088
+ ======================
1089
+ -----BEGIN CERTIFICATE-----
1090
+ MIIDIDCCAgigAwIBAgIBJDANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
1091
+ U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MxIENBMB4XDTAxMDQwNjEwNDkxM1oXDTIxMDQw
1092
+ NjEwNDkxM1owOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
1093
+ IENsYXNzMSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALWJHytPZwp5/8Ue+H88
1094
+ 7dF+2rDNbS82rDTG29lkFwhjMDMiikzujrsPDUJVyZ0upe/3p4zDq7mXy47vPxVnqIJyY1MPQYx9
1095
+ EJUkoVqlBvqSV536pQHydekfvFYmUk54GWVYVQNYwBSujHxVX3BbdyMGNpfzJLWaRpXk3w0LBUXl
1096
+ 0fIdgrvGE+D+qnr9aTCU89JFhfzyMlsy3uhsXR/LpCJ0sICOXZT3BgBLqdReLjVQCfOAl/QMF645
1097
+ 2F/NM8EcyonCIvdFEu1eEpOdY6uCLrnrQkFEy0oaAIINnvmLVz5MxxftLItyM19yejhW1ebZrgUa
1098
+ HXVFsculJRwSVzb9IjcCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIR+IMi/ZT
1099
+ iFIwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQCLGrLJXWG04bkruVPRsoWdd44W7hE9
1100
+ 28Jj2VuXZfsSZ9gqXLar5V7DtxYvyOirHYr9qxp81V9jz9yw3Xe5qObSIjiHBxTZ/75Wtf0HDjxV
1101
+ yhbMp6Z3N/vbXB9OWQaHowND9Rart4S9Tu+fMTfwRvFAttEMpWT4Y14h21VOTzF2nBBhjrZTOqMR
1102
+ vq9tfB69ri3iDGnHhVNoomG6xT60eVR4ngrHAr5i0RGCS2UvkVrCqIexVmiUefkl98HVrhq4uz2P
1103
+ qYo4Ffdz0Fpg0YCw8NzVUM1O7pJIae2yIx4wzMiUyLb1O4Z/P6Yun/Y+LLWSlj7fLJOK/4GMDw9Z
1104
+ IRlXvVWa
1105
+ -----END CERTIFICATE-----
1106
+
1107
+ Sonera Class 2 Root CA
1108
+ ======================
1109
+ -----BEGIN CERTIFICATE-----
1110
+ MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
1111
+ U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
1112
+ NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
1113
+ IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
1114
+ /Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
1115
+ dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
1116
+ f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
1117
+ tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
1118
+ nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
1119
+ XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
1120
+ 0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
1121
+ cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
1122
+ Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
1123
+ EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
1124
+ llpwrN9M
1125
+ -----END CERTIFICATE-----
1126
+
1127
+ Staat der Nederlanden Root CA
1128
+ =============================
1129
+ -----BEGIN CERTIFICATE-----
1130
+ MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UE
1131
+ ChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFhdCBkZXIgTmVkZXJsYW5kZW4g
1132
+ Um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1145
+ nGQI0DvDKcWy7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
1146
+ iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
1147
+ -----END CERTIFICATE-----
1148
+
1149
+ TDC Internet Root CA
1150
+ ====================
1151
+ -----BEGIN CERTIFICATE-----
1152
+ MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJESzEVMBMGA1UE
1153
+ ChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTAeFw0wMTA0MDUx
1154
+ NjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNVBAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJu
1155
+ ZXQxHTAbBgNVBAsTFFREQyBJbnRlcm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
1156
+ MIIBCgKCAQEAxLhAvJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20j
1157
+ xsNuZp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a0vnRrEvL
1158
+ znWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc14izbSysseLlJ28TQx5yc
1159
+ 5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGNeGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6
1160
+ otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcDR0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZI
1161
+ AYb4QgEBBAQDAgAHMGUGA1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMM
1162
+ VERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxMEQ1JM
1163
+ MTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3WjALBgNVHQ8EBAMC
1164
+ AQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAwHQYDVR0OBBYEFGxkAcf9hW2syNqe
1165
+ UAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJKoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0G
1166
+ CSqGSIb3DQEBBQUAA4IBAQBOQ8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540m
1167
+ gwV5dOy0uaOXwTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+
1168
+ 2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm899qNLPg7kbWzb
1169
+ O0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0jUNAE4z9mQNUecYu6oah9jrU
1170
+ Cbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38aQNiuJkFBT1reBK9sG9l
1171
+ -----END CERTIFICATE-----
1172
+
1173
+ TDC OCES Root CA
1174
+ ================
1175
+ -----BEGIN CERTIFICATE-----
1176
+ MIIFGTCCBAGgAwIBAgIEPki9xDANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJESzEMMAoGA1UE
1177
+ ChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wMzAyMTEwODM5MzBaFw0zNzAyMTEwOTA5
1178
+ MzBaMDExCzAJBgNVBAYTAkRLMQwwCgYDVQQKEwNUREMxFDASBgNVBAMTC1REQyBPQ0VTIENBMIIB
1179
+ IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC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MDIxMTA5MDkzMFowHwYDVR0jBBgwFoAUYLWF7FZkfhIZJ2cdUBVLc647
1193
+ +RIwHQYDVR0OBBYEFGC1hexWZH4SGSdnHVAVS3OuO/kSMB0GCSqGSIb2fQdBAAQQMA4bCFY2LjA6
1194
+ NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEACromJkbTc6gJ82sLMJn9iuFXehHTuJTXCRBuo7E4
1195
+ A9G28kNBKWKnctj7fAXmMXAnVBhOinxO5dHKjHiIzxvTkIvmI/gLDjNDfZziChmPyQE+dF10yYsc
1196
+ A+UYyAFMP8uXBV2YcaaYb7Z8vTd/vuGTJW1v8AqtFxjhA7wHKcitJuj4YfD9IQl+mo6paH1IYnK9
1197
+ AOoBmbgGglGBTvH1tJFUuSN6AJqfXY3gPGS5GhKSKseCRHI53OI8xthV9RVOyAUO28bQYqbsFbS1
1198
+ AoLbrIyigfCbmTH1ICCoiGEKB5+U/NDXG8wuF/MEJ3Zn61SD/aSQfgY9BKNDLdr8C2LqL19iUw==
1199
+ -----END CERTIFICATE-----
1200
+
1201
+ UTN DATACorp SGC Root CA
1202
+ ========================
1203
+ -----BEGIN CERTIFICATE-----
1204
+ MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCBkzELMAkGA1UE
1205
+ BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl
1206
+ IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZ
1207
+ BgNVBAMTElVUTiAtIERBVEFDb3JwIFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBa
1208
+ MIGTMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4w
1209
+ HAYDVQQKExVUaGUgVVN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D2JzHVImOBwYSf0wdJrE5SIv2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwP
1223
+ DPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI
1224
+ -----END CERTIFICATE-----
1225
+
1226
+ UTN USERFirst Email Root CA
1227
+ ===========================
1228
+ -----BEGIN CERTIFICATE-----
1229
+ MIIEojCCA4qgAwIBAgIQRL4Mi1AAJLQR0zYlJWfJiTANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UE
1230
+ BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl
1231
+ IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xNjA0
1232
+ BgNVBAMTLVVUTi1VU0VSRmlyc3QtQ2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBFbWFpbDAeFw05
1233
+ OTA3MDkxNzI4NTBaFw0xOTA3MDkxNzM2NThaMIGuMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQx
1234
+ FzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsx
1235
+ ITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTE2MDQGA1UEAxMtVVROLVVTRVJGaXJz
1236
+ dC1DbGllbnQgQXV0aGVudGljYXRpb24gYW5kIEVtYWlsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
1237
+ MIIBCgKCAQEAsjmFpPJ9q0E7YkY3rs3BYHW8OWX5ShpHornMSMxqmNVNNRm5pELlzkniii8efNIx
1238
+ B8dOtINknS4p1aJkxIW9hVE1eaROaJB7HHqkkqgX8pgV8pPMyaQylbsMTzC9mKALi+VuG6JG+ni8
1239
+ om+rWV6lL8/K2m2qL+usobNqqrcuZzWLeeEeaYji5kbNoKXqvgvOdjp6Dpvq/NonWz1zHyLmSGHG
1240
+ TPNpsaguG7bUMSAsvIKKjqQOpdeJQ/wWWq8dcdcRWdq6hw2v+vPhwvCkxWeM1tZUOt4KpLoDd7Nl
1241
+ yP0e03RiqhjKaJMeoYV+9Udly/hNVyh00jT/MLbu9mIwFIws6wIDAQABo4G5MIG2MAsGA1UdDwQE
1242
+ AwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSJgmd9xJ0mcABLtFBIfN49rgRufTBYBgNV
1243
+ HR8EUTBPME2gS6BJhkdodHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLVVTRVJGaXJzdC1DbGll
1244
+ bnRBdXRoZW50aWNhdGlvbmFuZEVtYWlsLmNybDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH
1245
+ AwQwDQYJKoZIhvcNAQEFBQADggEBALFtYV2mGn98q0rkMPxTbyUkxsrt4jFcKw7u7mFVbwQ+zzne
1246
+ xRtJlOTrIEy05p5QLnLZjfWqo7NK2lYcYJeA3IKirUq9iiv/Cwm0xtcgBEXkzYABurorbs6q15L+
1247
+ 5K/r9CYdFip/bDCVNy8zEqx/3cfREYxRmLLQo5HQrfafnoOTHh1CuEava2bwm3/q4wMC5QJRwarV
1248
+ NZ1yQAOJujEdxRBoUp7fooXFXAimeOZTT7Hot9MUnpOmw2TjrH5xzbyf6QMbzPvprDHBr3wVdAKZ
1249
+ w7JHpsIyYdfHb0gkUSeh1YdV8nuPmD0Wnu51tvjQjvLzxq4oW6fw8zYX/MMF08oDSlQ=
1250
+ -----END CERTIFICATE-----
1251
+
1252
+ UTN USERFirst Hardware Root CA
1253
+ ==============================
1254
+ -----BEGIN CERTIFICATE-----
1255
+ MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE
1256
+ BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IEx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VHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUF
1270
+ BwMGBggrBgEFBQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
1271
+ //bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogW
1272
+ XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2
1273
+ lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn
1274
+ iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67
1275
+ nfhmqA==
1276
+ -----END CERTIFICATE-----
1277
+
1278
+ UTN USERFirst Object Root CA
1279
+ ============================
1280
+ -----BEGIN CERTIFICATE-----
1281
+ MIIEZjCCA06gAwIBAgIQRL4Mi1AAJLQR0zYt4LNfGzANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UE
1282
+ BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl
1283
+ IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHTAb
1284
+ BgNVBAMTFFVUTi1VU0VSRmlyc3QtT2JqZWN0MB4XDTk5MDcwOTE4MzEyMFoXDTE5MDcwOTE4NDAz
1285
+ NlowgZUxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkx
1286
+ HjAcBgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2Vy
1287
+ dHJ1c3QuY29tMR0wGwYDVQQDExRV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OzwcFxBSAAeL0TUh2oPs0AH8g=
1301
+ -----END CERTIFICATE-----
1302
+
1303
+ Camerfirma Chambers of Commerce Root
1304
+ ====================================
1305
+ -----BEGIN CERTIFICATE-----
1306
+ MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe
1307
+ QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i
1308
+ ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx
1309
+ NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp
1310
+ cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn
1311
+ MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC
1312
+ AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU
1313
+ xFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0dBmpAPrMMhe5cG3nCYsS4No41XQEMIwRH
1314
+ NaqbYE6gZj3LJgqcQKH0XZi/caulAGgq7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jW
1315
+ DA+wWFjbw2Y3npuRVDM30pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFV
1316
+ d9oKDMyXroDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIGA1Ud
1317
+ EwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5jaGFtYmVyc2lnbi5v
1318
+ cmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p26EpW1eLTXYGduHRooowDgYDVR0P
1319
+ AQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hh
1320
+ bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD
1321
+ VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz
1322
+ aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi
1323
+ fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD
1324
+ L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN
1325
+ UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n
1326
+ ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1
1327
+ erfutGWaIZDgqtCYvDi1czyL+Nw=
1328
+ -----END CERTIFICATE-----
1329
+
1330
+ Camerfirma Global Chambersign Root
1331
+ ==================================
1332
+ -----BEGIN CERTIFICATE-----
1333
+ MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe
1334
+ QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i
1335
+ ZXJzaWduL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WduLm9y
1348
+ ZzBbBgNVHSAEVDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh
1349
+ bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0BAQUFAAOCAQEA
1350
+ PDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y
1351
+ gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ
1352
+ PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4
1353
+ IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes
1354
+ t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
1355
+ -----END CERTIFICATE-----
1356
+
1357
+ NetLock Qualified (Class QA) Root
1358
+ =================================
1359
+ -----BEGIN CERTIFICATE-----
1360
+ MIIG0TCCBbmgAwIBAgIBezANBgkqhkiG9w0BAQUFADCByTELMAkGA1UEBhMCSFUxETAPBgNVBAcT
1361
+ CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV
1362
+ BAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQDEzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVn
1363
+ eXpvaSAoQ2xhc3MgUUEpIFRhbnVzaXR2YW55a2lhZG8xHjAcBgkqhkiG9w0BCQEWD2luZm9AbmV0
1364
+ bG9jay5odTAeFw0wMzAzMzAwMTQ3MTFaFw0yMjEyMTUwMTQ3MTFaMIHJMQswCQYDVQQGEwJIVTER
1365
+ MA8GA1UEBxMIQnVkYXBl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ary (Class A) Root
1394
+ =============================
1395
+ -----BEGIN CERTIFICATE-----
1396
+ MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQI
1397
+ EwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6
1398
+ dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9j
1399
+ ayBLb3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oX
1400
+ DTE5MDIxOTIzMTQ0N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQH
1401
+ EwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYD
1402
+ VQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFz
1403
+ cyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSM
1404
+ D7tM9DceqQWC2ObhbHDqeLVu0ThEDaiDzl3S1tWBxdRL51uUcCbbO51qTGL3cfNk1mE7PetzozfZ
1405
+ z+qMkjvN9wfcZnSX9EUi3fRc4L9t875lM+QVOr/bmJBVOMTtplVjC7B4BPTjbsE/jvxReB+SnoPC
1406
+ /tmwqcm8WgD/qaiYdPv2LD4VOQ22BFWoDpggQrOxJa1+mm9dU7GrDPzr4PN6s6iz/0b2Y6LYOph7
1407
+ tqyF/7AlT3Rj5xMHpQqPBffAZG9+pyeAlt7ULoZgx2srXnN7F+eRP2QM2EsiNCubMvJIH5+hCoR6
1408
+ 4sKtlz2O1cH5VqNQ6ca0+pii7pXmKgO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mwBQOxmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjP
1422
+ ytoUMaFP0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQQeJB
1423
+ CWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxkf1qbFFgBJ34TUMdr
1424
+ KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM
1425
+ 8CgHrTwXZoi1/baI
1426
+ -----END CERTIFICATE-----
1427
+
1428
+ NetLock Business (Class B) Root
1429
+ ===============================
1430
+ -----BEGIN CERTIFICATE-----
1431
+ MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUxETAPBgNVBAcT
1432
+ CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV
1433
+ BAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQDEylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikg
1434
+ VGFudXNpdHZhbnlraWFkbzAeFw05OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYD
1435
+ VQQGEwJIVTERMA8GA1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRv
1436
+ bnNhZ2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5ldExvY2sg
1437
+ VXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
1438
+ iQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xKgZjupNTKihe5In+DCnVMm8Bp2GQ5o+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IGUtbWFpbCBhdCBj
1452
+ cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM
1453
+ 43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR
1454
+ stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI
1455
+ -----END CERTIFICATE-----
1456
+
1457
+ NetLock Express (Class C) Root
1458
+ ==============================
1459
+ -----BEGIN CERTIFICATE-----
1460
+ MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT
1461
+ CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV
1462
+ BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBD
1463
+ KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJ
1464
+ BgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6
1465
+ dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMrTmV0TG9j
1466
+ ayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzANBgkqhkiG9w0BAQEFAAOB
1467
+ jQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNAOoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3Z
1468
+ W3oDvV3zOwzDUXmbrVWg6dADEK8KuhRC2VImESLH0iDMgqSaqf64gXadarfSNnU+sYYJ9m5tfk63
1469
+ euy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zbM2
1482
+ xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2gpO0u9f38vf5NNwgMvOOW
1483
+ gyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4Fp1hBWeAyNDYpQcCNJgEjTME1A==
1484
+ -----END CERTIFICATE-----
1485
+
1486
+ XRamp Global CA Root
1487
+ ====================
1488
+ -----BEGIN CERTIFICATE-----
1489
+ MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE
1490
+ BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj
1491
+ dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
1492
+ dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx
1493
+ HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg
1494
+ U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
1495
+ dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu
1496
+ IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx
1497
+ foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE
1498
+ zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs
1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 HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI
1530
+ Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b
1531
+ vZ8=
1532
+ -----END CERTIFICATE-----
1533
+
1534
+ Starfield Class 2 CA
1535
+ ====================
1536
+ -----BEGIN CERTIFICATE-----
1537
+ MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc
1538
+ U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg
1539
+ Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo
1540
+ MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG
1541
+ A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG
1542
+ SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY
1543
+ bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ
1544
+ JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm
1545
+ epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN
1546
+ F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF
1547
+ MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f
1548
+ hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo
1549
+ bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g
1550
+ QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs
1551
+ afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM
1552
+ PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
1553
+ xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD
1554
+ KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
1555
+ QBFGmh95DmK/D5fs4C8fF5Q=
1556
+ -----END CERTIFICATE-----
1557
+
1558
+ StartCom Certification Authority
1559
+ ================================
1560
+ -----BEGIN CERTIFICATE-----
1561
+ MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
1562
+ U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu
1563
+ ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0
1564
+ NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk
1565
+ LjErMCk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591
+ fsNrarnDy0RLrHiQi+fHLB5LEUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZ
1592
+ EoalHmdkrQYuL6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
1593
+ yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl
1594
+ 1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/
1595
+ lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro
1596
+ g14=
1597
+ -----END CERTIFICATE-----
1598
+
1599
+ Taiwan GRCA
1600
+ ===========
1601
+ -----BEGIN CERTIFICATE-----
1602
+ MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG
1603
+ EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X
1604
+ DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv
1605
+ dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD
1606
+ ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN
1607
+ w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5
1608
+ BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O
1609
+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xARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk
1623
+ Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk
1624
+ 7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ
1625
+ CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy
1626
+ +fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS
1627
+ -----END CERTIFICATE-----
1628
+
1629
+ Firmaprofesional Root CA
1630
+ ========================
1631
+ -----BEGIN CERTIFICATE-----
1632
+ MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMxIjAgBgNVBAcT
1633
+ GUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1dG9yaWRhZCBkZSBDZXJ0aWZp
1634
+ Y2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FA
1635
+ ZmlybWFwcm9mZXNpb25hbC5jb20wHhcNMDExMDI0MjIwMDAwWhcNMTMxMDI0MjIwMDAwWjCBnTEL
1636
+ MAkGA1UEBhMCRVMxIjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMT
1637
+ OUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2
1638
+ ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20wggEiMA0GCSqGSIb3DQEB
1639
+ AQUAA4IBDwAwggEKAoIBAQDnIwNvbyOlXnjOlSztlB5uCp4Bx+ow0Syd3Tfom5h5VtP8c9/Qit5V
1640
+ j1H5WuretXDE7aTt/6MNbg9kUDGvASdYrv5sp0ovFy3Tc9UTHI9ZpTQsHVQERc1ouKDAA6XPhUJH
1641
+ lShbz++AbOCQl4oBPB3zhxAwJkh91/zpnZFx/0GaqUC1N5wpIE8fUuOgfRNtVLcK3ulqTgesrBlf
1642
+ 3H5idPayBQC6haD9HThuy1q7hryUZzM1gywfI834yJFxzJeL764P3CkDG8A563DtwW4O2GcLiam8
1643
+ NeTvtjS0pbbELaW+0MOUJEjb35bTALVmGotmBQ/dPz/LP6pemkr4tErvlTcbAgMBAAGjgZ8wgZww
1644
+ KgYDVR0RBCMwIYYfaHR0cDovL3d3dy5maXJtYXByb2Zlc2lvbmFsLmNvbTASBgNVHRMBAf8ECDAG
1645
+ AQH/AgEBMCsGA1UdEAQkMCKADzIwMDExMDI0MjIwMDAwWoEPMjAxMzEwMjQyMjAwMDBaMA4GA1Ud
1646
+ DwEB/wQEAwIBBjAdBgNVHQ4EFgQUMwugZtHq2s7eYpMEKFK1FH84aLcwDQYJKoZIhvcNAQEFBQAD
1647
+ ggEBAEdz/o0nVPD11HecJ3lXV7cVVuzH2Fi3AQL0M+2TUIiefEaxvT8Ub/GzR0iLjJcG1+p+o1wq
1648
+ u00vR+L4OQbJnC4xGgN49Lw4xiKLMzHwFgQEffl25EvXwOaD7FnMP97/T2u3Z36mhoEyIwOdyPdf
1649
+ wUpgpZKpsaSgYMN4h7Mi8yrrW6ntBas3D7Hi05V2Y1Z0jFhyGzflZKG+TQyTmAyX9odtsz/ny4Cm
1650
+ 7YjHX1BiAuiZdBbQ5rQ58SfLyEDW44YQqSMSkuBpQWOnryULwMWSyx6Yo1q6xTMPoJcB3X/ge9YG
1651
+ VM+h4k0460tQtcsm9MracEpqoeJ5quGnM/b9Sh/22WA=
1652
+ -----END CERTIFICATE-----
1653
+
1654
+ Wells Fargo Root CA
1655
+ ===================
1656
+ -----BEGIN CER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1700
+ VtA4oJVwIHaM190e3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtl
1701
+ vrsRls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ipmXeascCl
1702
+ OS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HHb6D0jqTsNFFbjCYDcKF3
1703
+ 1QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksfrK/7DZBaZmBwXarNeNQk7shBoJMBkpxq
1704
+ nvy5JMWzFYJ+vq6VK+uxwNrjAWALXmmshFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCy
1705
+ x/yP2FS1k2Kdzs9Z+z0YzirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMW
1706
+ NY6E0F/6MBr1mmz0DlP5OlvRHA==
1707
+ -----END CERTIFICATE-----
1708
+
1709
+ DigiCert Assured ID Root CA
1710
+ ===========================
1711
+ -----BEGIN CERTIFICATE-----
1712
+ MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG
1713
+ EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
1714
+ IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx
1715
+ MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
1716
+ ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew
1717
+ ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO
1718
+ 9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy
1719
+ UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW
1720
+ /lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy
1721
+ oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf
1722
+ GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF
1723
+ 66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq
1724
+ hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc
1725
+ EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn
1726
+ SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i
1727
+ 8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
1728
+ +o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
1729
+ -----END CERTIFICATE-----
1730
+
1731
+ DigiCert Global Root CA
1732
+ =======================
1733
+ -----BEGIN CERTIFICATE-----
1734
+ MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh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tGbfYmbW0W5BjfIt
1748
+ tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
1749
+ UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
1750
+ CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
1751
+ -----END CERTIFICATE-----
1752
+
1753
+ DigiCert High Assurance EV Root CA
1754
+ ==================================
1755
+ -----BEGIN CERTIFICATE-----
1756
+ MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
1757
+ EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
1758
+ KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
1759
+ MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
1760
+ MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
1761
+ Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
1762
+ Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS
1763
+ OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3
1764
+ MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ
1765
+ NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe
1766
+ h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB
1767
+ Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY
1768
+ JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ
1769
+ V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp
1770
+ myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK
1771
+ mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
1772
+ vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
1773
+ -----END CERTIFICATE-----
1774
+
1775
+ Certplus Class 2 Primary CA
1776
+ ===========================
1777
+ -----BEGIN CERTIFICATE-----
1778
+ MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE
1779
+ BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN
1780
+ OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy
1781
+ dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
1782
+ ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR
1783
+ 5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ
1784
+ Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO
1785
+ YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e
1786
+ e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME
1787
+ CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ
1788
+ YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t
1789
+ L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD
1790
+ P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R
1791
+ TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+
1792
+ 7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW
1793
+ //1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
1794
+ l7+ijrRU
1795
+ -----END CERTIFICATE-----
1796
+
1797
+ DST Root CA X3
1798
+ ==============
1799
+ -----BEGIN CERTIFICATE-----
1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RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS
1814
+ fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
1815
+ -----END CERTIFICATE-----
1816
+
1817
+ DST ACES CA X6
1818
+ ==============
1819
+ -----BEGIN CERTIFICATE-----
1820
+ MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQG
1821
+ EwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QxETAPBgNVBAsTCERTVCBBQ0VT
1822
+ MRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0wMzExMjAyMTE5NThaFw0xNzExMjAyMTE5NTha
1823
+ MFsxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UE
1824
+ CxMIRFNUIEFDRVMxFzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOC
1825
+ AQ8AMIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPuktKe1jzI
1826
+ DZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7gLFViYsx+tC3dr5BPTCa
1827
+ pCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZHfAjIgrrep4c9oW24MFbCswKBXy314pow
1828
+ GCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4aahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPy
1829
+ MjwmR/onJALJfh1biEITajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1Ud
1830
+ EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rkc3Qu
1831
+ Y29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjtodHRwOi8vd3d3LnRy
1832
+ dXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU
1833
+ CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2
1834
+ 5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t
1835
+ Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq
1836
+ nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs
1837
+ vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3
1838
+ oKfN5XozNmr6mis=
1839
+ -----END CERTIFICATE-----
1840
+
1841
+ TURKTRUST Certificate Services Provider Root 1
1842
+ ==============================================
1843
+ -----BEGIN CERTIFICATE-----
1844
+ MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOcUktUUlVTVCBF
1845
+ bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGDAJUUjEP
1846
+ MA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykgMjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0
1847
+ acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMx
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IdAaLX/7KfS0zgY
1861
+ nNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKSRGQDJereW26fyfJOrN3H
1862
+ -----END CERTIFICATE-----
1863
+
1864
+ TURKTRUST Certificate Services Provider Root 2
1865
+ ==============================================
1866
+ -----BEGIN CERTIFICATE-----
1867
+ MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBF
1868
+ bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP
1869
+ MA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg
1870
+ QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcN
1871
+ MDUxMTA3MTAwNzU3WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVr
1872
+ dHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEPMA0G
1873
+ A1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls
1874
+ acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwggEiMA0G
1875
+ CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqe
1876
+ LCDe2JAOCtFp0if7qnefJ1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKI
1877
+ x+XlZEdhR3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJQv2g
1878
+ QrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGXJHpsmxcPbe9TmJEr
1879
+ 5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1pzpwACPI2/z7woQ8arBT9pmAPAgMB
1880
+ AAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58SFq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8G
1881
+ A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/ntt
1882
+ Rbj2hWyfIvwqECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4
1883
+ Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFzgw2lGh1uEpJ+
1884
+ hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotHuFEJjOp9zYhys2AzsfAKRO8P
1885
+ 9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LSy3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5
1886
+ UrbnBEI=
1887
+ -----END CERTIFICATE-----
1888
+
1889
+ SwissSign Platinum CA - G2
1890
+ ==========================
1891
+ -----BEGIN CERTIFICATE-----
1892
+ MIIFwTCCA6mgAwIBAgIITrIAZwwDXU8wDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UEBhMCQ0gxFTAT
1893
+ BgNVBAoTDFN3aXNzU2lnbiBBRzEjMCEGA1UEAxMaU3dpc3NTaWduIFBsYXRpbnVtIENBIC0gRzIw
1894
+ HhcNMDYxMDI1MDgzNjAwWhcNMzYxMDI1MDgzNjAwWjBJMQswCQYDVQQGEwJDSDEVMBMGA1UEChMM
1895
+ U3dpc3NTaWduIEFHMSMwIQYDVQQDExpTd2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c2lnbi5jb20vMA0GCSqGSIb3DQEBBQUAA4ICAQAIhab1
1909
+ Fgz8RBrBY+D5VUYI/HAcQiiWjrfFwUF1TglxeeVtlspLpYhg0DB0uMoI3LQwnkAHFmtllXcBrqS3
1910
+ NQuB2nEVqXQXOHtYyvkv+8Bldo1bAbl93oI9ZLi+FHSjClTTLJUYFzX1UWs/j6KWYTl4a0vlpqD4
1911
+ U99REJNi54Av4tHgvI42Rncz7Lj7jposiU0xEQ8mngS7twSNC/K5/FqdOxa3L8iYq/6KUFkuozv8
1912
+ KV2LwUvJ4ooTHbG/u0IdUt1O2BReEMYxB+9xJ/cbOQncguqLs5WGXv312l0xpuAxtpTmREl0xRbl
1913
+ 9x8DYSjFyMsSoEJL+WuICI20MhjzdZ/EfwBPBZWcoxcCw7NTm6ogOSkrZvqdr16zktK1puEa+S1B
1914
+ aYEUtLS17Yk9zvupnTVCRLEcFHOBzyoBNZox1S2PbYTfgE1X4z/FhHXaicYwu+uPyyIIoK6q8QNs
1915
+ OktNCaUOcsZWayFCTiMlFGiudgp8DAdwZPmaL/YFOSbGDI8Zf0NebvRbFS/bYV3mZy8/CJT5YLSY
1916
+ Mdp08YSTcU1f+2BY0fvEwW2JorsgH51xkcsymxM9Pn2SUjWskpSi0xjCfMfqr3YFFt1nJ8J+HAci
1917
+ IfNAChs0B0QTwoRqjt8ZWr9/6x3iGjjRXK9HkmuAtTClyY3YqzGBH9/CZjfTk6mFhnll0g==
1918
+ -----END CERTIFICATE-----
1919
+
1920
+ SwissSign Gold CA - G2
1921
+ ======================
1922
+ -----BEGIN CERTIFICATE-----
1923
+ MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw
1924
+ EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN
1925
+ MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMD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XQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
1939
+ L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm
1940
+ 5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr
1941
+ 44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf
1942
+ Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m
1943
+ Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp
1944
+ mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
1945
+ vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
1946
+ KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
1947
+ NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
1948
+ viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
1949
+ -----END CERTIFICATE-----
1950
+
1951
+ SwissSign Silver CA - G2
1952
+ ========================
1953
+ -----BEGIN CERTIFICATE-----
1954
+ MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT
1955
+ BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQS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F6DNweRB
1969
+ tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
1970
+ cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P
1971
+ 4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F
1972
+ kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L
1973
+ 3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx
1974
+ /uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa
1975
+ DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP
1976
+ e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
1977
+ WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
1978
+ DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
1979
+ DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
1980
+ -----END CERTIFICATE-----
1981
+
1982
+ GeoTrust Primary Certification Authority
1983
+ ========================================
1984
+ -----BEGIN CERTIFICATE-----
1985
+ MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
1986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ZHa
1999
+ Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG
2000
+ 1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
2001
+ -----END CERTIFICATE-----
2002
+
2003
+ thawte Primary Root CA
2004
+ ======================
2005
+ -----BEGIN CERTIFICATE-----
2006
+ MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE
2007
+ BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
2008
+ aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
2009
+ cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3
2010
+ MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg
2011
+ SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv
2012
+ KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT
2013
+ FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs
2014
+ oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ
2015
+ 1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc
2016
+ q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K
2017
+ aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p
2018
+ afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD
2019
+ VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF
2020
+ AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
2021
+ uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
2022
+ xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
2023
+ jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
2024
+ z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
2025
+ -----END CERTIFICATE-----
2026
+
2027
+ VeriSign Class 3 Public Primary Certification Authority - G5
2028
+ ============================================================
2029
+ -----BEGIN CERTIFICATE-----
2030
+ MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
2031
+ BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
2032
+ ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
2033
+ IHVzZSBvbmx5MUUwQwYDVQQ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uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG
2047
+ SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+
2048
+ X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE
2049
+ KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC
2050
+ Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
2051
+ ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
2052
+ -----END CERTIFICATE-----
2053
+
2054
+ SecureTrust CA
2055
+ ==============
2056
+ -----BEGIN CERTIFICATE-----
2057
+ MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG
2058
+ EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy
2059
+ dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe
2060
+ BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC
2061
+ ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX
2062
+ OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t
2063
+ DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH
2064
+ GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b
2065
+ 01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH
2066
+ ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/
2067
+ BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj
2068
+ aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
2069
+ KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu
2070
+ SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf
2071
+ mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ
2072
+ nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
2073
+ 3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
2074
+ -----END CERTIFICATE-----
2075
+
2076
+ Secure Global CA
2077
+ ================
2078
+ -----BEGIN CERTIFICATE-----
2079
+ MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG
2080
+ EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAX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Ni5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5
2094
+ 3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
2095
+ f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
2096
+ -----END CERTIFICATE-----
2097
+
2098
+ COMODO Certification Authority
2099
+ ==============================
2100
+ -----BEGIN CERTIFICATE-----
2101
+ MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
2102
+ BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
2103
+ A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1
2104
+ dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb
2105
+ MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD
2106
+ T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
2107
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH
2108
+ +7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww
2109
+ xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV
2110
+ 4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA
2111
+ 1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI
2112
+ rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E
2113
+ BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k
2114
+ b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC
2115
+ AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP
2116
+ OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
2117
+ RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc
2118
+ IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
2119
+ +8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
2120
+ -----END CERTIFICATE-----
2121
+
2122
+ Network Solutions Certificate Authority
2123
+ =======================================
2124
+ -----BEGIN CERTIFICATE-----
2125
+ MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
2126
+ EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
2127
+ IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
2128
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EZbz3Htv
2141
+ wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
2142
+ ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
2143
+ -----END CERTIFICATE-----
2144
+
2145
+ WellsSecure Public Root Certificate Authority
2146
+ =============================================
2147
+ -----BEGIN CERTIFICATE-----
2148
+ MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM
2149
+ F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw
2150
+ NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN
2151
+ MDcxMjEzMTcwNzU0WhcNMjIxMjE0MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dl
2152
+ bGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYD
2153
+ VQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
2154
+ CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+rWxxTkqxtnt3CxC5FlAM1
2155
+ iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjUDk/41itMpBb570OYj7OeUt9tkTmPOL13
2156
+ i0Nj67eT/DBMHAGTthP796EfvyXhdDcsHqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8
2157
+ bJVhHlfXBIEyg1J55oNjz7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiB
2158
+ K0HmOFafSZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/SlwxlAgMB
2159
+ AAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqGKGh0dHA6Ly9jcmwu
2160
+ cGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0PAQH/BAQDAgHGMB0GA1UdDgQWBBQm
2161
+ lRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0jBIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGB
2162
+ i6SBiDCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRww
2163
+ GgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg
2164
+ Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEBALkVsUSRzCPI
2165
+ K0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd/ZDJPHV3V3p9+N701NX3leZ0
2166
+ bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pBA4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSlj
2167
+ qHyita04pO2t/caaH/+Xc/77szWnk4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+es
2168
+ E2fDbbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ
2169
+ tylv2G0xffX8oRAHh84vWdw+WNs=
2170
+ -----END CERTIFICATE-----
2171
+
2172
+ COMODO ECC Certification Authority
2173
+ ==================================
2174
+ -----BEGIN CERTIFICATE-----
2175
+ MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELM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YHE4RK
2206
+ q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q
2207
+ MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg
2208
+ Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI
2209
+ lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF
2210
+ 0mBWWg==
2211
+ -----END CERTIFICATE-----
2212
+
2213
+ Security Communication EV RootCA1
2214
+ =================================
2215
+ -----BEGIN CERTIFICATE-----
2216
+ MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
2217
+ U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2VjdXJpdHkgQ29tbXVuaWNh
2218
+ dGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIzMloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UE
2219
+ BhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNl
2220
+ Y3VyaXR5IENvbW11bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
2221
+ AQoCggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSERMqm4miO
2222
+ /VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gOzXppFodEtZDkBp2uoQSX
2223
+ WHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4z
2224
+ ZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDFMxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4
2225
+ bepJz11sS6/vmsJWXMY1VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK
2226
+ 9U2vP9eCOKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
2227
+ SIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HWtWS3irO4G8za+6xm
2228
+ iEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZq51ihPZRwSzJIxXYKLerJRO1RuGG
2229
+ Av8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDbEJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnW
2230
+ mHyojf6GPgcWkuF75x3sM3Z+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEW
2231
+ T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490
2232
+ -----END CERTIFICATE-----
2233
+
2234
+ OISTE WISeKey Global Root GA CA
2235
+ ===============================
2236
+ -----BEGIN CERTIFICATE-----
2237
+ MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE
2238
+ BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG
2239
+ A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH
2240
+ bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD
2241
+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ARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0=
2255
+ -----END CERTIFICATE-----
2256
+
2257
+ S-TRUST Authentication and Encryption Root CA 2005 PN
2258
+ =====================================================
2259
+ -----BEGIN CERTIFICATE-----
2260
+ MIIEezCCA2OgAwIBAgIQNxkY5lNUfBq1uMtZWts1tzANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UE
2261
+ BhMCREUxIDAeBgNVBAgTF0JhZGVuLVd1ZXJ0dGVtYmVyZyAoQlcpMRIwEAYDVQQHEwlTdHV0dGdh
2262
+ cnQxKTAnBgNVBAoTIERldXRzY2hlciBTcGFya2Fzc2VuIFZlcmxhZyBHbWJIMT4wPAYDVQQDEzVT
2263
+ LVRSVVNUIEF1dGhlbnRpY2F0aW9uIGFuZCBFbmNyeXB0aW9uIFJvb3QgQ0EgMjAwNTpQTjAeFw0w
2264
+ NTA2MjIwMDAwMDBaFw0zMDA2MjEyMzU5NTlaMIGuMQswCQYDVQQGEwJERTEgMB4GA1UECBMXQmFk
2265
+ ZW4tV3VlcnR0ZW1iZXJnIChCVykxEjAQBgNVBAcTCVN0dXR0Z2FydDEpMCcGA1UEChMgRGV1dHNj
2266
+ aGVyIFNwYXJrYXNzZW4gVmVybGFnIEdtYkgxPjA8BgNVBAMTNVMtVFJVU1QgQXV0aGVudGljYXRp
2267
+ b24gYW5kIEVuY3J5cHRpb24gUm9vdCBDQSAyMDA1OlBOMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
2268
+ MIIBCgKCAQEA2bVKwdMz6tNGs9HiTNL1toPQb9UY6ZOvJ44TzbUlNlA0EmQpoVXhOmCTnijJ4/Ob
2269
+ 4QSwI7+Vio5bG0F/WsPoTUzVJBY+h0jUJ67m91MduwwA7z5hca2/OnpYH5Q9XIHV1W/fuJvS9eXL
2270
+ g3KSwlOyggLrra1fFi2SU3bxibYs9cEv4KdKb6AwajLrmnQDaHgTncovmwsdvs91DSaXm8f1Xgqf
2271
+ eN+zvOyauu9VjxuapgdjKRdZYgkqeQd3peDRF2npW932kKvimAoA0SVtnteFhy+S8dF2g08LOlk3
2272
+ KC8zpxdQ1iALCvQm+Z845y2kuJuJja2tyWp9iRe79n+Ag3rm7QIDAQABo4GSMIGPMBIGA1UdEwEB
2273
+ /wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFTVFJv
2274
+ bmxpbmUxLTIwNDgtNTAdBgNVHQ4EFgQUD8oeXHngovMpttKFswtKtWXsa1IwHwYDVR0jBBgwFoAU
2275
+ D8oeXHngovMpttKFswtKtWXsa1IwDQYJKoZIhvcNAQEFBQADggEBAK8B8O0ZPCjoTVy7pWMciDMD
2276
+ pwCHpB8gq9Yc4wYfl35UvbfRssnV2oDsF9eK9XvCAPbpEW+EoFolMeKJ+aQAPzFoLtU96G7m1R08
2277
+ P7K9n3frndOMusDXtk3sU5wPBG7qNWdX4wple5A64U8+wwCSersFiXOMy6ZNwPv2AtawB6MDwidA
2278
+ nwzkhYItr5pCHdDHjfhA7p0GVxzZotiAFP7hYy0yh9WUUpY6RsZxlj33mA6ykaqP2vROJAA5Veit
2279
+ F7nTNCtKqUDMFypVZUF0Qn71wK/Ik63yGFs9iQzbRzkk+OBM8h+wPQrKBU6JIRrjKpms/H+h8Q8b
2280
+ Hz2eBIPdltkdOpQ=
2281
+ -----END CERTIFICATE-----
2282
+
2283
+ Microsec e-Szigno Root CA
2284
+ =========================
2285
+ -----BEGIN CERTIFICATE-----
2286
+ MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UE
2287
+ BhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNyb3NlYyBMdGQuMRQwEgYDVQQL
2288
+ EwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9zZWMgZS1Temlnbm8gUm9vdCBD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290IENBghEAzLjnv04pGv2i3Gal
2315
+ HCwPETAdBgNVHQ4EFgQUx6BJdRZhhNsxS4TS8TdAkO9O3PcwDQYJKoZIhvcNAQEFBQADggEBANMT
2316
+ nGZjWS7KXHAM/IO8VbH0jgdsZifOwTsgqRy7RlRw7lrMoHfqaEQn6/Ip3Xep1fvj1KcExJW4C+FE
2317
+ aGAHQzAxQmHl7tnlJNUb3+FKG6qfx1/4ehHqE5MAyopYse7tDk2016g2JnzgOsHVV4Lxdbb9iV/a
2318
+ 86g4nzUGCM4ilb7N1fy+W955a9x6qWVmvrElWl/tftOsRm1M9DKHtCAE4Gx4sHfRhUZLphK3dehK
2319
+ yVZs15KrnfVJONJPU+NVkBHbmJbGSfI+9J8b4PeI3CVimUTYc78/MPMMNz7UwiiAc7EBt51alhQB
2320
+ S6kRnSlqLtBdgcDPsiBDxwPgN05dCtxZICU=
2321
+ -----END CERTIFICATE-----
2322
+
2323
+ Certigna
2324
+ ========
2325
+ -----BEGIN CERTIFICATE-----
2326
+ MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw
2327
+ EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3
2328
+ MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI
2329
+ Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q
2330
+ XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH
2331
+ GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p
2332
+ ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg
2333
+ DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf
2334
+ Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ
2335
+ tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ
2336
+ BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J
2337
+ SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA
2338
+ hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+
2339
+ ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu
2340
+ PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY
2341
+ 1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
2342
+ WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
2343
+ -----END CERTIFICATE-----
2344
+
2345
+ AC Ra\xC3\xADz Certic\xC3\xA1mara S.A.
2346
+ ======================================
2347
+ -----BEGIN CERTIFICATE-----
2348
+ MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsxCzAJBgNVBAYT
2349
+ AkNPMUcwRQYDVQQKDD5Tb2NpZWRh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WaM3X94nCHNMyAK9Sy9NgWyo6R35rMDOhYil/SrnhLecU
2376
+ Iw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxkBYn8eNZcLCZDqQ==
2377
+ -----END CERTIFICATE-----
2378
+
2379
+ TC TrustCenter Class 2 CA II
2380
+ ============================
2381
+ -----BEGIN CERTIFICATE-----
2382
+ MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC
2383
+ REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy
2384
+ IENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYw
2385
+ MTEyMTQzODQzWhcNMjUxMjMxMjI1OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1
2386
+ c3RDZW50ZXIgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UE
2387
+ AxMcVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
2388
+ AQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jftMjWQ+nEdVl//OEd+DFw
2389
+ IxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKguNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2
2390
+ xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2JXjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQ
2391
+ Xa7pIXSSTYtZgo+U4+lK8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7u
2392
+ SNQZu+995OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1UdEwEB
2393
+ /wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3kUrL84J6E1wIqzCB
2394
+ 7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2NybC92Mi90
2395
+ Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBU
2396
+ cnVzdENlbnRlciUyMENsYXNzJTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i
2397
+ SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
2398
+ TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iSGNn3Bzn1LL4G
2399
+ dXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprtZjluS5TmVfwLG4t3wVMTZonZ
2400
+ KNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8au0WOB9/WIFaGusyiC2y8zl3gK9etmF1Kdsj
2401
+ TYjKUCjLhdLTEKJZbtOTVAB6okaVhgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kP
2402
+ JOzHdiEoZa5X6AeIdUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfk
2403
+ vQ==
2404
+ -----END CERTIFICATE-----
2405
+
2406
+ TC TrustCenter Class 3 CA II
2407
+ ============================
2408
+ -----BEGIN CERTIFICATE-----
2409
+ MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC
2410
+ REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGV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wMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i
2424
+ SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
2425
+ TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlNirTzwppVMXzE
2426
+ O2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8TtXqluJucsG7Kv5sbviRmEb8
2427
+ yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9
2428
+ IJqDnxrcOfHFcqMRA/07QlIp2+gB95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal
2429
+ 092Y+tTmBvTwtiBjS+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc
2430
+ 5A==
2431
+ -----END CERTIFICATE-----
2432
+
2433
+ TC TrustCenter Universal CA I
2434
+ =============================
2435
+ -----BEGIN CERTIFICATE-----
2436
+ MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTELMAkGA1UEBhMC
2437
+ REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy
2438
+ IFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcN
2439
+ MDYwMzIyMTU1NDI4WhcNMjUxMjMxMjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMg
2440
+ VHJ1c3RDZW50ZXIgR21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYw
2441
+ JAYDVQQDEx1UQyBU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+ ==========================
2458
+ -----BEGIN CERTIFICATE-----
2459
+ MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT
2460
+ RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG
2461
+ A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5
2462
+ MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G
2463
+ A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS
2464
+ b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5
2465
+ bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI
2466
+ KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY
2467
+ AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK
2468
+ Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV
2469
+ jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV
2470
+ HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr
2471
+ E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy
2472
+ zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8
2473
+ rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G
2474
+ dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
2475
+ Cm26OWMohpLzGITY+9HPBVZkVw==
2476
+ -----END CERTIFICATE-----
2477
+
2478
+ ComSign CA
2479
+ ==========
2480
+ -----BEGIN CERTIFICATE-----
2481
+ MIIDkzCCAnugAwIBAgIQFBOWgxRVjOp7Y+X8NId3RDANBgkqhkiG9w0BAQUFADA0MRMwEQYDVQQD
2482
+ EwpDb21TaWduIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQGEwJJTDAeFw0wNDAzMjQxMTMy
2483
+ MThaFw0yOTAzMTkxNTAyMThaMDQxEzARBgNVBAMTCkNvbVNpZ24gQ0ExEDAOBgNVBAoTB0NvbVNp
2484
+ Z24xCzAJBgNVBAYTAklMMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8ORUaSvTx49q
2485
+ ROR+WCf4C9DklBKK8Rs4OC8fMZwG1Cyn3gsqrhqg455qv588x26i+YtkbDqthVVRVKU4VbirgwTy
2486
+ P2Q298CNQ0NqZtH3FyrV7zb6MBBC11PN+fozc0yz6YQgitZBJzXkOPqUm7h65HkfM/sb2CEJKHxN
2487
+ GGleZIp6GZPKfuzzcuc3B1hZKKxC+cX/zT/npfo4sdAMx9lSGlPWgcxCejVb7Us6eva1jsz/D3zk
2488
+ YDaHL63woSV9/9JLEYhwVKZBqGdTUkJe5DSe5L6j7KpiXd3DTKaCQeQzC6zJMw9kglcq/QytNuEM
2489
+ rkvF7zuZ2SOzW120V+x0cAwqTwIDAQABo4GgMIGdMAwGA1UdEwQFMAMBAf8wPQYDVR0fBDYwNDAy
2490
+ oDCgLoYsaHR0cDovL2ZlZGlyLmNvbXNpZ24uY28uaWwvY3JsL0NvbVNpZ25DQS5jcmwwDgYDVR0P
2491
+ AQH/BAQDAgGGMB8GA1UdIwQYMBaAFEsBmz5WGmU2dst7l6qSBe4y5ygxMB0GA1UdDgQWBBRLAZs+
2492
+ VhplNnbLe5eqkgXuMucoMTANBgkqhkiG9w0BAQUFAAOCAQEA0Nmlfv4pYEWdfoPPbrxHbvUanlR2
2493
+ QnG0PFg/LUAlQvaBnPGJEMgOqnhPOAlXsDzACPw1jvFIUY0McXS6hMTXcpuEfDhOZAYnKuGntewI
2494
+ mbQKDdSFc8gS4TXt8QUxHXOZDOuWyt3T5oWq8Ir7dcHyCTxlZWTzTNity4hp8+SDtwy9F1qWF8pb
2495
+ /627HOkthIDYIb6FUtnUdLlphbpN7Sgy6/lhSuTENh4Z3G+EER+V9YMoGKgzkkMn3V0TBEVPh9VG
2496
+ zT2ouvDzuFYkRes3x+F2T3I5GN9+dHLHcy056mDmrRGiVod7w2ia/viMcKjfZTL0pECMocJEAw6U
2497
+ AGegcQCCSA==
2498
+ -----END CERTIFICATE-----
2499
+
2500
+ ComSign Secured CA
2501
+ ==================
2502
+ -----BEGIN CERTIFICATE-----
2503
+ MIIDqzCCApOgAwIBAgIRAMcoRwmzuGxFjB36JPU2TukwDQYJKoZIhvcNAQEFBQAwPDEbMBkGA1UE
2504
+ AxMSQ29tU2lnbiBTZWN1cmVkIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQGEwJJTDAeFw0w
2505
+ NDAzMjQxMTM3MjBaFw0yOTAzMTYxNTA0NTZaMDwxGzAZBgNVBAMTEkNvbVNpZ24gU2VjdXJlZCBD
2506
+ QTEQMA4GA1UEChMHQ29tU2lnbjELMAkGA1UEBhMCSUwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
2507
+ ggEKAoIBAQDGtWhfHZQV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JzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi
2538
+ 5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2
2539
+ hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T
2540
+ X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
2541
+ WL1WMRJOEcgh4LMRkWXbtKaIOM5V
2542
+ -----END CERTIFICATE-----
2543
+
2544
+ ePKI Root Certification Authority
2545
+ =================================
2546
+ -----BEGIN CERTIFICATE-----
2547
+ MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG
2548
+ EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg
2549
+ Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx
2550
+ MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq
2551
+ MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B
2552
+ AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs
2553
+ IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi
2554
+ lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv
2555
+ q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+r
2568
+ GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE
2569
+ xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx
2570
+ gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy
2571
+ sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD
2572
+ BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=
2573
+ -----END CERTIFICATE-----
2574
+
2575
+ T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3
2576
+ =============================================================================================================================
2577
+ -----BEGIN CERTIFICATE-----
2578
+ MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH
2579
+ DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q
2580
+ aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ry
2581
+ b25payB2ZSBLcmlwdG9sb2ppIEFyYcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNV
2582
+ BAsMGkthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUg
2583
+ S8O2ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAeFw0wNz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zrgxvMTfvCr4
2597
+ N5EY3ATIZJkrGG2AA1nJrvhY0D7twyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLT
2598
+ y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh
2599
+ LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+J1q2M
2600
+ dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI=
2601
+ -----END CERTIFICATE-----
2602
+
2603
+ Buypass Class 2 CA 1
2604
+ ====================
2605
+ -----BEGIN CERTIFICATE-----
2606
+ MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
2607
+ QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMiBDQSAxMB4XDTA2
2608
+ MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh
2609
+ c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZI
2610
+ hvcNAQEBBQADggEPADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7M
2611
+ cXA0ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLXl18xoS83
2612
+ 0r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVBHfCuuCkslFJgNJQ72uA4
2613
+ 0Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/R
2614
+ uFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNC
2615
+ MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0P
2616
+ AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLPgcIV
2617
+ 1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+DKhQ7SLHrQVMdvvt
2618
+ 7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKuBctN518fV4bVIJwo+28TOPX2EZL2
2619
+ fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHsh7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5w
2620
+ wDX3OaJdZtB7WZ+oRxKaJyOkLY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho
2621
+ -----END CERTIFICATE-----
2622
+
2623
+ Buypass Class 3 CA 1
2624
+ ====================
2625
+ -----BEGIN CERTIFICATE-----
2626
+ MIIDUzCCAjugAwIBAgIBAjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
2627
+ QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMyBDQSAxMB4XDTA1
2628
+ MDUwOTE0MTMwM1oXDTE1MDUwOTE0MTMwM1owSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh
2629
+ c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDMgQ0EgMTCCASIwDQYJKoZI
2630
+ hvcNAQEBBQADggEPADCCAQoCggEBAKSO13TZKWTeXx+HgJHqTjnmGcZEC4DVC69TB4sSveZn8AKx
2631
+ ifZgisRbsELRwCGoy+Gb72RRtqfPFfV0gGgEkKBYouZ0plNTVUhjP5JW3SROjvi6K//zNIqeKNc0
2632
+ n6wv1g/xpC+9UrJJhW05NfBEMJNGJPO251P7vGGvqaMU+8IXF4Rs4HyI+MkcVyzwPX6UvCWThOia
2633
+ AJpFBUJXgPROztmuOfbIUxAMZTpHe2DC1vqRycZxbL2RhzyRhkmr8w+gbCZ2Xhysm3HljbybIR6c
2634
+ 1jh+JIAVMYKWsUnTYjdbiAwKYjT+p0h+mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNC
2635
+ MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0P
2636
+ AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFPBdy7
2637
+ pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27sEzNxZy5p+qksP2bA
2638
+ EllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2mSlf56oBzKwzqBwKu5HEA6BvtjT5
2639
+ htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yCe/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQj
2640
+ el/wroQk5PMr+4okoyeYZdowdXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915
2641
+ -----END CERTIFICATE-----
2642
+
2643
+ EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1
2644
+ ==========================================================================
2645
+ -----BEGIN CERTIFICATE-----
2646
+ MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF
2647
+ bGVrdHJvbmlrIFNlcnRpZmlrY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o1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0
2661
+ Nokb+Clsi7n2l9GkLqq+CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
2662
+ /wQEAwIBBjAdBgNVHQ4EFgQU587GT/wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgwFoAU587GT/wW
2663
+ Z5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2+8ygjdsZs93/mQJ7ANtyVDR2t
2664
+ FcU22NU57/IeIl6zgrRdu0waypIN30ckHrMk2pGI6YNw3ZPX6bqz3xZaPt7gyPvT/Wwp+BVGoGgm
2665
+ zJNSroIBk5DKd8pNSe/iWtkqvTDOTLKBtjDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64k
2666
+ XPBfrAowzIpAoHMEwfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqT
2667
+ bCmYIai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJnxk1Gj7sU
2668
+ RT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4QDgZxGhBM/nV+/x5XOULK
2669
+ 1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9qKd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt
2670
+ 2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11thie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQ
2671
+ Y9iJSrSq3RZj9W6+YKH47ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9
2672
+ AahH3eU7QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT
2673
+ -----END CERTIFICATE-----
2674
+
2675
+ certSIGN ROOT CA
2676
+ ================
2677
+ -----BEGI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EHBDa0GpC9oHRxUIlt
2691
+ vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz
2692
+ TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD
2693
+ -----END CERTIFICATE-----
2694
+
2695
+ CNNIC ROOT
2696
+ ==========
2697
+ -----BEGIN CERTIFICATE-----
2698
+ MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJDTjEOMAwGA1UE
2699
+ ChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2MDcwOTE0WhcNMjcwNDE2MDcw
2700
+ OTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1Qw
2701
+ ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzD
2702
+ o+/hn7E7SIX1mlwhIhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tiz
2703
+ VHa6dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZOV/kbZKKT
2704
+ VrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrCGHn2emU1z5DrvTOTn1Or
2705
+ czvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gNv7Sg2Ca+I19zN38m5pIEo3/PIKe38zrK
2706
+ y5nLAgMBAAGjczBxMBEGCWCGSAGG+EIBAQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscC
2707
+ wQ7vptU7ETAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991S
2708
+ lgrHAsEO76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnKOOK5
2709
+ Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvHugDnuL8BV8F3RTIM
2710
+ O/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7HgviyJA/qIYM/PmLXoXLT1tLYhFHxUV8
2711
+ BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fLbuXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2
2712
+ G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m
2713
+ mxE=
2714
+ -----END CERTIFICATE-----
2715
+
2716
+ ApplicationCA - Japanese Government
2717
+ ===================================
2718
+ -----BEGIN CERTIFICATE-----
2719
+ MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT
2720
+ SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw
2721
+ MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl
2722
+ cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
2723
+ CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4
2724
+ fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN
2725
+ wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE
2726
+ jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu
2727
+ nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU
2728
+ WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV
2729
+ BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD
2730
+ vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs
2731
+ o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g
2732
+ /DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD
2733
+ io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW
2734
+ dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
2735
+ rosot4LKGAfmt1t06SAZf7IbiVQ=
2736
+ -----END CERTIFICATE-----
2737
+
2738
+ GeoTrust Primary Certification Authority - G3
2739
+ =============================================
2740
+ -----BEGIN CERTIFICATE-----
2741
+ MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
2742
+ BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0
2743
+ IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUH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
2757
+ AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
2758
+ t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
2759
+ -----END CERTIFICATE-----
2760
+
2761
+ thawte Primary Root CA - G2
2762
+ ===========================
2763
+ -----BEGIN CERTIFICATE-----
2764
+ MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC
2765
+ VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu
2766
+ IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg
2767
+ Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV
2768
+ MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG
2769
+ b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt
2770
+ IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS
2771
+ LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5
2772
+ 8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU
2773
+ mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN
2774
+ G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K
2775
+ rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
2776
+ -----END CERTIFICATE-----
2777
+
2778
+ thawte Primary Root CA - G3
2779
+ ===========================
2780
+ -----BEGIN CERTIFICATE-----
2781
+ MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE
2782
+ BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
2783
+ aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
2784
+ cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w
2785
+ ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
2786
+ d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD
2787
+ VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG
2788
+ A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
2789
+ MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At
2790
+ P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC
2791
+ +BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY
2792
+ 7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW
2793
+ vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E
2794
+ BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ
2795
+ KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK
2796
+ A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
2797
+ t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC
2798
+ 8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm
2799
+ er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A=
2800
+ -----END CERTIFICATE-----
2801
+
2802
+ GeoTrust Primary Certification Authority - G2
2803
+ =============================================
2804
+ -----BEGIN CERTIFICATE-----
2805
+ MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC
2806
+ VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu
2807
+ Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD
2808
+ ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1
2809
+ OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
2810
+ MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl
2811
+ b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG
2812
+ BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc
2813
+ KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD
2814
+ VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+
2815
+ EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m
2816
+ ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2
2817
+ npaqBA+K
2818
+ -----END CERTIFICATE-----
2819
+
2820
+ VeriSign Universal Root Certification Authority
2821
+ ===============================================
2822
+ -----BEGIN CERTIFICATE-----
2823
+ MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
2824
+ BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
2825
+ ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
2826
+ IHVzZSBvbmx5MTgwNgY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d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
2840
+ Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
2841
+ Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
2842
+ P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
2843
+ wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
2844
+ mJO37M2CYfE45k+XmCpajQ==
2845
+ -----END CERTIFICATE-----
2846
+
2847
+ VeriSign Class 3 Public Primary Certification Authority - G4
2848
+ ============================================================
2849
+ -----BEGIN CERTIFICATE-----
2850
+ MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
2851
+ VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
2852
+ b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
2853
+ ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
2854
+ YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
2855
+ MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
2856
+ cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
2857
+ b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
2858
+ IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
2859
+ Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
2860
+ rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
2861
+ /zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
2862
+ HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
2863
+ Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
2864
+ A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
2865
+ AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
2866
+ -----END CERTIFICATE-----
2867
+
2868
+ NetLock Arany (Class Gold) Főtanúsítvány
2869
+ ============================================
2870
+ -----BEGIN CERTIFICATE-----
2871
+ MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G
2872
+ A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610
2873
+ dsOhbnlraWFkw7NrIChDZXJ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cTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
2887
+ bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna
2888
+ NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu
2889
+ dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
2890
+ -----END CERTIFICATE-----
2891
+
2892
+ Staat der Nederlanden Root CA - G2
2893
+ ==================================
2894
+ -----BEGIN CERTIFICATE-----
2895
+ MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
2896
+ CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
2897
+ Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC
2898
+ TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
2899
+ ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ
2900
+ 5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn
2901
+ vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj
2902
+ CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil
2903
+ e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn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XYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF
2917
+ URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb
2918
+ CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h
2919
+ oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV
2920
+ IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm
2921
+ 66+KAQ==
2922
+ -----END CERTIFICATE-----
2923
+
2924
+ CA Disig
2925
+ ========
2926
+ -----BEGIN CERTIFICATE-----
2927
+ MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzETMBEGA1UEBxMK
2928
+ QnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwHhcNMDYw
2929
+ MzIyMDEzOTM0WhcNMTYwMzIyMDEzOTM0WjBKMQswCQYDVQQGEwJTSzETMBEGA1UEBxMKQnJhdGlz
2930
+ bGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwggEiMA0GCSqGSIb3
2931
+ DQEBAQUAA4IBDwAwggEKAoIBAQCS9jHBfYj9mQGp2HvycXXxMcbzdWb6UShGhJd4NLxs/LxFWYgm
2932
+ GErENx+hSkS943EE9UQX4j/8SFhvXJ56CbpRNyIjZkMhsDxkovhqFQ4/61HhVKndBpnXmjxUizkD
2933
+ Pw/Fzsbrg3ICqB9x8y34dQjbYkzo+s7552oftms1grrijxaSfQUMbEYDXcDtab86wYqg6I7ZuUUo
2934
+ hwjstMoVvoLdtUSLLa2GDGhibYVW8qwUYzrG0ZmsNHhWS8+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GCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nw
2966
+ cy8wKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE
2967
+ FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcYP2/v6X2+MA4G
2968
+ A1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOiCfP+JmeaUOTDBS8rNXiRTHyo
2969
+ ERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+gkcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyL
2970
+ abVAyJRld/JXIWY7zoVAtjNjGr95HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678
2971
+ IIbsSt4beDI3poHSna9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkh
2972
+ Mp6qqIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0ZTbvGRNs2
2973
+ yyqcjg==
2974
+ -----END CERTIFICATE-----
2975
+
2976
+ Hongkong Post Root CA 1
2977
+ =======================
2978
+ -----BEGIN CERTIFICATE-----
2979
+ MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT
2980
+ DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx
2981
+ NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n
2982
+ IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF
2983
+ AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1
2984
+ ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr
2985
+ auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh
2986
+ qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
2987
+ V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
2988
+ HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i
2989
+ h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio
2990
+ l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei
2991
+ IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps
2992
+ T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT
2993
+ c4afU9hDDl3WY4JxHYB0yvbiAmvZWg==
2994
+ -----END CERTIFICATE-----
2995
+
2996
+ SecureSign RootCA11
2997
+ ===================
2998
+ -----BEGIN CERTIFICATE-----
2999
+ MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi
3000
+ SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS
3001
+ b290Q0ExM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ObjBmNQSdJQO7e5iNEOdyhIta6A/I=
3015
+ -----END CERTIFICATE-----
3016
+
3017
+ ACEDICOM Root
3018
+ =============
3019
+ -----BEGIN CERTIFICATE-----
3020
+ MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UEAwwNQUNFRElD
3021
+ T00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMB4XDTA4
3022
+ MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEWMBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoG
3023
+ A1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEF
3024
+ AAOCAg8AMIICCgKCAgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHk
3025
+ WLn709gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7XBZXehuD
3026
+ YAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5PGrjm6gSSrj0RuVFCPYew
3027
+ MYWveVqc/udOXpJPQ/yrOq2lEiZmueIM15jO1FillUAKt0SdE3QrwqXrIhWYENiLxQSfHY9g5QYb
3028
+ m8+5eaA9oiM/Qj9r+hwDezCNzmzAv+YbX79nuIQZ1RXve8uQNjFiybwCq0Zfm/4aaJQ0PZCOrfbk
3029
+ HQl/Sog4P75n/TSW9R28MHTLOO7VbKvU/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXTT
3030
+ xKJxqvQUfecyuB+81fFOvW8XAjnXDpVCOscAPukmYxHqC9FK/xidstd7LzrZlvvoHpKuE1XI2Sf2
3031
+ 3EgbsCTBheN3nZqk8wwRHQ3ItBTutYJXCb8gWH8vIiPYcMt5bMlL8qkqyPyH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puvoDs3zk4E7Czp3o
3045
+ tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA==
3046
+ -----END CERTIFICATE-----
3047
+
3048
+ Verisign Class 1 Public Primary Certification Authority
3049
+ =======================================================
3050
+ -----BEGIN CERTIFICATE-----
3051
+ MIICPDCCAaUCED9pHoGc8JpK83P/uUii5N0wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx
3052
+ FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5
3053
+ IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow
3054
+ XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAx
3055
+ IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
3056
+ A4GNADCBiQKBgQDlGb9to1ZhLZlIcfZn3rmN67eehoAKkQ76OCWvRoiC5XOooJskXQ0fzGVuDLDQ
3057
+ VoQYh5oGmxChc9+0WDlrbsH2FdWoqD+qEgaNMax/sDTXjzRniAnNFBHiTkVWaR94AoDa3EeRKbs2
3058
+ yWNcxeDXLYd7obcysHswuiovMaruo2fa2wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFgVKTk8d6Pa
3059
+ XCUDfGD67gmZPCcQcMgMCeazh88K4hiWNWLMv5sneYlfycQJ9M61Hd8qveXbhpxoJeUwfLaJFf5n
3060
+ 0a3hUKw8fGJLj7qE1xIVGx/KXQ/BUpQqEZnae88MNhPVNdwQGVnqlMEAv3WP2fr9dgTbYruQagPZ
3061
+ RjXZ+Hxb
3062
+ -----END CERTIFICATE-----
3063
+
3064
+ Verisign Class 3 Public Primary Certification Authority
3065
+ =======================================================
3066
+ -----BEGIN CERTIFICATE-----
3067
+ MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx
3068
+ FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
3069
+ IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow
3070
+ XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
3071
+ IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
3072
+ A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
3073
+ f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
3074
+ hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky
3075
+ CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX
3076
+ bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/
3077
+ D/xwzoiQ
3078
+ -----END CERTIFICATE-----
3079
+
3080
+ Microsec e-Szigno Root CA 2009
3081
+ ==============================
3082
+ -----BEGIN CERTIFICATE-----
3083
+ MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER
3084
+ MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3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pL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX
3098
+ I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
3099
+ tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02
3100
+ yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi
3101
+ LXpUq3DDfSJlgnCW
3102
+ -----END CERTIFICATE-----
3103
+
3104
+ E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi
3105
+ ===================================================
3106
+ -----BEGIN CERTIFICATE-----
3107
+ MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
3108
+ EwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxpZ2kgQS5TLjE8MDoGA1UEAxMz
3109
+ ZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3
3110
+ MDEwNDExMzI0OFoXDTE3MDEwNDExMzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0
3111
+ cm9uaWsgQmlsZ2kgR3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9u
3112
+ aWsgU2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
3113
+ AQoCggEBAMMSIJ6wXgBljU5Gu4Bc6SwGl9XzcslwuedLZYDBS75+PNdUMZTe1RK6UxYC6lhj71vY
3114
+ 8+0qGqpxSKPcEC1fX+tcS5yWCEIlKBHMilpiAVDV6wlTL/jDj/6z/P2douNffb7tC+Bg62nsM+3Y
3115
+ jfsSSYMAyYuXjDtzKjKzEve5TfL0TW3H5tYmNwjy2f1rXKPlSFxYvEK+A1qBuhw1DADT9SN+cTAI
3116
+ JjjcJRFHLfO6IxClv7wC90Nex/6wN1CZew+TzuZDLMN+DfIcQ2Zgy2ExR4ejT669VmxMvLz4Bcpk
3117
+ 9Ok0oSy1c+HCPujIyTQlCFzz7abHlJ+tiEMl1+E5YP6sOVkCAwEAAaNCMEAwDgYDVR0PAQH/BAQD
3118
+ AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ/uRLOU1fqRTy7ZVZoEVtstxNulMA0GCSqG
3119
+ SIb3DQEBBQUAA4IBAQB/X7lTW2M9dTLn+sR0GstG30ZpHFLPqk/CaOv/gKlR6D1id4k9CnU58W5d
3120
+ F4dvaAXBlGzZXd/aslnLpRCKysw5zZ/rTt5S/wzw9JKp8mxTq5vSR6AfdPebmvEvFZ96ZDAYBzwq
3121
+ D2fK/A+JYZ1lpTzlvBNbCNvj/+27BrtqBrF6T2XGgv0enIu1De5Iu7i9qgi0+6N8y5/NkHZchpZ4
3122
+ Vwpm+Vganf2XKWDeEaaQHBkc7gGWIjQ0LpH5t8Qn0Xvmv/uARFoW5evg1Ao4vOSR49XrXMGs3xtq
3123
+ fJ7lddK2l4fbzIcrQzqECK+rPNv3PGYxhrCdU3nt+CPeQuMtgvEP5fqX
3124
+ -----END CERTIFICATE-----
3125
+
3126
+ GlobalSign Root CA - R3
3127
+ =======================
3128
+ -----BEGIN CERTIFICATE-----
3129
+ MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv
3130
+ YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
3131
+ bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
3132
+ aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
3133
+ bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt
3134
+ iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ
3135
+ 0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3
3136
+ rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl
3137
+ OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2
3138
+ xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
3139
+ FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7
3140
+ lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8
3141
+ EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E
3142
+ bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18
3143
+ YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
3144
+ kpeDMdmztcpHWD9f
3145
+ -----END CERTIFICATE-----
3146
+
3147
+ TC TrustCenter Universal CA III
3148
+ ===============================
3149
+ -----BEGIN C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w0BAQUFAAOCAQEA
3163
+ g8ev6n9NCjw5sWi+e22JLumzCecYV42FmhfzdkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+
3164
+ KGwWaODIl0YgoGhnYIg5IFHYaAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhK
3165
+ BgePxLcHsU0GDeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV
3166
+ CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPHLQNjO9Po5KIq
3167
+ woIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg==
3168
+ -----END CERTIFICATE-----
3169
+
3170
+ Autoridad de Certificacion Firmaprofesional CIF A62634068
3171
+ =========================================================
3172
+ -----BEGIN CERTIFICATE-----
3173
+ MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA
3174
+ BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
3175
+ MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw
3176
+ QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
3177
+ NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
3178
+ Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
3179
+ B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqja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+ R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP
3194
+ T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f
3195
+ Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl
3196
+ osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR
3197
+ crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR
3198
+ saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD
3199
+ KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi
3200
+ 6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
3201
+ -----END CERTIFICATE-----
3202
+
3203
+ Izenpe.com
3204
+ ==========
3205
+ -----BEGIN CERTIFICATE-----
3206
+ MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG
3207
+ EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz
3208
+ MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu
3209
+ QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ
3210
+ 03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqH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p9MiDrAyw6l
3224
+ Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga
3225
+ kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q
3226
+ hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs
3227
+ g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5
3228
+ aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5
3229
+ nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC
3230
+ ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo
3231
+ Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
3232
+ WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
3233
+ -----END CERTIFICATE-----
3234
+
3235
+ Chambers of Commerce Root - 2008
3236
+ ================================
3237
+ -----BEGIN CERTIFICATE-----
3238
+ MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD
3239
+ MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
3240
+ bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
3241
+ QS4xK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RLLmF
3267
+ 9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK
3268
+ zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG
3269
+ nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
3270
+ OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ
3271
+ -----END CERTIFICATE-----
3272
+
3273
+ Global Chambersign Root - 2008
3274
+ ==============================
3275
+ -----BEGIN CERTIFICATE-----
3276
+ MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
3277
+ MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
3278
+ bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
3279
+ QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx
3280
+ NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg
3281
+ Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ
3282
+ QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
3283
+ aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf
3284
+ VtPkOpt2RbQ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kEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp
3298
+ 1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0
3299
+ dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG
3300
+ /5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6
3301
+ ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s
3302
+ dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg
3303
+ 9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH
3304
+ foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du
3305
+ qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr
3306
+ P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
3307
+ c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
3308
+ 09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
3309
+ -----END CERTIFICATE-----
3310
+
3311
+ Go Daddy Root Certificate Authority - G2
3312
+ ========================================
3313
+ -----BEGIN CERTIFICATE-----
3314
+ MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9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8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r
3328
+ 5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV
3329
+ N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
3330
+ LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1
3331
+ -----END CERTIFICATE-----
3332
+
3333
+ Starfield Root Certificate Authority - G2
3334
+ =========================================
3335
+ -----BEGIN CERTIFICATE-----
3336
+ MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
3337
+ B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
3338
+ b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0
3339
+ eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw
3340
+ DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg
3341
+ VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB
3342
+ dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv
3343
+ W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs
3344
+ bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk
3345
+ N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf
3346
+ ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU
3347
+ JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
3348
+ AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol
3349
+ TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx
3350
+ 4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw
3351
+ F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
3352
+ pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ
3353
+ c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
3354
+ -----END CERTIFICATE-----
3355
+
3356
+ Starfield Services Root Certificate Authority - G2
3357
+ ==================================================
3358
+ -----BEGIN CERTIFICATE-----
3359
+ MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
3360
+ B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
3361
+ b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl
3362
+ IEF1dGhvcml0eSAtI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+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza
3376
+ YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6
3377
+ -----END CERTIFICATE-----
3378
+
3379
+ AffirmTrust Commercial
3380
+ ======================
3381
+ -----BEGIN CERTIFICATE-----
3382
+ MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS
3383
+ BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw
3384
+ MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
3385
+ bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF
3386
+ AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb
3387
+ DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV
3388
+ C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6
3389
+ BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww
3390
+ MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV
3391
+ HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
3392
+ AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG
3393
+ hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi
3394
+ qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv
3395
+ 0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh
3396
+ sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
3397
+ -----END CERTIFICATE-----
3398
+
3399
+ AffirmTrust Networking
3400
+ ======================
3401
+ -----BEGIN CERTIFICATE-----
3402
+ MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS
3403
+ BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw
3404
+ MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
3405
+ bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF
3406
+ AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE
3407
+ Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI
3408
+ dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24
3409
+ /PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb
3410
+ h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV
3411
+ HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
3412
+ AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu
3413
+ UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6
3414
+ 12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23
3415
+ WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9
3416
+ /ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
3417
+ -----END CERTIFICATE-----
3418
+
3419
+ AffirmTrust Premium
3420
+ ===================
3421
+ -----BEGIN CERTIFICATE-----
3422
+ MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS
3423
+ BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy
3424
+ OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy
3425
+ dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
3426
+ MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn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OOF6S
3440
+ L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK
3441
+ +4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV
3442
+ BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg
3443
+ IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60
3444
+ g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb
3445
+ zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw==
3446
+ -----END CERTIFICATE-----
3447
+
3448
+ AffirmTrust Premium ECC
3449
+ =======================
3450
+ -----BEGIN CERTIFICATE-----
3451
+ MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV
3452
+ BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx
3453
+ MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U
3454
+ cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA
3455
+ IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ
3456
+ N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW
3457
+ BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK
3458
+ BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X
3459
+ 57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM
3460
+ eQ==
3461
+ -----END CERTIFICATE-----
3462
+
3463
+ Certum Trusted Network CA
3464
+ =========================
3465
+ -----BEGIN CERTIFICATE-----
3466
+ MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK
3467
+ ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv
3468
+ biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy
3469
+ MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU
3470
+ ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
3471
+ MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
3472
+ AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC
3473
+ l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J
3474
+ J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4
3475
+ fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0
3476
+ cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB
3477
+ Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw
3478
+ DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj
3479
+ jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1
3480
+ mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
3481
+ Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
3482
+ 03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
3483
+ -----END CERTIFICATE-----
3484
+
3485
+ Certinomis - Autorité Racine
3486
+ =============================
3487
+ -----BEGIN CERTIFICATE-----
3488
+ MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK
3489
+ Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAkBgNVBAMMHUNlcnRpbm9taXMg
3490
+ LSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkG
3491
+ A1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYw
3492
+ JAYDVQ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ov3/4gbIOZ/x
3505
+ WqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZMOH8oMDX/nyNTt7buFHAAQCva
3506
+ R6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40
3507
+ nJ+U8/aGH88bc62UeYdocMMzpXDn2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1B
3508
+ CxMjidPJC+iKunqjo3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjv
3509
+ JL1vnxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG5ERQL1TE
3510
+ qkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b
3511
+ WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE
3512
+ wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/
3513
+ vgt2Fl43N+bYdJeimUV5
3514
+ -----END CERTIFICATE-----
3515
+
3516
+ Root CA Generalitat Valenciana
3517
+ ==============================
3518
+ -----BEGIN CERTIFICATE-----
3519
+ MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJFUzEfMB0GA1UE
3520
+ ChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290
3521
+ IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwHhcNMDEwNzA2MTYyMjQ3WhcNMjEwNzAxMTUyMjQ3
3522
+ WjBoMQswCQYDVQQGEwJFUzEfMB0GA1UEChMWR2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dDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAVdRU0VlIXLOThaq/Yy/kgM40
3567
+ ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fGKOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmr
3568
+ sQd7TZjTXLDR8KdCoLXEjq/+8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZd
3569
+ JXDRZslo+S4RFGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS
3570
+ mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmEDNuxUCAKGkq6
3571
+ ahq97BvIxYSazQ==
3572
+ -----END CERTIFICATE-----
3573
+
3574
+ TWCA Root Certification Authority
3575
+ =================================
3576
+ -----BEGIN CERTIFICATE-----
3577
+ MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ
3578
+ VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh
3579
+ dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG
3580
+ EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB
3581
+ IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
3582
+ AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx
3583
+ QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC
3584
+ oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP
3585
+ 4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r
3586
+ y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB
3587
+ BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG
3588
+ 9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC
3589
+ mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
3590
+ QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
3591
+ T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
3592
+ Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
3593
+ -----END CERTIFICATE-----
3594
+
3595
+ Security Communication RootCA2
3596
+ ==============================
3597
+ -----BEGIN CERTIFICATE-----
3598
+ MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
3599
+ U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh
3600
+ dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC
3601
+ SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy
3602
+ aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
3603
+ ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++
3604
+ +T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R
3605
+ 3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV
3606
+ spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K
3607
+ EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8
3608
+ QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB
3609
+ CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj
3610
+ u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk
3611
+ 3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q
3612
+ tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29
3613
+ mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
3614
+ -----END CERTIFICATE-----
3615
+
3616
+ EC-ACC
3617
+ ======
3618
+ -----BEGIN CERTIFICATE-----
3619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H7nF2W4onW4
3632
+ HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a
3633
+ E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw
3634
+ 0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E
3635
+ BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD
3636
+ VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0
3637
+ Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l
3638
+ dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ
3639
+ lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa
3640
+ Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe
3641
+ l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2
3642
+ E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D
3643
+ 5EI=
3644
+ -----END CERTIFICATE-----
3645
+
3646
+ Hellenic Academic and Research Institutions RootCA 2011
3647
+ =======================================================
3648
+ -----BEGIN CERTIFICATE-----
3649
+ MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BA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ub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu
3663
+ b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt
3664
+ XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
3665
+ TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD
3666
+ /md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N
3667
+ 7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4
3668
+ -----END CERTIFICATE-----
3669
+
3670
+ Actalis Authentication Root CA
3671
+ ==============================
3672
+ -----BEGIN CERTIFICATE-----
3673
+ MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM
3674
+ BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE
3675
+ AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky
3676
+ MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz
3677
+ IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
3678
+ IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ
3679
+ wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8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b2rykOLpn7VU+
3693
+ Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC
3694
+ 4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo
3695
+ 2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz
3696
+ lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem
3697
+ OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9
3698
+ vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
3699
+ -----END CERTIFICATE-----
3700
+
3701
+ Trustis FPS Root CA
3702
+ ===================
3703
+ -----BEGIN CERTIFICATE-----
3704
+ MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG
3705
+ EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290
3706
+ IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV
3707
+ BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ
3708
+ KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ
3709
+ RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk
3710
+ H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa
3711
+ cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt
3712
+ o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA
3713
+ AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd
3714
+ BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c
3715
+ GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC
3716
+ yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P
3717
+ 8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV
3718
+ l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl
3719
+ iB6XzCGcKQENZetX2fNXlrtIzYE=
3720
+ -----END CERTIFICATE-----
3721
+
3722
+ StartCom Certification Authority
3723
+ ================================
3724
+ -----BEGIN CERTIFICATE-----
3725
+ MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
3726
+ U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu
3727
+ ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdX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EXoPBKlCcWw0bdT82AUuoVpaiF8H3VhFyAX
3754
+ e2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVFP0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA
3755
+ 2MFrLH9ZXF2RsXAiV+uKa0hK1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBs
3756
+ HvUwyKMQ5bLmKhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE
3757
+ JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ8dCAWZvLMdib
3758
+ D4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnmfyWl8kgAwKQB2j8=
3759
+ -----END CERTIFICATE-----
3760
+
3761
+ StartCom Certification Authority G2
3762
+ ===================================
3763
+ -----BEGIN CERTIFICATE-----
3764
+ MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
3765
+ U3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
3766
+ RzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UE
3767
+ ChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3Jp
3768
+ dHkgRzIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8O
3769
+ o1XJJZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsDvfOpL9HG
3770
+ 4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQ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y6NHrgbuxu9mk47EDTc
3784
+ nIhT76IxW1hPkWLIwpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/Xld
3785
+ blhYXzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5lIxKVCCIc
3786
+ l85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoohdVddLHRDiBYmxOlsGOm
3787
+ 7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulrso8uBtjRkcfGEvRM/TAXw8HaOFvjqerm
3788
+ obp573PYtlNXLfbQ4ddI
3789
+ -----END CERTIFICATE-----
3790
+
3791
+ Buypass Class 2 Root CA
3792
+ =======================
3793
+ -----BEGIN CERTIFICATE-----
3794
+ MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
3795
+ QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X
3796
+ DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
3797
+ eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw
3798
+ DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1
3799
+ g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn
3800
+ 9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b
3801
+ /+EmGVnAJLqBcXmQRFBoJJRfu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Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0
3815
+ oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC
3816
+ wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS
3817
+ CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN
3818
+ rJgWVqA=
3819
+ -----END CERTIFICATE-----
3820
+
3821
+ Buypass Class 3 Root CA
3822
+ =======================
3823
+ -----BEGIN CERTIFICATE-----
3824
+ MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
3825
+ QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X
3826
+ DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
3827
+ eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw
3828
+ DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH
3829
+ sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR
3830
+ 5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh
3831
+ 7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ
3832
+ ZoYS6J1yFhNkUsepNxz9gjDthBgd9K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buHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug
3846
+ UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe
3847
+ eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi
3848
+ Cp/HuZc=
3849
+ -----END CERTIFICATE-----
3850
+
3851
+ T-TeleSec GlobalRoot Class 3
3852
+ ============================
3853
+ -----BEGIN CERTIFICATE-----
3854
+ MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
3855
+ IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
3856
+ cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx
3857
+ MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
3858
+ dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
3859
+ ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3
3860
+ DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK
3861
+ 9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU
3862
+ NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF
3863
+ iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W
3864
+ 0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA
3865
+ MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr
3866
+ AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb
3867
+ fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT
3868
+ ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h
3869
+ P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
3870
+ e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw==
3871
+ -----END CERTIFICATE-----
3872
+
3873
+ EE Certification Centre Root CA
3874
+ ===============================
3875
+ -----BEGIN CERTIFICATE-----
3876
+ MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
3877
+ EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy
3878
+ dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw
3879
+ MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB
3880
+ UyBTZXJ0aWZpdH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*/
5
+ final class BackWPup_Admin {
6
+
7
+ private static $instance = NULL;
8
+ public $page_hooks = array();
9
+
10
+ /**
11
+ *
12
+ * Set needed filters and actions and load all needed
13
+ *
14
+ * @return \BackWPup_Admin
15
+ */
16
+ public function __construct() {
17
+
18
+ //Load text domain
19
+ load_plugin_textdomain( 'backwpup', FALSE, BackWPup::get_plugin_data( 'BaseName' ) . '/languages' );
20
+
21
+ //Add menu pages
22
+ add_filter( 'backwpup_admin_pages', array( $this, 'admin_page_jobs' ), 2 );
23
+ add_filter( 'backwpup_admin_pages', array( $this, 'admin_page_editjob' ), 3 );
24
+ add_filter( 'backwpup_admin_pages', array( $this, 'admin_page_logs' ), 4 );
25
+ add_filter( 'backwpup_admin_pages', array( $this, 'admin_page_backups' ), 5 );
26
+ add_filter( 'backwpup_admin_pages', array( $this, 'admin_page_settings' ), 6 );
27
+ add_filter( 'backwpup_admin_pages', array( $this, 'admin_page_about' ), 20 );
28
+
29
+ //Add Menu
30
+ if ( is_multisite() )
31
+ add_action( 'network_admin_menu', array( $this, 'admin_menu' ) );
32
+ else
33
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
34
+ //add notices
35
+ add_action('admin_notices', array( $this, 'admin_notices' ) );
36
+ //add Plugin links
37
+ add_filter( 'plugin_row_meta', array( $this, 'plugin_links' ), 10, 2 );
38
+ //add more actions
39
+ add_action( 'admin_init', array( $this, 'admin_init' ) );
40
+ //add more actions
41
+ add_action( 'admin_head', array( $this, 'admin_head' ) );
42
+ //Save Form posts general
43
+ add_action( 'admin_post_backwpup', array( $this, 'save_post_form' ) );
44
+ //Save Form posts wizard
45
+ add_action( 'admin_post_backwpup_wizard', array( 'BackWPup_Page_Wizard', 'save_post_form' ) );
46
+ //Admin Footer Text replacement
47
+ add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 100 );
48
+ add_filter( 'update_footer', array( $this, 'update_footer' ), 100 );
49
+ }
50
+
51
+ /**
52
+ * @static
53
+ * @return \BackWPup
54
+ */
55
+ public static function getInstance() {
56
+
57
+ if (NULL === self::$instance) {
58
+ self::$instance = new self;
59
+ }
60
+ return self::$instance;
61
+ }
62
+
63
+ private function __clone() {}
64
+
65
+ /**
66
+ * Admin init function
67
+ */
68
+ public function admin_init() {
69
+
70
+ //only add action if ajax call
71
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX && defined( 'WP_ADMIN' ) && WP_ADMIN ) {
72
+ //ajax calls
73
+ add_action( 'wp_ajax_backwpup_working', array( 'BackWPup_Page_Jobs', 'ajax_working' ) );
74
+ add_action( 'wp_ajax_backwpup_cron_text', array( 'BackWPup_Page_Editjob', 'ajax_cron_text' ) );
75
+ //ajax handler for jobtypes
76
+ add_action( 'wp_ajax_backwpup_jobtype', array( $this, 'jobtype_edit_ajax' ) );
77
+ //ajax or view logs
78
+ add_action( 'wp_ajax_backwpup_view_log', array( 'BackWPup_Page_Logs', 'ajax_view_log' ) );
79
+ //ajax calls for job types
80
+ if ( $jobtypes = BackWPup::get_job_types() ) {
81
+ foreach ( $jobtypes as $id => $jobtypeclass ) {
82
+ add_action( 'wp_ajax_backwpup_jobtype_' . strtolower( $id ), array( $jobtypeclass, 'edit_ajax' ) );
83
+ }
84
+ }
85
+ //ajax calls for destinations
86
+ if ( $dests = BackWPup::get_destinations() ) {
87
+ foreach ( $dests as $id => $destclass ) {
88
+ add_action( 'wp_ajax_backwpup_dest_' . strtolower( $id ), array( $destclass, 'edit_ajax' ) );
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Admin init function
96
+ */
97
+ public function admin_head() {
98
+
99
+ //register js and css for BackWPup
100
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
101
+ wp_enqueue_style( 'backwpupadmin', BackWPup::get_plugin_data( 'URL' ) . '/css/admin.dev.css', array(), time(), 'screen' );
102
+ } else {
103
+ wp_enqueue_style( 'backwpupadmin', BackWPup::get_plugin_data( 'URL' ) . '/css/admin.css', array( ), BackWPup::get_plugin_data( 'Version' ), 'screen' );
104
+ }
105
+ }
106
+
107
+ /**
108
+ *
109
+ * Add Links in Plugins Menu to BackWPup
110
+ *
111
+ * @param $links
112
+ * @param $file
113
+ * @return array
114
+ */
115
+ public function plugin_links( $links, $file ) {
116
+
117
+ if ( $file == plugin_basename( BackWPup::get_plugin_data( 'MainFile' ) ) ) {
118
+ $links[ ] = '<a href="' . __( 'https://marketpress.com/documentation/backwpup-pro/', 'backwpup' ) . '">' . __( 'Documentation', 'backwpup' ) . '</a>';
119
+ if ( class_exists( 'BackWPup_Features', FALSE ) )
120
+ $links[ ] = '<a href="' . __( 'https://marketpress.com/support/forum/plugins/backwpup-pro/', 'backwpup' ) . '">' . __( 'Pro Support', 'backwpup' ) . '</a>';
121
+ else
122
+ $links[ ] = '<a href="' . __( 'http://wordpress.org/support/plugin/backwpup/', 'backwpup' ) . '">' . __( 'Support', 'backwpup' ) . '</a>';
123
+
124
+ }
125
+
126
+ return $links;
127
+ }
128
+
129
+ /**
130
+ * Add menu entries
131
+ */
132
+ public function admin_menu() {
133
+
134
+ if ( ! get_site_option( 'backwpup_about_page' ) ) { //display about page only
135
+ $this->page_hooks[ 'backwpup' ] = add_menu_page( BackWPup::get_plugin_data( 'name' ), BackWPup::get_plugin_data( 'name' ), 'activate_plugins', 'backwpup', array( 'BackWPup_Page_About', 'page' ), BackWPup::get_plugin_data( 'URL' ) . '/images/BackWPup16.png' );
136
+ add_action( 'load-' . $this->page_hooks[ 'backwpup' ], array( 'BackWPup_Admin', 'init_generel' ) );
137
+ add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpup' ], array( 'BackWPup_Page_About', 'admin_print_styles' ) );
138
+ add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpup' ], array( 'BackWPup_Page_About', 'admin_print_scripts' ) );
139
+ } else { // Display normal pages
140
+ add_menu_page( BackWPup::get_plugin_data( 'name' ), BackWPup::get_plugin_data( 'name' ), 'backwpup', 'backwpup', array( 'BackWPup_Page_Backwpup', 'page' ), BackWPup::get_plugin_data( 'URL' ) . '/images/BackWPup16.png' );
141
+ $this->page_hooks[ 'backwpup' ] = add_submenu_page( 'backwpup', __( 'BackWPup Dashboard', 'backwpup' ), __( 'Dashboard', 'backwpup' ), 'backwpup', 'backwpup', array( 'BackWPup_Page_Backwpup', 'page' ) );
142
+ add_action( 'load-' . $this->page_hooks[ 'backwpup' ], array( 'BackWPup_Admin', 'init_generel' ) );
143
+ add_action( 'load-' . $this->page_hooks[ 'backwpup' ], array( 'BackWPup_Page_Backwpup', 'load' ) );
144
+ add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpup' ], array( 'BackWPup_Page_Backwpup', 'admin_print_styles' ) );
145
+ add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpup' ], array( 'BackWPup_Page_Backwpup', 'admin_print_scripts' ) );
146
+
147
+ //Add pages form plugins
148
+ $this->page_hooks = apply_filters( 'backwpup_admin_pages' ,$this->page_hooks );
149
+ }
150
+
151
+ }
152
+
153
+
154
+ /**
155
+ * @param $page_hooks
156
+ * @return mixed
157
+ */
158
+ public function admin_page_jobs( $page_hooks ) {
159
+
160
+ $this->page_hooks[ 'backwpupjobs' ] = add_submenu_page( 'backwpup', __( 'Jobs', 'backwpup' ), __( 'Jobs', 'backwpup' ), 'backwpup_jobs', 'backwpupjobs', array( 'BackWPup_Page_Jobs', 'page' ) );
161
+ add_action( 'load-' . $this->page_hooks[ 'backwpupjobs' ], array( 'BackWPup_Admin', 'init_generel' ) );
162
+ add_action( 'load-' . $this->page_hooks[ 'backwpupjobs' ], array( 'BackWPup_Page_Jobs', 'load' ) );
163
+ add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpupjobs' ], array( 'BackWPup_Page_Jobs', 'admin_print_styles' ) );
164
+ add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpupjobs' ], array( 'BackWPup_Page_Jobs', 'admin_print_scripts' ) );
165
+
166
+ return $page_hooks;
167
+ }
168
+
169
+ /**
170
+ * @param $page_hooks
171
+ * @return mixed
172
+ */
173
+ public function admin_page_editjob( $page_hooks ) {
174
+
175
+ $this->page_hooks[ 'backwpupeditjob' ] = add_submenu_page( 'backwpup', __( 'Add New Job', 'backwpup' ), __( 'Add New Job', 'backwpup' ), 'backwpup_jobs_edit', 'backwpupeditjob', array( 'BackWPup_Page_Editjob', 'page' ) );
176
+ add_action( 'load-' . $this->page_hooks[ 'backwpupeditjob' ], array( 'BackWPup_Admin', 'init_generel' ) );
177
+ add_action( 'load-' . $this->page_hooks[ 'backwpupeditjob' ], array( 'BackWPup_Page_Editjob', 'auth' ) );
178
+ add_action( 'load-' . $this->page_hooks[ 'backwpupeditjob' ], array( 'BackWPup_Page_Editjob', 'load' ) );
179
+ add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpupeditjob' ], array( 'BackWPup_Page_Editjob', 'admin_print_styles' ) );
180
+ add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpupeditjob' ], array( 'BackWPup_Page_Editjob', 'admin_print_scripts' ) );
181
+
182
+ return $page_hooks;
183
+ }
184
+
185
+ /**
186
+ * @param $page_hooks
187
+ * @return mixed
188
+ */
189
+ public function admin_page_logs( $page_hooks ) {
190
+
191
+ $this->page_hooks[ 'backwpuplogs' ] = add_submenu_page( 'backwpup', __( 'Logs', 'backwpup' ), __( 'Logs', 'backwpup' ), 'backwpup_logs', 'backwpuplogs', array( 'BackWPup_Page_Logs', 'page' ) );
192
+ add_action( 'load-' . $this->page_hooks[ 'backwpuplogs' ], array( 'BackWPup_Admin', 'init_generel' ) );
193
+ add_action( 'load-' . $this->page_hooks[ 'backwpuplogs' ], array( 'BackWPup_Page_Logs', 'load' ) );
194
+ add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpuplogs' ], array( 'BackWPup_Page_Logs', 'admin_print_styles' ) );
195
+ add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpuplogs' ], array( 'BackWPup_Page_Logs', 'admin_print_scripts' ) );
196
+
197
+ return $page_hooks;
198
+ }
199
+
200
+ /**
201
+ * @param $page_hooks
202
+ * @return mixed
203
+ */
204
+ public function admin_page_backups( $page_hooks ) {
205
+
206
+ $this->page_hooks[ 'backwpupbackups' ] = add_submenu_page( 'backwpup', __( 'Backups', 'backwpup' ), __( 'Backups', 'backwpup' ), 'backwpup_backups', 'backwpupbackups', array( 'BackWPup_Page_Backups', 'page' ) );
207
+ add_action( 'load-' . $this->page_hooks[ 'backwpupbackups' ], array( 'BackWPup_Admin', 'init_generel' ) );
208
+ add_action( 'load-' . $this->page_hooks[ 'backwpupbackups' ], array( 'BackWPup_Page_Backups', 'load' ) );
209
+ add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpupbackups' ], array( 'BackWPup_Page_Backups', 'admin_print_styles' ) );
210
+ add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpupbackups' ], array( 'BackWPup_Page_Backups', 'admin_print_scripts' ) );
211
+
212
+ return $page_hooks;
213
+ }
214
+
215
+ /**
216
+ * @param $page_hooks
217
+ * @return mixed
218
+ */
219
+ public function admin_page_settings( $page_hooks ) {
220
+
221
+ $this->page_hooks[ 'backwpupsettings' ] = add_submenu_page( 'backwpup', __( 'Settings', 'backwpup' ), __( 'Settings', 'backwpup' ), 'backwpup_settings', 'backwpupsettings', array( 'BackWPup_Page_Settings', 'page' ) );
222
+ add_action( 'load-' . $this->page_hooks[ 'backwpupsettings' ], array( 'BackWPup_Admin', 'init_generel' ) );
223
+ add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpupsettings' ], array( 'BackWPup_Page_Settings', 'admin_print_styles' ) );
224
+ add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpupsettings' ], array( 'BackWPup_Page_Settings', 'admin_print_scripts' ) );
225
+
226
+ return $page_hooks;
227
+ }
228
+
229
+ /**
230
+ * @param $page_hooks
231
+ * @return mixed
232
+ */
233
+ public function admin_page_about( $page_hooks ) {
234
+
235
+ $this->page_hooks[ 'backwpupabout' ] = add_submenu_page( 'backwpup', __( 'About', 'backwpup' ), __( 'About', 'backwpup' ), 'backwpup', 'backwpupabout', array( 'BackWPup_Page_About', 'page' ) );
236
+ add_action( 'load-' . $this->page_hooks[ 'backwpupabout' ], array( 'BackWPup_Admin', 'init_generel' ) );
237
+ add_action( 'admin_print_styles-' . $this->page_hooks[ 'backwpupabout' ], array( 'BackWPup_Page_About', 'admin_print_styles' ) );
238
+ add_action( 'admin_print_scripts-' . $this->page_hooks[ 'backwpupabout' ], array( 'BackWPup_Page_About', 'admin_print_scripts' ) );
239
+
240
+ return $page_hooks;
241
+ }
242
+
243
+
244
+ /**
245
+ * Load for all BackWPup pages
246
+ */
247
+ public static function init_generel() {
248
+
249
+ //start using sessions
250
+ session_start();
251
+
252
+ //register js from tipTip
253
+ wp_register_script( 'tiptip', BackWPup::get_plugin_data( 'URL' ) . '/js/jquery.tipTip.minified.js', array( 'jquery' ), '1.3', TRUE );
254
+
255
+ //register fancybox
256
+ wp_register_style( 'fancybox2', BackWPup::get_plugin_data( 'URL' ) . '/js/fancybox/jquery.fancybox.css', '', '2.1.4', 'screen' );
257
+ wp_register_script( 'fancybox2', BackWPup::get_plugin_data( 'URL' ) . '/js/fancybox/jquery.fancybox.pack.js', array( 'jquery' ), '2.1.4', TRUE );
258
+
259
+ //register js and css for BackWPup
260
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
261
+ wp_register_script( 'backwpupgeneral', BackWPup::get_plugin_data( 'URL' ) . '/js/general.dev.js', array( 'jquery', 'tiptip', 'fancybox2' ), time(), TRUE );
262
+ wp_register_style( 'backwpupgeneral', BackWPup::get_plugin_data( 'URL' ) . '/css/general.dev.css', array( 'fancybox2' ), time(), 'screen' );
263
+ } else {
264
+ wp_register_script( 'backwpupgeneral', BackWPup::get_plugin_data( 'URL' ) . '/js/general.js', array( 'jquery', 'tiptip', 'fancybox2' ), BackWPup::get_plugin_data( 'Version' ), TRUE );
265
+ wp_register_style( 'backwpupgeneral', BackWPup::get_plugin_data( 'URL' ) . '/css/general.css', array( 'fancybox2' ), BackWPup::get_plugin_data( 'Version' ), 'screen' );
266
+ }
267
+
268
+ //add Help
269
+ BackWPup_Help::help();
270
+ }
271
+
272
+
273
+ /**
274
+ * Called on save form. Only POST allowed.
275
+ */
276
+ public function save_post_form() {
277
+
278
+ //start using sessions
279
+ session_start();
280
+
281
+ //Allowed Pages
282
+ if ( ! in_array( $_POST[ 'page' ], array ( 'backwpupeditjob', 'backwpupinformation', 'backwpupsettings' ) ) )
283
+ wp_die( __( 'Cheating Huh?', 'backwpup' ) );
284
+
285
+ //nonce check
286
+ check_admin_referer( $_POST[ 'page' ] . '_page' );
287
+
288
+ if ( ! current_user_can( 'backwpup' ) )
289
+ wp_die( __( 'Cheating Huh?', 'backwpup' ) );
290
+
291
+ //build query for rederict
292
+ if ( ! isset( $_POST[ 'anchor' ] ) )
293
+ $_POST[ 'anchor' ] = NULL;
294
+ $query_args=array();
295
+ if ( isset( $_POST[ 'page' ] ) )
296
+ $query_args[ 'page' ] = $_POST[ 'page' ];
297
+ if ( isset( $_POST[ 'tab' ] ) )
298
+ $query_args[ 'tab' ] = $_POST[ 'tab' ];
299
+ if ( isset( $_POST[ 'tab' ] ) && isset( $_POST[ 'nexttab' ] ) && $_POST[ 'tab' ] != $_POST[ 'nexttab' ] )
300
+ $query_args[ 'tab' ] = $_POST[ 'nexttab' ];
301
+
302
+ $jobid = NULL;
303
+ if ( isset( $_POST[ 'jobid' ] ) ) {
304
+ $jobid = (int) $_POST[ 'jobid' ];
305
+ $query_args[ 'jobid' ] = $jobid;
306
+ }
307
+
308
+ //Call method to save data
309
+ $page_class = NULL;
310
+ if ( $_POST[ 'page' ] == 'backwpupeditjob' )
311
+ $page_class = 'BackWPup_Page_Editjob';
312
+ elseif ( $_POST[ 'page' ] == 'backwpupinformation' )
313
+ $page_class = 'BackWPup_Page_Information';
314
+ elseif ( $_POST[ 'page' ] == 'backwpupsettings' ) {
315
+ $page_class = 'BackWPup_Page_Settings';
316
+ $_POST[ 'tab' ] = '';
317
+ }
318
+ $message = call_user_func( array( $page_class, 'save_post_form' ), $_POST[ 'tab' ], $jobid);
319
+
320
+ if ( ! empty( $message ) ) {
321
+ if ( $_POST[ 'page' ] == 'backwpupeditjob' ) {
322
+ $url = BackWPup_Job::get_jobrun_url( 'runnowlink', BackWPup_Option::get( $jobid, 'jobid' ) );
323
+ $message .= ' <a href="' . network_admin_url( 'admin.php' ) . '?page=backwpupjobs">' . __( 'Jobs overview', 'backwpup' ) . '</a> | <a href="' . $url[ 'url' ] . '">' . __( 'Run now', 'backwpup' ) . '</a>';
324
+ }
325
+ self::message( $message );
326
+ }
327
+
328
+ //Back to topic
329
+ wp_safe_redirect( add_query_arg( $query_args, network_admin_url( 'admin.php' ) ) . $_POST[ 'anchor' ] );
330
+ exit;
331
+ }
332
+
333
+ /**
334
+ * Add Message
335
+ *
336
+ * @param $message
337
+ */
338
+ public static function message( $message ) {
339
+
340
+
341
+ if( ! isset( $_SESSION[ 'backwpup_messages' ] ) )
342
+ $_SESSION[ 'backwpup_messages' ] = array();
343
+
344
+ if ( is_array( $message ) )
345
+ $_SESSION[ 'backwpup_messages' ] = array_merge( $_SESSION[ 'backwpup_messages' ], $message);
346
+ else
347
+ $_SESSION[ 'backwpup_messages' ][] = $message;
348
+
349
+ }
350
+
351
+ /**
352
+ * Get all Message that not displayed
353
+ *
354
+ * @return array
355
+ */
356
+ public static function get_message( ) {
357
+
358
+ return $_SESSION[ 'backwpup_messages' ];
359
+ }
360
+
361
+ /**
362
+ * Display Messages
363
+ *
364
+ * @param bool $echo
365
+ * @return string
366
+ */
367
+ public static function display_messages( $echo = TRUE ) {
368
+
369
+ $message = '';
370
+
371
+ if ( ! empty( $_SESSION[ 'backwpup_messages' ] ) ) {
372
+ foreach( $_SESSION[ 'backwpup_messages' ] as $saved)
373
+ $message .= '<p>' . $saved . '</p>';
374
+ //clean messages
375
+ $_SESSION[ 'backwpup_messages' ] = array();
376
+ }
377
+
378
+ if( empty( $message ) )
379
+ return '';
380
+
381
+ if ( $echo )
382
+ echo '<div id="message" class="updated">' . $message . '</div>';
383
+ else
384
+ return '<div id="message" class="updated">' . $message . '</div>';
385
+ }
386
+
387
+ /**
388
+ * Overrides WordPress text in Footer
389
+ *
390
+ * @param $admin_footer_text string
391
+ * @return string
392
+ */
393
+ public function admin_footer_text( $admin_footer_text ) {
394
+
395
+ if ( isset( $_REQUEST[ 'page' ] ) && strstr( $_REQUEST[ 'page' ], 'backwpup') ) {
396
+ $admin_footer_text = '<span class="ip_logo">' . sprintf( _x( 'A project of %s', 'link to Inpsyde.com, link text: Inpsyde GmbH', 'backwpup' ), '<a href="http://inpsyde.com">Inpsyde GmbH</a>' ) . '</span>';
397
+ $admin_footer_text .= sprintf( _x( 'Developer: %s', 'developer name, link text: Daniel Hüsken', 'backwpup' ), '<a href="http://danielhuesken.de">Daniel Hüsken</a>' );
398
+
399
+ return $admin_footer_text;
400
+ }
401
+
402
+ return $admin_footer_text;
403
+ }
404
+
405
+ /**
406
+ * Overrides WordPress Version in Footer
407
+ *
408
+ * @param $update_footer_text string
409
+ * @return string
410
+ */
411
+ public function update_footer( $update_footer_text ) {
412
+
413
+ if ( isset( $_REQUEST[ 'page' ] ) && strstr( $_REQUEST[ 'page' ], 'backwpup') ) {
414
+ $update_footer_text = '<a href="' . translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' ) . '">' . BackWPup::get_plugin_data( 'Name' ) . '</a> '. sprintf( __( 'version %s' ,'backwpup'), BackWPup::get_plugin_data( 'Version' ) );
415
+
416
+ return $update_footer_text;
417
+ }
418
+
419
+ return $update_footer_text;
420
+ }
421
+
422
+ /**
423
+ * Display admin notices
424
+ */
425
+ public function admin_notices() {
426
+ if ( ! current_user_can( 'activate_plugins') )
427
+ return;
428
+
429
+ if ( ! get_site_option( 'backwpup_about_page' ) && ! ( isset( $_REQUEST[ 'page' ] ) && $_REQUEST[ 'page' ] == 'backwpup' ) )
430
+ echo '<div class="updated"><p>' . sprintf( __( 'You have activatetd or updated BackWPup please check <a href="%s">here</a>.', 'backwpup'), network_admin_url( 'admin.php').'?page=backwpup' ) . '</p></div>';
431
+
432
+ }
433
+ }
inc/class-adminbar.php ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class to display BackWPup in Adminbar
4
+ */
5
+ class BackWPup_Adminbar {
6
+
7
+ private static $instance = NULL;
8
+
9
+ /**
10
+ *
11
+ */
12
+ private function __construct() {
13
+
14
+ if ( defined( 'DOING_CRON' ) || ! current_user_can( 'backwpup' ) || ! is_admin_bar_showing() || ! get_site_option( 'backwpup_cfg_showadminbar', TRUE ) )
15
+ return;
16
+
17
+ //load text domain
18
+ load_plugin_textdomain( 'backwpupadminbar', FALSE, BackWPup::get_plugin_data( 'BaseName' ) . '/languages' );
19
+ //add admin bar. Works only in init
20
+ add_action( 'admin_bar_menu', array( $this, 'adminbar' ), 100 );
21
+ //admin bar css
22
+ add_action( 'wp_enqueue_scripts', array( $this, 'print_styles' ) );
23
+ add_action( 'admin_print_scripts', array( $this, 'print_styles' ) );
24
+ }
25
+
26
+ /**
27
+ * @static
28
+ * @return \BackWPup_Adminbar
29
+ */
30
+ public static function getInstance() {
31
+
32
+ if (NULL === self::$instance) {
33
+ self::$instance = new self;
34
+ }
35
+ return self::$instance;
36
+ }
37
+
38
+
39
+ private function __clone() {}
40
+
41
+
42
+ /**
43
+ * @global $wp_admin_bar WP_Admin_Bar
44
+ */
45
+ public function adminbar() {
46
+ global $wp_admin_bar;
47
+
48
+ $job_object = BackWPup_Job::get_working_data( FALSE );
49
+ $menu_title = '<span class="ab-icon"></span><span class="ab-label">' . BackWPup::get_plugin_data( 'name' ) . '</span>';
50
+ $menu_herf = network_admin_url( 'admin.php' ) . '?page=backwpup';
51
+ if ( $job_object && current_user_can( 'backwpup_jobs_start' ) ) {
52
+ $menu_title = '<span class="ab-icon blink"></span><span class="ab-label">' . BackWPup::get_plugin_data( 'name' ) . ' <span id="backwpup-adminbar-running">' .__( 'running', 'backwpupadminbar') . '</span></span>';
53
+ $menu_herf = network_admin_url( 'admin.php' ) . '?page=backwpupjobs';
54
+ }
55
+
56
+ if ( current_user_can( 'backwpup' ) )
57
+ $wp_admin_bar->add_menu( array(
58
+ 'id' => 'backwpup',
59
+ 'title' => $menu_title,
60
+ 'href' => $menu_herf,
61
+ 'meta' => array( 'title' => __( 'BackWPup', 'backwpupadminbar' ) )
62
+ ) );
63
+
64
+ if ( $job_object && current_user_can( 'backwpup_jobs_start' ) ) {
65
+ $wp_admin_bar->add_menu( array(
66
+ 'id' => 'backwpup_working',
67
+ 'parent' => 'backwpup_jobs',
68
+ 'title' => __( 'See Working!', 'backwpupadminbar' ),
69
+ 'href' => network_admin_url( 'admin.php' ) . '?page=backwpupjobs'
70
+ ) );
71
+ $wp_admin_bar->add_menu( array(
72
+ 'id' => 'backwpup_working_abort',
73
+ 'parent' => 'backwpup_working',
74
+ 'title' => __( 'Abort!', 'backwpupadminbar' ),
75
+ 'href' => wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpup&action=abort', 'abort-job' )
76
+ ) );
77
+ }
78
+
79
+ if ( current_user_can( 'backwpup_jobs' ) )
80
+ $wp_admin_bar->add_menu( array(
81
+ 'id' => 'backwpup_jobs',
82
+ 'parent' => 'backwpup',
83
+ 'title' => __( 'Jobs', 'backwpupadminbar' ),
84
+ 'href' => network_admin_url( 'admin.php' ) . '?page=backwpupjobs'
85
+ ) );
86
+
87
+ if ( current_user_can( 'backwpup_jobs_edit' ) )
88
+ $wp_admin_bar->add_menu( array(
89
+ 'id' => 'backwpup_jobs_new',
90
+ 'parent' => 'backwpup_jobs',
91
+ 'title' => __( 'Add New', 'backwpupadminbar' ),
92
+ 'href' => network_admin_url( 'admin.php' ) . '?page=backwpupeditjob'
93
+ ) );
94
+
95
+ if ( current_user_can( 'backwpup_logs' ) )
96
+ $wp_admin_bar->add_menu( array(
97
+ 'id' => 'backwpup_logs',
98
+ 'parent' => 'backwpup',
99
+ 'title' => __( 'Logs', 'backwpupadminbar' ),
100
+ 'href' => network_admin_url( 'admin.php' ) . '?page=backwpuplogs'
101
+ ) );
102
+
103
+ if ( current_user_can( 'backwpup_backups' ) )
104
+ $wp_admin_bar->add_menu( array(
105
+ 'id' => 'backwpup_backups',
106
+ 'parent' => 'backwpup',
107
+ 'title' => __( 'Backups', 'backwpupadminbar' ),
108
+ 'href' => network_admin_url( 'admin.php' ) . '?page=backwpupbackups'
109
+ ) );
110
+
111
+ if ( current_user_can( 'backwpup' ) )
112
+ $wp_admin_bar->add_menu( array(
113
+ 'id' => 'backwpup_wizard',
114
+ 'parent' => 'backwpup',
115
+ 'title' => __( 'Wizards', 'backwpupadminbar' ),
116
+ 'href' => network_admin_url( 'admin.php' ) . '?page=backwpupwizard'
117
+ ) );
118
+
119
+ //add wizards
120
+ $wizards = BackWPup::get_wizards();
121
+ foreach ( $wizards as $wizard_class ) {
122
+ if ( ! current_user_can( $wizard_class->info[ 'cap' ] ) )
123
+ continue;
124
+ $wp_admin_bar->add_menu( array(
125
+ 'id' => 'backwpup_wizard_' . $wizard_class->info[ 'ID' ],
126
+ 'parent' => 'backwpup_wizard',
127
+ 'title' => $wizard_class->info[ 'name' ],
128
+ 'href' => network_admin_url( 'admin.php' ) . '?page=backwpupwizard&wizard_start=' . $wizard_class->info[ 'ID' ]
129
+ ) );
130
+ }
131
+
132
+ //add jobs
133
+ $jobs = (array)BackWPup_Option::get_job_ids();
134
+ foreach ( $jobs as $jobid ) {
135
+ if ( current_user_can( 'backwpup_jobs_edit' ) ) {
136
+ $name = BackWPup_Option::get( $jobid, 'name' );
137
+ $wp_admin_bar->add_menu( array(
138
+ 'id' => 'backwpup_jobs_' . $jobid,
139
+ 'parent' => 'backwpup_jobs',
140
+ 'title' => $name,
141
+ 'href' => wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupeditjob&jobid=' . $jobid, 'edit-job' )
142
+ ) );
143
+ }
144
+ if ( current_user_can( 'backwpup_jobs_start' ) ) {
145
+ $url = BackWPup_Job::get_jobrun_url( 'runnowlink', $jobid );
146
+ $wp_admin_bar->add_menu( array(
147
+ 'id' => 'backwpup_jobs_runnow_' . $jobid,
148
+ 'parent' => 'backwpup_jobs_' . $jobid,
149
+ 'title' => __( 'Run Now', 'backwpupadminbar' ),
150
+ 'href' => $url[ 'url' ]
151
+ ) );
152
+ }
153
+ }
154
+ }
155
+
156
+ /**
157
+ *
158
+ */
159
+ public function print_styles() {
160
+
161
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
162
+ wp_enqueue_style( 'backwpupadminbar', BackWPup::get_plugin_data( 'URL' ) . '/css/adminbar.dev.css', '', time(), 'screen' );
163
+ else
164
+ wp_enqueue_style( 'backwpupadminbar', BackWPup::get_plugin_data( 'URL' ) . '/css/adminbar.css', '', BackWPup::get_plugin_data( 'Version' ), 'screen' );
165
+ }
166
+ }
inc/class-create-archive.php ADDED
@@ -0,0 +1,447 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for creating File Archives
4
+ */
5
+ class BackWPup_Create_Archive {
6
+
7
+ /**
8
+ * Achieve file with full path
9
+ *
10
+ * @var string
11
+ */
12
+ private $file = '';
13
+
14
+ /**
15
+ * Compression method
16
+ *
17
+ * @var string Method off compression Methods are ZipArchive, PclZip, Tar, TarGz, TarBz2, gz, bz2
18
+ */
19
+ private $method = '';
20
+
21
+ /**
22
+ * Open handel for files.
23
+ */
24
+ private $filehandel = '';
25
+
26
+ /**
27
+ * class handel for ZipArchive.
28
+ *
29
+ * @var ZipArchive
30
+ */
31
+ private $ziparchive = NULL;
32
+
33
+ /**
34
+ * class handel for PclZip.
35
+ *
36
+ * @var PclZip
37
+ */
38
+ private $pclzip = NULL;
39
+
40
+ /**
41
+ * Saved encoding will restored on __destruct
42
+ *
43
+ * @var string
44
+ */
45
+ private $previous_encoding = '';
46
+
47
+ /**
48
+ * File cont off added files to handel somethings that depends on it
49
+ *
50
+ * @var int number of files added
51
+ */
52
+ private $file_count = 0;
53
+
54
+ /**
55
+ * Set archive Parameter
56
+ *
57
+ * @param $file string File with full path of the archive
58
+ * @throws BackWPup_Create_Archive_Exception
59
+ */
60
+ public function __construct( $file ) {
61
+
62
+
63
+ //check param
64
+ if ( empty( $file ) )
65
+ throw new BackWPup_Create_Archive_Exception( __( 'The file name of an archive cannot be empty ', 'backwpup' ) );
66
+
67
+ //set file
68
+ $this->file = trim( $file );
69
+
70
+ //check folder can used
71
+ if ( ! is_dir( dirname( $this->file ) ) ||! is_writable( dirname( $this->file ) ) )
72
+ throw new BackWPup_Create_Archive_Exception( sprintf( _x( 'Folder %s for the archive not found','%s = Folder name', 'backwpup' ), dirname( $this->file ) ) );
73
+
74
+
75
+ //set and check method and get open handle
76
+ if ( strtolower( substr( $this->file, -7 ) ) == '.tar.gz' ) {
77
+ if ( ! function_exists( 'gzencode' ) )
78
+ throw new BackWPup_Create_Archive_Exception( __( 'Functions for gz compression not available', 'backwpup' ) );
79
+ $this->method = 'TarGz';
80
+ $this->filehandel = fopen( $this->file, 'c+b');
81
+ $eof_compressed = gzencode( pack( "a1024", "" ) );
82
+ //remove tar end of file
83
+ if ( filesize( $this->file ) > strlen( $eof_compressed ) ) {
84
+ fseek( $this->filehandel, - strlen( $eof_compressed ), SEEK_END );
85
+ $last_blocs = fread( $this->filehandel, strlen( $eof_compressed ) );
86
+ //overwrite tar end of file
87
+ if ( $last_blocs == $eof_compressed )
88
+ fseek( $this->filehandel, - strlen( $eof_compressed ), SEEK_END );
89
+ }
90
+ }
91
+ elseif ( strtolower( substr( $this->file, -8 ) ) == '.tar.bz2' ) {
92
+ if ( ! function_exists( 'bzcompress' ) )
93
+ throw new BackWPup_Create_Archive_Exception( __( 'Functions for bz2 compression not available', 'backwpup' ) );
94
+ $this->method = 'TarBz2';
95
+ $this->filehandel = fopen( $this->file, 'c+b');
96
+ $eof_compressed = bzcompress( pack( "a1024", "" ) );
97
+ //remove tar end of file
98
+ if ( filesize( $this->file ) > strlen( $eof_compressed ) ) {
99
+ fseek( $this->filehandel, - strlen( $eof_compressed ), SEEK_END );
100
+ $last_blocs = fread( $this->filehandel, strlen( $eof_compressed ) );
101
+ //overwrite tar end of file
102
+ if ( $last_blocs == $eof_compressed )
103
+ fseek( $this->filehandel, - strlen( $eof_compressed ), SEEK_END );
104
+ }
105
+ }
106
+ elseif ( strtolower( substr( $this->file, -4 ) ) == '.tar' ) {
107
+ $this->method = 'Tar';
108
+ $this->filehandel = fopen( $this->file, 'c+b');
109
+ //remove tar end of file
110
+ if ( filesize( $this->file ) > 1024 ) {
111
+ fseek( $this->filehandel, -1024, SEEK_END );
112
+ $last_blocs = fread( $this->filehandel, 1024 );
113
+ //overwrite tar end of file
114
+ if ( $last_blocs == pack( "a1024", "" ) )
115
+ fseek( $this->filehandel, -1024, SEEK_END );
116
+ }
117
+ }
118
+ elseif ( strtolower( substr( $this->file, -4 ) ) == '.zip' ) {
119
+ $this->method = 'PclZip';
120
+ if ( class_exists( 'ZipArchive' ) ) {
121
+ $this->method = 'ZipArchive';
122
+ $this->ziparchive = new ZipArchive();
123
+ $res = $this->ziparchive->open( $this->file, ZipArchive::CREATE );
124
+ if ( $res !== TRUE )
125
+ throw new BackWPup_Create_Archive_Exception( sprintf( _x( 'Can not create zip archive: %d','ZipArchive open() result', 'backwpup' ), $res ) );
126
+ }
127
+ if ( $this->get_method() == 'PclZip' && ! function_exists( 'gzencode' ) )
128
+ throw new BackWPup_Create_Archive_Exception( __( 'Functions for gz compression not available', 'backwpup' ) );
129
+ if( $this->get_method() == 'PclZip' ) {
130
+ define( 'PCLZIP_TEMPORARY_DIR', BackWPup::get_plugin_data( 'TEMP' ) );
131
+ if ( ini_get( 'mbstring.func_overload' ) && function_exists( 'mb_internal_encoding' ) ) {
132
+ $this->previous_encoding = mb_internal_encoding();
133
+ mb_internal_encoding( 'ISO-8859-1' );
134
+ }
135
+ require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
136
+ $this->pclzip = new PclZip( $this->file );
137
+ }
138
+ }
139
+ elseif ( strtolower( substr( $this->file, -3 ) ) == '.gz' ) {
140
+ if ( ! function_exists( 'gzencode' ) )
141
+ throw new BackWPup_Create_Archive_Exception( __( 'Functions for gz compression not available', 'backwpup' ) );
142
+ $this->method = 'gz';
143
+ $this->filehandel = fopen( 'compress.zlib://' . $this->file, 'wb');
144
+ }
145
+ elseif ( strtolower( substr( $this->file, -4 ) ) == '.bz2' ) {
146
+ if ( ! function_exists( 'bzcompress' ) )
147
+ throw new BackWPup_Create_Archive_Exception( __( 'Functions for bz2 compression not available', 'backwpup' ) );
148
+ $this->method = 'bz2';
149
+ $this->filehandel = fopen( 'compress.bzip2://' . $this->file, 'w');
150
+ }
151
+ else {
152
+ throw new BackWPup_Create_Archive_Exception( sprintf( _x( 'Method to archive file %s not detected','%s = file name', 'backwpup' ), basename( $this->file ) ) );
153
+ }
154
+
155
+ //check file handle
156
+ if ( ! empty( $this->filehandel ) && ! is_resource( $this->filehandel ) )
157
+ throw new BackWPup_Create_Archive_Exception( __( 'Can not open archive file', 'backwpup' ) );
158
+
159
+ }
160
+
161
+
162
+ /**
163
+ * Closes open archive on shutdown.
164
+ */
165
+ public function __destruct() {
166
+
167
+ //set encoding back
168
+ if ( ! empty( $this->previous_encoding ) )
169
+ mb_internal_encoding( $this->previous_encoding );
170
+
171
+ //write tar file end
172
+ if ( $this->get_method() == 'Tar' ) {
173
+ fwrite( $this->filehandel, pack( "a1024", "" ) );
174
+ }
175
+ elseif ( $this->get_method() == 'TarGz' ) {
176
+ fwrite( $this->filehandel, gzencode( pack( "a1024", "" ) ) );
177
+ }
178
+ elseif ( $this->get_method() == 'TarBz2' ) {
179
+ fwrite( $this->filehandel, bzcompress( pack( "a1024", "" ) ) );
180
+ }
181
+
182
+ //close PclZip Class
183
+ if ( is_object( $this->pclzip ) ) {
184
+ unset( $this->pclzip );
185
+ }
186
+
187
+ //close PclZip Class
188
+ if ( is_object( $this->ziparchive ) ) {
189
+ $this->ziparchive_status();
190
+ $this->ziparchive->close();
191
+ unset( $this->ziparchive );
192
+ }
193
+
194
+ //close file if open
195
+ if ( is_resource( $this->filehandel ) )
196
+ fclose( $this->filehandel );
197
+ }
198
+
199
+ /**
200
+ * Get method that the archive uses
201
+ *
202
+ * @return string of compression method
203
+ */
204
+ public function get_method() {
205
+
206
+ return $this->method;
207
+ }
208
+
209
+
210
+ /**
211
+ * Adds a file to Archive
212
+ *
213
+ * @param $file_name string
214
+ * @param $name_in_archive string
215
+ * @return bool Add worked or not
216
+ * @throws BackWPup_Create_Archive_Exception
217
+ */
218
+ public function add_file( $file_name, $name_in_archive = '' ) {
219
+
220
+ //check param
221
+ if ( empty( $file_name ) )
222
+ throw new BackWPup_Create_Archive_Exception( __( 'File name cannot be empty', 'backwpup' ) );
223
+
224
+ if ( ! is_file( $file_name ) || ! is_readable( $file_name ) ) {
225
+ trigger_error( sprintf( _x( 'File %s does not exist or is not readable', 'File path to add to archive', 'backwpup' ), $file_name ), E_USER_WARNING );
226
+ return false;
227
+ }
228
+
229
+ if ( empty( $name_in_archive ) )
230
+ $name_in_archive = $file_name;
231
+
232
+ switch ( $this->get_method() ) {
233
+ case 'gz':
234
+ if ( $this->file_count > 0 ) {
235
+ trigger_error( __( 'This archive method can only add one file', 'backwpup' ), E_USER_WARNING );
236
+ return false;
237
+ }
238
+ //add file to archive
239
+ if ( ! ( $fd = fopen( $file_name, 'rb' ) ) ) {
240
+ trigger_error( sprintf( __( 'Can not open source file %s to archive', 'backwpup' ), $file_name ), E_USER_WARNING );
241
+ return false;
242
+ }
243
+ while ( ! feof( $fd ) )
244
+ fwrite( $this->filehandel, fread( $fd, 8192 ) );
245
+ fclose( $fd );
246
+ break;
247
+ case 'bz':
248
+ if ( $this->file_count > 0 ) {
249
+ trigger_error( __( 'This archive method can only add one file', 'backwpup' ), E_USER_WARNING );
250
+ return false;
251
+ }
252
+ //add file to archive
253
+ if ( ! ( $fd = fopen( $file_name, 'rb' ) ) ) {
254
+ trigger_error( sprintf( __( 'Can not open source file %s to archive', 'backwpup' ), $file_name ), E_USER_WARNING );
255
+ return false;
256
+ }
257
+ while ( ! feof( $fd ) )
258
+ fwrite( $this->filehandel, bzcompress( fread( $fd, 8192 ) ) );
259
+ fclose( $fd );
260
+ break;
261
+ case 'Tar':
262
+ case 'TarGz':
263
+ case 'TarBz2':
264
+ if ( ! $this->tar_file( $file_name, $name_in_archive ) );
265
+ return FALSE;
266
+ break;
267
+ case 'ZipArchive':
268
+ //close and reopen, all added files are open on fs
269
+ if ( $this->file_count >= 10 ) { //35 works with PHP 5.2.4 on win
270
+ $this->ziparchive_status();
271
+ $this->ziparchive->close();
272
+ $this->ziparchive->open( $this->file, ZipArchive::CREATE );
273
+ $this->file_count = 0;
274
+ }
275
+ if ( ! $this->ziparchive->addFile( $file_name, $name_in_archive ) ) {
276
+ trigger_error( sprintf( __( 'Can not add "%s" to zip archive!', 'backwpup' ), $name_in_archive ), E_USER_ERROR );
277
+ return false;
278
+ }
279
+ break;
280
+ case 'PclZip':
281
+ if ( 0 == $this->pclzip->add( array( array(
282
+ PCLZIP_ATT_FILE_NAME => $file_name,
283
+ PCLZIP_ATT_FILE_NEW_FULL_NAME => $name_in_archive
284
+ ) ) )
285
+ ) {
286
+ trigger_error( sprintf( __( 'PclZip archive add error: %s', 'backwpup' ), $this->pclzip->errorInfo( TRUE ) ), E_USER_ERROR );
287
+ return false;
288
+ }
289
+ break;
290
+ }
291
+
292
+ $this->file_count++;
293
+
294
+ return TRUE;
295
+ }
296
+
297
+
298
+ /**
299
+ * Output status of ZipArchive
300
+ */
301
+ private function ziparchive_status() {
302
+
303
+ if ( $this->ziparchive->status > 0 ) {
304
+ $zip_error = $this->ziparchive->status;
305
+ if ( $this->ziparchive->status == 1 )
306
+ $zip_error = __( '(ER_MULTIDISK) Multi-disk zip archives not supported', 'backwpup' );
307
+ if ( $this->ziparchive->status == 2 )
308
+ $zip_error = __( '(ER_RENAME) Renaming temporary file failed', 'backwpup' );
309
+ if ( $this->ziparchive->status == 3 )
310
+ $zip_error = __( '(ER_CLOSE) Closing zip archive failed', 'backwpup' );
311
+ if ( $this->ziparchive->status == 4 )
312
+ $zip_error = __( '(ER_SEEK) Seek error', 'backwpup' );
313
+ if ( $this->ziparchive->status == 5 )
314
+ $zip_error = __( '(ER_READ) Read error', 'backwpup' );
315
+ if ( $this->ziparchive->status == 6 )
316
+ $zip_error = __( '(ER_WRITE) Write error', 'backwpup' );
317
+ if ( $this->ziparchive->status == 7 )
318
+ $zip_error = __( '(ER_CRC) CRC error', 'backwpup' );
319
+ if ( $this->ziparchive->status == 8 )
320
+ $zip_error = __( '(ER_ZIPCLOSED) Containing zip archive was closed', 'backwpup' );
321
+ if ( $this->ziparchive->status == 9 )
322
+ $zip_error = __( '(ER_NOENT) No such file', 'backwpup' );
323
+ if ( $this->ziparchive->status == 10 )
324
+ $zip_error = __( '(ER_EXISTS) File already exists', 'backwpup' );
325
+ if ( $this->ziparchive->status == 11 )
326
+ $zip_error = __( '(ER_OPEN) Can\'t open file', 'backwpup' );
327
+ if ( $this->ziparchive->status == 12 )
328
+ $zip_error = __( '(ER_TMPOPEN) Failure to create temporary file', 'backwpup' );
329
+ if ( $this->ziparchive->status == 13 )
330
+ $zip_error = __( '(ER_ZLIB) Zlib error', 'backwpup' );
331
+ if ( $this->ziparchive->status == 14 )
332
+ $zip_error = __( '(ER_MEMORY) Malloc failure', 'backwpup' );
333
+ if ( $this->ziparchive->status == 15 )
334
+ $zip_error = __( '(ER_CHANGED) Entry has been changed', 'backwpup' );
335
+ if ( $this->ziparchive->status == 16 )
336
+ $zip_error = __( '(ER_COMPNOTSUPP) Compression method not supported', 'backwpup' );
337
+ if ( $this->ziparchive->status == 17 )
338
+ $zip_error = __( '(ER_EOF) Premature EOF', 'backwpup' );
339
+ if ( $this->ziparchive->status == 18 )
340
+ $zip_error = __( '(ER_INVAL) Invalid argument', 'backwpup' );
341
+ if ( $this->ziparchive->status == 19 )
342
+ $zip_error = __( '(ER_NOZIP) Not a zip archive', 'backwpup' );
343
+ if ( $this->ziparchive->status == 20 )
344
+ $zip_error = __( '(ER_INTERNAL) Internal error', 'backwpup' );
345
+ if ( $this->ziparchive->status == 21 )
346
+ $zip_error = __( '(ER_INCONS) Zip archive inconsistent', 'backwpup' );
347
+ if ( $this->ziparchive->status == 22 )
348
+ $zip_error = __( '(ER_REMOVE) Can\'t remove file', 'backwpup' );
349
+ if ( $this->ziparchive->status == 23 )
350
+ $zip_error = __( '(ER_DELETED) Entry has been deleted', 'backwpup' );
351
+ trigger_error( sprintf( _x( 'ZipArchive returns status: %s','Text of ZipArchive status Massage', 'backwpup' ), $zip_error ), E_USER_ERROR );
352
+ }
353
+ }
354
+
355
+ /**
356
+ * Tar a file to archive
357
+ */
358
+ private function tar_file( $file_name, $name_in_archive ) {
359
+
360
+ //split filename larger than 100 chars
361
+ if ( strlen( $name_in_archive ) <= 100 ) {
362
+ $filename = $name_in_archive;
363
+ $filename_prefix = "";
364
+ }
365
+ else {
366
+ $filename_offset = strlen( $name_in_archive ) - 100;
367
+ $split_pos = strpos( $name_in_archive, '/', $filename_offset );
368
+ $filename = substr( $name_in_archive, $split_pos + 1 );
369
+ $filename_prefix = substr( $name_in_archive, 0, $split_pos );
370
+ if ( strlen( $filename ) > 100 )
371
+ trigger_error( sprintf( __( 'File name "%1$s" too long to be saved correctly in %2$s archive!', 'backwpup' ), $name_in_archive, $this->get_method() ), E_USER_WARNING );
372
+ if ( strlen( $filename_prefix ) > 155 )
373
+ trigger_error( sprintf( __( 'File path "%1$s" too long to be saved correctly in %2$s archive!', 'backwpup' ), $name_in_archive, $this->get_method() ), E_USER_WARNING );
374
+ }
375
+ //get file stat
376
+ $file_stat = @stat( $file_name );
377
+ //open file
378
+ if ( ! ( $fd = fopen( $file_name, 'rb' ) ) ) {
379
+ trigger_error( sprintf( __( 'Can not open source file %s to archive', 'backwpup' ), $file_name ), E_USER_WARNING );
380
+ return FALSE;
381
+ }
382
+ //Set file user/group name if linux
383
+ $fileowner = __( "Unknown", "backwpup" );
384
+ $filegroup = __( "Unknown", "backwpup" );
385
+ if ( function_exists( 'posix_getpwuid' ) ) {
386
+ $info = posix_getpwuid( $file_stat[ 'uid' ] );
387
+ $fileowner = $info[ 'name' ];
388
+ $info = posix_getgrgid( $file_stat[ 'gid' ] );
389
+ $filegroup = $info[ 'name' ];
390
+ }
391
+ // Generate the TAR header for this file
392
+ $header = pack( "a100a8a8a8a12a12a8a1a100a6a2a32a32a8a8a155a12",
393
+ $filename, //name of file 100
394
+ sprintf( "%07o", $file_stat[ 'mode' ] ), //file mode 8
395
+ sprintf( "%07o", $file_stat[ 'uid' ] ), //owner user ID 8
396
+ sprintf( "%07o", $file_stat[ 'gid' ] ), //owner group ID 8
397
+ sprintf( "%011o", $file_stat[ 'size' ] ), //length of file in bytes 12
398
+ sprintf( "%011o", $file_stat[ 'mtime' ] ), //modify time of file 12
399
+ " ", //checksum for header 8
400
+ 0, //type of file 0 or null = File, 5=Dir
401
+ "", //name of linked file 100
402
+ "ustar", //USTAR indicator 6
403
+ "00", //USTAR version 2
404
+ $fileowner, //owner user name 32
405
+ $filegroup, //owner group name 32
406
+ "", //device major number 8
407
+ "", //device minor number 8
408
+ $filename_prefix, //prefix for file name 155
409
+ "" ); //fill block 12
410
+
411
+ // Computes the unsigned Checksum of a file's header
412
+ $checksum = 0;
413
+ for ( $i = 0; $i < 512; $i ++ )
414
+ $checksum += ord( substr( $header, $i, 1 ) );
415
+
416
+ $checksum = pack( "a8", sprintf( "%07o", $checksum ) );
417
+ $header = substr_replace( $header, $checksum, 148, 8 );
418
+ //write header
419
+ if ( $this->get_method() == 'TarBz2' )
420
+ fwrite( $this->filehandel, bzcompress( $header ) );
421
+ elseif( $this->get_method() == 'TarGz' )
422
+ fwrite( $this->filehandel, gzencode( $header ) );
423
+ else
424
+ fwrite( $this->filehandel, $header );
425
+
426
+ // read/write files in 512K Blocks
427
+ while ( ! feof( $fd ) ) {
428
+ $file_data = fread( $fd, 512 );
429
+ if ( strlen( $file_data ) > 0 ) {
430
+ if ( $this->get_method() == 'TarBz2' )
431
+ fwrite( $this->filehandel, bzcompress( pack( "a512", $file_data ) ) );
432
+ elseif( $this->get_method() == 'TarGz' )
433
+ fwrite( $this->filehandel, gzencode( pack( "a512", $file_data ) ) );
434
+ else
435
+ fwrite( $this->filehandel, pack( "a512", $file_data ) );
436
+ }
437
+ }
438
+ fclose( $fd );
439
+
440
+ return TRUE;
441
+ }
442
+ }
443
+
444
+ /**
445
+ * Exception Handler
446
+ */
447
+ class BackWPup_Create_Archive_Exception extends Exception { }
inc/class-cron.php ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for BackWPup cron methods
4
+ */
5
+ class BackWPup_Cron {
6
+
7
+ /**
8
+ * @static
9
+ *
10
+ * @param $arg
11
+ * @internal param $args
12
+ */
13
+ public static function run( $arg ) {
14
+
15
+ $job_object = BackWPup_Job::get_working_data();
16
+ if ( is_object( $job_object ) ) {
17
+ //reschedule restart
18
+ wp_schedule_single_event( time() + 60, 'backwpup_cron', array( 'id' => 'restart' ) );
19
+ //restart job if not working
20
+ $not_worked_time = microtime( TRUE ) - $job_object->timestamp_last_update;
21
+ if ( $not_worked_time > 300 )
22
+ BackWPup_Job::start_wp_cron( 0 );
23
+ }
24
+ elseif ( $arg != 'restart' ) {
25
+ //check that job exits
26
+ $jobids = BackWPup_Option::get_job_ids( 'activetype', 'wpcron' );
27
+ if ( ! in_array( $arg, $jobids) )
28
+ return;
29
+ //reschedule job for next run
30
+ $cronnxet = BackWPup_Cron::cron_next( BackWPup_Option::get( $arg, 'cron' ) );
31
+ wp_schedule_single_event( $cronnxet, 'backwpup_cron', array( 'id' => $arg ) );
32
+ //start job
33
+ BackWPup_Job::start_wp_cron( $arg );
34
+ }
35
+ }
36
+
37
+
38
+ /**
39
+ * Check Jobs worked and Cleanup logs and so on
40
+ */
41
+ public static function check_cleanup() {
42
+
43
+ $job_object = BackWPup_Job::get_working_data( TRUE );
44
+ $jobids = BackWPup_Option::get_job_ids( );
45
+
46
+ // check aborted jobs for longer than a tow hours, abort them courtly and send mail
47
+ if ( is_object( $job_object ) ) {
48
+ $not_worked_time = microtime( TRUE ) - $job_object->timestamp_last_update;
49
+ if ( $not_worked_time > 7200 ) {
50
+ unlink( BackWPup::get_plugin_data( 'running_file' ) );
51
+ //add log entry
52
+ $timestamp = "<span title=\"[Type: " . E_USER_ERROR . "|Line: " . __LINE__ . "|File: " . basename( __FILE__ ) . "|PID: " . $job_object->pid . "]\">[" . date_i18n( 'd-M-Y H:i:s' ) . "]</span> ";
53
+ file_put_contents( $job_object->logfile, $timestamp . "<span class=\"error\">" . __( 'ERROR:', 'backwpup' ) . " " . __( 'Aborted, because 2 hours no progress!', 'backwpup' ) . "</span><br />" . PHP_EOL, FILE_APPEND );
54
+ //write new log header
55
+ $job_object->errors ++;
56
+ $fd = fopen( $job_object->logfile, 'r+' );
57
+ $filepos = ftell( $fd );
58
+ while ( ! feof( $fd ) ) {
59
+ $line = fgets( $fd );
60
+ if ( stripos( $line, "<meta name=\"backwpup_errors\"" ) !== FALSE ) {
61
+ fseek( $fd, $filepos );
62
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_errors\" content=\"" . $job_object->errors . "\" />", 100 ) . PHP_EOL );
63
+ break;
64
+ }
65
+ $filepos = ftell( $fd );
66
+ }
67
+ fclose( $fd );
68
+ //update job settings
69
+ if ( ! empty( $job_object->job[ 'jobid' ] ) )
70
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastruntime', ( current_time( 'timestamp' ) - $job_object->start_time ) );
71
+ //clean up temp
72
+ if ( ! empty( $job_object->backup_file ) && is_file( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->backup_file ) )
73
+ unlink( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->backup_file );
74
+ if ( ! empty( $job_object->folder_list_file ) && is_file( $job_object->folder_list_file ) )
75
+ unlink( $job_object->folder_list_file );
76
+ if ( ! empty( $job_object->additional_files_to_backup ) ) {
77
+ foreach ( $job_object->additional_files_to_backup as $additional_file ) {
78
+ if ( $additional_file == BackWPup::get_plugin_data( 'TEMP' ) . basename( $additional_file ) && is_file( $additional_file ) )
79
+ unlink( $additional_file );
80
+ }
81
+ }
82
+ //Send mail with log
83
+ if ( $job_object->job[ 'mailaddresslog' ] ) {
84
+ $subject = sprintf( __( '[%3$s] BackWPup log %1$s: %2$s', 'backwpup' ), date_i18n( 'd-M-Y H:i', $job_object->job[ 'lastrun' ], TRUE ), esc_attr( $job_object->job[ 'name' ] ), __('ERROR','backwpup') );
85
+ $headers = array();
86
+ $headers[] = 'Content-Type: text/html; charset='. get_bloginfo( 'charset' );
87
+ $headers[] = 'X-Priority: 1';
88
+ $headers[] = 'From: BackWPup <' . sanitize_email( get_bloginfo( 'admin_email' ) ).'>';
89
+ wp_mail( $job_object->job[ 'mailaddresslog' ], $subject, file_get_contents( $job_object->logfile ), $headers );
90
+ }
91
+ }
92
+ }
93
+
94
+ //Compress not compressed logs
95
+ if ( function_exists( 'gzopen' ) && ! $job_object && BackWPup_Option::get( 'cfg', 'gzlogs' )) {
96
+ //Compress logs from last Jobs
97
+ foreach ( $jobids as $jobid ) {
98
+ $log_file = BackWPup_Option::get( $jobid, 'logfile' );
99
+ //compress uncompressed
100
+ if ( is_file( $log_file ) && '.html' == substr( $log_file, -5 ) ) {
101
+ $compress = new BackWPup_Create_Archive( $log_file . '.gz' );
102
+ if ( $compress->add_file( $log_file ) ) {
103
+ BackWPup_Option::update( $jobid, 'logfile', $log_file. '.gz' );
104
+ unlink( $log_file );
105
+ }
106
+ unset( $compress );
107
+ }
108
+
109
+ }
110
+ //Compress old not compressed logs
111
+ $log_folder = scandir( BackWPup_Option::get( 'cfg', 'logfolder' ) );
112
+ foreach ( $log_folder as $log_file ) {
113
+ if ( is_file( BackWPup_Option::get( 'cfg', 'logfolder' ) . $log_file ) && '.html' == substr( $log_file, -5 ) ) {
114
+ $compress = new BackWPup_Create_Archive( BackWPup_Option::get( 'cfg', 'logfolder' ) . $log_file . '.gz' );
115
+ if ( $compress->add_file( BackWPup_Option::get( 'cfg', 'logfolder' ) . $log_file ) ) {
116
+ unlink( BackWPup_Option::get( 'cfg', 'logfolder' ) . $log_file );
117
+ }
118
+ unset( $compress );
119
+ }
120
+ }
121
+ }
122
+
123
+ //Jobs cleanings
124
+ if ( ! $job_object ) {
125
+ //remove restart cron
126
+ wp_clear_scheduled_hook( 'backwpup_cron', array( 'id' => 'restart' ) );
127
+ //clear maintenance mode
128
+ if ( is_file( ABSPATH . '.maintenance' ) or ( defined( 'FB_WM_TEXTDOMAIN' ) && ( get_site_option( FB_WM_TEXTDOMAIN . '-msqld' ) == 1 or get_option( FB_WM_TEXTDOMAIN . '-msqld' ) == 1 ) ) ) {
129
+ if ( class_exists( 'WPMaintenanceMode' ) ) { //Support for WP Maintenance Mode Plugin (Frank Bueltge)
130
+ if ( is_multisite() && is_plugin_active_for_network( FB_WM_BASENAME ) )
131
+ update_site_option( FB_WM_TEXTDOMAIN . '-msqld', 0 );
132
+ else
133
+ update_option( FB_WM_TEXTDOMAIN . '-msqld', 0 );
134
+ }
135
+ else { //WP Support
136
+ unlink( ABSPATH . '.maintenance' );
137
+ }
138
+ }
139
+ //temp cleanup
140
+ $temp_fodler = scandir( BackWPup::get_plugin_data( 'TEMP' ) );
141
+ foreach ( $temp_fodler as $temp_file ) {
142
+ if ( is_file( BackWPup::get_plugin_data( 'TEMP' ) . $temp_file ) ) {
143
+ if ( '.gz' == substr( $temp_file, -3 ) || '.sql' == substr( $temp_file, -4 ) || '.bz2' == substr( $temp_file, -4 ) || '.zip' == substr( $temp_file, -4 ) || '.txt' == substr( $temp_file, -4 ) || '.xml' == substr( $temp_file, -4 ) )
144
+ unlink( BackWPup_Option::get( 'cfg', 'logfolder' ) . $temp_file );
145
+ }
146
+ }
147
+ }
148
+ }
149
+
150
+ /**
151
+ *
152
+ * Get the local time timestamp of the next cron execution
153
+ *
154
+ * @param string $cronstring string of cron (* * * * *)
155
+ *
156
+ * @return int timestamp
157
+ */
158
+ public static function cron_next( $cronstring ) {
159
+
160
+ $cron = array();
161
+ $cronarray = array();
162
+ //Cron string
163
+ list( $cronstr[ 'minutes' ], $cronstr[ 'hours' ], $cronstr[ 'mday' ], $cronstr[ 'mon' ], $cronstr[ 'wday' ] ) = explode( ' ', $cronstring, 5 );
164
+
165
+ //make arrays form string
166
+ foreach ( $cronstr as $key => $value ) {
167
+ if ( strstr( $value, ',' ) )
168
+ $cronarray[ $key ] = explode( ',', $value );
169
+ else
170
+ $cronarray[ $key ] = array( 0 => $value );
171
+ }
172
+
173
+ //make arrays complete with ranges and steps
174
+ foreach ( $cronarray as $cronarraykey => $cronarrayvalue ) {
175
+ $cron[ $cronarraykey ] = array();
176
+ foreach ( $cronarrayvalue as $value ) {
177
+ //steps
178
+ $step = 1;
179
+ if ( strstr( $value, '/' ) )
180
+ list( $value, $step ) = explode( '/', $value, 2 );
181
+ //replace weekday 7 with 0 for sundays
182
+ if ( $cronarraykey == 'wday' )
183
+ $value = str_replace( '7', '0', $value );
184
+ //ranges
185
+ if ( strstr( $value, '-' ) ) {
186
+ list( $first, $last ) = explode( '-', $value, 2 );
187
+ if ( ! is_numeric( $first ) || ! is_numeric( $last ) || $last > 60 || $first > 60 ) //check
188
+ return 2147483647;
189
+ if ( $cronarraykey == 'minutes' && $step < 5 ) //set step minimum to 5 min.
190
+ $step = 5;
191
+ $range = array();
192
+ for ( $i = $first; $i <= $last; $i = $i + $step ) {
193
+ $range[ ] = $i;
194
+ }
195
+ $cron[ $cronarraykey ] = array_merge( $cron[ $cronarraykey ], $range );
196
+ }
197
+ elseif ( $value == '*' ) {
198
+ $range = array();
199
+ if ( $cronarraykey == 'minutes' ) {
200
+ if ( $step < 10 ) //set step minimum to 5 min.
201
+ $step = 10;
202
+ for ( $i = 0; $i <= 59; $i = $i + $step ) {
203
+ $range[ ] = $i;
204
+ }
205
+ }
206
+ if ( $cronarraykey == 'hours' ) {
207
+ for ( $i = 0; $i <= 23; $i = $i + $step ) {
208
+ $range[ ] = $i;
209
+ }
210
+ }
211
+ if ( $cronarraykey == 'mday' ) {
212
+ for ( $i = $step; $i <= 31; $i = $i + $step ) {
213
+ $range[ ] = $i;
214
+ }
215
+ }
216
+ if ( $cronarraykey == 'mon' ) {
217
+ for ( $i = $step; $i <= 12; $i = $i + $step ) {
218
+ $range[ ] = $i;
219
+ }
220
+ }
221
+ if ( $cronarraykey == 'wday' ) {
222
+ for ( $i = 0; $i <= 6; $i = $i + $step ) {
223
+ $range[ ] = $i;
224
+ }
225
+ }
226
+ $cron[ $cronarraykey ] = array_merge( $cron[ $cronarraykey ], $range );
227
+ }
228
+ else {
229
+ //Month names
230
+ if ( strtolower( $value ) == 'jan' )
231
+ $value = 1;
232
+ if ( strtolower( $value ) == 'feb' )
233
+ $value = 2;
234
+ if ( strtolower( $value ) == 'mar' )
235
+ $value = 3;
236
+ if ( strtolower( $value ) == 'apr' )
237
+ $value = 4;
238
+ if ( strtolower( $value ) == 'may' )
239
+ $value = 5;
240
+ if ( strtolower( $value ) == 'jun' )
241
+ $value = 6;
242
+ if ( strtolower( $value ) == 'jul' )
243
+ $value = 7;
244
+ if ( strtolower( $value ) == 'aug' )
245
+ $value = 8;
246
+ if ( strtolower( $value ) == 'sep' )
247
+ $value = 9;
248
+ if ( strtolower( $value ) == 'oct' )
249
+ $value = 10;
250
+ if ( strtolower( $value ) == 'nov' )
251
+ $value = 11;
252
+ if ( strtolower( $value ) == 'dec' )
253
+ $value = 12;
254
+ //Week Day names
255
+ if ( strtolower( $value ) == 'sun' )
256
+ $value = 0;
257
+ if ( strtolower( $value ) == 'sat' )
258
+ $value = 6;
259
+ if ( strtolower( $value ) == 'mon' )
260
+ $value = 1;
261
+ if ( strtolower( $value ) == 'tue' )
262
+ $value = 2;
263
+ if ( strtolower( $value ) == 'wed' )
264
+ $value = 3;
265
+ if ( strtolower( $value ) == 'thu' )
266
+ $value = 4;
267
+ if ( strtolower( $value ) == 'fri' )
268
+ $value = 5;
269
+ if ( ! is_numeric( $value ) || $value > 60 ) //check
270
+ return 2147483647;
271
+ $cron[ $cronarraykey ] = array_merge( $cron[ $cronarraykey ], array( 0 => $value ) );
272
+ }
273
+ }
274
+ }
275
+
276
+ //generate years
277
+ for ( $i = gmdate( 'Y' ); $i < gmdate( 'Y', 2147483647 ); $i ++ ) {
278
+ $cron[ 'year' ][ ] = $i;
279
+ }
280
+
281
+ //calc next timestamp
282
+ $current_timestamp = time();
283
+ foreach ( $cron[ 'year' ] as $year ) {
284
+ foreach ( $cron[ 'mon' ] as $mon ) {
285
+ foreach ( $cron[ 'mday' ] as $mday ) {
286
+ foreach ( $cron[ 'hours' ] as $hours ) {
287
+ foreach ( $cron[ 'minutes' ] as $minutes ) {
288
+ $timestamp = gmmktime( $hours - get_option( 'gmt_offset' ), $minutes, 0, $mon, $mday, $year );
289
+ if ( $timestamp && in_array( gmdate( 'j', $timestamp ), $cron[ 'mday' ] ) && in_array( gmdate( 'w', $timestamp ), $cron[ 'wday' ] ) && $timestamp > $current_timestamp ) {
290
+ return $timestamp;
291
+ }
292
+ }
293
+ }
294
+ }
295
+ }
296
+ }
297
+
298
+ return 2147483647;
299
+ }
300
+
301
+ }
inc/class-destination-dropbox.php ADDED
@@ -0,0 +1,825 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Documentation: https://www.dropbox.com/developers/reference/api
4
+ */
5
+ class BackWPup_Destination_Dropbox extends BackWPup_Destinations {
6
+
7
+ /**
8
+ * @return mixed
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'DROPBOX';
13
+ $this->info[ 'name' ] = __( 'Dropbox', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'Backup to Dropbox', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+ /**
23
+ * @return array
24
+ */
25
+ public function option_defaults() {
26
+
27
+ return array( 'dropboxtoken' => '', 'dropboxsecret' => '', 'dropboxroot' => 'sandbox', 'dropboxmaxbackups' => 0, 'dropboxsyncnodelete' => TRUE, 'dropboxdir' => trailingslashit( sanitize_file_name( get_bloginfo( 'name' ) ) ) );
28
+ }
29
+
30
+
31
+ /**
32
+ * @param $jobid
33
+ */
34
+ public function edit_tab( $jobid ) {
35
+ //Dropbox auth keys from Dropbox
36
+ if ( isset( $_GET[ 'uid' ] ) && (int)$_GET[ 'uid' ] > 1 && ! empty( $_GET[ 'oauth_token' ] ) ) {
37
+ if ( isset( $_SESSION[ 'backwpup_jobedit'][ 'dropboxsandbox_auth' ][ 'oAuthRequestToken' ] ) && $_SESSION[ 'backwpup_jobedit'][ 'dropboxsandbox_auth' ][ 'oAuthRequestToken' ] == $_GET[ 'oauth_token' ] ) {
38
+ //Get Access Tokens
39
+ try {
40
+ $dropbox = new BackWPup_Destination_Dropbox_API( 'sandbox' );
41
+ $oAuthStuff = $dropbox->oAuthAccessToken( $_SESSION[ 'backwpup_jobedit'][ 'dropboxsandbox_auth' ][ 'oAuthRequestToken' ], $_SESSION[ 'backwpup_jobedit'][ 'dropboxsandbox_auth' ][ 'oAuthRequestTokenSecret' ] );
42
+ //Save Tokens
43
+ echo '<input type="hidden" name="dropboxtoken" value="' . esc_attr( $oAuthStuff[ 'oauth_token' ] ) . '" />';
44
+ echo '<input type="hidden" name="dropboxsecret" value="' . esc_attr( BackWPup_Encryption::encrypt( $oAuthStuff[ 'oauth_token_secret' ] ) ) . '" />';
45
+ echo '<input type="hidden" name="dropboxroot" value="sandbox" />';
46
+ echo '<div id="message" class="updated">' . __( 'Dropbox authentication complete!', 'backwpup' ) . '</div>';
47
+ }
48
+ catch ( Exception $e ) {
49
+ echo '<div id=\"message\" class=\"updated\">' . sprintf( __( 'Dropbox API: %s', 'backwpup' ), $e->getMessage() ) . '</div>';
50
+ }
51
+ } elseif ( isset( $_SESSION[ 'backwpup_jobedit'][ 'dropboxdropbox_auth' ][ 'oAuthRequestToken' ] ) && $_SESSION[ 'backwpup_jobedit'][ 'dropboxdropbox_auth' ][ 'oAuthRequestToken' ] == $_GET[ 'oauth_token' ] ) {
52
+ //Get Access Tokens
53
+ try {
54
+ $dropbox = new BackWPup_Destination_Dropbox_API( 'dropbox' );
55
+ $oAuthStuff = $dropbox->oAuthAccessToken( $_SESSION[ 'backwpup_jobedit'][ 'dropboxdropbox_auth' ][ 'oAuthRequestToken' ], $_SESSION[ 'backwpup_jobedit'][ 'dropboxdropbox_auth' ][ 'oAuthRequestTokenSecret' ] );
56
+ //Save Tokens
57
+ echo '<input type="hidden" name="dropboxtoken" value="' . esc_attr( $oAuthStuff[ 'oauth_token' ] ) . '" />';
58
+ echo '<input type="hidden" name="dropboxsecret" value="' . esc_attr( BackWPup_Encryption::encrypt( $oAuthStuff[ 'oauth_token_secret' ] ) ) . '" />';
59
+ echo '<input type="hidden" name="dropboxroot" value="dropbox" />';
60
+ echo '<div class="notice">' . __( 'Dropbox authentication complete!', 'backwpup' ) . '</div>';
61
+ }
62
+ catch ( Exception $e ) {
63
+ echo '<div id=\"message\" class=\"updated\">' . sprintf( __( 'Dropbox API: %s', 'backwpup' ), $e->getMessage() ) . '</div>';
64
+ }
65
+ } else {
66
+ echo '<div id=\"message\" class=\"updated\">' . __( 'Wrong Token for Dropbox authentication received!', 'backwpup' ) . '</div>';
67
+ }
68
+ }
69
+
70
+ //get auth url sandbox
71
+ try {
72
+ $dropbox = new BackWPup_Destination_Dropbox_API( 'sandbox' );
73
+ // let the user authorize (user will be redirected)
74
+ $response_sandbox = $dropbox->oAuthAuthorize( network_admin_url( 'admin.php' ) . '?page=backwpupeditjob&jobid=' .$jobid .'&tab=dest-dropbox&_wpnonce=' . wp_create_nonce( 'edit-job' ) );
75
+ // save oauth_token_secret
76
+ $_SESSION[ 'backwpup_jobedit'][ 'dropboxsandbox_auth' ] = array(
77
+ 'oAuthRequestToken' => $response_sandbox[ 'oauth_token' ],
78
+ 'oAuthRequestTokenSecret' => $response_sandbox[ 'oauth_token_secret' ]
79
+ );
80
+ }
81
+ catch ( Exception $e ) {
82
+ echo '<div id=\"message\" class=\"updated\">' . sprintf( __( 'Dropbox API: %s', 'backwpup' ), $e->getMessage() ) . '</div>';
83
+ }
84
+ //get auth url dropbox
85
+ try {
86
+ $dropbox = new BackWPup_Destination_Dropbox_API( 'dropbox' );
87
+ // let the user authorize (user will be redirected)
88
+ $response_dropbox = $dropbox->oAuthAuthorize( network_admin_url( 'admin.php' ) . '?page=backwpupeditjob&jobid=' .$jobid .'&tab=dest-dropbox&_wpnonce=' . wp_create_nonce( 'edit-job' ) );
89
+ // save oauth_token_secret
90
+ $_SESSION[ 'backwpup_jobedit'][ 'dropboxdropbox_auth' ] = array(
91
+ 'oAuthRequestToken' => $response_dropbox[ 'oauth_token' ],
92
+ 'oAuthRequestTokenSecret' => $response_dropbox[ 'oauth_token_secret' ]
93
+ );
94
+ }
95
+ catch ( Exception $e ) {
96
+ echo '<div id=\"message\" class=\"updated\">' . sprintf( __( 'Dropbox API: %s', 'backwpup' ), $e->getMessage() ) . '</div>';
97
+ }
98
+ ?>
99
+
100
+ <h3 class="title"><?php _e( 'Login', 'backwpup' ); ?></h3>
101
+ <p></p>
102
+ <table class="form-table">
103
+ <tr valign="top">
104
+ <th scope="row"><?php _e( 'Authenticate', 'backwpup' ); ?></th>
105
+ <td><?php if ( ! BackWPup_Option::get( $jobid, 'dropboxtoken' ) && ! BackWPup_Option::get( $jobid, 'dropboxsecret' ) && ! isset( $oAuthStuff[ 'oauth_token' ] ) ) { ?>
106
+ <span style="color:red;"><?php _e( 'Not authenticated!', 'backwpup' ); ?></span>&nbsp;<a href="http://db.tt/8irM1vQ0"><?php _e( 'Create Account', 'backwpup' ); ?></a><br />
107
+ <a class="button secondary" href="<?php echo esc_url( $response_sandbox[ 'authurl' ] );?>"><?php _e( 'Authenticate (Sandbox)', 'backwpup' ); ?></a>&nbsp;
108
+ <a class="button secondary" href="<?php echo esc_url( $response_dropbox[ 'authurl' ] );?>"><?php _e( 'Authenticate (full Dropbox)', 'backwpup' ); ?></a>
109
+ <?php } else { ?>
110
+ <span style="color:green;"><?php _e( 'Authenticated!', 'backwpup' ); ?></span><br />
111
+ <a class="button secondary" href="<?php echo esc_url( $response_sandbox[ 'authurl' ] );?>"><?php _e( 'Reauthenticate (Sandbox)', 'backwpup' ); ?></a>&nbsp;
112
+ <a class="button secondary" href="<?php echo esc_url( $response_dropbox[ 'authurl' ] );?>"><?php _e( 'Reauthenticate (full Dropbox)', 'backwpup' ); ?></a>
113
+ <?php } ?>
114
+ </td>
115
+ </tr>
116
+ </table>
117
+
118
+
119
+ <h3 class="title"><?php _e( 'Backup settings', 'backwpup' ); ?></h3>
120
+ <p></p>
121
+ <table class="form-table">
122
+ <tr valign="top">
123
+ <th scope="row"><label for="iddropboxdir"><?php _e( 'Folder in Dropbox', 'backwpup' ); ?></label></th>
124
+ <td>
125
+ <input id="iddropboxdir" name="dropboxdir" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'dropboxdir' ) ); ?>" class="regular-text" />
126
+ </td>
127
+ </tr>
128
+ <tr valign="top">
129
+ <th scope="row"><?php _e( 'File Deletion', 'backwpup' ); ?></th>
130
+ <td>
131
+ <?php
132
+ if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'archive' ) {
133
+ ?>
134
+ <label for="iddropboxmaxbackups"><input id="iddropboxmaxbackups" name="dropboxmaxbackups" type="text" size="3" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'dropboxmaxbackups' ) );?>" class="small-text" />&nbsp;
135
+ <?php _e( 'Number of files to hold in folder.', 'backwpup' ); BackWPup_Help::tip( __( 'Oldest files will be deleted first. 0 = no deletion', 'backwpup' ) ); ?></label>
136
+ <?php } else { ?>
137
+ <label for="iddropboxsyncnodelete" ><input class="checkbox" value="1"
138
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dropboxsyncnodelete' ), TRUE ); ?>
139
+ name="dropboxsyncnodelete" id="iddropboxsyncnodelete" /> <?php _e( 'Do not delete files on sync to destination!', 'backwpup' ); ?></label>
140
+ <?php } ?>
141
+ </td>
142
+ </tr>
143
+ </table>
144
+
145
+ <?php
146
+ }
147
+
148
+
149
+ /**
150
+ * @param $jobid
151
+ * @return string|void
152
+ */
153
+ public function edit_form_post_save( $jobid ) {
154
+
155
+ unset( $_SESSION[ 'backwpup_jobedit'] );
156
+
157
+ if ( isset( $_POST[ 'dropboxtoken' ] ) ) {
158
+ BackWPup_Option::update( $jobid, 'dropboxtoken', $_POST[ 'dropboxtoken' ] );
159
+ BackWPup_Option::update( $jobid, 'dropboxsecret', $_POST[ 'dropboxsecret' ] );
160
+ BackWPup_Option::update( $jobid, 'dropboxroot', ( isset( $_POST[ 'dropboxroot' ] ) && $_POST[ 'dropboxroot' ] == 'dropbox' ) ? 'dropbox' : 'sandbox' );
161
+ }
162
+
163
+ BackWPup_Option::update( $jobid, 'dropboxsyncnodelete', ( isset( $_POST[ 'dropboxsyncnodelete' ] ) && $_POST[ 'dropboxsyncnodelete' ] == 1 ) ? TRUE : FALSE );
164
+ BackWPup_Option::update( $jobid, 'dropboxmaxbackups', isset( $_POST[ 'dropboxmaxbackups' ] ) ? (int)$_POST[ 'dropboxmaxbackups' ] : 0 );
165
+
166
+ $_POST[ 'dropboxdir' ] = trailingslashit( str_replace( '//', '/', str_replace( '\\', '/', trim( stripslashes( $_POST[ 'dropboxdir' ] ) ) ) ) );
167
+ if ( substr( $_POST[ 'dropboxdir' ], 0, 1 ) == '/' )
168
+ $_POST[ 'dropboxdir' ] = substr( $_POST[ 'dropboxdir' ], 1 );
169
+ if ( $_POST[ 'dropboxdir' ] == '/' )
170
+ $_POST[ 'dropboxdir' ] = '';
171
+ BackWPup_Option::update( $jobid, 'dropboxdir', $_POST[ 'dropboxdir' ] );
172
+
173
+ }
174
+
175
+ /**
176
+ * @param $jobdest
177
+ * @param $backupfile
178
+ */
179
+ public function file_delete( $jobdest, $backupfile ) {
180
+
181
+ $files = get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
182
+ list( $jobid, $dest ) = explode( '_', $jobdest );
183
+
184
+ if ( BackWPup_Option::get( $jobid, 'dropboxtoken' ) && BackWPup_Option::get( $jobid, 'dropboxsecret' ) ) {
185
+ try {
186
+ $dropbox = new BackWPup_Destination_Dropbox_API( BackWPup_Option::get( $jobid, 'dropboxroot' ) );
187
+ $dropbox->setOAuthTokens( BackWPup_Option::get( $jobid, 'dropboxtoken' ), BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'dropboxsecret' ) ) );
188
+ $dropbox->fileopsDelete( $backupfile );
189
+ //update file list
190
+ foreach ( $files as $key => $file ) {
191
+ if ( is_array( $file ) && $file[ 'file' ] == $backupfile )
192
+ unset( $files[ $key ] );
193
+ }
194
+ unset( $dropbox );
195
+ }
196
+ catch ( Exception $e ) {
197
+ BackWPup_Admin::message( 'DROPBOX: ' . $e->getMessage() );
198
+ }
199
+ }
200
+ set_site_transient( 'backwpup_',strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
201
+ }
202
+
203
+ /**
204
+ * @param $jobid
205
+ * @param $get_file
206
+ */
207
+ public function file_download( $jobid, $get_file ) {
208
+
209
+ try {
210
+ $dropbox = new BackWPup_Destination_Dropbox_API( BackWPup_Option::get( $jobid, 'dropboxroot' ) );
211
+ $dropbox->setOAuthTokens( BackWPup_Option::get( $jobid, 'dropboxtoken' ), BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'dropboxsecret' ) ) );
212
+ $media = $dropbox->media( $get_file );
213
+ if ( ! empty( $media[ 'url' ] ) )
214
+ header( "Location: " . $media[ 'url' ] );
215
+ die();
216
+ }
217
+ catch ( Exception $e ) {
218
+ die( $e->getMessage() );
219
+ }
220
+ }
221
+
222
+ /**
223
+ * @param $jobdest
224
+ * @return mixed
225
+ */
226
+ public function file_get_list( $jobdest ) {
227
+ return get_site_transient( 'BackWPup_' . $jobdest );
228
+ }
229
+
230
+ /**
231
+ * @param $job_object
232
+ * @return bool
233
+ */
234
+ public function job_run_archive( $job_object ) {
235
+
236
+ $job_object->substeps_todo = 2 + $job_object->backup_filesize;
237
+ $job_object->log( sprintf( __( '%d. Try to send backup file to Dropbox &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
238
+ try {
239
+ $dropbox = new BackWPup_Destination_Dropbox_API( $job_object->job[ 'dropboxroot' ] );
240
+ // set the tokens
241
+ $dropbox->setOAuthTokens( $job_object->job[ 'dropboxtoken' ], BackWPup_Encryption::decrypt( $job_object->job[ 'dropboxsecret' ] ) );
242
+ //get account info
243
+ $info = $dropbox->accountInfo();
244
+ if ( ! empty( $info[ 'uid' ] ) ) {
245
+ $job_object->log( sprintf( __( 'Authenticated with Dropbox from %s', 'backwpup' ), $info[ 'display_name' ] . ' (' . $info[ 'email' ] . ')' ), E_USER_NOTICE );
246
+ }
247
+ //Check Quota
248
+ $dropboxfreespase = $info[ 'quota_info' ][ 'quota' ] - $info[ 'quota_info' ][ 'shared' ] - $info[ 'quota_info' ][ 'normal' ];
249
+ if ( $job_object->backup_filesize > $dropboxfreespase ) {
250
+ $job_object->log( __( 'No free space left on Dropbox!', 'backwpup' ), E_USER_ERROR );
251
+
252
+ return TRUE;
253
+ }
254
+ else {
255
+ $job_object->log( sprintf( __( '%s free on Dropbox', 'backwpup' ), size_format( $dropboxfreespase, 2 ) ), E_USER_NOTICE );
256
+ }
257
+ $job_object->substeps_done = 0;
258
+ // put the file
259
+ $job_object->log( __( 'Upload to Dropbox now started &hellip;', 'backwpup' ), E_USER_NOTICE );
260
+ $response = $dropbox->upload( $job_object->backup_folder . $job_object->backup_file, $job_object->job[ 'dropboxdir' ] . $job_object->backup_file );
261
+ if ( $response[ 'bytes' ] == filesize( $job_object->backup_folder . $job_object->backup_file ) ) {
262
+ if ( ! empty( $job_object->job[ 'jobid' ] ) )
263
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastbackupdownloadurl', network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloaddropbox&file=' . $job_object->job[ 'dropboxdir' ] . $job_object->backup_file . '&jobid=' . $job_object->job[ 'jobid' ] );
264
+ $job_object->substeps_done = 1 + $job_object->backup_filesize;
265
+ $job_object->log( sprintf( __( 'Backup transferred to %s', 'backwpup' ), 'https://api-content.dropbox.com/1/files/' . $job_object->job[ 'dropboxroot' ] . '/' . $job_object->job[ 'dropboxdir' ] . $job_object->backup_file ), E_USER_NOTICE );
266
+ }
267
+ else {
268
+ if ( $response[ 'bytes' ] != filesize( $job_object->backup_folder . $job_object->backup_file ) )
269
+ $job_object->log( __( 'Uploaded file size and local file size not the same!', 'backwpup' ), E_USER_ERROR );
270
+ else
271
+ $job_object->log( sprintf( __( 'Error on transfer backup to Dropbox: %s', 'backwpup' ), $response[ 'error' ] ), E_USER_ERROR );
272
+
273
+ return FALSE;
274
+ }
275
+ }
276
+ catch ( Exception $e ) {
277
+ $job_object->log( E_USER_ERROR, sprintf( __( 'Dropbox API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
278
+
279
+ return FALSE;
280
+ }
281
+ try {
282
+ $backupfilelist = array();
283
+ $filecounter = 0;
284
+ $files = array();
285
+ $metadata = $dropbox->metadata( $job_object->job[ 'dropboxdir' ] );
286
+ if ( is_array( $metadata ) ) {
287
+ foreach ( $metadata[ 'contents' ] as $data ) {
288
+ if ( $data[ 'is_dir' ] != TRUE ) {
289
+ $file = basename( $data[ 'path' ] );
290
+ if ( $job_object->is_backup_archive( $file ) )
291
+ $backupfilelist[ strtotime( $data[ 'modified' ] ) ] = $file;
292
+ $files[ $filecounter ][ 'folder' ] = "https://api-content.dropbox.com/1/files/" . $job_object->job[ 'dropboxroot' ] . dirname( $data[ 'path' ] ) . "/";
293
+ $files[ $filecounter ][ 'file' ] = $data[ 'path' ];
294
+ $files[ $filecounter ][ 'filename' ] = basename( $data[ 'path' ] );
295
+ $files[ $filecounter ][ 'downloadurl' ] = network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloaddropbox&file=' . $data[ 'path' ] . '&jobid=' . $job_object->job[ 'jobid' ];
296
+ $files[ $filecounter ][ 'filesize' ] = $data[ 'bytes' ];
297
+ $files[ $filecounter ][ 'time' ] = strtotime( $data[ 'modified' ] ) + ( get_option( 'gmt_offset' ) * 3600 );
298
+ $filecounter ++;
299
+ }
300
+ }
301
+ }
302
+ if ( $job_object->job[ 'dropboxmaxbackups' ] > 0 && is_object( $dropbox ) ) { //Delete old backups
303
+ if ( count( $backupfilelist ) > $job_object->job[ 'dropboxmaxbackups' ] ) {
304
+ ksort( $backupfilelist );
305
+ $numdeltefiles = 0;
306
+ while ( $file = array_shift( $backupfilelist ) ) {
307
+ if ( count( $backupfilelist ) < $job_object->job[ 'dropboxmaxbackups' ] )
308
+ break;
309
+ $response = $dropbox->fileopsDelete( $job_object->job[ 'dropboxdir' ] . $file ); //delete files on Cloud
310
+ if ( $response[ 'is_deleted' ] == 'true' ) {
311
+ foreach ( $files as $key => $filedata ) {
312
+ if ( $filedata[ 'file' ] == '/' .$job_object->job[ 'dropboxdir' ] . $file )
313
+ unset( $files[ $key ] );
314
+ }
315
+ $numdeltefiles ++;
316
+ }
317
+ else
318
+ $job_object->log( sprintf( __( 'Error on delete file on Dropbox: %s', 'backwpup' ), $file ), E_USER_ERROR );
319
+ }
320
+ if ( $numdeltefiles > 0 )
321
+ $job_object->log( sprintf( _n( 'One file deleted on Dropbox', '%d files deleted on Dropbox', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
322
+ }
323
+ }
324
+ set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_dropbox', $files, 60 * 60 * 24 * 7 );
325
+ }
326
+ catch ( Exception $e ) {
327
+ $job_object->log( E_USER_ERROR, sprintf( __( 'Dropbox API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
328
+
329
+ return FALSE;
330
+ }
331
+ $job_object->substeps_done ++;
332
+
333
+ return TRUE;
334
+ }
335
+
336
+ /**
337
+ * @param $job_object
338
+ * @return bool
339
+ */
340
+ public function can_run( $job_object ) {
341
+
342
+ if ( empty( $job_object->job[ 'dropboxtoken' ] ) )
343
+ return FALSE;
344
+
345
+ if ( empty( $job_object->job[ 'dropboxsecret' ] ) )
346
+ return FALSE;
347
+
348
+ return TRUE;
349
+ }
350
+
351
+ }
352
+
353
+
354
+ /**
355
+ *
356
+ */
357
+ final class BackWPup_Destination_Dropbox_API {
358
+
359
+ /**
360
+ *
361
+ */
362
+ const API_URL = 'https://api.dropbox.com/';
363
+
364
+ /**
365
+ *
366
+ */
367
+ const API_CONTENT_URL = 'https://api-content.dropbox.com/';
368
+
369
+ /**
370
+ *
371
+ */
372
+ const API_WWW_URL = 'https://www.dropbox.com/';
373
+
374
+ /**
375
+ *
376
+ */
377
+ const API_VERSION_URL = '1/';
378
+
379
+ /**
380
+ * dropbox vars
381
+ *
382
+ * @var string
383
+ */
384
+ private $root = 'sandbox';
385
+
386
+ /**
387
+ * oAuth vars
388
+ *
389
+ * @var string
390
+ */
391
+ private $oauth_app_key = '';
392
+
393
+ /**
394
+ * @var string
395
+ */
396
+ private $oauth_app_secret = '';
397
+ /**
398
+ * @var string
399
+ */
400
+ private $oauth_token = '';
401
+
402
+ /**
403
+ * @var string
404
+ */
405
+ private $oauth_token_secret = '';
406
+
407
+
408
+ /**
409
+ * @param string $boxtype
410
+ */
411
+ public function __construct( $boxtype = 'dropbox' ) {
412
+
413
+ if ( $boxtype == 'dropbox' ) {
414
+ $this->oauth_app_key = BackWPup_Option::get( 'cfg', 'dropboxappkey' );
415
+ $this->oauth_app_secret = BackWPup_Encryption::decrypt( BackWPup_Option::get( 'cfg', 'dropboxappsecret' ) );
416
+ $this->root = 'dropbox';
417
+ }
418
+ else {
419
+ $this->oauth_app_key = BackWPup_Option::get( 'cfg', 'dropboxsandboxappkey' );
420
+ $this->oauth_app_secret = BackWPup_Encryption::decrypt( BackWPup_Option::get( 'cfg', 'dropboxsandboxappsecret' ) );
421
+ $this->root = 'sandbox';
422
+ }
423
+
424
+ if ( empty( $this->oauth_app_key ) or empty( $this->oauth_app_secret ) )
425
+ throw new BackWPup_Destination_Dropbox_API_Exception( "No App key or App Secret specified." );
426
+ }
427
+
428
+ /**
429
+ * @param $token
430
+ * @param $secret
431
+ * @throws BackWPup_Destination_Dropbox_API_Exception
432
+ */
433
+ public function setOAuthTokens( $token, $secret ) {
434
+
435
+ $this->oauth_token = $token;
436
+ $this->oauth_token_secret = $secret;
437
+
438
+ if ( empty( $this->oauth_token ) or empty( $this->oauth_token_secret ) )
439
+ throw new BackWPup_Destination_Dropbox_API_Exception( "No oAuth token or secret specified." );
440
+ }
441
+
442
+ /**
443
+ * @return array|mixed|string
444
+ */
445
+ public function accountInfo() {
446
+
447
+ $url = self::API_URL . self::API_VERSION_URL . 'account/info';
448
+
449
+ return $this->request( $url );
450
+ }
451
+
452
+ /**
453
+ * @param $file
454
+ * @param string $path
455
+ * @param bool $overwrite
456
+ * @return array|mixed|string
457
+ * @throws BackWPup_Destination_Dropbox_API_Exception
458
+ */
459
+ public function upload( $file, $path = '', $overwrite = TRUE ) {
460
+
461
+ $file = str_replace( "\\", "/", $file );
462
+
463
+ if ( ! is_readable( $file ) or ! is_file( $file ) )
464
+ throw new BackWPup_Destination_Dropbox_API_Exception( "Error: File \"$file\" is not readable or doesn't exist." );
465
+
466
+ $filesize = filesize( $file );
467
+
468
+ if ( $filesize < 8388608 ) { //chunk transfer on bigger uploads
469
+ $filehandel = fopen( $file, 'r' );
470
+ $url = self::API_CONTENT_URL . self::API_VERSION_URL . 'files_put/' . $this->root . '/' . $this->encode_path( $path );
471
+ $output = $this->request( $url, array( 'overwrite' => ( $overwrite ) ? 'true' : 'false' ), 'PUT', $filehandel, $filesize );
472
+ fclose( $filehandel );
473
+ }
474
+ else {
475
+ $output = $this->chunked_upload( $file, $path, $overwrite );
476
+ }
477
+
478
+ return $output;
479
+ }
480
+
481
+ /**
482
+ * @param $file
483
+ * @param string $path
484
+ * @param bool $overwrite
485
+ * @return array|mixed|string
486
+ * @throws BackWPup_Destination_Dropbox_API_Exception
487
+ */
488
+ public function chunked_upload( $file, $path = '', $overwrite = TRUE ) {
489
+
490
+ $file = str_replace( "\\", "/", $file );
491
+
492
+ if ( ! is_readable( $file ) or ! is_file( $file ) )
493
+ throw new BackWPup_Destination_Dropbox_API_Exception( "Error: File \"$file\" is not readable or doesn't exist." );
494
+
495
+ $file_handel = fopen( $file, 'r' );
496
+ $uploadid = NULL;
497
+ $offset = 0;
498
+ $job_object = BackWPup_Job::getInstance();
499
+
500
+ while ( $data = fread( $file_handel, 4194304 ) ) { //4194304 = 4MB
501
+ $chunkHandle = fopen( 'php://memory', 'w+' );
502
+ fwrite( $chunkHandle, $data );
503
+ rewind( $chunkHandle );
504
+ $url = self::API_CONTENT_URL . self::API_VERSION_URL . 'chunked_upload';
505
+ $output = $this->request( $url, array( 'upload_id' => $uploadid, 'offset' => $offset ), 'PUT', $chunkHandle, strlen( $data ) );
506
+ fclose( $chunkHandle );
507
+ $job_object->curl_read_callback( NULL, NULL, strlen( $data ) );
508
+ //args for next chunk
509
+ $offset = $output[ 'offset' ];
510
+ $uploadid = $output[ 'upload_id' ];
511
+ fseek( $file_handel, $offset );
512
+ }
513
+
514
+ fclose( $file_handel );
515
+ $url = self::API_CONTENT_URL . self::API_VERSION_URL . 'commit_chunked_upload/' . $this->root . '/' . $this->encode_path( $path );
516
+
517
+ return $this->request( $url, array( 'overwrite' => ( $overwrite ) ? 'true' : 'false', 'upload_id' => $uploadid ), 'POST' );
518
+ }
519
+
520
+ /**
521
+ * @param $path
522
+ * @param bool $echo
523
+ * @return array|mixed|string
524
+ */
525
+ public function download( $path, $echo = FALSE ) {
526
+
527
+ $url = self::API_CONTENT_URL . self::API_VERSION_URL . 'files/' . $this->root . '/' . $this->encode_path( $path );
528
+ if ( ! $echo )
529
+ return $this->request( $url );
530
+ else
531
+ $this->request( $url, NULL, 'GET', NULL, 0, TRUE );
532
+ }
533
+
534
+ /**
535
+ * @param string $path
536
+ * @param bool $listContents
537
+ * @param int $fileLimit
538
+ * @param string $hash
539
+ * @return array|mixed|string
540
+ */
541
+ public function metadata( $path = '', $listContents = TRUE, $fileLimit = 10000, $hash = '' ) {
542
+
543
+ $url = self::API_URL . self::API_VERSION_URL . 'metadata/' . $this->root . '/' . $this->encode_path( $path );
544
+
545
+ return $this->request( $url, array(
546
+ 'list' => ( $listContents ) ? 'true' : 'false',
547
+ 'hash' => ( $hash ) ? $hash : '',
548
+ 'file_limit' => $fileLimit
549
+ ) );
550
+ }
551
+
552
+ /**
553
+ * @param string $path
554
+ * @param $query
555
+ * @param int $fileLimit
556
+ * @return array|mixed|string
557
+ * @throws BackWPup_Destination_Dropbox_API_Exception
558
+ */
559
+ public function search( $path = '', $query, $fileLimit = 1000 ) {
560
+
561
+ if ( strlen( $query ) >= 3 )
562
+ throw new BackWPup_Destination_Dropbox_API_Exception( "Error: Query \"$query\" must three characters long." );
563
+ $url = self::API_URL . self::API_VERSION_URL . 'search/' . $this->root . '/' . $this->encode_path( $path );
564
+
565
+ return $this->request( $url, array(
566
+ 'query' => $query,
567
+ 'file_limit' => $fileLimit
568
+ ) );
569
+ }
570
+
571
+ /**
572
+ * @param string $path
573
+ * @return array|mixed|string
574
+ */
575
+ public function shares( $path = '' ) {
576
+
577
+ $url = self::API_URL . self::API_VERSION_URL . 'shares/' . $this->root . '/' . $this->encode_path( $path );
578
+
579
+ return $this->request( $url );
580
+ }
581
+
582
+ /**
583
+ * @param string $path
584
+ * @return array|mixed|string
585
+ */
586
+ public function media( $path = '' ) {
587
+
588
+ $url = self::API_URL . self::API_VERSION_URL . 'media/' . $this->root . '/' . $this->encode_path( $path );
589
+
590
+ return $this->request( $url );
591
+ }
592
+
593
+ /**
594
+ * @param $path
595
+ * @return array|mixed|string
596
+ */
597
+ public function fileopsDelete( $path ) {
598
+
599
+ $url = self::API_URL . self::API_VERSION_URL . 'fileops/delete';
600
+
601
+ return $this->request( $url, array(
602
+ 'path' => '/' . $this->encode_path( $path ),
603
+ 'root' => $this->root
604
+ ) );
605
+ }
606
+
607
+ /**
608
+ * @param $path
609
+ * @return array|mixed|string
610
+ */
611
+ public function fileopsCreate_folder( $path ) {
612
+
613
+ $url = self::API_URL . self::API_VERSION_URL . 'fileops/create_folder';
614
+
615
+ return $this->request( $url, array(
616
+ 'path' => '/' . $this->encode_path( $path ),
617
+ 'root' => $this->root
618
+ ) );
619
+ }
620
+
621
+ /**
622
+ * @param $callback_url
623
+ * @return array
624
+ * @throws BackWPup_Destination_Dropbox_API_Exception
625
+ */
626
+ public function oAuthAuthorize( $callback_url ) {
627
+
628
+ $headers[ ] = 'Authorization: OAuth oauth_version="1.0", oauth_signature_method="PLAINTEXT", oauth_consumer_key="' . $this->oauth_app_key . '", oauth_signature="' . $this->oauth_app_secret . '&"';
629
+ $ch = curl_init();
630
+ curl_setopt( $ch, CURLOPT_URL, self::API_URL . self::API_VERSION_URL . 'oauth/request_token' );
631
+ curl_setopt( $ch, CURLOPT_USERAGENT, BackWPup::get_plugin_data( 'User-Agent' ) );
632
+ curl_setopt( $ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
633
+ curl_setopt( $ch, CURLOPT_SSLVERSION, 3 );
634
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, TRUE );
635
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 2 );
636
+ if ( is_file( BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' ) )
637
+ curl_setopt( $ch, CURLOPT_CAINFO, BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' );
638
+ curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
639
+ curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
640
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );
641
+ $content = curl_exec( $ch );
642
+ $status = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
643
+ if ( $status >= 200 && $status < 300 && 0 == curl_errno( $ch ) ) {
644
+ parse_str( $content, $oauth_token );
645
+ }
646
+ else {
647
+ $output = json_decode( $content, TRUE );
648
+ if ( isset( $output[ 'error' ] ) && is_string( $output[ 'error' ] ) ) $message = $output[ 'error' ];
649
+ elseif ( isset( $output[ 'error' ][ 'hash' ] ) && $output[ 'error' ][ 'hash' ] != '' ) $message = (string)$output[ 'error' ][ 'hash' ];
650
+ elseif ( 0 != curl_errno( $ch ) ) $message = '(' . curl_errno( $ch ) . ') ' . curl_error( $ch );
651
+ else $message = '(' . $status . ') Invalid response.';
652
+ throw new BackWPup_Destination_Dropbox_API_Exception( $message );
653
+ }
654
+ curl_close( $ch );
655
+
656
+ return array(
657
+ 'authurl' => self::API_WWW_URL . self::API_VERSION_URL . 'oauth/authorize?oauth_token=' . $oauth_token[ 'oauth_token' ] . '&oauth_callback=' . urlencode( $callback_url ),
658
+ 'oauth_token' => $oauth_token[ 'oauth_token' ],
659
+ 'oauth_token_secret' => $oauth_token[ 'oauth_token_secret' ]
660
+ );
661
+ }
662
+
663
+ /**
664
+ * @param $oauth_token
665
+ * @param $oauth_token_secret
666
+ *
667
+ * @return array|null
668
+ * @throws BackWPup_Destination_Dropbox_API_Exception
669
+ */
670
+ public function oAuthAccessToken( $oauth_token, $oauth_token_secret ) {
671
+
672
+ $headers[ ] = 'Authorization: OAuth oauth_version="1.0", oauth_signature_method="PLAINTEXT", oauth_consumer_key="' . $this->oauth_app_key . '", oauth_token="' . $oauth_token . '", oauth_signature="' . $this->oauth_app_secret . '&' . $oauth_token_secret . '"';
673
+ $ch = curl_init();
674
+ curl_setopt( $ch, CURLOPT_URL, self::API_URL . self::API_VERSION_URL . 'oauth/access_token' );
675
+ curl_setopt( $ch, CURLOPT_USERAGENT, BackWPup::get_plugin_data( 'User-Agent' ) );
676
+ curl_setopt( $ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
677
+ curl_setopt( $ch, CURLOPT_SSLVERSION, 3 );
678
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, TRUE );
679
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 2 );
680
+ if ( is_file( BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' ) )
681
+ curl_setopt( $ch, CURLOPT_CAINFO, BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' );
682
+ curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
683
+ curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
684
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );
685
+ $content = curl_exec( $ch );
686
+ $status = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
687
+ if ( $status >= 200 && $status < 300 && 0 == curl_errno( $ch ) ) {
688
+ parse_str( $content, $oauth_token );
689
+ $this->setOAuthTokens( $oauth_token[ 'oauth_token' ], $oauth_token[ 'oauth_token_secret' ] );
690
+
691
+ return $oauth_token;
692
+ }
693
+ else {
694
+ $output = json_decode( $content, TRUE );
695
+ if ( isset( $output[ 'error' ] ) && is_string( $output[ 'error' ] ) ) $message = $output[ 'error' ];
696
+ elseif ( isset( $output[ 'error' ][ 'hash' ] ) && $output[ 'error' ][ 'hash' ] != '' ) $message = (string)$output[ 'error' ][ 'hash' ];
697
+ elseif ( 0 != curl_errno( $ch ) ) $message = '(' . curl_errno( $ch ) . ') ' . curl_error( $ch );
698
+ else $message = '(' . $status . ') Invalid response.';
699
+ throw new BackWPup_Destination_Dropbox_API_Exception( $message );
700
+ }
701
+ }
702
+
703
+ /**
704
+ * @param $url
705
+ * @param array $args
706
+ * @param string $method
707
+ * @param null $filehandel
708
+ * @param int $filesize
709
+ * @param bool $echo
710
+ *
711
+ * @throws BackWPup_Destination_Dropbox_API_Exception
712
+ * @internal param null $file
713
+ * @return array|mixed|string
714
+ */
715
+ private function request( $url, $args = array(), $method = 'GET', $filehandel = NULL, $filesize = 0, $echo = FALSE ) {
716
+
717
+ /* Header*/
718
+ $headers[ ] = 'Authorization: OAuth oauth_version="1.0", oauth_signature_method="PLAINTEXT", oauth_consumer_key="' . $this->oauth_app_key . '", oauth_token="' . $this->oauth_token . '", oauth_signature="' . $this->oauth_app_secret . '&' . $this->oauth_token_secret . '"';
719
+ $headers[ ] = 'Expect:';
720
+
721
+ /* Build cURL Request */
722
+ $ch = curl_init();
723
+ if ( $method == 'POST' ) {
724
+ curl_setopt( $ch, CURLOPT_POST, TRUE );
725
+ curl_setopt( $ch, CURLOPT_POSTFIELDS, $args );
726
+ curl_setopt( $ch, CURLOPT_URL, $url );
727
+ }
728
+ elseif ( $method == 'PUT' ) {
729
+ curl_setopt( $ch, CURLOPT_PUT, TRUE );
730
+ curl_setopt( $ch, CURLOPT_INFILE, $filehandel );
731
+ curl_setopt( $ch, CURLOPT_INFILESIZE, $filesize );
732
+ $args = ( is_array( $args ) ) ? '?' . http_build_query( $args, '', '&' ) : $args;
733
+ curl_setopt( $ch, CURLOPT_URL, $url . $args );
734
+ }
735
+ else {
736
+ $args = ( is_array( $args ) ) ? '?' . http_build_query( $args, '', '&' ) : $args;
737
+ curl_setopt( $ch, CURLOPT_URL, $url . $args );
738
+ }
739
+ curl_setopt( $ch, CURLOPT_USERAGENT, BackWPup::get_plugin_data( 'User-Agent' ) );
740
+ curl_setopt( $ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
741
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );
742
+ curl_setopt( $ch, CURLOPT_SSLVERSION, 3 );
743
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, TRUE );
744
+ curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 2 );
745
+ if ( is_file( BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' ) )
746
+ curl_setopt( $ch, CURLOPT_CAINFO, BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' );
747
+ curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
748
+ $content = '';
749
+ $output = '';
750
+ $header = '';
751
+ if ( $echo ) {
752
+ echo curl_exec( $ch );
753
+ }
754
+ else {
755
+ curl_setopt( $ch, CURLOPT_HEADER, TRUE );
756
+ if ( 0 == curl_errno( $ch ) ) {
757
+ list( $header, $content ) = explode( "\r\n\r\n", curl_exec( $ch ), 2 );
758
+ $output = json_decode( $content, TRUE );
759
+ }
760
+ }
761
+ $status = curl_getinfo( $ch );
762
+ if ( isset( $datafilefd ) && is_resource( $datafilefd ) )
763
+ fclose( $datafilefd );
764
+
765
+ if ( $status[ 'http_code' ] == 503 ) {
766
+ $wait = 1;
767
+ trigger_error($header,E_USER_WARNING);
768
+ if ( preg_match( "/retry-after:(.*?)\r/i", $header, $matches ) )
769
+ $wait = trim( $matches[ 1 ] );
770
+ trigger_error( sprintf( '(503) Your app is making too many requests and is being rate limited. 503s can trigger on a per-app or per-user basis. Wait for %d seconds.', $wait ), E_USER_WARNING );
771
+ sleep( $wait );
772
+
773
+ return $this->request( $url, $args, $method, $filehandel, $filesize, $echo );
774
+ } elseif ( $status[ 'http_code' ] == 404 ) {
775
+ trigger_error( '(' . $status[ 'http_code' ] . ') ' . $output[ 'error' ], E_USER_WARNING );
776
+
777
+ return FALSE;
778
+ }
779
+ elseif ( isset( $output[ 'error' ] ) || $status[ 'http_code' ] >= 300 || $status[ 'http_code' ] < 200 || curl_errno( $ch ) > 0 ) {
780
+ if ( isset( $output[ 'error' ] ) && is_string( $output[ 'error' ] ) ) $message = '(' . $status[ 'http_code' ] . ') ' . $output[ 'error' ];
781
+ elseif ( isset( $output[ 'error' ][ 'hash' ] ) && $output[ 'error' ][ 'hash' ] != '' ) $message = (string)'(' . $status[ 'http_code' ] . ') ' . $output[ 'error' ][ 'hash' ];
782
+ elseif ( 0 != curl_errno( $ch ) ) $message = '(' . curl_errno( $ch ) . ') ' . curl_error( $ch );
783
+ elseif ( $status[ 'http_code' ] == 304 ) $message = '(304) The folder contents have not changed (relies on hash parameter).';
784
+ elseif ( $status[ 'http_code' ] == 400 ) $message = '(400) Bad input parameter: ' . strip_tags( $content );
785
+ elseif ( $status[ 'http_code' ] == 401 ) $message = '(401) Bad or expired token. This can happen if the user or Dropbox revoked or expired an access token. To fix that you should re-authenticate the user.';
786
+ elseif ( $status[ 'http_code' ] == 403 ) $message = '(403) Bad OAuth request (wrong consumer key, bad nonce, expired timestamp, ...). Unfortunately, reauthenticating the user won\'t help here.';
787
+ elseif ( $status[ 'http_code' ] == 404 ) $message = '(404) The file was not found at the specified path, or was not found at the specified rev.';
788
+ elseif ( $status[ 'http_code' ] == 405 ) $message = '(405) Request method not expected (generally should be GET,PUT or POST).';
789
+ elseif ( $status[ 'http_code' ] == 406 ) $message = '(406) There are too many file entries to return.';
790
+ elseif ( $status[ 'http_code' ] == 411 ) $message = '(411) Chunked encoding was attempted for this upload, but is not supported by Dropbox.';
791
+ elseif ( $status[ 'http_code' ] == 415 ) $message = '(415) The image is invalid and cannot be thumbnailed.';
792
+ elseif ( $status[ 'http_code' ] == 503 ) $message = '(503) Your app is making too many requests and is being rate limited. 503s can trigger on a per-app or per-user basis.';
793
+ elseif ( $status[ 'http_code' ] == 507 ) $message = '(507) User is over Dropbox storage quota.';
794
+ else $message = '(' . $status[ 'http_code' ] . ') Invalid response.';
795
+ throw new BackWPup_Destination_Dropbox_API_Exception( $message );
796
+ }
797
+ else {
798
+ curl_close( $ch );
799
+ if ( ! is_array( $output ) )
800
+ return $content;
801
+ else
802
+ return $output;
803
+ }
804
+ }
805
+
806
+ /**
807
+ * @param $path
808
+ *
809
+ * @return mixed
810
+ */
811
+ private function encode_path( $path ) {
812
+
813
+ $path = preg_replace( '#/+#', '/', trim( $path, '/' ) );
814
+ $path = str_replace( '%2F', '/', rawurlencode( $path ) );
815
+
816
+ return $path;
817
+ }
818
+ }
819
+
820
+ /**
821
+ *
822
+ */
823
+ class BackWPup_Destination_Dropbox_API_Exception extends Exception {
824
+
825
+ }
inc/class-destination-email.php ADDED
@@ -0,0 +1,448 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Swift Mailer v4.3.0
3
+ // http://swiftmailer.org/
4
+ // https://github.com/swiftmailer/swiftmailer
5
+ if ( ! class_exists( 'Swift' ) )
6
+ require BackWPup::get_plugin_data( 'PluginDir' ) . '/sdk/SwiftMailer/swift_required.php';
7
+
8
+ /**
9
+ *
10
+ */
11
+ class BackWPup_Destination_Email extends BackWPup_Destinations {
12
+
13
+ /**
14
+ * @return mixed
15
+ */
16
+ public function __construct() {
17
+
18
+ $this->info[ 'ID' ] = 'EMAIL';
19
+ $this->info[ 'name' ] = __( 'Email', 'backwpup' );
20
+ $this->info[ 'description' ] = __( 'Backup to email', 'backwpup' );
21
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
22
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
23
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
24
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
25
+
26
+ }
27
+
28
+ /**
29
+ * @return array
30
+ */
31
+ public function option_defaults() {
32
+
33
+ $default=array();
34
+ $default[ 'emailaddress' ] = sanitize_email( get_bloginfo( 'admin_email' ) );
35
+ $default[ 'emailefilesize' ] = 20;
36
+ $default[ 'emailsndemail' ] = sanitize_email( get_bloginfo( 'admin_email' ) );
37
+ $default[ 'emailmethod' ] = '';
38
+ $default[ 'emailsendmail' ] = ini_get( 'sendmail_path' );
39
+ $default[ 'emailhost' ] = isset($_SERVER[ 'SERVER_NAME' ]) ? $_SERVER[ 'SERVER_NAME' ] : '';
40
+ $default[ 'emailhostport' ] = 25;
41
+ $default[ 'emailsecure' ] = '';
42
+ $default[ 'emailuser' ] = '';
43
+ $default[ 'emailpass' ] = '';
44
+
45
+ return $default;
46
+ }
47
+
48
+
49
+ /**
50
+ * @param $jobid
51
+ */
52
+ public function edit_tab( $jobid ) {
53
+ ?>
54
+ <h3 class="title"><?php _e( 'Email address', 'backwpup' ); ?></h3>
55
+ <table class="form-table">
56
+ <tr valign="top">
57
+ <th scope="row"><label for="emailaddress"><?PHP _e( 'Email address', 'backwpup' ); ?></label></th>
58
+ <td>
59
+ <input name="emailaddress" id="emailaddress" type="text"
60
+ value="<?PHP echo esc_attr( BackWPup_Option::get( $jobid, 'emailaddress' ) );?>" class="regular-text" />
61
+ <?php BackWPup_Help::tip( __('Email address to which Backups are sent.','backwpup') ); ?>
62
+ </td>
63
+ </tr>
64
+ <tr valign="top">
65
+ <th scope="row"><label for="sendemailtest"><?PHP _e( 'Send test email', 'backwpup' ); ?></label></th>
66
+ <td>
67
+ <button id="sendemailtest" class="button secondary"><?PHP _e( 'Send test email', 'backwpup' ); ?></button>
68
+ </td>
69
+ </tr>
70
+ </table>
71
+
72
+ <h3 class="title"><?php _e( 'Send email settings', 'backwpup' ); ?></h3>
73
+ <table class="form-table">
74
+ <tr valign="top">
75
+ <th scope="row"><label for="idemailefilesize"><?PHP _e( 'Maximum file size', 'backwpup' ); ?></label></th>
76
+ <td><input id="idemailefilesize" name="emailefilesize" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'emailefilesize' ) ); ?>" class="small-text" /><?php _e('MB','backwpup'); ?>
77
+ <?php BackWPup_Help::tip( __('Max. file size where email send with. 0 = unlimited','backwpup') ); ?>
78
+ </td>
79
+ </tr>
80
+ <tr valign="top">
81
+ <th scope="row"><label for="emailsndemail"><?PHP _e( 'Sender email address', 'backwpup' ); ?></label></th>
82
+ <td><input name="emailsndemail" type="text" id="emailsndemail"
83
+ value="<?PHP echo esc_attr( BackWPup_Option::get( $jobid, 'emailsndemail' ) );?>"
84
+ class="regular-text" />
85
+ <?php BackWPup_Help::tip( __('Sender email address','backwpup') ); ?>
86
+ </td>
87
+ </tr>
88
+ <tr valign="top">
89
+ <th scope="row"><label for="emailmethod"><?PHP _e( 'Send email method', 'backwpup' ); ?></label></th>
90
+ <td>
91
+ <select id="emailmethod" name="emailmethod">
92
+ <?php
93
+ echo '<option value=""' . selected( '', BackWPup_Option::get( $jobid, 'emailmethod' ), FALSE ) . '>' . __( 'Use Blog settings', 'backwpup' ) . '</option>';
94
+ echo '<option value="mail"' . selected( 'mail', BackWPup_Option::get( $jobid, 'emailmethod' ), FALSE ) . '>' . __( 'PHP: mail()', 'backwpup' ) . '</option>';
95
+ echo '<option value="sendmail"' . selected( 'sendmail', BackWPup_Option::get( $jobid, 'emailmethod' ), FALSE ) . '>' . __( 'Sendmail', 'backwpup' ) . '</option>';
96
+ echo '<option value="smtp"' . selected( 'smtp', BackWPup_Option::get( $jobid, 'emailmethod' ), FALSE ) . '>' . __( 'SMTP', 'backwpup' ) . '</option>';
97
+ ?>
98
+ </select>
99
+ <?php BackWPup_Help::tip( __('- Use Blog settings: gets the settings form blog. -PHP mail(): needs more PHP memory','backwpup') ); ?>
100
+ </td>
101
+ </tr>
102
+ <tr valign="top"
103
+ id="emailsendmail" <?PHP if ( BackWPup_Option::get( $jobid, 'emailmethod' ) != 'sendmail' ) echo 'style="display:none;"';?>>
104
+ <th scope="row"><label for="emailsendmail"><?PHP _e( 'Sendmail path', 'backwpup' ); ?></label></th>
105
+ <td>
106
+ <input name="emailsendmail" id="emailsendmail" type="text"
107
+ value="<?PHP echo esc_attr( BackWPup_Option::get( $jobid, 'emailsendmail' ) );?>"
108
+ class="regular-text code" />
109
+ </td>
110
+ </tr>
111
+ <tr valign="top"
112
+ class="emailsmtp" <?PHP if ( BackWPup_Option::get( $jobid, 'emailmethod' ) != 'smtp' ) echo 'style="display:none;"';?>>
113
+ <th scope="row"><label for="emailhost"><?PHP _e( 'SMTP host name', 'backwpup' ); ?></label></th>
114
+ <td>
115
+ <input name="emailhost" id="emailhost" type="text"
116
+ value="<?PHP echo esc_attr( BackWPup_Option::get( $jobid, 'emailhost' ) );?>"
117
+ class="regular-text code"/>&nbsp;
118
+ <label for="emailhostport"><?PHP _e( 'Port:', 'backwpup' ); ?><input name="emailhostport" id="emailhostport" type="text"
119
+ value="<?PHP echo esc_attr( BackWPup_Option::get( $jobid, 'emailhostport' ) );?>"
120
+ class="small-text code" /></label>
121
+ </td>
122
+ </tr>
123
+ <tr valign="top"
124
+ class="emailsmtp" <?PHP if ( BackWPup_Option::get( $jobid, 'emailmethod' ) != 'smtp' ) echo 'style="display:none;"';?>>
125
+ <th scope="row"><label for="emailsecure"><?PHP _e( 'SMTP secure connection', 'backwpup' ); ?></label>
126
+ </th>
127
+ <td>
128
+ <select id="emailsecure" name="emailsecure">
129
+ <option value=""<?PHP selected( '', BackWPup_Option::get( $jobid, 'emailsecure' ), TRUE ); ?>><?PHP _e( 'none', 'backwpup' ); ?></option>
130
+ <option value="ssl"<?PHP selected( 'ssl', BackWPup_Option::get( $jobid, 'emailsecure' ), TRUE ); ?>><?PHP _e( 'SSL', 'backwpup' ); ?></option>
131
+ <option value="tls"<?PHP selected( 'tls', BackWPup_Option::get( $jobid, 'emailsecure' ), TRUE ); ?>><?PHP _e( 'TLS', 'backwpup' ); ?></option>
132
+ </select>
133
+ </td>
134
+ </tr>
135
+ <tr valign="top"
136
+ class="emailsmtp" <?PHP if ( BackWPup_Option::get( $jobid, 'emailmethod' ) != 'smtp' ) echo 'style="display:none;"';?>>
137
+ <th scope="row"><label for="emailuser"><?PHP _e( 'SMTP username', 'backwpup' ); ?></label></th>
138
+ <td>
139
+ <input name="emailuser" id="emailuser" type="text"
140
+ value="<?PHP echo esc_attr( BackWPup_Option::get( $jobid, 'emailuser' ) );?>" class="regular-text" autocomplete="off" />
141
+ </td>
142
+ </tr>
143
+ <tr valign="top"
144
+ class="emailsmtp" <?PHP if ( BackWPup_Option::get( $jobid, 'emailmethod' ) != 'smtp' ) echo 'style="display:none;"';?>>
145
+ <th scope="row"><label for="emailpass"><?PHP _e( 'SMTP password', 'backwpup' ); ?></label></th>
146
+ <td>
147
+ <input name="emailpass" id="emailpass" type="password"
148
+ value="<?PHP echo esc_attr( BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'emailpass' ) ) );?>"
149
+ class="regular-text" autocomplete="off" />
150
+ </td>
151
+ </tr>
152
+ </table>
153
+ <?php
154
+ }
155
+
156
+
157
+ public function edit_inline_js() {
158
+ //<script type="text/javascript">
159
+ ?>
160
+ $('#emailmethod').change(function () {
161
+ if ('smtp' == $('#emailmethod').val()) {
162
+ $('.emailsmtp').show();
163
+ $('#emailsendmail').hide();
164
+ } else if ('sendmail' == $('#emailmethod').val()) {
165
+ $('.emailsmtp').hide();
166
+ $('#emailsendmail').show();
167
+ } else {
168
+ $('.emailsmtp').hide();
169
+ $('#emailsendmail').hide();
170
+ }
171
+ });
172
+ $('#sendemailtest').live('click', function() {
173
+ $('#sendemailtest').after('&nbsp;<img id="emailsendtext" src="<?php echo get_admin_url().'images/loading.gif'; ?>" width="16" height="16" />');
174
+ var data = {
175
+ action: 'backwpup_dest_email',
176
+ emailaddress: $('input[name="emailaddress"]').val(),
177
+ emailsndemail: $('input[name="emailsndemail"]').val(),
178
+ emailmethod: $('#emailmethod').val(),
179
+ emailsendmail: $('input[name="emailsendmail"]').val(),
180
+ emailhost: $('input[name="emailhost"]').val(),
181
+ emailhostport: $('input[name="emailhostport"]').val(),
182
+ emailsecure: $('#emailsecure').val(),
183
+ emailuser: $('input[name="emailuser"]').val(),
184
+ emailpass: $('input[name="emailpass"]').val(),
185
+ _ajax_nonce: $('#backwpupajaxnonce').val()
186
+ };
187
+ $.post(ajaxurl, data, function(response) {
188
+ $('#emailsendtext').replaceWith( response );
189
+ });
190
+ return false;
191
+ });
192
+ <?php
193
+ }
194
+
195
+ /**
196
+ * @param $jobid
197
+ */
198
+ public function edit_form_post_save( $jobid ) {
199
+
200
+ BackWPup_Option::update( $jobid, 'emailaddress', isset( $_POST[ 'emailaddress' ] ) ? sanitize_email( $_POST[ 'emailaddress' ] ) : '' );
201
+ BackWPup_Option::update( $jobid, 'emailefilesize', isset( $_POST[ 'emailefilesize' ] ) ? (int)$_POST[ 'emailefilesize' ] : 0 );
202
+ BackWPup_Option::update( $jobid, 'emailsndemail', sanitize_email( $_POST[ 'emailsndemail' ] ) );
203
+ BackWPup_Option::update( $jobid, 'emailmethod', ( $_POST[ 'emailmethod' ] == '' || $_POST[ 'emailmethod' ] == 'mail' || $_POST[ 'emailmethod' ] == 'sendmail' || $_POST[ 'emailmethod' ] == 'smtp' ) ? $_POST[ 'emailmethod' ] : '' );
204
+ BackWPup_Option::update( $jobid, 'emailsendmail', $_POST[ 'emailsendmail' ] );
205
+ BackWPup_Option::update( $jobid, 'emailhost', $_POST[ 'emailhost' ] );
206
+ BackWPup_Option::update( $jobid, 'emailhostport', (int)$_POST[ 'emailhostport' ] );
207
+ BackWPup_Option::update( $jobid, 'emailsecure', ( $_POST[ 'emailsecure' ] == 'ssl' || $_POST[ 'emailsecure' ] == 'tls' ) ? $_POST[ 'emailsecure' ] : '' );
208
+ BackWPup_Option::update( $jobid, 'emailuser', $_POST[ 'emailuser' ] );
209
+ BackWPup_Option::update( $jobid, 'emailpass', BackWPup_Encryption::encrypt( $_POST[ 'emailpass' ] ) );
210
+ }
211
+
212
+ /**
213
+ * @param $job_object
214
+ * @return bool
215
+ */
216
+ public function job_run_archive( $job_object ) {
217
+
218
+ $job_object->substeps_todo = 1;
219
+ $job_object->log( sprintf( __( '%d. Try to send backup with email &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
220
+
221
+ //check file Size
222
+ if ( !empty( $job_object->job[ 'emailefilesize' ] ) ) {
223
+ if ( $job_object->backup_filesize > $job_object->job[ 'emailefilesize' ] * 1024 * 1024 ) {
224
+ $job_object->log( __( 'Backup archive too big to be sent by email!', 'backwpup' ), E_USER_ERROR );
225
+ $job_object->substeps_done = 1;
226
+
227
+ return TRUE;
228
+ }
229
+ }
230
+
231
+ $job_object->log( sprintf( __( 'Sending email to %s &hellip;', 'backwpup' ), $job_object->job[ 'emailaddress' ] ), E_USER_NOTICE );
232
+
233
+ //get mail settings
234
+ $emailmethod='mail';
235
+ $emailsendmail='';
236
+ $emailhost='';
237
+ $emailhostport='';
238
+ $emailsecure='';
239
+ $emailuser='';
240
+ $emailpass='';
241
+
242
+ if ( empty( $job_object->job[ 'emailmethod' ] ) ) {
243
+ //do so if i'm the wp_mail to get the settings
244
+ global $phpmailer;
245
+ // (Re)create it, if it's gone missing
246
+ if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
247
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
248
+ require_once ABSPATH . WPINC . '/class-smtp.php';
249
+ $phpmailer = new PHPMailer( true );
250
+ }
251
+ //only if PHPMailer really used
252
+ if ( is_object( $phpmailer ) ) {
253
+ do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
254
+ //get settings from PHPMailer
255
+ $emailmethod=$phpmailer->Mailer;
256
+ $emailsendmail=$phpmailer->Sendmail;
257
+ $emailhost=$phpmailer->Host;
258
+ $emailhostport=$phpmailer->Port;
259
+ $emailsecure=$phpmailer->SMTPSecure;
260
+ $emailuser=$phpmailer->Username;
261
+ $emailpass=$phpmailer->Password;
262
+ }
263
+ } else {
264
+ $emailmethod = $job_object->job[ 'emailmethod' ];
265
+ $emailsendmail = $job_object->job[ 'emailsendmail' ];
266
+ $emailhost = $job_object->job[ 'emailhost' ];
267
+ $emailhostport = $job_object->job[ 'emailhostport' ];
268
+ $emailsecure = $job_object->job[ 'emailsecure' ];
269
+ $emailuser = $job_object->job[ 'emailuser' ];
270
+ $emailpass = BackWPup_Encryption::decrypt( $job_object->job[ 'emailpass' ] );
271
+ }
272
+
273
+ //Generate mail with Swift Mailer
274
+ if ( function_exists( 'mb_internal_encoding' ) && ( (int)ini_get( 'mbstring.func_overload' ) ) & 2 ) {
275
+ $mbEncoding = mb_internal_encoding();
276
+ mb_internal_encoding( 'ASCII' );
277
+ }
278
+
279
+ try {
280
+ //Set Temp dir for mailing
281
+ Swift_Preferences::getInstance()->setTempDir( untrailingslashit( BackWPup::get_plugin_data( 'TEMP' ) ) )->setCacheType( 'disk' );
282
+ // Create the Transport
283
+ if ( $emailmethod == 'smtp' ) {
284
+ $job_object->need_free_memory( '8M' );
285
+ $transport = Swift_SmtpTransport::newInstance( $emailhost, $emailhostport );
286
+ $transport->setUsername( $emailuser );
287
+ $transport->setPassword( $emailpass );
288
+ if ( $emailsecure == 'ssl' )
289
+ $transport->setEncryption( 'ssl' );
290
+ if ( $emailsecure == 'tls' )
291
+ $transport->setEncryption( 'tls' );
292
+ }
293
+ elseif ( $emailmethod == 'sendmail' ) {
294
+ $job_object->need_free_memory( '8M' );
295
+ $transport = Swift_SendmailTransport::newInstance( $emailsendmail );
296
+ }
297
+ else {
298
+ $job_object->need_free_memory( $job_object->backup_filesize * 8 );
299
+ $transport = Swift_MailTransport::newInstance();
300
+ }
301
+ // Create the Mailer using your created Transport
302
+ $emailer = Swift_Mailer::newInstance( $transport );
303
+
304
+ // Create a message
305
+ $message = Swift_Message::newInstance( sprintf( __( 'BackWPup archive from %1$s: %2$s', 'backwpup' ), date_i18n( 'd-M-Y H:i', $job_object->start_time, TRUE ), esc_attr($job_object->job[ 'name' ] ) ) );
306
+ $message->setFrom( array( $job_object->job[ 'emailsndemail' ] ) );
307
+ $message->setTo( array( $job_object->job[ 'emailaddress' ] ) );
308
+ $message->setBody( sprintf( __( 'Backup archive: %s', 'backwpup' ), $job_object->backup_file ), 'text/plain', strtolower( get_bloginfo( 'charset' ) ) );
309
+ $message->attach( Swift_Attachment::fromPath( $job_object->backup_folder . $job_object->backup_file, $job_object->get_mime_type( $job_object->backup_folder . $job_object->backup_file ) ) );
310
+ // Send the message
311
+ $result = $emailer->send( $message );
312
+ }
313
+ catch ( Exception $e ) {
314
+ $job_object->log( 'Swift Mailer: ' . $e->getMessage(), E_USER_ERROR );
315
+ }
316
+
317
+ if ( isset( $mbEncoding ) ) {
318
+ mb_internal_encoding( $mbEncoding );
319
+ }
320
+
321
+ if ( ! $result ) {
322
+ $job_object->log( __( 'Error while sending email!', 'backwpup' ), E_USER_ERROR );
323
+
324
+ return FALSE;
325
+ }
326
+ else {
327
+ $job_object->substeps_done = 1;
328
+ $job_object->log( __( 'Email sent.', 'backwpup' ), E_USER_NOTICE );
329
+
330
+ return TRUE;
331
+ }
332
+ }
333
+
334
+ /**
335
+ * @param $job_object
336
+ * @return bool
337
+ */
338
+ public function can_run( $job_object ) {
339
+
340
+ if ( empty( $job_object->job[ 'emailaddress' ] ) )
341
+ return FALSE;
342
+
343
+ if ( $job_object->job[ 'backuptype' ] != 'archive' )
344
+ return FALSE;
345
+
346
+ return TRUE;
347
+ }
348
+
349
+
350
+ /**
351
+ * sends test mail
352
+ */
353
+ public function edit_ajax() {
354
+
355
+ check_ajax_referer( 'backwpup_ajax_nonce' );
356
+
357
+ //get mail settings
358
+ $emailmethod='mail';
359
+ $emailsendmail='';
360
+ $emailhost='';
361
+ $emailhostport='';
362
+ $emailsecure='';
363
+ $emailuser='';
364
+ $emailpass='';
365
+
366
+ if ( empty( $_POST[ 'emailmethod' ] ) ) {
367
+ //do so if i'm the wp_mail to get the settings
368
+ global $phpmailer;
369
+ // (Re)create it, if it's gone missing
370
+ if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
371
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
372
+ require_once ABSPATH . WPINC . '/class-smtp.php';
373
+ $phpmailer = new PHPMailer( true );
374
+ }
375
+ //only if PHPMailer really used
376
+ if ( is_object( $phpmailer ) ) {
377
+ do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
378
+ //get settings from PHPMailer
379
+ $emailmethod=$phpmailer->Mailer;
380
+ $emailsendmail=$phpmailer->Sendmail;
381
+ $emailhost=$phpmailer->Host;
382
+ $emailhostport=$phpmailer->Port;
383
+ $emailsecure=$phpmailer->SMTPSecure;
384
+ $emailuser=$phpmailer->Username;
385
+ $emailpass=$phpmailer->Password;
386
+ }
387
+ } else {
388
+ $emailmethod = $_POST[ 'emailmethod' ];
389
+ $emailsendmail = $_POST[ 'emailsendmail' ];
390
+ $emailhost = $_POST[ 'emailhost' ];
391
+ $emailhostport = $_POST[ 'emailhostport' ];
392
+ $emailsecure = $_POST[ 'emailsecure' ];
393
+ $emailuser = $_POST[ 'emailuser' ];
394
+ $emailpass = BackWPup_Encryption::decrypt( $_POST[ 'emailpass' ] );
395
+ }
396
+
397
+ //Generate mail with Swift Mailer
398
+
399
+ if ( function_exists( 'mb_internal_encoding' ) && ( (int)ini_get( 'mbstring.func_overload' ) ) & 2 ) {
400
+ $mbEncoding = mb_internal_encoding();
401
+ mb_internal_encoding( 'ASCII' );
402
+ }
403
+
404
+ try {
405
+ //Set Temp dir for mailing
406
+ Swift_Preferences::getInstance()->setTempDir( untrailingslashit( BackWPup::get_plugin_data( 'TEMP' ) ) )->setCacheType( 'disk' );
407
+ // Create the Transport
408
+ if ( $emailmethod == 'smtp' ) {
409
+ $transport = Swift_SmtpTransport::newInstance( $emailhost, $emailhostport );
410
+ $transport->setUsername( $emailuser );
411
+ $transport->setPassword( $emailpass );
412
+ if ( $emailsecure == 'ssl' )
413
+ $transport->setEncryption( 'ssl' );
414
+ if ( $emailsecure == 'tls' )
415
+ $transport->setEncryption( 'tls' );
416
+ }
417
+ elseif ( $emailmethod == 'sendmail' ) {
418
+ $transport = Swift_SendmailTransport::newInstance( $emailsendmail );
419
+ }
420
+ else {
421
+ $transport = Swift_MailTransport::newInstance();
422
+ }
423
+ // Create the Mailer using your created Transport
424
+ $emailer = Swift_Mailer::newInstance( $transport );
425
+
426
+ // Create a message
427
+ $message = Swift_Message::newInstance( __( 'BackWPup archive sending TEST Message', 'backwpup' ) );
428
+ $message->setFrom( array( $_POST[ 'emailsndemail' ] ) );
429
+ $message->setTo( array( $_POST[ 'emailaddress' ] ) );
430
+ $message->setBody( __( 'If this message reaches you sending of backup archives per email should work.', 'backwpup' ) );
431
+ // Send the message
432
+ $result = $emailer->send( $message );
433
+ }
434
+ catch ( Exception $e ) {
435
+ echo '<span id="emailsendtext" style="color:red;">Swift Mailer: ' . $e->getMessage() . '</span>';
436
+ }
437
+
438
+ if ( isset( $mbEncoding ) ) {
439
+ mb_internal_encoding( $mbEncoding );
440
+ }
441
+
442
+ if ( ! isset( $result ) || ! $result )
443
+ echo '<span id="emailsendtext" style="color:red;">' . __( 'Error while sending email!', 'backwpup' ) . '</span>';
444
+ else
445
+ echo '<span id="emailsendtext" style="color:green;">' . __( 'Email sent.', 'backwpup' ) . '</span>';
446
+ die();
447
+ }
448
+ }
inc/class-destination-folder.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_Destination_Folder extends BackWPup_Destinations {
6
+
7
+ /**
8
+ * @return mixed
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'FOLDER';
13
+ $this->info[ 'name' ] = __( 'Folder', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'Backup to Folder', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+
23
+ /**
24
+ * @return array
25
+ */
26
+ public function option_defaults() {
27
+
28
+ $upload_dir = wp_upload_dir();
29
+
30
+ return array( 'maxbackups' => 0, 'backupdir' => trailingslashit( str_replace( '\\', '/',$upload_dir[ 'basedir' ] ) ) . trailingslashit( sanitize_title_with_dashes( get_bloginfo( 'name' ) ) ), 'backupsyncnodelete' => TRUE );
31
+ }
32
+
33
+
34
+ /**
35
+ * @param $jobid
36
+ * @return void
37
+ * @internal param $main
38
+ */
39
+ public function edit_tab( $jobid ) {
40
+ ?>
41
+ <h3 class="title"><?php _e( 'Backup settings', 'backwpup' ); ?></h3>
42
+ <p></p>
43
+ <table class="form-table">
44
+ <tr valign="top">
45
+ <th scope="row"><label for="idbackupdir"><?php _e( 'Folder to store the backups in', 'backwpup' ); ?></label></th>
46
+ <td>
47
+ <input name="backupdir" id="idbackupdir" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'backupdir' ) ); ?>" class="regular-text" />
48
+ </td>
49
+ </tr>
50
+ <tr valign="top">
51
+ <th scope="row"><?php _e( 'File Deletion', 'backwpup' ); ?></th>
52
+ <td>
53
+ <?php
54
+ if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'archive' ) {
55
+ ?>
56
+ <label for="idmaxbackups"><input name="maxbackups" id="idmaxbackups" type="text" size="3" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'maxbackups' ) ) ;?>" class="small-text" />&nbsp;
57
+ <?php _e( 'Number of files to hold in folder.', 'backwpup' ); BackWPup_Help::tip( __( 'Oldest files will be deleted first. 0 = no deletion', 'backwpup' ) ); ?></label>
58
+ <?php } else { ?>
59
+ <label for="idbackupsyncnodelete"><input class="checkbox" value="1"
60
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'backupsyncnodelete' ), TRUE ); ?>
61
+ name="backupsyncnodelete" id="idbackupsyncnodelete" /> <?php _e( 'Do not delete files on sync to destination!', 'backwpup' ); ?></label>
62
+ <?php } ?>
63
+ </td>
64
+ </tr>
65
+ </table>
66
+ <?php
67
+ }
68
+
69
+
70
+ /**
71
+ * @param $jobid
72
+ */
73
+ public function edit_form_post_save( $jobid ) {
74
+
75
+ $_POST[ 'backupdir' ] = trailingslashit( str_replace( '//', '/', str_replace( '\\', '/', trim( stripslashes( $_POST[ 'backupdir' ] ) ) ) ) );
76
+ if ( $_POST[ 'backupdir' ][ 0 ] == '.' || ( $_POST[ 'backupdir' ][ 0 ] != '/' && ! preg_match( '#^[a-zA-Z]:/#', $_POST[ 'backupdir' ] ) ) )
77
+ $_POST[ 'backupdir' ] = trailingslashit( str_replace( '\\', '/', ABSPATH ) ) . $_POST[ 'backupdir' ];
78
+ if ( $_POST[ 'backupdir' ] == '/' )
79
+ $_POST[ 'backupdir' ] = '';
80
+ BackWPup_Option::update( $jobid, 'backupdir', $_POST[ 'backupdir' ] );
81
+
82
+ BackWPup_Option::update( $jobid, 'maxbackups', isset( $_POST[ 'maxbackups' ] ) ? (int)$_POST[ 'maxbackups' ] : 0 );
83
+ BackWPup_Option::update( $jobid, 'backupsyncnodelete', ( isset( $_POST[ 'backupsyncnodelete' ] ) && $_POST[ 'backupsyncnodelete' ] == 1 ) ? TRUE : FALSE );
84
+ }
85
+
86
+ /**
87
+ * @param $jobdest
88
+ * @param $backupfile
89
+ */
90
+ public function file_delete( $jobdest, $backupfile ) {
91
+
92
+ $files = get_site_transient( 'backwpup_'. strtolower( $jobdest ), FALSE );
93
+ if ( is_file( $backupfile ) ) {
94
+ if ( unlink( $backupfile ) ) {
95
+ //update file list
96
+ foreach ( $files as $key => $file ) {
97
+ if ( is_array( $file ) && $file[ 'file' ] == $backupfile )
98
+ unset( $files[ $key ] );
99
+ }
100
+ }
101
+ }
102
+
103
+ set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
104
+ }
105
+
106
+ /**
107
+ * @param $jobid
108
+ * @param $get_file
109
+ */
110
+ public function file_download( $jobid, $get_file ) {
111
+
112
+ if ( is_file( $get_file ) ) {
113
+ @apache_setenv( 'no-gzip', 1 );
114
+ @ini_set( 'zlib.output_compression', 0 );
115
+ header( "Pragma: public" );
116
+ header( "Expires: 0" );
117
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
118
+ header( "Content-Type: application/octet-stream" );
119
+ header( "Content-Disposition: attachment; filename=" . basename( $get_file ) . ";" );
120
+ header( "Content-Transfer-Encoding: binary" );
121
+ header( "Content-Length: " . filesize( $get_file ) );
122
+ @set_time_limit( 0 );
123
+ //chunked readfile
124
+ ob_end_clean();
125
+ $handle = fopen( $get_file, 'r' );
126
+ if ( $handle ) {
127
+ while ( ! feof( $handle ) ) {
128
+ $buffer = fread( $handle, 20482048 ); //2MB chunkes
129
+ echo $buffer;
130
+ ob_flush();
131
+ flush();
132
+ }
133
+ fclose( $handle );
134
+ }
135
+ die();
136
+ }
137
+ else {
138
+ header( $_SERVER[ "SERVER_PROTOCOL" ] . " 404 Not Found" );
139
+ header( "Status: 404 Not Found" );
140
+ die();
141
+ }
142
+ }
143
+
144
+ /**
145
+ * @param $jobdest
146
+ * @return mixed
147
+ */
148
+ public function file_get_list( $jobdest ) {
149
+
150
+ return get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
151
+ }
152
+
153
+ /**
154
+ * @param $job_object
155
+ * @return bool
156
+ */
157
+ public function job_run_archive( $job_object ) {
158
+
159
+ $job_object->substeps_todo = 1;
160
+ if ( ! empty( $job_object->job[ 'jobid' ] ) )
161
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastbackupdownloadurl', add_query_arg( array(
162
+ 'page' => 'backwpupbackups',
163
+ 'action' => 'downloadfolder',
164
+ 'file' => $job_object->backup_folder . $job_object->backup_file
165
+ ), network_admin_url( 'admin.php' ) ) );
166
+ //Delete old Backupfiles
167
+ $backupfilelist = array();
168
+ $filecounter = 0;
169
+ $files = array();
170
+ if ( $dir = @opendir( $job_object->backup_folder ) ) { //make file list
171
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
172
+ if ( is_file( $job_object->backup_folder . $file ) ) {
173
+ //list for deletion
174
+ if ( $job_object->is_backup_archive( $file ) )
175
+ $backupfilelist[ filemtime( $job_object->backup_folder . $file ) ] = $file;
176
+ //file list for backups
177
+ $files[ $filecounter ][ 'folder' ] = $job_object->backup_folder;
178
+ $files[ $filecounter ][ 'file' ] = $job_object->backup_folder . $file;
179
+ $files[ $filecounter ][ 'filename' ] = $file;
180
+ $files[ $filecounter ][ 'downloadurl' ] = add_query_arg( array(
181
+ 'page' => 'backwpupbackups',
182
+ 'action' => 'downloadfolder',
183
+ 'file' => $job_object->backup_folder . $file
184
+ ), network_admin_url( 'admin.php' ) );
185
+ $files[ $filecounter ][ 'filesize' ] = filesize( $job_object->backup_folder . $file );
186
+ $files[ $filecounter ][ 'time' ] = filemtime( $job_object->backup_folder . $file );
187
+ $filecounter ++;
188
+ }
189
+ }
190
+ @closedir( $dir );
191
+ }
192
+ if ( $job_object->job[ 'maxbackups' ] > 0 ) {
193
+ if ( count( $backupfilelist ) > $job_object->job[ 'maxbackups' ] ) {
194
+ ksort( $backupfilelist );
195
+ $numdeltefiles = 0;
196
+ while ( $file = array_shift( $backupfilelist ) ) {
197
+ if ( count( $backupfilelist ) < $job_object->job[ 'maxbackups' ] )
198
+ break;
199
+ unlink( $job_object->backup_folder . $file );
200
+ foreach ( $files as $key => $filedata ) {
201
+ if ( $filedata[ 'file' ] == $job_object->backup_folder . $file )
202
+ unset( $files[ $key ] );
203
+ }
204
+ $numdeltefiles ++;
205
+ }
206
+ if ( $numdeltefiles > 0 )
207
+ $job_object->log( sprintf( _n( 'One backup file deleted', '%d backup files deleted', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
208
+ }
209
+ }
210
+ set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_folder', $files, 60 * 60 * 24 * 7 );
211
+
212
+ $job_object->substeps_done ++;
213
+
214
+ return TRUE;
215
+ }
216
+
217
+ /**
218
+ * @param $job_object
219
+ * @return bool
220
+ */
221
+ public function can_run( $job_object ) {
222
+
223
+ if ( empty( $job_object->job[ 'backupdir' ] ) || $job_object->job[ 'backupdir' ] == '/' )
224
+ return FALSE;
225
+
226
+ return TRUE;
227
+ }
228
+
229
+ }
inc/class-destination-ftp.php ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_Destination_Ftp extends BackWPup_Destinations {
6
+
7
+ /**
8
+ * @return mixed
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'FTP';
13
+ $this->info[ 'name' ] = __( 'FTP', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'Backup to FTP', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+ /**
23
+ * @return array
24
+ */
25
+ public function option_defaults() {
26
+
27
+ return array( 'ftphost' => '', 'ftphostport' => 21, 'ftptimeout' => 90, 'ftpuser' => '', 'ftppass' => '', 'ftpdir' => trailingslashit( sanitize_title_with_dashes( get_bloginfo( 'name' ) ) ), 'ftpmaxbackups' => 0, 'ftppasv' => TRUE, 'ftpssl' => FALSE );
28
+ }
29
+
30
+
31
+
32
+ /**
33
+ * @param $jobid
34
+ */
35
+ public function edit_tab( $jobid ) {
36
+ ?>
37
+
38
+ <h3 class="title"><?php _e( 'FTP Server and login', 'backwpup' ); ?></h3>
39
+ <p></p>
40
+ <table class="form-table">
41
+ <tr valign="top">
42
+ <th scope="row"><label for="idftphost"><?php _e( 'FTP Server', 'backwpup' ); ?></label></th>
43
+ <td>
44
+ <input id="idftphost" name="ftphost" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'ftphost' ) );?>"
45
+ class="regular-text" autocomplete="off" />&nbsp;&nbsp;
46
+ <label for="idftphostport"><?php _e( 'Port:', 'backwpup' ); ?>
47
+ <input name="ftphostport" id="idftphostport" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'ftphostport' ) ); ?>"
48
+ class="small-text" /></label>
49
+ </td>
50
+ </tr>
51
+ <tr valign="top">
52
+ <th scope="row"><label for="idftpuser"><?php _e( 'Username', 'backwpup' ); ?></label></th>
53
+ <td>
54
+ <input id="idftpuser" name="ftpuser" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'ftpuser' ) ); ?>"
55
+ class="user regular-text" autocomplete="off" />
56
+ </td>
57
+ </tr>
58
+ <tr valign="top">
59
+ <th scope="row"><label for="idftppass"><?php _e( 'Password', 'backwpup' ); ?></label></th>
60
+ <td>
61
+ <input id="idftppass" name="ftppass" type="password" value="<?php echo esc_attr( BackWPup_Encryption::decrypt(BackWPup_Option::get( $jobid, 'ftppass' ) ) ); ?>"
62
+ class="password regular-text" autocomplete="off" />
63
+ </td>
64
+ </tr>
65
+ </table>
66
+
67
+ <h3 class="title"><?php _e( 'Backup settings', 'backwpup' ); ?></h3>
68
+ <p></p>
69
+ <table class="form-table">
70
+ <tr valign="top">
71
+ <th scope="row"><label for="idftpdir"><?php _e( 'Folder to store files', 'backwpup' ); ?></label></th>
72
+ <td>
73
+ <input id="idftpdir" name="ftpdir" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'ftpdir' ) ); ?>" class="regular-text" />
74
+ </td>
75
+ </tr>
76
+ <tr valign="top">
77
+ <th scope="row"><?php _e( 'File Deletion', 'backwpup' ); ?></th>
78
+ <td>
79
+ <?php
80
+ if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'archive' ) {
81
+ ?>
82
+ <label for="idftpmaxbackups"><input id="idftpmaxbackups" name="ftpmaxbackups" type="text" size="3" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'ftpmaxbackups' ) ); ?>" class="small-text" />&nbsp;
83
+ <?php _e( 'Number of files to hold in folder.', 'backwpup' ); BackWPup_Help::tip( __( 'Oldest files will be deleted first. 0 = no deletion', 'backwpup' ) ); ?></label>
84
+ <?php } else { ?>
85
+ <label for="idftpsyncnodelete"><input class="checkbox" value="1"
86
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'ftpsyncnodelete' ), TRUE ); ?>
87
+ name="ftpsyncnodelete" id="idftpsyncnodelete" /> <?php _e( 'Do not delete files on sync to destination!', 'backwpup' ); ?></label>
88
+ <?php } ?>
89
+ </td>
90
+ </tr>
91
+ </table>
92
+
93
+ <h3 class="title"><?php _e( 'FTP specific settings', 'backwpup' ); ?></h3>
94
+ <p></p>
95
+ <table class="form-table">
96
+ <tr valign="top">
97
+ <th scope="row"><label for="idftptimeout"><?php _e( 'Timeout for FTP connection', 'backwpup' ); ?></label></th>
98
+ <td>
99
+ <input id="idftptimeout" name="ftptimeout" type="text" size="3"
100
+ value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'ftptimeout' ) ); ?>"
101
+ class="small-text" /> <?php _e( 'seconds', 'backwpup' ); ?>
102
+ </td>
103
+ </tr>
104
+ <tr valign="top">
105
+ <th scope="row"><?php _e( 'SSL-FTP Connection', 'backwpup' ); ?></th>
106
+ <td>
107
+ <label for="idftpssl"><input class="checkbox" value="1"
108
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'ftpssl' ), TRUE ); ?>
109
+ id="idftpssl" name="ftpssl"<?php if ( ! function_exists( 'ftp_ssl_connect' ) ) echo " disabled=\"disabled\""; ?> /> <?php _e( 'Use explicit SSL-FTP Connection.', 'backwpup' ); ?></label>
110
+
111
+ </td>
112
+ </tr>
113
+ <tr valign="top">
114
+ <th scope="row"><?php _e( 'FTP Passive mode', 'backwpup' ); ?></th>
115
+ <td>
116
+ <label for="idftppasv"><input class="checkbox" value="1"
117
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'ftppasv' ), TRUE ); ?>
118
+ name="ftppasv" id="idftppasv" /> <?php _e( 'Use FTP Passive mode.', 'backwpup' ); ?></label>
119
+ </td>
120
+ </tr>
121
+ </table>
122
+
123
+ <?php
124
+ }
125
+
126
+
127
+ /**
128
+ * @param $id
129
+ */
130
+ public function edit_form_post_save( $id ) {
131
+
132
+ $_POST[ 'ftphost' ] = str_replace( array( 'http://', 'ftp://' ), '', $_POST[ 'ftphost' ] );
133
+ BackWPup_Option::update( $id, 'ftphost', isset( $_POST[ 'ftphost' ] ) ? $_POST[ 'ftphost' ] : '' );
134
+
135
+ BackWPup_Option::update( $id, 'ftphostport', ! empty( $_POST[ 'ftphostport' ] ) ? (int)$_POST[ 'ftphostport' ] : 21 );
136
+ BackWPup_Option::update( $id, 'ftptimeout', ! empty( $_POST[ 'ftptimeout' ] ) ? (int)$_POST[ 'ftptimeout' ] : 90 );
137
+ BackWPup_Option::update( $id, 'ftpuser', isset( $_POST[ 'ftpuser' ] ) ? $_POST[ 'ftpuser' ] : '' );
138
+ BackWPup_Option::update( $id, 'ftppass', isset( $_POST[ 'ftppass' ] ) ? BackWPup_Encryption::encrypt( $_POST[ 'ftppass' ] ) : '' );
139
+
140
+ if ( ! empty( $_POST[ 'ftpdir' ] ) )
141
+ $_POST[ 'ftpdir' ] = trailingslashit( str_replace( '//', '/', str_replace( '\\', '/', trim( stripslashes( $_POST[ 'ftpdir' ] ) ) ) ) );
142
+ BackWPup_Option::update( $id, 'ftpdir', $_POST[ 'ftpdir' ] );
143
+
144
+ BackWPup_Option::update( $id, 'ftpmaxbackups', isset( $_POST[ 'ftpmaxbackups' ] ) ? (int)$_POST[ 'ftpmaxbackups' ] : 0 );
145
+
146
+ if ( function_exists( 'ftp_ssl_connect' ) )
147
+ BackWPup_Option::update( $id, 'ftpssl', ( isset( $_POST[ 'ftpssl' ] ) && $_POST[ 'ftpssl' ] == 1 ) ? TRUE : FALSE );
148
+ else
149
+ BackWPup_Option::update( $id, 'ftpssl', FALSE );
150
+
151
+ BackWPup_Option::update( $id, 'ftppasv', ( isset( $_POST[ 'ftppasv' ] ) && $_POST[ 'ftppasv' ] == 1 ) ? TRUE : FALSE );
152
+ }
153
+
154
+ /**
155
+ * @param $jobdest
156
+ * @param $backupfile
157
+ */
158
+ public function file_delete( $jobdest, $backupfile ) {
159
+
160
+ $files = get_site_transient( 'backwpup_'. strtolower( $jobdest ), FALSE );
161
+ list( $jobid, $dest ) = explode( '_', $jobdest );
162
+
163
+ if ( BackWPup_Option::get( $jobid, 'ftphost' ) && BackWPup_Option::get( $jobid, 'ftpuser' ) && BackWPup_Option::get( $jobid, 'ftppass' ) && function_exists( 'ftp_connect' ) ) {
164
+ $ftp_conn_id = FALSE;
165
+ if ( function_exists( 'ftp_ssl_connect' ) && BackWPup_Option::get( $jobid, 'ftpssl' ) ) { //make SSL FTP connection
166
+ $ftp_conn_id = ftp_ssl_connect( BackWPup_Option::get( $jobid, 'ftphost' ), BackWPup_Option::get( $jobid, 'ftphostport' ), BackWPup_Option::get( $jobid, 'ftptimeout' ) );
167
+ }
168
+ elseif ( ! BackWPup_Option::get( $jobid, 'ftpssl' ) ) { //make normal FTP conection if SSL not work
169
+ $ftp_conn_id = ftp_connect( BackWPup_Option::get( $jobid, 'ftphost' ), BackWPup_Option::get( $jobid, 'ftphostport' ), BackWPup_Option::get( $jobid, 'ftptimeout' ) );
170
+ }
171
+ $loginok = FALSE;
172
+ if ( $ftp_conn_id ) {
173
+ //FTP Login
174
+ if ( @ftp_login( $ftp_conn_id, BackWPup_Option::get( $jobid, 'ftpuser' ), BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'ftppass' ) ) ) ) {
175
+ $loginok = TRUE;
176
+ }
177
+ else { //if PHP ftp login don't work use raw login
178
+ ftp_raw( $ftp_conn_id, 'USER ' . BackWPup_Option::get( $jobid, 'ftpuser' ) );
179
+ $return = ftp_raw( $ftp_conn_id, 'PASS ' . BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'ftppass' ) ) );
180
+ if ( substr( trim( $return[ 0 ] ), 0, 3 ) <= 400 )
181
+ $loginok = TRUE;
182
+ }
183
+ }
184
+ if ( $loginok ) {
185
+ ftp_pasv( $ftp_conn_id, BackWPup_Option::get( $jobid, 'ftppasv' ) );
186
+ ftp_delete( $ftp_conn_id, $backupfile );
187
+ //update file list
188
+ foreach ( $files as $key => $file ) {
189
+ if ( is_array( $file ) && $file[ 'file' ] == $backupfile )
190
+ unset( $files[ $key ] );
191
+ }
192
+ }
193
+ else {
194
+ BackWPup_Admin::message( __( 'FTP: Login failure!', 'backwpup' ) );
195
+ }
196
+ }
197
+
198
+ set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
199
+ }
200
+
201
+ /**
202
+ * @param $jobdest
203
+ * @return mixed
204
+ */
205
+ public function file_get_list( $jobdest ) {
206
+
207
+ return get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
208
+ }
209
+
210
+ /**
211
+ * @param $job_object
212
+ * @return bool
213
+ */
214
+ public function job_run_archive( $job_object ) {
215
+
216
+ $job_object->substeps_todo = $job_object->backup_filesize;
217
+ $job_object->log( sprintf( __( '%d. Try to send backup file to a FTP Server &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
218
+
219
+ if ( ! empty( $job_object->job[ 'ftpssl' ] ) ) { //make SSL FTP connection
220
+ if ( function_exists( 'ftp_ssl_connect' ) ) {
221
+ $ftp_conn_id = ftp_ssl_connect( $job_object->job[ 'ftphost' ], $job_object->job[ 'ftphostport' ], $job_object->job[ 'ftptimeout' ] );
222
+ if ( $ftp_conn_id )
223
+ $job_object->log( sprintf( __( 'Connected by explicit SSL-FTP to Server: %s', 'backwpup' ), $job_object->job[ 'ftphost' ] . ':' . $job_object->job[ 'ftphostport' ] ), E_USER_NOTICE );
224
+ else {
225
+ $job_object->log( sprintf( __( 'Can not connect by explicit SSL-FTP to Server: %s', 'backwpup' ), $job_object->job[ 'ftphost' ] . ':' . $job_object->job[ 'ftphostport' ] ), E_USER_ERROR );
226
+
227
+ return FALSE;
228
+ }
229
+ }
230
+ else {
231
+ $job_object->log( __( 'PHP function to connect with explicit SSL-FTP to server does not exist!', 'backwpup' ), E_USER_ERROR );
232
+
233
+ return TRUE;
234
+ }
235
+ }
236
+ else { //make normal FTP connection if SSL not work
237
+ $ftp_conn_id = ftp_connect( $job_object->job[ 'ftphost' ], $job_object->job[ 'ftphostport' ], $job_object->job[ 'ftptimeout' ] );
238
+ if ( $ftp_conn_id )
239
+ $job_object->log( sprintf( __( 'Connected to FTP server: %s', 'backwpup' ), $job_object->job[ 'ftphost' ] . ':' . $job_object->job[ 'ftphostport' ] ), E_USER_NOTICE );
240
+ else {
241
+ $job_object->log( sprintf( __( 'Can not connect to FTP server: %s', 'backwpup' ), $job_object->job[ 'ftphost' ] . ':' . $job_object->job[ 'ftphostport' ] ), E_USER_ERROR );
242
+
243
+ return FALSE;
244
+ }
245
+ }
246
+
247
+ //FTP Login
248
+ $job_object->log( sprintf( __( 'FTP Client command: %s', 'backwpup' ), 'USER ' . $job_object->job[ 'ftpuser' ] ), E_USER_NOTICE );
249
+ if ( $loginok = ftp_login( $ftp_conn_id, $job_object->job[ 'ftpuser' ], BackWPup_Encryption::decrypt( $job_object->job[ 'ftppass' ] ) ) ) {
250
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), 'User ' . $job_object->job[ 'ftpuser' ] . ' logged in.' ), E_USER_NOTICE );
251
+ }
252
+ else { //if PHP ftp login don't work use raw login
253
+ $return = ftp_raw( $ftp_conn_id, 'USER ' . $job_object->job[ 'ftpuser' ] );
254
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), $return[ 0 ] ), E_USER_NOTICE );
255
+ if ( substr( trim( $return[ 0 ] ), 0, 3 ) <= 400 ) {
256
+ $job_object->log( sprintf( __( 'FTP Client command: %s', 'backwpup' ), 'PASS *******' ), E_USER_NOTICE );
257
+ $return = ftp_raw( $ftp_conn_id, 'PASS ' . BackWPup_Encryption::decrypt( $job_object->job[ 'ftppass' ] ) );
258
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), $return[ 0 ] ), E_USER_NOTICE );
259
+ if ( substr( trim( $return[ 0 ] ), 0, 3 ) <= 400 )
260
+ $loginok = TRUE;
261
+ }
262
+ }
263
+ if ( ! $loginok )
264
+ return FALSE;
265
+
266
+ //SYSTYPE
267
+ $job_object->log( sprintf( __( 'FTP Client command: %s', 'backwpup' ), 'SYST' ), E_USER_NOTICE );
268
+ $systype = ftp_systype( $ftp_conn_id );
269
+ if ( $systype )
270
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), $systype ), E_USER_NOTICE );
271
+ else
272
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), __( 'Error getting SYSTYPE', 'backwpup' ) ), E_USER_ERROR );
273
+
274
+ //test ftp dir and create it if not exists
275
+ if ( ! empty( $job_object->job[ 'ftpdir' ] ) && $job_object->job[ 'ftpdir' ] != '/' ) {
276
+ $ftpdirs = explode( "/", rtrim( $job_object->job[ 'ftpdir' ], '/' ) );
277
+ foreach ( $ftpdirs as $ftpdir ) {
278
+ if ( empty( $ftpdir ) )
279
+ continue;
280
+ if ( ! @ftp_chdir( $ftp_conn_id, $ftpdir ) ) {
281
+ if ( @ftp_mkdir( $ftp_conn_id, $ftpdir ) ) {
282
+ $job_object->log( sprintf( __( 'FTP Folder "%s" created!', 'backwpup' ), $ftpdir ), E_USER_NOTICE );
283
+ ftp_chdir( $ftp_conn_id, $ftpdir );
284
+ }
285
+ else {
286
+ $job_object->log( sprintf( __( 'FTP Folder "%s" can not be created!', 'backwpup' ), $ftpdir ), E_USER_ERROR );
287
+
288
+ return FALSE;
289
+ }
290
+ }
291
+ }
292
+ }
293
+
294
+ // Get the current working directory
295
+ $current_ftp_dir = trailingslashit( ftp_pwd( $ftp_conn_id ) );
296
+ $job_object->log( sprintf( __( 'FTP current folder is: %s', 'backwpup' ), $current_ftp_dir ), E_USER_NOTICE );
297
+
298
+ //delete file on ftp if new try
299
+ if ( $job_object->substeps_done == 0 )
300
+ @ftp_delete( $ftp_conn_id, $job_object->job[ 'ftpdir' ] . $job_object->backup_file );
301
+
302
+ //PASV
303
+ $job_object->log( sprintf( __( 'FTP Client command: %s', 'backwpup' ), 'PASV' ), E_USER_NOTICE );
304
+ if ( $job_object->job[ 'ftppasv' ] ) {
305
+ if ( ftp_pasv( $ftp_conn_id, TRUE ) )
306
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), __( 'Entering passive mode', 'backwpup' ) ), E_USER_NOTICE );
307
+ else
308
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), __( 'Can not enter passive mode', 'backwpup' ) ), E_USER_WARNING );
309
+ }
310
+ else {
311
+ if ( ftp_pasv( $ftp_conn_id, FALSE ) )
312
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), __( 'Entering normal mode', 'backwpup' ) ), E_USER_NOTICE );
313
+ else
314
+ $job_object->log( sprintf( __( 'FTP Server reply: %s', 'backwpup' ), __( 'Can not enter normal mode', 'backwpup' ) ), E_USER_WARNING );
315
+ }
316
+
317
+ if ( $job_object->substeps_done < $job_object->backup_filesize ) {
318
+ $job_object->log( __( 'Upload to FTP now started &hellip;', 'backwpup' ), E_USER_NOTICE );
319
+ $fp = fopen( $job_object->backup_folder . $job_object->backup_file, 'r' );
320
+ $ret = ftp_nb_fput( $ftp_conn_id, $current_ftp_dir . $job_object->backup_file, $fp, FTP_BINARY, $job_object->substeps_done );
321
+ while ( $ret == FTP_MOREDATA ) {
322
+ $job_object->substeps_done = ftell( $fp );
323
+ $job_object->update_working_data();
324
+ $ret = ftp_nb_continue( $ftp_conn_id );
325
+ }
326
+ if ( $ret != FTP_FINISHED ) {
327
+ $job_object->log( __( 'Can not transfer backup to FTP server!', 'backwpup' ), E_USER_ERROR );
328
+
329
+ return FALSE;
330
+ }
331
+ else {
332
+ $job_object->substeps_done = $job_object->backup_filesize;
333
+ $job_object->log( sprintf( __( 'Backup transferred to FTP server: %s', 'backwpup' ), $current_ftp_dir . $job_object->backup_file ), E_USER_NOTICE );
334
+ if ( ! empty( $job_object->job[ 'jobid' ] ) )
335
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastbackupdownloadurl', "ftp://" . $job_object->job[ 'ftpuser' ] . ":" . BackWPup_Encryption::decrypt( $job_object->job[ 'ftppass' ] ) . "@" . $job_object->job[ 'ftphost' ] . ':' . $job_object->job[ 'ftphostport' ] . $current_ftp_dir . $job_object->backup_file );
336
+ }
337
+ fclose( $fp );
338
+ }
339
+
340
+ $backupfilelist = array();
341
+ $filecounter = 0;
342
+ $files = array();
343
+ if ( $filelist = ftp_nlist( $ftp_conn_id, $current_ftp_dir ) ) {
344
+ foreach ( $filelist as $file ) {
345
+ if ( $job_object->is_backup_archive( $file ) ) {
346
+ $time = ftp_mdtm( $ftp_conn_id, '"' . $file . '"' );
347
+ if ( $time != - 1 )
348
+ $backupfilelist[ $time ] = basename( $file );
349
+ else
350
+ $backupfilelist[ ] = basename( $file );
351
+ }
352
+ if ( basename( $file ) != '.' && basename( $file ) != '..' ) {
353
+ $files[ $filecounter ][ 'folder' ] = "ftp://" . $job_object->job[ 'ftphost' ] . ':' . $job_object->job[ 'ftphostport' ] . dirname( $file ) . "/";
354
+ $files[ $filecounter ][ 'file' ] = $file;
355
+ $files[ $filecounter ][ 'filename' ] = basename( $file );
356
+ $files[ $filecounter ][ 'downloadurl' ] = "ftp://" . rawurlencode( $job_object->job[ 'ftpuser' ] ) . ":" . rawurlencode( BackWPup_Encryption::decrypt( $job_object->job[ 'ftppass' ] ) ) . "@" . $job_object->job[ 'ftphost' ] . ':' . $job_object->job[ 'ftphostport' ] . $file;
357
+ $files[ $filecounter ][ 'filesize' ] = ftp_size( $ftp_conn_id, '"' . $file . '"' );
358
+ $files[ $filecounter ][ 'time' ] = ftp_mdtm( $ftp_conn_id, '"' . $file . '"' );
359
+ $filecounter ++;
360
+ }
361
+ }
362
+ }
363
+
364
+ if ( ! empty( $job_object->job[ 'ftpmaxbackups' ] ) && $job_object->job[ 'ftpmaxbackups' ] > 0 ) { //Delete old backups
365
+ if ( count( $backupfilelist ) > $job_object->job[ 'ftpmaxbackups' ] ) {
366
+ ksort( $backupfilelist );
367
+ $numdeltefiles = 0;
368
+ while ( $file = array_shift( $backupfilelist ) ) {
369
+ if ( count( $backupfilelist ) < $job_object->job[ 'ftpmaxbackups' ] )
370
+ break;
371
+ if ( ftp_delete( $ftp_conn_id, $job_object->job[ 'ftpdir' ] . $file ) ) { //delete files on ftp
372
+ foreach ( $files as $key => $filedata ) {
373
+ if ( $filedata[ 'file' ] == $job_object->job[ 'ftpdir' ] . $file )
374
+ unset( $files[ $key ] );
375
+ }
376
+ $numdeltefiles ++;
377
+ }
378
+ else
379
+ $job_object->log( sprintf( __( 'Can not delete "%s" on FTP server!', 'backwpup' ), $job_object->job[ 'ftpdir' ] . $file ), E_USER_ERROR );
380
+
381
+ }
382
+ if ( $numdeltefiles > 0 )
383
+ $job_object->log( sprintf( _n( 'One file deleted on FTP Server', '%d files deleted on FTP Server', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
384
+ }
385
+ }
386
+ set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_ftp', $files, 60 * 60 * 24 * 7 );
387
+
388
+ ftp_close( $ftp_conn_id );
389
+
390
+ return TRUE;
391
+ }
392
+
393
+ /**
394
+ * @param $job_object
395
+ * @return bool
396
+ */
397
+ public function can_run( $job_object ) {
398
+
399
+ if ( empty( $job_object->job[ 'ftphost' ] ) )
400
+ return FALSE;
401
+
402
+ if ( empty( $job_object->job[ 'ftpuser' ] ) )
403
+ return FALSE;
404
+
405
+ if ( empty( $job_object->job[ 'ftppass' ] ) )
406
+ return FALSE;
407
+
408
+ return TRUE;
409
+ }
410
+
411
+ }
inc/class-destination-msazure.php ADDED
@@ -0,0 +1,402 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Windows Azure SDK v0.3.1_2011-08
3
+ // http://www.windowsazure.com/en-us/develop/php/
4
+ // https://github.com/WindowsAzure/azure-sdk-for-php
5
+ include BackWPup::get_plugin_data( 'PluginDir' ) . '/sdk/WindowsAzure/WindowsAzure.php';
6
+ // Pear libs include
7
+ // http://www.pear.com/
8
+ set_include_path( get_include_path() . PATH_SEPARATOR . __DIR__ . '/sdk/PEAR/');
9
+
10
+ /**
11
+ * Documentation: http://www.windowsazure.com/en-us/develop/php/how-to-guides/blob-service/
12
+ */
13
+ class BackWPup_Destination_MSAzure extends BackWPup_Destinations {
14
+
15
+ /**
16
+ * @return mixed
17
+ */
18
+ public function __construct() {
19
+
20
+ $this->info[ 'ID' ] = 'MSAZURE';
21
+ $this->info[ 'name' ] = __( 'MS Azure', 'backwpup' );
22
+ $this->info[ 'description' ] = __( 'Backup to Microsoft Azure (Blob)', 'backwpup' );
23
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
24
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
25
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
26
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
27
+
28
+ }
29
+
30
+ /**
31
+ * @return array
32
+ */
33
+ public function option_defaults() {
34
+
35
+ return array( 'msazureaccname' => '', 'msazurekey' => '', 'msazurecontainer' => '', 'msazuredir' => trailingslashit( sanitize_title_with_dashes( get_bloginfo( 'name' ) ) ), 'msazuremaxbackups' => 0, 'msazuresyncnodelete' => TRUE );
36
+ }
37
+
38
+
39
+ /**
40
+ * @param $jobid
41
+ */
42
+ public function edit_tab( $jobid ) {
43
+ ?>
44
+ <h3 class="title"><?php _e( 'MS Azure access keys', 'backwpup' ); ?></h3>
45
+ <p></p>
46
+ <table class="form-table">
47
+ <tr valign="top">
48
+ <th scope="row"><label for="msazureaccname"><?php _e( 'Account name', 'backwpup' ); ?></label></th>
49
+ <td>
50
+ <input id="msazureaccname" name="msazureaccname" type="text"
51
+ value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'msazureaccname' ) );?>" class="regular-text" autocomplete="off" />
52
+ </td>
53
+ </tr>
54
+ <tr valign="top">
55
+ <th scope="row"><label for="msazurekey"><?php _e( 'Access key', 'backwpup' ); ?></label></th>
56
+ <td>
57
+ <input id="msazurekey" name="msazurekey" type="password"
58
+ value="<?php echo esc_attr( BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'msazurekey' ) ) );?>" class="regular-text" autocomplete="off" />
59
+ </td>
60
+ </tr>
61
+ </table>
62
+
63
+ <h3 class="title"><?php _e( 'Blob container', 'backwpup' ); ?></h3>
64
+ <p></p>
65
+ <table class="form-table">
66
+ <tr valign="top">
67
+ <th scope="row"><label for="msazurecontainerselected"><?php _e( 'Container selection', 'backwpup' ); ?></label></th>
68
+ <td>
69
+ <input id="msazurecontainerselected" name="msazurecontainerselected" type="hidden" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'msazurecontainer' ) );?>" />
70
+ <?php if ( BackWPup_Option::get( $jobid, 'msazureaccname' ) && BackWPup_Option::get( $jobid, 'msazurekey' ) ) $this->edit_ajax( array(
71
+ 'msazurehost' => BackWPup_Option::get( $jobid, 'msazurehost' ),
72
+ 'msazureaccname' => BackWPup_Option::get( $jobid, 'msazureaccname' ),
73
+ 'msazurekey' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'msazurekey' ) ),
74
+ 'msazureselected' => BackWPup_Option::get( $jobid, 'msazurecontainer' )
75
+ ) ); ?>
76
+ </td>
77
+ </tr>
78
+ <tr valign="top">
79
+ <th scope="row"><label for="newmsazurecontainer"><?php _e( 'Create a new container', 'backwpup' ); ?></label></th>
80
+ <td>
81
+ <input id="newmsazurecontainer" name="newmsazurecontainer" type="text" value="" class="small-text" autocomplete="off" />
82
+ </td>
83
+ </tr>
84
+ </table>
85
+
86
+ <h3 class="title"><?php _e( 'Backup settings', 'backwpup' ); ?></h3>
87
+ <p></p>
88
+ <table class="form-table">
89
+ <tr valign="top">
90
+ <th scope="row"><label for="idmsazuredir"><?php _e( 'Folder in container', 'backwpup' ); ?></label></th>
91
+ <td>
92
+ <input id="idmsazuredir" name="msazuredir" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'msazuredir' ) ); ?>" class="regular-text" />
93
+ </td>
94
+ </tr>
95
+ <tr valign="top">
96
+ <th scope="row"><?php _e( 'File deletion', 'backwpup' ); ?></th>
97
+ <td>
98
+ <?php
99
+ if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'archive' ) {
100
+ ?>
101
+ <label for="idmsazuremaxbackups"><input id="idmsazuremaxbackups" name="msazuremaxbackups" type="text" size="3" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'msazuremaxbackups' ) );?>" class="small-text" />&nbsp;
102
+ <?php _e( 'Number of files to hold in folder.', 'backwpup' ); BackWPup_Help::tip( __( 'Oldest files will be deleted first. 0 = no deletion', 'backwpup' ) ); ?></label>
103
+ <?php } else { ?>
104
+ <label for="idmsazuresyncnodelete"><input class="checkbox" value="1"
105
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'msazuresyncnodelete' ), TRUE ); ?>
106
+ name="msazuresyncnodelete" id="idmsazuresyncnodelete" /> <?php _e( 'Do not delete files on sync to destination!', 'backwpup' ); ?></label>
107
+ <?php } ?>
108
+ </td>
109
+ </tr>
110
+ </table>
111
+ <?php
112
+ }
113
+
114
+
115
+ /**
116
+ * @param $jobid
117
+ */
118
+ public function edit_form_post_save( $jobid ) {
119
+ $message="";
120
+
121
+ BackWPup_Option::update( $jobid, 'msazureaccname', isset( $_POST[ 'msazureaccname' ] ) ? $_POST[ 'msazureaccname' ] : '' );
122
+ BackWPup_Option::update( $jobid, 'msazurekey', isset( $_POST[ 'msazurekey' ] ) ? BackWPup_Encryption::encrypt( $_POST[ 'msazurekey' ] ) : '' );
123
+ BackWPup_Option::update( $jobid, 'msazurecontainer', isset( $_POST[ 'msazurecontainer' ] ) ? $_POST[ 'msazurecontainer' ] : '' );
124
+
125
+ $_POST[ 'msazuredir' ] = trailingslashit( str_replace( '//', '/', str_replace( '\\', '/', trim( stripslashes( $_POST[ 'msazuredir' ] ) ) ) ) );
126
+ if ( substr( $_POST[ 'msazuredir' ], 0, 1 ) == '/' )
127
+ $_POST[ 'msazuredir' ] = substr( $_POST[ 'msazuredir' ], 1 );
128
+ if ( $_POST[ 'msazuredir' ] == '/' )
129
+ $_POST[ 'msazuredir' ] = '';
130
+ BackWPup_Option::update( $jobid, 'msazuredir', $_POST[ 'msazuredir' ] );
131
+
132
+ BackWPup_Option::update( $jobid, 'msazuremaxbackups', isset( $_POST[ 'msazuremaxbackups' ] ) ? (int)$_POST[ 'msazuremaxbackups' ] : 0 );
133
+ BackWPup_Option::update( $jobid, 'msazuresyncnodelete', ( isset( $_POST[ 'msazuresyncnodelete' ] ) && $_POST[ 'msazuresyncnodelete' ] == 1 ) ? TRUE : FALSE );
134
+
135
+ //create a new container
136
+ if ( ! empty( $_POST[ 'newmsazurecontainer' ] ) && ! empty( $_POST[ 'msazureaccname' ] ) && ! empty( $_POST[ 'msazurekey' ] ) ) {
137
+ try {
138
+ $blobRestProxy = WindowsAzure\Common\ServicesBuilder::getInstance()->createBlobService( 'DefaultEndpointsProtocol=https;AccountName=' . $_POST[ 'msazureaccname' ] . ';AccountKey=' . $_POST[ 'msazurekey' ] );
139
+ $container_options = new WindowsAzure\Blob\Models\CreateContainerOptions();
140
+ $container_options->setPublicAccess( WindowsAzure\Blob\Models\PublicAccessType::NONE );
141
+ $blobRestProxy->createContainer( $_POST[ 'newmsazurecontainer' ], $container_options );
142
+ BackWPup_Option::update( $jobid, 'msazurecontainer', $_POST[ 'newmsazurecontainer' ] );
143
+ $message .= sprintf( __( 'MS Azure container "%s" created.', 'backwpup' ), $_POST[ 'newmsazurecontainer' ] ) . '<br />';
144
+ }
145
+ catch ( Exception $e ) {
146
+ $message .= sprintf( __( 'MS Azure container create: %s', 'backwpup' ), $e->getMessage() ) . '<br />';
147
+ }
148
+ }
149
+
150
+ return $message;
151
+ }
152
+
153
+
154
+ /**
155
+ * @param $jobdest
156
+ * @param $backupfile
157
+ */
158
+ public function file_delete( $jobdest, $backupfile ) {
159
+
160
+ $files = get_site_transient( 'backwpup_'. strtolower( $jobdest ), FALSE );
161
+ list( $jobid, $dest ) = explode( '_', $jobdest );
162
+
163
+ if ( BackWPup_Option::get( $jobid, 'msazureaccname' ) && BackWPup_Option::get( $jobid, 'msazurekey' ) && BackWPup_Option::get( $jobid, 'msazurecontainer' ) ) {
164
+ try {
165
+ $blobRestProxy = WindowsAzure\Common\ServicesBuilder::getInstance()->createBlobService( 'DefaultEndpointsProtocol=https;AccountName=' . BackWPup_Option::get( $jobid, 'msazureaccname' ) . ';AccountKey=' . BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'msazurekey' ) ) );
166
+ $blobRestProxy->deleteBlob( BackWPup_Option::get( $jobid, 'msazurecontainer' ), $backupfile );
167
+ //update file list
168
+ foreach ( $files as $key => $file ) {
169
+ if ( is_array( $file ) && $file[ 'file' ] == $backupfile )
170
+ unset( $files[ $key ] );
171
+ }
172
+ }
173
+ catch ( Exception $e ) {
174
+ BackWPup_Admin::message( 'MS AZURE: ' . $e->getMessage() );
175
+ }
176
+ }
177
+
178
+ set_site_transient( 'backwpup_' . strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
179
+ }
180
+
181
+ /**
182
+ * @param $jobid
183
+ * @param $get_file
184
+ */
185
+ public function file_download( $jobid, $get_file ) {
186
+ try {
187
+ $blobRestProxy = WindowsAzure\Common\ServicesBuilder::getInstance()->createBlobService( 'DefaultEndpointsProtocol=https;AccountName=' . BackWPup_Option::get( $jobid, 'msazureaccname' ) . ';AccountKey=' . BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'msazurekey' ) ) );
188
+ $blob = $blobRestProxy->getBlob( BackWPup_Option::get( $jobid, 'msazurecontainer' ), $get_file );
189
+ @apache_setenv( 'no-gzip', 1 );
190
+ @ini_set( 'zlib.output_compression', 0 );
191
+ header( "Pragma: public" );
192
+ header( "Expires: 0" );
193
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
194
+ header( "Content-Type: application/octet-stream" );
195
+ header( "Content-Disposition: attachment; filename=" . basename( $get_file ) . ";" );
196
+ header( "Content-Transfer-Encoding: binary" );
197
+ header( "Content-Length: " . $blob->getProperties()->getContentLength() );
198
+ @set_time_limit( 0 );
199
+ fpassthru( $blob->getContentStream() );
200
+ die();
201
+ }
202
+ catch ( Exception $e ) {
203
+ die( $e->getMessage() );
204
+ }
205
+ }
206
+
207
+ /**
208
+ * @param $jobdest
209
+ * @return mixed
210
+ */
211
+ public function file_get_list( $jobdest ) {
212
+ return get_site_transient( 'backwpup_' . $jobdest );
213
+ }
214
+
215
+ /**
216
+ * @param $job_object
217
+ * @return bool
218
+ */
219
+ public function job_run_archive( $job_object ) {
220
+
221
+ $job_object->substeps_todo = 2;
222
+
223
+ $job_object->log( sprintf( __( '%d. Try sending backup to a Microsoft Azure (Blob) &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
224
+ try {
225
+
226
+ $blobRestProxy = WindowsAzure\Common\ServicesBuilder::getInstance()->createBlobService('DefaultEndpointsProtocol=https;AccountName=' . $job_object->job[ 'msazureaccname' ] . ';AccountKey=' . BackWPup_Encryption::decrypt( $job_object->job[ 'msazurekey' ] ) );
227
+
228
+ //test vor existing container
229
+ $containers = $blobRestProxy->listContainers()->getContainers();
230
+
231
+ $container_url = '';
232
+ foreach( $containers as $container ) {
233
+ if ( $container->getName() == $job_object->job[ 'msazurecontainer' ] ) {
234
+ $container_url = $container->getUrl();
235
+ break;
236
+ }
237
+ }
238
+
239
+ if ( empty( $container_url ) ) {
240
+ $job_object->log( sprintf( __( 'MS Azure container "%s" does not exist!', 'backwpup'), $job_object->job[ 'msazurecontainer' ] ), E_USER_ERROR );
241
+
242
+ return TRUE;
243
+ } else {
244
+ $job_object->log( sprintf( __( 'Connected to MS Azure container "%s".', 'backwpup'), $job_object->job[ 'msazurecontainer' ] ), E_USER_NOTICE );
245
+ }
246
+
247
+
248
+ $job_object->log( __( 'Upload to MS Azure now started &hellip;', 'backwpup' ), E_USER_NOTICE );
249
+ $blobRestProxy->createBlockBlob( $job_object->job[ 'msazurecontainer' ], $job_object->job[ 'msazuredir' ] . $job_object->backup_file, fopen( $job_object->backup_folder . $job_object->backup_file, 'r' ) );
250
+ $job_object->substeps_done = 1;
251
+ $job_object->log( sprintf( __( 'Backup transferred to %s', 'backwpup' ), $container_url . '/' . $job_object->job[ 'msazuredir' ] . $job_object->backup_file ), E_USER_NOTICE );
252
+ if ( !empty( $job_object->job[ 'jobid' ] ) )
253
+ BackWPup_Option::update( $job_object->job[ 'jobid' ] , 'lastbackupdownloadurl', network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloadmsazure&file=' . $job_object->job[ 'msazuredir' ] . $job_object->backup_file . '&jobid=' . $job_object->job[ 'jobid' ] );
254
+
255
+
256
+ $backupfilelist = array();
257
+ $filecounter = 0;
258
+ $files = array();
259
+ $blob_options = new WindowsAzure\Blob\Models\ListBlobsOptions();
260
+ $blob_options->setPrefix( $job_object->job[ 'msazuredir' ] );
261
+ $blobs = $blobRestProxy->listBlobs( $job_object->job[ 'msazurecontainer' ], $blob_options )->getBlobs();
262
+
263
+ if ( is_array( $blobs ) ) {
264
+ foreach ( $blobs as $blob ) {
265
+ $file = basename( $blob->getName() );
266
+ if ( $job_object->is_backup_archive( $file ) )
267
+ $backupfilelist[ $blob->getProperties()->getLastModified()->getTimestamp() ] = $file;
268
+ $files[ $filecounter ][ 'folder' ] = $container_url . "/" . dirname( $blob->getName() ) . "/";
269
+ $files[ $filecounter ][ 'file' ] = $blob->getName();
270
+ $files[ $filecounter ][ 'filename' ] = basename( $blob->getName() );
271
+ $files[ $filecounter ][ 'downloadurl' ] = network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloadmsazure&file=' . $blob->getName() . '&jobid=' . $job_object->job[ 'jobid' ];
272
+ $files[ $filecounter ][ 'filesize' ] = $blob->getProperties()->getContentLength();
273
+ $files[ $filecounter ][ 'time' ] = $blob->getProperties()->getLastModified()->getTimestamp() + ( get_option( 'gmt_offset' ) * 3600 );
274
+ $filecounter ++;
275
+ }
276
+ }
277
+ // Delete old backups
278
+ if ( ! empty ($job_object->job[ 'msazuremaxbackups' ] ) && $job_object->job[ 'msazuremaxbackups' ] > 0 ) {
279
+ if ( count( $backupfilelist ) > $job_object->job[ 'msazuremaxbackups' ] ) {
280
+ ksort( $backupfilelist );
281
+ $numdeltefiles = 0;
282
+ while ( $file = array_shift( $backupfilelist ) ) {
283
+ if ( count( $backupfilelist ) < $job_object->job[ 'msazuremaxbackups' ] )
284
+ break;
285
+ $blobRestProxy->deleteBlob( $job_object->job[ 'msazurecontainer' ], $job_object->job[ 'msazuredir' ] . $file );
286
+ foreach ( $files as $key => $filedata ) {
287
+ if ( $filedata[ 'file' ] == $job_object->job[ 'msazuredir' ] . $file )
288
+ unset( $files[ $key ] );
289
+ }
290
+ $numdeltefiles ++;
291
+ }
292
+ if ( $numdeltefiles > 0 )
293
+ $job_object->log( sprintf( _n( 'One file deleted on Microsoft Azure container.', '%d files deleted on Microsoft Azure container.', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
294
+ }
295
+ }
296
+ set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_msazure', $files, 60 * 60 * 24 * 7 );
297
+ }
298
+ catch ( Exception $e ) {
299
+ $job_object->log( E_USER_ERROR, sprintf( __( 'Microsoft Azure API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
300
+ }
301
+ $job_object->substeps_done = 2;
302
+
303
+ return TRUE;
304
+ }
305
+
306
+ /**
307
+ * @param $job_object
308
+ * @return bool
309
+ */
310
+ public function can_run( $job_object ) {
311
+
312
+ if ( empty( $job_object->job[ 'msazureaccname' ] ) )
313
+ return FALSE;
314
+
315
+ if ( empty( $job_object->job[ 'msazurekey' ]) )
316
+ return FALSE;
317
+
318
+ if ( empty( $job_object->job[ 'msazurecontainer' ] ) )
319
+ return FALSE;
320
+
321
+ return TRUE;
322
+ }
323
+
324
+ /**
325
+ *
326
+ */
327
+ public function edit_inline_js() {
328
+ //<script type="text/javascript">
329
+ ?>
330
+ function msazuregetcontainer() {
331
+ var data = {
332
+ action: 'backwpup_dest_msazure',
333
+ msazureaccname: $('#msazureaccname').val(),
334
+ msazurekey: $('#msazurekey').val(),
335
+ msazureselected: $('#msazurecontainerselected').val(),
336
+ _ajax_nonce: $('#backwpupajaxnonce').val()
337
+ };
338
+ $.post(ajaxurl, data, function(response) {
339
+ $('#msazurecontainererror').remove();
340
+ $('#msazurecontainer').remove();
341
+ $('#msazurecontainerselected').after(response);
342
+ });
343
+ }
344
+ $('#msazureaccname').change(function() {msazuregetcontainer();});
345
+ $('#msazurekey').change(function() {msazuregetcontainer();});
346
+ <?php
347
+ }
348
+
349
+ /**
350
+ * @param string $args
351
+ */
352
+ public function edit_ajax( $args = '' ) {
353
+
354
+ $error = '';
355
+
356
+ if ( is_array( $args ) ) {
357
+ $ajax = FALSE;
358
+ }
359
+ else {
360
+ if ( ! current_user_can( 'backwpup_jobs_edit' ) )
361
+ wp_die( -1 );
362
+ check_ajax_referer( 'backwpup_ajax_nonce' );
363
+ $args[ 'msazureaccname' ] = $_POST[ 'msazureaccname' ];
364
+ $args[ 'msazurekey' ] = $_POST[ 'msazurekey' ];
365
+ $args[ 'msazureselected' ] = $_POST[ 'msazureselected' ];
366
+ $ajax = TRUE;
367
+ }
368
+ echo '<span id="msazurecontainererror" style="color:red;">';
369
+
370
+ if ( ! empty( $args[ 'msazureaccname' ] ) && ! empty( $args[ 'msazurekey' ] ) ) {
371
+ try {
372
+ $blobRestProxy = WindowsAzure\Common\ServicesBuilder::getInstance()->createBlobService( 'DefaultEndpointsProtocol=https;AccountName=' . $args[ 'msazureaccname' ] . ';AccountKey=' . BackWPup_Encryption::decrypt( $args[ 'msazurekey' ] ) );
373
+ $containers = $blobRestProxy->listContainers()->getContainers();
374
+ }
375
+ catch ( Exception $e ) {
376
+ $error = $e->getMessage();
377
+ }
378
+ }
379
+
380
+ if ( empty( $args[ 'msazureaccname' ] ) )
381
+ _e( 'Missing Account Name!', 'backwpup' );
382
+ elseif ( empty( $args[ 'msazurekey' ] ) )
383
+ _e( 'Missing Access Key!', 'backwpup' );
384
+ elseif ( ! empty( $error ) )
385
+ echo esc_html( $error );
386
+ elseif ( empty( $containers ) )
387
+ _e( 'No Container found!', 'backwpup' );
388
+ echo '</span>';
389
+
390
+ if ( !empty( $containers ) ) {
391
+ echo '<select name="msazurecontainer" id="msazurecontainer">';
392
+ foreach ( $containers as $container ) {
393
+ echo "<option " . selected( strtolower( $args[ 'msazureselected' ] ), strtolower( $container->getName() ), FALSE ) . ">" . $container->getName() . "</option>";
394
+ }
395
+ echo '</select>';
396
+ }
397
+ if ( $ajax )
398
+ die();
399
+ else
400
+ return;
401
+ }
402
+ }
inc/class-destination-rsc.php ADDED
@@ -0,0 +1,473 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Rackspace OpenCloud SDK v1.3
3
+ // http://www.rackspace.com/cloud/files/
4
+ // https://github.com/rackspace/php-opencloud
5
+ if ( ! defined( 'RAXSDK_CACERTPEM' ) )
6
+ define('RAXSDK_CACERTPEM', BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem');
7
+ if ( ! class_exists( 'Rackspace' ) )
8
+ require BackWPup::get_plugin_data( 'plugindir' ) . '/sdk/OpenCloud/rackspace.php';
9
+
10
+ /**
11
+ *
12
+ */
13
+ class BackWPup_Destination_RSC extends BackWPup_Destinations {
14
+
15
+ /**
16
+ * @return mixed
17
+ */
18
+ public function __construct() {
19
+
20
+ $this->info[ 'ID' ] = 'RSC';
21
+ $this->info[ 'name' ] = __( 'RSC', 'backwpup' );
22
+ $this->info[ 'description' ] = __( 'Backup to Rackspace Cloud Files', 'backwpup' );
23
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
24
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
25
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
26
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
27
+
28
+ }
29
+
30
+ /**
31
+ * @return array
32
+ */
33
+ public function option_defaults() {
34
+
35
+ return array( 'rscusername' => '', 'rscapikey' => '', 'rsccontainer' => '', 'rscregion' => 'DFW', 'rscdir' => trailingslashit( sanitize_title_with_dashes( get_bloginfo( 'name' ) ) ), 'rscmaxbackups' => 0, 'rscsyncnodelete' => TRUE );
36
+ }
37
+
38
+
39
+ /**
40
+ * @param $jobid
41
+ */
42
+ public function edit_tab( $jobid ) {
43
+ ?>
44
+ <h3 class="title"><?php _e( 'Rack Space Cloud Keys', 'backwpup' ); ?></h3>
45
+ <p></p>
46
+ <table class="form-table">
47
+ <tr valign="top">
48
+ <th scope="row"><label for="rscusername"><?php _e( 'Username', 'backwpup' ); ?></label></th>
49
+ <td>
50
+ <input id="rscusername" name="rscusername" type="text"
51
+ value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'rscusername' ) );?>" class="regular-text" autocomplete="off" />
52
+ </td>
53
+ </tr>
54
+ <tr valign="top">
55
+ <th scope="row"><label for="rscapikey"><?php _e( 'API Key', 'backwpup' ); ?></label></th>
56
+ <td>
57
+ <input id="rscapikey" name="rscapikey" type="password"
58
+ value="<?php echo esc_attr( BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'rscapikey' ) ) ); ?>" class="regular-text" autocomplete="off" />
59
+ </td>
60
+ </tr>
61
+ </table>
62
+
63
+ <h3 class="title"><?php _e( 'Select region', 'backwpup' ); ?></h3>
64
+ <p></p>
65
+ <table class="form-table">
66
+ <tr valign="top">
67
+ <th scope="row"><label for="rscregion"><?php _e( 'Rackspace Cloud Files Region', 'backwpup' ); ?></label></th>
68
+ <td>
69
+ <select name="rscregion" id="rscregion" title="<?php _e( 'Rackspace Cloud Files Region', 'backwpup' ); ?>">
70
+ <option value="DFW" <?php selected( 'DFW', BackWPup_Option::get( $jobid, 'rscregion' ), TRUE ) ?>><?php _e( 'Dallas (DFW)', 'backwpup' ); ?></option>
71
+ <option value="ORD" <?php selected( 'ORD', BackWPup_Option::get( $jobid, 'rscregion' ), TRUE ) ?>><?php _e( 'Chicago (ORD)', 'backwpup' ); ?></option>
72
+ </select><br/>
73
+ </td>
74
+ </tr>
75
+ <tr valign="top">
76
+ <th scope="row"><label for="rsccontainerselected"><?php _e( 'Container selection', 'backwpup' ); ?></label></th>
77
+ <td>
78
+ <input id="rsccontainerselected" name="rsccontainerselected" type="hidden" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'rsccontainer' ) ); ?>" />
79
+ <?php if ( BackWPup_Option::get( $jobid, 'rscusername' ) && BackWPup_Option::get( $jobid, 'rscapikey' ) ) $this->edit_ajax( array(
80
+ 'rscusername' => BackWPup_Option::get( $jobid, 'rscusername' ),
81
+ 'rscregion' => BackWPup_Option::get( $jobid, 'rscregion' ),
82
+ 'rscapikey' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'rscapikey' ) ),
83
+ 'rscselected' => BackWPup_Option::get( $jobid, 'rsccontainer' )
84
+ ) ); ?>
85
+ </td>
86
+ </tr>
87
+ <tr valign="top">
88
+ <th scope="row"><label for="idnewrsccontainer"><?php _e( 'Create a new container', 'backwpup' ); ?></label></th>
89
+ <td>
90
+ <input id="idnewrsccontainer" name="newrsccontainer" type="text" value="" class="text" />
91
+ </td>
92
+ </tr>
93
+ </table>
94
+
95
+ <h3 class="title"><?php _e( 'S3 Backup settings', 'backwpup' ); ?></h3>
96
+ <p></p>
97
+ <table class="form-table">
98
+ <tr valign="top">
99
+ <th scope="row"><label for="idrscdir"><?php _e( 'Folder in bucket', 'backwpup' ); ?></label></th>
100
+ <td>
101
+ <input id="idrscdir" name="rscdir" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'rscdir' ) ); ?>" class="regular-text" />
102
+ </td>
103
+ </tr>
104
+ <tr valign="top">
105
+ <th scope="row"><?php _e( 'File deletion', 'backwpup' ); ?></th>
106
+ <td>
107
+ <?php
108
+ if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'archive' ) {
109
+ ?>
110
+ <label for="idrscmaxbackups"><input id="idrscmaxbackups" name="rscmaxbackups" type="text" size="3" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'rscmaxbackups' ) ); ?>" class="small-text" />&nbsp;
111
+ <?php _e( 'Number of files to hold in folder.', 'backwpup' ); BackWPup_Help::tip( __( 'Oldest files will be deleted first. 0 = no deletion', 'backwpup' ) ); ?></label>
112
+ <?php } else { ?>
113
+ <label for="idrscsyncnodelete"><input class="checkbox" value="1"
114
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'rscsyncnodelete' ), TRUE ); ?>
115
+ name="rscsyncnodelete" id="idrscsyncnodelete" /> <?php _e( 'Do not delete files on sync to destination!', 'backwpup' ); ?></label>
116
+ <?php } ?>
117
+ </td>
118
+ </tr>
119
+ </table>
120
+ <?php
121
+ }
122
+
123
+ /**
124
+ * @param $id
125
+ */
126
+ public function edit_form_post_save( $id ) {
127
+
128
+ BackWPup_Option::update( $id, 'rscusername', isset( $_POST[ 'rscusername' ] ) ? $_POST[ 'rscusername' ] : '' );
129
+ BackWPup_Option::update( $id, 'rscapikey', isset( $_POST[ 'rscapikey' ] ) ? BackWPup_Encryption::encrypt( $_POST[ 'rscapikey' ] ) : '' );
130
+ BackWPup_Option::update( $id, 'rsccontainer', isset( $_POST[ 'rsccontainer' ] ) ? $_POST[ 'rsccontainer' ] : '' );
131
+ BackWPup_Option::update( $id, 'rscregion', ! empty( $_POST[ 'rscregion' ] ) ? $_POST[ 'rscregion' ] : 'DFW' );
132
+
133
+ $_POST[ 'rscdir' ] = trailingslashit( str_replace( '//', '/', str_replace( '\\', '/', trim( stripslashes( $_POST[ 'rscdir' ] ) ) ) ) );
134
+ if ( substr( $_POST[ 'rscdir' ], 0, 1 ) == '/' )
135
+ $_POST[ 'rscdir' ] = substr( $_POST[ 'rscdir' ], 1 );
136
+ if ( $_POST[ 'rscdir' ] == '/' )
137
+ $_POST[ 'rscdir' ] = '';
138
+ BackWPup_Option::update( $id, 'rscdir', $_POST[ 'rscdir' ] );
139
+
140
+ BackWPup_Option::update( $id, 'rscmaxbackups', isset( $_POST[ 'rscmaxbackups' ] ) ? (int)$_POST[ 'rscmaxbackups' ] : 0 );
141
+ BackWPup_Option::update( $id, 'rscsyncnodelete', ( isset( $_POST[ 'rscsyncnodelete' ] ) && $_POST[ 'rscsyncnodelete' ] == 1 ) ? TRUE : FALSE );
142
+
143
+ if ( ! empty( $_POST[ 'rscusername' ] ) && ! empty( $_POST[ 'rscapikey' ] ) && ! empty( $_POST[ 'newrsccontainer' ] ) ) {
144
+ try {
145
+ $conn = new OpenCloud\Rackspace(
146
+ 'https://identity.api.rackspacecloud.com/v2.0/',
147
+ array(
148
+ 'username' => $_POST[ 'rscusername' ],
149
+ 'apiKey' => $_POST[ 'rscapikey' ]
150
+ ));
151
+ $ostore = $conn->ObjectStore( 'cloudFiles' , $_POST[ 'rscregion' ], 'publicURL');
152
+ $container = $ostore->Container();
153
+ $container->Create( array( 'name' => $_POST[ 'newrsccontainer' ] ));
154
+ //$container->DisableCDN();
155
+ BackWPup_Option::update( $id, 'rsccontainer', $_POST[ 'newrsccontainer' ] );
156
+ BackWPup_Admin::message( sprintf( __( 'Rackspace Cloud container "%s" created.', 'backwpup' ), $_POST[ 'newrsccontainer' ] ) );
157
+
158
+ }
159
+ catch ( Exception $e ) {
160
+ BackWPup_Admin::message( sprintf( __( 'Rackspace Cloud API: %s', 'backwpup' ), $e->getMessage() ) );
161
+ }
162
+ }
163
+ }
164
+
165
+ /**
166
+ * @param $jobdest
167
+ * @param $backupfile
168
+ */
169
+ public function file_delete( $jobdest, $backupfile ) {
170
+
171
+ $files = get_site_transient( 'backwpup_'. strtolower( $jobdest ), FALSE );
172
+ list( $jobid, $dest ) = explode( '_', $jobdest );
173
+
174
+ if ( BackWPup_Option::get( $jobid, 'rscusername' ) && BackWPup_Option::get( $jobid, 'rscapikey' ) && BackWPup_Option::get( $jobid, 'rsccontainer' ) ) {
175
+ try {
176
+ $conn = new OpenCloud\Rackspace(
177
+ 'https://identity.api.rackspacecloud.com/v2.0/',
178
+ array(
179
+ 'username' => BackWPup_Option::get( $jobid, 'rscusername' ),
180
+ 'apiKey' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'rscapikey' ) )
181
+ ));
182
+ $ostore = $conn->ObjectStore( 'cloudFiles' , BackWPup_Option::get( $jobid, 'rscregion' ), 'publicURL');
183
+ $container = $ostore->Container( BackWPup_Option::get( $jobid, 'rsccontainer' ) );
184
+ $fileobject = $container->DataObject();
185
+ $fileobject->Delete( array( 'name' => $backupfile ) );
186
+ //update file list
187
+ foreach ( $files as $key => $file ) {
188
+ if ( is_array( $file ) && $file[ 'file' ] == $backupfile )
189
+ unset( $files[ $key ] );
190
+ }
191
+
192
+ }
193
+ catch ( Exception $e ) {
194
+ BackWPup_Admin::message( 'RSC: ' . $e->getMessage() );
195
+ }
196
+ }
197
+
198
+ set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
199
+ }
200
+
201
+ /**
202
+ * @param $jobid
203
+ * @param $get_file
204
+ */
205
+ public function file_download( $jobid, $get_file ) {
206
+
207
+ try {
208
+ $conn = new OpenCloud\Rackspace(
209
+ 'https://identity.api.rackspacecloud.com/v2.0/',
210
+ array(
211
+ 'username' => BackWPup_Option::get( $jobid, 'rscusername' ),
212
+ 'apiKey' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 'rscapikey' ) )
213
+ ));
214
+ $ostore = $conn->ObjectStore( 'cloudFiles' , BackWPup_Option::get( $jobid, 'rscregion' ), 'publicURL');
215
+ $container = $ostore->Container( BackWPup_Option::get( $jobid, 'rsccontainer' ) );
216
+ $backupfile = $container->DataObject( $get_file );
217
+ @apache_setenv( 'no-gzip', 1 );
218
+ @ini_set( 'zlib.output_compression', 0 );
219
+ header( "Pragma: public" );
220
+ header( "Expires: 0" );
221
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
222
+ header( "Content-Type: application/octet-stream" );
223
+ header( "Content-Disposition: attachment; filename=" . basename( $get_file ) . ";" );
224
+ header( "Content-Transfer-Encoding: binary" );
225
+ header( "Content-Length: " . $backupfile->bytes );
226
+ @set_time_limit( 0 );
227
+ echo $backupfile->SaveToString();
228
+ die();
229
+ }
230
+ catch ( Exception $e ) {
231
+ die( $e->getMessage() );
232
+ }
233
+ }
234
+
235
+ /**
236
+ * @param $jobdest
237
+ * @return mixed
238
+ */
239
+ public function file_get_list( $jobdest ) {
240
+
241
+ return get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
242
+ }
243
+
244
+ /**
245
+ * @param $job_object
246
+ * @return bool
247
+ */
248
+ public function job_run_archive( $job_object ) {
249
+
250
+ $job_object->substeps_todo = 2 + $job_object->backup_filesize;
251
+ $job_object->substeps_done = 0;
252
+ $job_object->log( sprintf( __( '%d. Trying to send backup file to Rackspace cloud &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
253
+
254
+ try {
255
+
256
+ $conn = new OpenCloud\Rackspace(
257
+ 'https://identity.api.rackspacecloud.com/v2.0/',
258
+ array(
259
+ 'username' => $job_object->job[ 'rscusername' ],
260
+ 'apiKey' => BackWPup_Encryption::decrypt( $job_object->job[ 'rscapikey' ] )
261
+ ));
262
+ //set upload callback
263
+ $conn->SetUploadProgressCallback( array( $this,'UploadProgressCallback') );
264
+ //connect to cloud files
265
+ $ostore = $conn->ObjectStore( 'cloudFiles' , $job_object->job[ 'rscregion' ], 'publicURL');
266
+
267
+ $container = $ostore->Container( $job_object->job[ 'rsccontainer' ] );
268
+ $job_object->log( sprintf(__( 'Connected to Rackspace cloud files container %s', 'backwpup' ), $container->name ) );
269
+ }
270
+ catch ( Exception $e ) {
271
+ $job_object->log( E_USER_ERROR, sprintf( __( 'Rackspace Cloud API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
272
+
273
+ return FALSE;
274
+ }
275
+
276
+
277
+ try {
278
+ //Transfer Backup to Rackspace Cloud
279
+ $job_object->substeps_done = 0;
280
+ $job_object->log( __( 'Upload to Rackspace cloud started &hellip;', 'backwpup' ), E_USER_NOTICE );
281
+
282
+ $backupfile = $container->DataObject();
283
+ $uploded = $backupfile->Create( array(
284
+ 'name'=> $job_object->job[ 'rscdir' ] . $job_object->backup_file,
285
+ 'content_type'=> $job_object->get_mime_type( $job_object->backup_folder . $job_object->backup_file )
286
+ ), $job_object->backup_folder . $job_object->backup_file );
287
+ if ( $uploded ) {
288
+ $job_object->substeps_todo = 1 + $job_object->backup_filesize;
289
+ $job_object->log( __( 'Backup File transferred to RSC://', 'backwpup' ) . $job_object->job[ 'rsccontainer' ] . '/' . $job_object->job[ 'rscdir' ] . $job_object->backup_file, E_USER_NOTICE );
290
+ if ( !empty( $job_object->job[ 'jobid' ] ) )
291
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastbackupdownloadurl', network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloadrsc&file=' . $job_object->job[ 'rscdir' ] . $job_object->backup_file . '&jobid=' . $job_object->job[ 'jobid' ] );
292
+ } else {
293
+ $job_object->log( __( 'Can not transfer backup to Rackspace cloud.', 'backwpup' ), E_USER_ERROR );
294
+
295
+ return FALSE;
296
+ }
297
+ }
298
+ catch ( Exception $e ) {
299
+ $job_object->log( E_USER_ERROR, sprintf( __( 'Rackspace Cloud API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
300
+
301
+ return FALSE;
302
+ }
303
+
304
+ try {
305
+ $backupfilelist = array();
306
+ $filecounter = 0;
307
+ $files = array();
308
+ $objlist = $container->ObjectList( array( 'prefix' => $job_object->job[ 'rscdir' ] ) );
309
+ if ($objlist->Size() > 0 ) {
310
+ while ( $object = $objlist->Next() ) {
311
+ $file = basename( $object->name );
312
+ if ( $job_object->job[ 'rscdir' ] . $file == $object->name ) { //only in the folder and not in complete bucket
313
+ if ( $job_object->is_backup_archive( $file ) )
314
+ $backupfilelist[ strtotime( $object->last_modified ) ] = $file;
315
+ }
316
+ $files[ $filecounter ][ 'folder' ] = "RSC://" . $job_object->job[ 'rsccontainer' ] . "/" . dirname( $object->name ) . "/";
317
+ $files[ $filecounter ][ 'file' ] = $object->name;
318
+ $files[ $filecounter ][ 'filename' ] = basename( $object->name );
319
+ $files[ $filecounter ][ 'downloadurl' ] = network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloadrsc&file=' . $object->name . '&jobid=' . $job_object->job[ 'jobid' ];
320
+ $files[ $filecounter ][ 'filesize' ] = $object->bytes;
321
+ $files[ $filecounter ][ 'time' ] = strtotime( $object->last_modified ) + ( get_option( 'gmt_offset' ) * 3600 );
322
+ $filecounter ++;
323
+ }
324
+ }
325
+ if ( ! empty( $job_object->job[ 'rscmaxbackups' ] ) && $job_object->job[ 'rscmaxbackups' ] > 0 ) { //Delete old backups
326
+ if ( count( $backupfilelist ) > $job_object->job[ 'rscmaxbackups' ] ) {
327
+ ksort( $backupfilelist );
328
+ $numdeltefiles = 0;
329
+ while ( $file = array_shift( $backupfilelist ) ) {
330
+ if ( count( $backupfilelist ) < $job_object->job[ 'rscmaxbackups' ] )
331
+ break;
332
+ $fileobject = $container->DataObject();
333
+ $fileobject->Delete( array( 'name' => $job_object->job[ 'rscdir' ] . $file ) );
334
+ foreach ( $files as $key => $filedata ) {
335
+ if ( $filedata[ 'file' ] == $job_object->job[ 'rscdir' ] . $file )
336
+ unset( $files[ $key ] );
337
+ }
338
+ $numdeltefiles ++;
339
+ }
340
+ if ( $numdeltefiles > 0 )
341
+ $job_object->log( sprintf( _n( 'One file deleted on Rackspace cloud container.', '%d files deleted on Rackspace cloud container.', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
342
+ }
343
+ }
344
+ set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_rsc', $files, 60 * 60 * 24 * 7 );
345
+ }
346
+ catch ( Exception $e ) {
347
+ $job_object->log( E_USER_ERROR, sprintf( __( 'Rackspace Cloud API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
348
+
349
+ return FALSE;
350
+ }
351
+ $job_object->substeps_done ++;
352
+
353
+ return TRUE;
354
+ }
355
+
356
+ /**
357
+ * Callback to get transferd bytes on upload
358
+ */
359
+ public function UploadProgressCallback( $bytes_transferred ) {
360
+
361
+ $backwpup_job_object = BackWPup_Job::getInstance();
362
+ $backwpup_job_object->substeps_done = $backwpup_job_object->substeps_done + $bytes_transferred;
363
+ $backwpup_job_object->update_working_data();
364
+ }
365
+
366
+ /**
367
+ * @param $job_object
368
+ * @return bool
369
+ */
370
+ public function can_run( $job_object ) {
371
+
372
+ if ( empty( $job_object->job[ 'rscusername'] ) )
373
+ return FALSE;
374
+
375
+ if ( empty( $job_object->job[ 'rscapikey'] ) )
376
+ return FALSE;
377
+
378
+ if ( empty( $job_object->job[ 'rsccontainer'] ) )
379
+ return FALSE;
380
+
381
+ return TRUE;
382
+ }
383
+
384
+ /**
385
+ *
386
+ */
387
+ public function edit_inline_js() {
388
+ //<script type="text/javascript">
389
+ ?>
390
+ function rscgetcontainer() {
391
+ var data = {
392
+ action: 'backwpup_dest_rsc',
393
+ rscusername: $('#rscusername').val(),
394
+ rscapikey: $('#rscapikey').val(),
395
+ rscregion: $('#rscregion').val(),
396
+ rscselected: $('#rsccontainerselected').val(),
397
+ _ajax_nonce: $('#backwpupajaxnonce').val()
398
+ };
399
+ $.post(ajaxurl, data, function(response) {
400
+ $('#rsccontainererror').remove();
401
+ $('#rsccontainer').remove();
402
+ $('#rsccontainerselected').after(response);
403
+ });
404
+ }
405
+ $('#rscregion').change(function() {rscgetcontainer();});
406
+ $('#rscusername').change(function() {rscgetcontainer();});
407
+ $('#rscapikey').change(function() {rscgetcontainer();});
408
+ <?php
409
+ }
410
+
411
+ /**
412
+ * @param string $args
413
+ */
414
+ public function edit_ajax( $args = '' ) {
415
+
416
+ $error = '';
417
+
418
+ if ( is_array( $args ) ) {
419
+ $ajax = FALSE;
420
+ } else {
421
+ if ( ! current_user_can( 'backwpup_jobs_edit' ) )
422
+ wp_die( -1 );
423
+ check_ajax_referer( 'backwpup_ajax_nonce' );
424
+ $args[ 'rscusername' ] = $_POST[ 'rscusername' ];
425
+ $args[ 'rscapikey' ] = $_POST[ 'rscapikey' ];
426
+ $args[ 'rscselected' ] = $_POST[ 'rscselected' ];
427
+ $args[ 'rscregion' ] = $_POST[ 'rscregion' ];
428
+ $ajax = TRUE;
429
+ }
430
+ echo '<span id="rsccontainererror" style="color:red;">';
431
+
432
+ if ( ! empty( $args[ 'rscusername' ] ) && ! empty( $args[ 'rscapikey' ] ) && ! empty( $args[ 'rscregion' ] ) ) {
433
+ try {
434
+ $conn = new OpenCloud\Rackspace(
435
+ 'https://identity.api.rackspacecloud.com/v2.0/',
436
+ array(
437
+ 'username' => $args[ 'rscusername' ],
438
+ 'apiKey' => BackWPup_Encryption::decrypt( $args[ 'rscapikey' ] )
439
+ ));
440
+
441
+ $ostore = $conn->ObjectStore( 'cloudFiles' , $args[ 'rscregion' ], 'publicURL');
442
+ $containerlist = $ostore->ContainerList();
443
+ }
444
+ catch ( Exception $e ) {
445
+ $error = $e->getMessage();
446
+ $containerlist = NULL;
447
+ }
448
+ }
449
+
450
+ if ( empty( $args[ 'rscusername' ] ) )
451
+ _e( 'Missing Username!', 'backwpup' );
452
+ elseif ( empty( $args[ 'rscapikey' ] ) )
453
+ _e( 'Missing API Key!', 'backwpup' );
454
+ elseif ( ! empty( $error ) )
455
+ echo esc_html( $error );
456
+ elseif ( ! is_object( $containerlist ) || $containerlist->Size() == 0 )
457
+ _e( "No Container's found!", 'backwpup' );
458
+ echo '</span>';
459
+
460
+ if ( isset( $containerlist ) && $containerlist->Size() > 0 ) {
461
+ echo '<select name="rsccontainer" id="rsccontainer">';
462
+ while( $container = $containerlist->Next() ) {
463
+ echo "<option " . selected( strtolower( $args[ 'rscselected' ] ), strtolower( $container->name ), FALSE ) . ">" . $container->name . "</option>";
464
+ }
465
+ echo '</select>';
466
+ }
467
+
468
+ if ( $ajax )
469
+ die();
470
+ else
471
+ return;
472
+ }
473
+ }
inc/class-destination-s3.php ADDED
@@ -0,0 +1,620 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Amazon S3 SDK v2.1.2
3
+ // http://aws.amazon.com/de/sdkforphp2/
4
+ // https://github.com/aws/aws-sdk-php
5
+ if ( ! class_exists( 'Symfony\\Component\\ClassLoader\\UniversalClassLoader' ) )
6
+ include BackWPup::get_plugin_data( 'PluginDir' ) . '/sdk/Aws/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php';
7
+ $classLoader = new Symfony\Component\ClassLoader\UniversalClassLoader();
8
+ $classLoader->registerNamespaces( array(
9
+ 'Aws' => BackWPup::get_plugin_data( 'PluginDir' ) . '/sdk/Aws',
10
+ 'Guzzle' => BackWPup::get_plugin_data( 'PluginDir' ) . '/sdk/Aws',
11
+ 'Symfony\\Component\\EventDispatcher' => BackWPup::get_plugin_data( 'PluginDir' ) . '/sdk/Aws/symfony/event-dispatcher'
12
+ ));
13
+ $classLoader->register();
14
+
15
+ /**
16
+ * Documentation: http://docs.amazonwebservices.com/aws-sdk-php-2/latest/class-Aws.S3.S3Client.html
17
+ */
18
+ class BackWPup_Destination_S3 extends BackWPup_Destinations {
19
+
20
+ /**
21
+ *
22
+ */
23
+ public function __construct() {
24
+
25
+ $this->info[ 'ID' ] = 'S3';
26
+ $this->info[ 'name' ] = __( 'S3 Service', 'backwpup' );
27
+ $this->info[ 'description' ] = __( 'Backup to a S3 Service', 'backwpup' );
28
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
29
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
30
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
31
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
32
+
33
+ }
34
+
35
+ /**
36
+ * @param $s3region
37
+ * @param string $s3base_url
38
+ * @return string
39
+ */
40
+ protected function get_s3_base_url( $s3region, $s3base_url = '' ) {
41
+
42
+ if ( ! empty( $s3base_url ) )
43
+ return $s3base_url;
44
+
45
+ switch ( $s3region ) {
46
+ case 'us-east-1':
47
+ return 'https://s3.amazonaws.com';
48
+ case 'us-west-1':
49
+ return 'https://s3-us-west-1.amazonaws.com';
50
+ case 'us-west-2':
51
+ return 'https://s3-us-west-2.amazonaws.com';
52
+ case 'eu-west-1':
53
+ return 'https://s3-eu-west-1.amazonaws.com';
54
+ case 'ap-northeast-1':
55
+ return 'https://s3-ap-northeast-1.amazonaws.com';
56
+ case 'ap-southeast-1':
57
+ return 'https://s3-ap-southeast-1.amazonaws.com';
58
+ case 'ap-southeast-2':
59
+ return 'https://s3-ap-southeast-2.amazonaws.com';
60
+ case 'sa-east-1':
61
+ return 'https://s3-sa-east-1.amazonaws.com';
62
+ case 'us-gov-west-1':
63
+ return 'https://s3-us-gov-west-1.amazonaws.com';
64
+ case 'google-storage':
65
+ return 'https://storage.googleapis.com';
66
+ case 'hosteurope':
67
+ return 'https://cs.hosteurope.de';
68
+ case 'dreamhost':
69
+ return 'https://objects.dreamhost.com';
70
+ default:
71
+ return '';
72
+ }
73
+
74
+ }
75
+
76
+ /**
77
+ * @return array
78
+ */
79
+ public function option_defaults() {
80
+
81
+ return array( 's3accesskey' => '', 's3secretkey' => '', 's3bucket' => '', 's3region' => 'us-east-1', 's3base_url' => '', 's3ssencrypt' => '', 's3storageclass' => '', 's3dir' => trailingslashit( sanitize_title_with_dashes( get_bloginfo( 'name' ) ) ), 's3maxbackups' => 0, 's3syncnodelete' => TRUE );
82
+ }
83
+
84
+
85
+ /**
86
+ * @param $jobid
87
+ */
88
+ public function edit_tab( $jobid ) {
89
+
90
+ ?>
91
+ <h3 class="title"><?php _e( 'S3 Service', 'backwpup' ) ?></h3>
92
+ <p></p>
93
+ <table class="form-table">
94
+ <tr valign="top">
95
+ <th scope="row"><label for="s3region"><?php _e( 'Select a S3 service', 'backwpup' ) ?></label></th>
96
+ <td>
97
+ <select name="s3region" id="s3region" title="<?php _e( 'Amazon S3 Region', 'backwpup' ); ?>">
98
+ <option value="us-east-1" <?php selected( 'us-east-1', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: US Standard', 'backwpup' ); ?></option>
99
+ <option value="us-west-1" <?php selected( 'us-west-1', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: US West (Northern California)', 'backwpup' ); ?></option>
100
+ <option value="us-west-2" <?php selected( 'us-west-2', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: US West (Oregon)', 'backwpup' ); ?></option>
101
+ <option value="eu-west-1" <?php selected( 'eu-west-1', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: EU (Ireland)', 'backwpup' ); ?></option>
102
+ <option value="ap-northeast-1" <?php selected( 'ap-northeast-1', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: Asia Pacific (Tokyo)', 'backwpup' ); ?></option>
103
+ <option value="ap-southeast-1" <?php selected( 'ap-southeast-1', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: Asia Pacific (Singapore)', 'backwpup' ); ?></option>
104
+ <option value="ap-southeast-2" <?php selected( 'ap-southeast-2', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: Asia Pacific (Sydney)', 'backwpup' ); ?></option>
105
+ <option value="sa-east-1" <?php selected( 'sa-east-1', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: South America (Sao Paulo)', 'backwpup' ); ?></option>
106
+ <option value="us-gov-west-1" <?php selected( 'us-gov-west-1', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Amazon S3: GovCloud (US)', 'backwpup' ); ?></option>
107
+ <option value="google-storage" <?php selected( 'google-storage', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Google Storage (Interoperable Access)', 'backwpup' ); ?></option>
108
+ <option value="hosteurope" <?php selected( 'hosteurope', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Hosteurope Cloud Storage', 'backwpup' ); ?></option>
109
+ <option value="dreamhost" <?php selected( 'dreamhost', BackWPup_Option::get( $jobid, 's3region' ), TRUE ) ?>><?php _e( 'Dream Host Cloud Storage', 'backwpup' ); ?></option>
110
+ </select>
111
+ </td>
112
+ </tr>
113
+ <tr valign="top">
114
+ <th scope="row"><label for="s3base_url"><?php _e( 'Or a S3 Server url', 'backwpup' ) ?></label></th>
115
+ <td>
116
+ <input id="s3base_url" name="s3base_url" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 's3base_url' ) );?>" class="regular-text" autocomplete="off" />
117
+ </td>
118
+ </tr>
119
+ </table>
120
+
121
+ <h3 class="title"><?php _e( 'S3 Access Keys', 'backwpup' ); ?></h3>
122
+ <p></p>
123
+ <table class="form-table">
124
+ <tr valign="top">
125
+ <th scope="row"><label for="s3accesskey"><?php _e( 'Access Key', 'backwpup' ); ?></label></th>
126
+ <td>
127
+ <input id="s3accesskey" name="s3accesskey" type="text"
128
+ value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 's3accesskey' ) );?>" class="regular-text" autocomplete="off" />
129
+ </td>
130
+ </tr>
131
+ <tr valign="top">
132
+ <th scope="row"><label for="s3secretkey"><?php _e( 'Secret Key', 'backwpup' ); ?></label></th>
133
+ <td>
134
+ <input id="s3secretkey" name="s3secretkey" type="password"
135
+ value="<?php echo esc_attr( BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 's3secretkey' ) ) ); ?>" class="regular-text" autocomplete="off" />
136
+ </td>
137
+ </tr>
138
+ </table>
139
+
140
+ <h3 class="title"><?php _e( 'S3 Bucket', 'backwpup' ); ?></h3>
141
+ <p></p>
142
+ <table class="form-table">
143
+ <tr valign="top">
144
+ <th scope="row"><label for="s3bucketselected"><?php _e( 'Bucket selection', 'backwpup' ); ?></label></th>
145
+ <td>
146
+ <input id="s3bucketselected" name="s3bucketselected" type="hidden" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 's3bucket' ) ); ?>" />
147
+ <?php if ( BackWPup_Option::get( $jobid, 's3accesskey' ) && BackWPup_Option::get( $jobid, 's3secretkey' ) ) $this->edit_ajax( array(
148
+ 's3accesskey' => BackWPup_Option::get( $jobid, 's3accesskey' ),
149
+ 's3secretkey' => BackWPup_Encryption::decrypt(BackWPup_Option::get( $jobid, 's3secretkey' ) ),
150
+ 's3bucketselected' => BackWPup_Option::get( $jobid, 's3bucket' ),
151
+ 's3base_url' => BackWPup_Option::get( $jobid, 's3base_url' ),
152
+ 's3region' => BackWPup_Option::get( $jobid, 's3region' )
153
+ ) ); ?>
154
+ </td>
155
+ </tr>
156
+ <tr valign="top">
157
+ <th scope="row"><label for="s3newbucket"><?php _e( 'Create a new Bucket', 'backwpup' ); ?></label></th>
158
+ <td>
159
+ <input id="s3newbucket" name="s3newbucket" type="text" value="" class="small-text" autocomplete="off" />
160
+ </td>
161
+ </tr>
162
+ </table>
163
+
164
+ <h3 class="title"><?php _e( 'S3 Backup settings', 'backwpup' ); ?></h3>
165
+ <p></p>
166
+ <table class="form-table">
167
+ <tr valign="top">
168
+ <th scope="row"><label for="ids3dir"><?php _e( 'Folder in bucket', 'backwpup' ); ?></label></th>
169
+ <td>
170
+ <input id="ids3dir" name="s3dir" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 's3dir' ) ); ?>" class="regular-text" />
171
+ </td>
172
+ </tr>
173
+ <tr valign="top">
174
+ <th scope="row"><?php _e( 'File deletion', 'backwpup' ); ?></th>
175
+ <td>
176
+ <?php
177
+ if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'archive' ) {
178
+ ?>
179
+ <label for="ids3maxbackups"><input id="ids3maxbackups" name="s3maxbackups" type="text" size="3" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 's3maxbackups' ) ); ?>" class="small-text" />&nbsp;
180
+ <?php _e( 'Number of files to hold in folder.', 'backwpup' ); BackWPup_Help::tip( __( 'Oldest files will be deleted first. 0 = no deletion', 'backwpup' ) ); ?></label>
181
+ <?php } else { ?>
182
+ <label for="ids3syncnodelete"><input class="checkbox" value="1"
183
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 's3syncnodelete' ), TRUE ); ?>
184
+ name="s3syncnodelete" id="ids3syncnodelete" /> <?php _e( 'Do not delete files on sync to destination!', 'backwpup' ); ?></label>
185
+ <?php } ?>
186
+ </td>
187
+ </tr>
188
+ </table>
189
+
190
+ <h3 class="title"><?php _e( 'Amazon specific settings', 'backwpup' ); ?></h3>
191
+ <p></p>
192
+ <table class="form-table">
193
+ <tr valign="top">
194
+ <th scope="row"><label for="ids3storageclass"><?php _e( 'Amazon: Storage Class', 'backwpup' ); ?></label></th>
195
+ <td>
196
+ <select name="s3storageclass" id="ids3storageclass" title="<?php _e( 'Amazon: Storage Class', 'backwpup' ); ?>">
197
+ <option value="" <?php selected( 'us-east-1', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'none', 'backwpup' ); ?></option>
198
+ <option value="REDUCED_REDUNDANCY" <?php selected( 'REDUCED_REDUNDANCY', BackWPup_Option::get( $jobid, 's3storageclass' ), TRUE ) ?>><?php _e( 'Reduced Redundancy', 'backwpup' ); ?></option>
199
+ </select>
200
+ </td>
201
+ </tr>
202
+ <tr valign="top">
203
+ <th scope="row"><label for="ids3ssencrypt"><?php _e( 'Server side encryption', 'backwpup' ); ?></label></th>
204
+ <td>
205
+ <input class="checkbox" value="AES256"
206
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 's3ssencrypt' ), 'AES256' ); ?>
207
+ name="s3ssencrypt" id="ids3ssencrypt" /> <?php _e( 'Save files encrypted (AES256) on server.', 'backwpup' ); ?>
208
+ </td>
209
+ </tr>
210
+ </table>
211
+
212
+ <?php
213
+ }
214
+
215
+
216
+ /**
217
+ * @param $jobid
218
+ * @return string
219
+ */
220
+ public function edit_form_post_save( $jobid ) {
221
+ $message = '';
222
+ BackWPup_Option::update( $jobid, 's3accesskey', isset( $_POST[ 's3accesskey' ] ) ? $_POST[ 's3accesskey' ] : '' );
223
+ BackWPup_Option::update( $jobid, 's3secretkey', isset( $_POST[ 's3secretkey' ] ) ? BackWPup_Encryption::encrypt( $_POST[ 's3secretkey' ] ) : '' );
224
+ BackWPup_Option::update( $jobid, 's3base_url', isset( $_POST[ 's3base_url' ] ) ? esc_url_raw( $_POST[ 's3base_url' ] ) : '' );
225
+ BackWPup_Option::update( $jobid, 's3region', isset( $_POST[ 's3region' ] ) ? $_POST[ 's3region' ] : '' );
226
+ BackWPup_Option::update( $jobid, 's3storageclass', isset( $_POST[ 's3storageclass' ] ) ? $_POST[ 's3storageclass' ] : '' );
227
+ BackWPup_Option::update( $jobid, 's3ssencrypt', ( isset( $_POST[ 's3ssencrypt' ] ) && $_POST[ 's3ssencrypt' ] == 'AES256' ) ? 'AES256' : '' );
228
+ BackWPup_Option::update( $jobid, 's3bucket', isset( $_POST[ 's3bucket' ] ) ? $_POST[ 's3bucket' ] : '' );
229
+
230
+ $_POST[ 's3dir' ] = trailingslashit( str_replace( '//', '/', str_replace( '\\', '/', trim( stripslashes( $_POST[ 's3dir' ] ) ) ) ) );
231
+ if ( substr( $_POST[ 's3dir' ], 0, 1 ) == '/' )
232
+ $_POST[ 's3dir' ] = substr( $_POST[ 's3dir' ], 1 );
233
+ if ( $_POST[ 's3dir' ] == '/' )
234
+ $_POST[ 's3dir' ] = '';
235
+ BackWPup_Option::update( $jobid, 's3dir', $_POST[ 's3dir' ] );
236
+
237
+ BackWPup_Option::update( $jobid, 's3maxbackups', isset( $_POST[ 's3maxbackups' ] ) ? (int)$_POST[ 's3maxbackups' ] : 0 );
238
+ BackWPup_Option::update( $jobid, 's3syncnodelete', ( isset( $_POST[ 's3syncnodelete' ] ) && $_POST[ 's3syncnodelete' ] == 1 ) ? TRUE : FALSE );
239
+
240
+ //create new bucket
241
+ if ( !empty( $_POST[ 's3newbucket' ] ) ) {
242
+ try {
243
+ $s3 = Aws\S3\S3Client::factory( array( 'key' => $_POST[ 's3accesskey' ],
244
+ 'secret' => $_POST[ 's3secretkey' ],
245
+ 'region' => $_POST[ 's3region' ],
246
+ 'base_url' => $this->get_s3_base_url( $_POST[ 's3region' ], $_POST[ 's3base_url' ]),
247
+ 'scheme' => 'https',
248
+ 'ssl.certificate_authority' => BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem') );
249
+ // set bucket creation region
250
+ if ( $_POST[ 's3region' ] == 'google-storage' || $_POST[ 's3region' ] == 'hosteurope' )
251
+ $region = 'EU';
252
+ else
253
+ $region = $_POST[ 's3region' ];
254
+
255
+ if ($s3->isValidBucketName( $_POST[ 's3newbucket' ] ) ) {
256
+ $bucket = $s3->createBucket( array(
257
+ 'Bucket' => $_POST[ 's3newbucket' ] ,
258
+ 'LocationConstraint' => $region
259
+ ) )->toArray();
260
+ $s3->waitUntil('bucket_exists', $_POST[ 's3newbucket' ]);
261
+ if ( ! empty( $bucket[ 'Location' ] ) )
262
+ $message .= sprintf( __( 'Bucket %1$s in %2$s created.','backwpup'), $_POST[ 's3newbucket' ],$bucket[ 'Location' ] ) . '<br />';
263
+ else
264
+ $message .= sprintf( __( 'Bucket %s could not created.','backwpup'), $_POST[ 's3newbucket' ] ) . '<br />';
265
+ } else {
266
+ $message .= sprintf( __( ' %s is not a valid bucket name.','backwpup'), $_POST[ 's3newbucket' ] ) . '<br />';
267
+ }
268
+ }
269
+ catch ( Aws\S3\Exception\S3Exception $e ) {
270
+ $message .= $e->getMessage();
271
+ }
272
+ BackWPup_Option::update( $jobid, 's3bucket', $_POST[ 's3newbucket' ] );
273
+ }
274
+
275
+ return $message;
276
+ }
277
+
278
+ /**
279
+ * @param $jobdest
280
+ * @param $backupfile
281
+ */
282
+ public function file_delete( $jobdest, $backupfile ) {
283
+
284
+ $files = get_site_transient( 'backwpup_'. strtolower( $jobdest ), array() );
285
+ list( $jobid, $dest ) = explode( '_', $jobdest );
286
+
287
+ if ( BackWPup_Option::get( $jobid, 's3accesskey' ) && BackWPup_Option::get( $jobid, 's3secretkey' ) && BackWPup_Option::get( $jobid, 's3bucket' ) ) {
288
+ try {
289
+ $s3 = Aws\S3\S3Client::factory( array( 'key' => BackWPup_Option::get( $jobid, 's3accesskey' ),
290
+ 'secret' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 's3secretkey' ) ),
291
+ 'region' => BackWPup_Option::get( $jobid, 's3region' ),
292
+ 'base_url' => $this->get_s3_base_url( BackWPup_Option::get( $jobid, 's3region' ), BackWPup_Option::get( $jobid, 's3base_url' ) ),
293
+ 'scheme' => 'https',
294
+ 'ssl.certificate_authority' => BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem') );
295
+
296
+ $s3->deleteObject( array(
297
+ 'Bucket' => BackWPup_Option::get( $jobid, 's3bucket' ),
298
+ 'Key' => $backupfile
299
+ ) );
300
+ //update file list
301
+ foreach ( $files as $key => $file ) {
302
+ if ( is_array( $file ) && $file[ 'file' ] == $backupfile )
303
+ unset( $files[ $key ] );
304
+ }
305
+ unset( $s3 );
306
+ }
307
+ catch ( Exception $e ) {
308
+ BackWPup_Admin::message( sprintf( __('S3 Service API: %s','backwpup'), $e->getMessage() ) );
309
+ }
310
+ }
311
+
312
+ set_site_transient( 'backwpup_'. strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
313
+ }
314
+
315
+ /**
316
+ * @param $jobid
317
+ * @param $get_file
318
+ */
319
+ public function file_download( $jobid, $get_file ) {
320
+
321
+ try {
322
+ $s3 = Aws\S3\S3Client::factory( array( 'key' => BackWPup_Option::get( $jobid, 's3accesskey' ),
323
+ 'secret' => BackWPup_Encryption::decrypt( BackWPup_Option::get( $jobid, 's3secretkey' ) ),
324
+ 'region' => BackWPup_Option::get( $jobid, 's3region' ),
325
+ 'base_url' => $this->get_s3_base_url( BackWPup_Option::get( $jobid, 's3region' ), BackWPup_Option::get( $jobid, 's3base_url' ) ),
326
+ 'scheme' => 'https',
327
+ 'ssl.certificate_authority' => BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem') );
328
+
329
+ $s3file = $s3->getObject( array(
330
+ 'Bucket' => BackWPup_Option::get( $jobid, 's3bucket' ),
331
+ 'Key' => $get_file ) )->toArray();
332
+ }
333
+ catch ( Exception $e ) {
334
+ die( $e->getMessage() );
335
+ }
336
+
337
+ if ( $s3file[ 'ContentLength' ] > 0 && ! empty( $s3file[ 'ContentType' ] ) ) {
338
+ @apache_setenv( 'no-gzip', 1 );
339
+ @ini_set( 'zlib.output_compression', 0 );
340
+ header( "Pragma: public" );
341
+ header( "Expires: 0" );
342
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );;
343
+ header( "Content-Type: application/octet-stream" );
344
+ header( "Content-Disposition: attachment; filename=" . basename( $get_file ) . ";" );
345
+ header( "Content-Transfer-Encoding: binary" );
346
+ header( "Content-Length: " . $s3file[ 'ContentLength' ] );
347
+ @set_time_limit( 0 );
348
+ $s3file['Body']->rewind();
349
+ while ($filedata = $s3file['Body']->read(1024)) {
350
+ echo esc_html( $filedata );
351
+ }
352
+ die();
353
+ }
354
+ }
355
+
356
+ /**
357
+ * @param $jobdest
358
+ * @return mixed
359
+ */
360
+ public function file_get_list( $jobdest ) {
361
+
362
+ return get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
363
+ }
364
+
365
+ /**
366
+ * @param $job_object
367
+ * @return bool
368
+ */
369
+ public function job_run_archive( $job_object ) {
370
+
371
+ $job_object->substeps_todo = 2 + $job_object->backup_filesize;
372
+ $job_object->log( sprintf( __( '%d. Trying to send backup file to S3 Service &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
373
+
374
+ try {
375
+ $s3 = Aws\S3\S3Client::factory( array( 'key' => $job_object->job[ 's3accesskey' ],
376
+ 'secret' => BackWPup_Encryption::decrypt( $job_object->job[ 's3secretkey' ] ),
377
+ 'region' => $job_object->job[ 's3region' ],
378
+ 'base_url' => $this->get_s3_base_url( $job_object->job[ 's3region' ], $job_object->job[ 's3base_url' ] ),
379
+ 'scheme' => 'https',
380
+ 'ssl.certificate_authority' => BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem') );
381
+
382
+ if ( $s3->doesBucketExist( $job_object->job[ 's3bucket' ] ) ) {
383
+ $bucketregion = $s3->getBucketLocation( array( 'Bucket' => $job_object->job[ 's3bucket' ] ) )->toArray();
384
+ $bucketacl = $s3->getBucketAcl( array( 'Bucket' => $job_object->job[ 's3bucket' ] ) )->toArray();
385
+ $job_object->log( sprintf( __( 'Connected to S3 Bucket "%1$s" from "%3$s" in %2$s', 'backwpup' ), $job_object->job[ 's3bucket' ], $bucketregion[ 'Location' ], $bucketacl[ 'Owner' ][ 'DisplayName' ] ), E_USER_NOTICE );
386
+ }
387
+ else {
388
+ $job_object->log( sprintf( __( 'S3 Bucket "%s" does not exist!', 'backwpup' ), $job_object->job[ 's3bucket' ] ), E_USER_ERROR );
389
+
390
+ return TRUE;
391
+ }
392
+
393
+ //transfer file to S3
394
+ $job_object->log( __( 'Upload to S3 Service started &hellip;', 'backwpup' ), E_USER_NOTICE );
395
+
396
+ //check memory
397
+ $job_object->need_free_memory( '6M' );
398
+ //Prepare Upload
399
+ $multipart_transfer = Aws\S3\Model\MultipartUpload\UploadBuilder::newInstance()
400
+ ->setClient( $s3 )
401
+ ->setSource( $job_object->backup_folder . $job_object->backup_file )
402
+ ->setBucket( $job_object->job[ 's3bucket' ] )
403
+ ->setOption('ContentType', $job_object->get_mime_type( $job_object->backup_folder . $job_object->backup_file ) )
404
+ ->setOption('ACL', 'private' )
405
+ ->setKey( $job_object->job[ 's3dir' ] . $job_object->backup_file );
406
+ if ( ! empty( $job_object->job[ 's3ssencrypt' ] ) )
407
+ $multipart_transfer = $multipart_transfer->setOption('ServerSideEncryption', $job_object->job[ 's3ssencrypt' ] );
408
+ if ( ! empty( $job_object->job[ 's3storageclass' ] ) )
409
+ $multipart_transfer = $multipart_transfer->setOption('StorageClass', $job_object->job[ 's3storageclass' ] );
410
+ $multipart_transfer = $multipart_transfer->build();
411
+
412
+ // Attach event listeners to the transfer object for upload progress
413
+ $dispatcher = $multipart_transfer->getEventDispatcher();
414
+ $dispatcher->addListener($multipart_transfer::AFTER_PART_UPLOAD, function ($event) {
415
+ $size = $event['command']->get('Body')->getContentLength();
416
+ $job_object = BackWPup_Job::get_working_data();
417
+ $job_object->substeps_done = $job_object->substeps_done + $size;
418
+ $job_object->update_working_data();
419
+ });
420
+
421
+ try {
422
+ $multipart_transfer->upload();
423
+ } catch ( Aws\Common\Exception\MultipartUploadException $e ) {
424
+ $job_object->log( E_USER_ERROR, sprintf( __( 'S3 Service API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
425
+ $multipart_transfer->abort();
426
+
427
+ return FALSE;
428
+ }
429
+
430
+ $result = $s3->headObject( array( 'Bucket' => $job_object->job[ 's3bucket' ],
431
+ 'Key' => $job_object->job[ 's3dir' ] . $job_object->backup_file) )->toArray();
432
+
433
+ if ( isset( $result[ 'ContentLength' ] ) == filesize( $job_object->backup_folder . $job_object->backup_file ) ) {
434
+ $job_object->substeps_done = 1 + $job_object->backup_filesize;
435
+ $job_object->log( sprintf( __( 'Backup transferred to %s.', 'backwpup' ), $this->get_s3_base_url( $job_object->job[ 's3region' ], $job_object->job[ 's3base_url' ] ). '/' .$job_object->job[ 's3bucket' ] . '/' . $job_object->job[ 's3dir' ] . $job_object->backup_file ), E_USER_NOTICE );
436
+ if ( ! empty( $job_object->job[ 'jobid' ] ) )
437
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastbackupdownloadurl', network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloads3&file=' . $job_object->job[ 's3dir' ] . $job_object->backup_file . '&jobid=' . $job_object->job[ 'jobid' ] );
438
+ }
439
+ else {
440
+ $job_object->log( sprintf( __( 'Can not transfer backup to S3! (%1$d) %2$s', 'backwpup' ), $result[ "status" ], $result[ "Message" ] ), E_USER_ERROR );
441
+ }
442
+ }
443
+ catch ( Exception $e ) {
444
+ $job_object->log( E_USER_ERROR, sprintf( __( 'S3 Service API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
445
+
446
+ return FALSE;
447
+ }
448
+
449
+ try {
450
+ $backupfilelist = array();
451
+ $filecounter = 0;
452
+ $files = array();
453
+ $args = array(
454
+ 'Bucket' => $job_object->job[ 's3bucket' ],
455
+ 'Prefix' => $job_object->job[ 's3dir' ]
456
+ );
457
+ $objects = $s3->getIterator('ListObjects', $args );
458
+ if ( is_object( $objects ) ) {
459
+ foreach ( $objects as $object ) {
460
+ $file = basename( $object[ 'Key' ] );
461
+ $changetime = strtotime( $object[ 'LastModified' ] ) + ( get_option( 'gmt_offset' ) * 3600 );
462
+ if ( $job_object->is_backup_archive( $file ) )
463
+ $backupfilelist[ $changetime ] = $file;
464
+ $files[ $filecounter ][ 'folder' ] = $this->get_s3_base_url( $job_object->job[ 's3region' ], $job_object->job[ 's3base_url' ] ). '/' .$job_object->job[ 's3bucket' ] . '/' . dirname( $object[ 'Key' ] );
465
+ $files[ $filecounter ][ 'file' ] = $object[ 'Key' ];
466
+ $files[ $filecounter ][ 'filename' ] = basename( $object[ 'Key' ] );
467
+ $files[ $filecounter ][ 'downloadurl' ] = network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloads3&file=' . $object[ 'Key' ] . '&jobid=' . $job_object->job[ 'jobid' ];
468
+ $files[ $filecounter ][ 'filesize' ] = $object[ 'Size' ];
469
+ $files[ $filecounter ][ 'time' ] = $changetime;
470
+ $filecounter ++;
471
+ }
472
+ }
473
+ if ( $job_object->job[ 's3maxbackups' ] > 0 && is_object( $s3 ) ) { //Delete old backups
474
+ if ( count( $backupfilelist ) > $job_object->job[ 's3maxbackups' ] ) {
475
+ ksort( $backupfilelist );
476
+ $numdeltefiles = 0;
477
+ while ( $file = array_shift( $backupfilelist ) ) {
478
+ if ( count( $backupfilelist ) < $job_object->job[ 's3maxbackups' ] )
479
+ break;
480
+ //delete files on S3
481
+ $args = array(
482
+ 'Bucket' => $job_object->job[ 's3bucket' ],
483
+ 'Key' => $job_object->job[ 's3dir' ] . $file
484
+ );
485
+ $delete_s3 = $s3->deleteObject( $args )->toArray();
486
+ if ( is_array( $delete_s3 ) ) {
487
+ foreach ( $files as $key => $filedata ) {
488
+ if ( $filedata[ 'file' ] == $job_object->job[ 's3dir' ] . $file )
489
+ unset( $files[ $key ] );
490
+ }
491
+ $numdeltefiles ++;
492
+ } else {
493
+ $job_object->log( sprintf( __( 'Can not delete backup on %s.', 'backwpup' ), $this->get_s3_base_url( $job_object->job[ 's3region' ], $job_object->job[ 's3base_url' ] ). '/' .$job_object->job[ 's3bucket' ] . '/' . $job_object->job[ 's3dir' ] . $file ), E_USER_ERROR );
494
+ }
495
+ }
496
+ if ( $numdeltefiles > 0 )
497
+ $job_object->log( sprintf( _n( 'One file deleted on S3 Bucket.', '%d files deleted on S3 Bucket', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
498
+ }
499
+ }
500
+ set_site_transient( 'backwpup_' . $job_object->job[ 'jobid' ] . '_s3', $files, 60 * 60 * 24 * 7 );
501
+ }
502
+ catch ( Exception $e ) {
503
+ $job_object->log( E_USER_ERROR, sprintf( __( 'S3 Service API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
504
+
505
+ return FALSE;
506
+ }
507
+ $job_object->substeps_done = 2 + $job_object->backup_filesize;
508
+
509
+ return TRUE;
510
+ }
511
+
512
+
513
+ /**
514
+ * @param $job_object
515
+ * @return bool
516
+ */
517
+ public function can_run( $job_object ) {
518
+
519
+ if ( empty( $job_object->job[ 's3accesskey' ] ) )
520
+ return FALSE;
521
+
522
+ if ( empty( $job_object->job[ 's3secretkey' ] ) )
523
+ return FALSE;
524
+
525
+ if ( empty( $job_object->job[ 's3bucket' ] ) )
526
+ return FALSE;
527
+
528
+ return TRUE;
529
+ }
530
+
531
+ /**
532
+ *
533
+ */
534
+ public function edit_inline_js() {
535
+ //<script type="text/javascript">
536
+ ?>
537
+ function awsgetbucket() {
538
+ var data = {
539
+ action: 'backwpup_dest_s3',
540
+ s3accesskey: $('input[name="s3accesskey"]').val(),
541
+ s3secretkey: $('input[name="s3secretkey"]').val(),
542
+ s3bucketselected: $('input[name="s3bucketselected"]').val(),
543
+ s3base_url: $('input[name="s3base_url"]').val(),
544
+ s3region: $('#s3region').val(),
545
+ _ajax_nonce: $('#backwpupajaxnonce').val()
546
+ };
547
+ $.post(ajaxurl, data, function(response) {
548
+ $('#s3bucketerror').remove();
549
+ $('#s3bucket').remove();
550
+ $('#s3bucketselected').after(response);
551
+ });
552
+ }
553
+ $('input[name="s3accesskey"]').change(function() {awsgetbucket();});
554
+ $('input[name="s3secretkey"]').change(function() {awsgetbucket();});
555
+ $('input[name="s3base_url"]').change(function() {awsgetbucket();});
556
+ $('#s3region').change(function() {awsgetbucket();});
557
+ <?php
558
+ }
559
+
560
+ /**
561
+ * @param string $args
562
+ */
563
+ public function edit_ajax( $args = '' ) {
564
+
565
+ $error = '';
566
+
567
+ if ( is_array( $args ) ) {
568
+ $ajax = FALSE;
569
+ }
570
+ else {
571
+ if ( ! current_user_can( 'backwpup_jobs_edit' ) )
572
+ wp_die( -1 );
573
+ check_ajax_referer( 'backwpup_ajax_nonce' );
574
+ $args[ 's3accesskey' ] = $_POST[ 's3accesskey' ];
575
+ $args[ 's3secretkey' ] = $_POST[ 's3secretkey' ];
576
+ $args[ 's3bucketselected' ] = $_POST[ 's3bucketselected' ];
577
+ $args[ 's3base_url' ] = $_POST[ 's3base_url' ];
578
+ $args[ 's3region' ] = $_POST[ 's3region' ];
579
+ $ajax = TRUE;
580
+ }
581
+ echo '<span id="s3bucketerror" style="color:red;">';
582
+
583
+ if ( ! empty( $args[ 's3accesskey' ] ) && ! empty( $args[ 's3secretkey' ] ) ) {
584
+ try {
585
+ $s3 = Aws\S3\S3Client::factory( array( 'key' => $args[ 's3accesskey' ],
586
+ 'secret' => BackWPup_Encryption::decrypt( $args[ 's3secretkey' ] ),
587
+ 'region' => $args[ 's3region' ],
588
+ 'base_url' => $this->get_s3_base_url( $args[ 's3region' ], $args[ 's3base_url' ]),
589
+ 'scheme' => 'https',
590
+ 'ssl.certificate_authority' => BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem') );
591
+
592
+ $buckets = $s3->listBuckets();
593
+ }
594
+ catch ( Aws\S3\Exception\S3Exception $e ) {
595
+ $error = $e->getMessage();
596
+ }
597
+ }
598
+
599
+ if ( empty( $args[ 's3accesskey' ] ) )
600
+ _e( 'Missing access key!', 'backwpup' );
601
+ elseif ( empty( $args[ 's3secretkey' ] ) )
602
+ _e( 'Missing secret access key!', 'backwpup' );
603
+ elseif ( ! empty( $error ) )
604
+ echo esc_html( $error );
605
+ elseif ( ! isset( $buckets ) || count( $buckets['Buckets'] ) < 1 )
606
+ _e( 'No bucket found!', 'backwpup' );
607
+ echo '</span>';
608
+
609
+ if ( !empty( $buckets['Buckets'] ) ) {
610
+ echo '<select name="s3bucket" id="s3bucket">';
611
+ foreach ( $buckets['Buckets'] as $bucket ) {
612
+ echo "<option " . selected( $args[ 's3bucketselected' ], esc_attr( $bucket['Name'] ), FALSE ) . ">" . esc_attr( $bucket['Name'] ) . "</option>";
613
+ }
614
+ echo '</select>';
615
+ }
616
+
617
+ if ( $ajax )
618
+ die();
619
+ }
620
+ }
inc/class-destination-sugarsync.php ADDED
@@ -0,0 +1,889 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_Destination_SugarSync extends BackWPup_Destinations {
6
+
7
+ /**
8
+ * @return mixed
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'SUGARSYNC';
13
+ $this->info[ 'name' ] = __( 'SugarSync', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'Backup to SugarSync', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+
23
+ /**
24
+ * @return array
25
+ */
26
+ public function option_defaults() {
27
+ return array( 'sugarrefreshtoken' => '', 'sugarroot' => '', 'sugardir' => trailingslashit( sanitize_title_with_dashes( get_bloginfo( 'name' ) ) ), 'sugarmaxbackups' => 0 );
28
+ }
29
+
30
+
31
+ /**
32
+ * @param $jobid
33
+ */
34
+ public function edit_tab( $jobid ) {
35
+ ?>
36
+ <h3 class="title"><?php _e( 'Sugarsync Login', 'backwpup' ); ?></h3>
37
+ <p></p>
38
+ <table class="form-table">
39
+
40
+ <?php if ( ! BackWPup_Option::get( $jobid, 'sugarrefreshtoken' ) ) { ?>
41
+ <tr valign="top">
42
+ <th scope="row"><?php _e( 'Authentication', 'backwpup' ); ?></th>
43
+ <td>
44
+ <label for="sugaremail"><?php _e( 'E-mail address:', 'backwpup' ); ?><br/>
45
+ <input id="sugaremail" name="sugaremail" type="text"
46
+ value="<?php if ( isset( $_POST[ 'sugaremail' ] ) ) echo $_POST[ 'sugaremail' ];?>" class="large-text" autocomplete="off" /></label>
47
+ <br/>
48
+ <label for="sugarpass"><?php _e( 'Password:', 'backwpup' ); ?><br/>
49
+ <input id="sugarpass" name="sugarpass" type="password"
50
+ value="<?php if ( isset( $_POST[ 'sugarpass' ] ) ) echo $_POST[ 'sugarpass' ];?>" class="large-text" autocomplete="off" /></label>
51
+ <br/>
52
+ <br/>
53
+ <input type="submit" id="idauthbutton" name="authbutton" class="button-primary" accesskey="d"
54
+ value="<?php _e( 'Sugarsync authenticate!', 'backwpup' ); ?>"/>
55
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="authbutton" class="button"
56
+ value="<?php _e( 'Create Sugarsync Account', 'backwpup' ); ?>"/>
57
+ </td>
58
+ </tr>
59
+ <?php } else { ?>
60
+ <tr valign="top">
61
+ <th scope="row"><label for="idauthbutton"><?php _e( 'Authentication', 'backwpup' ); ?></label></th>
62
+ <td>
63
+ <span style="color:green;"><?php _e( 'Authenticated!', 'backwpup' ); ?></span>
64
+ <input type="submit" id="idauthbutton" name="authbutton" class="button-primary" accesskey="d"
65
+ value="<?php _e( 'Delete Sugarsync authentication!', 'backwpup' ); ?>" />
66
+ </td>
67
+ </tr>
68
+ <?php } ?>
69
+ </table>
70
+
71
+ <h3 class="title"><?php _e( 'SgarSync Root', 'backwpup' ); ?></h3>
72
+ <p></p>
73
+ <table class="form-table">
74
+ <tr valign="top">
75
+ <th scope="row"><label for="sugarroot"><?php _e( 'Sync folder selection', 'backwpup' ); ?></label></th>
76
+ <td>
77
+ <?php
78
+ try {
79
+ $sugarsync = new BackWPup_Destination_SugarSync_API( BackWPup_Option::get( $jobid, 'sugarrefreshtoken' ) );
80
+ $user = $sugarsync->user();
81
+ $syncfolders = $sugarsync->get( $user->syncfolders );
82
+ if ( ! is_object( $syncfolders ) )
83
+ echo '<span style="color:red;">' . __( 'No Syncfolders found!', 'backwpup' ) . '</span>';
84
+ }
85
+ catch ( Exception $e ) {
86
+ echo '<span style="color:red;">' . $e->getMessage() . '</span>';
87
+ }
88
+ if ( isset( $syncfolders ) && is_object( $syncfolders ) ) {
89
+ echo '<select name="sugarroot" id="sugarroot">';
90
+ foreach ( $syncfolders->collection as $roots ) {
91
+ echo "<option " . selected( strtolower( BackWPup_Option::get( $jobid, 'sugarroot' ) ), strtolower( $roots->ref ), FALSE ) . " value=\"" . $roots->ref . "\">" . $roots->displayName . "</option>";
92
+ }
93
+ echo '</select>';
94
+ }
95
+ ?>
96
+ </td>
97
+ </tr>
98
+ </table>
99
+
100
+ <h3 class="title"><?php _e( 'Backup settings', 'backwpup' ); ?></h3>
101
+ <p></p>
102
+ <table class="form-table">
103
+ <tr valign="top">
104
+ <th scope="row"><label for="idsugardir"><?php _e( 'Folder in root', 'backwpup' ); ?></label></th>
105
+ <td>
106
+ <input id="idsugardir" name="sugardir" type="text" value="<?php echo BackWPup_Option::get( $jobid, 'sugardir' ); ?>" class="regular-text" />
107
+ </td>
108
+ </tr>
109
+ <tr valign="top">
110
+ <th scope="row"><?php _e( 'File Deletion', 'backwpup' ); ?></th>
111
+ <td>
112
+ <?php
113
+ if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'archive' ) {
114
+ ?>
115
+ <label for="idsugarmaxbackups"><input id="idsugarmaxbackups" name="sugarmaxbackups" type="text" size="3" value="<?php echo BackWPup_Option::get( $jobid, 'sugarmaxbackups' );?>" class="small-text" />&nbsp;
116
+ <?php _e( 'Number of files to hold in folder.', 'backwpup' ); BackWPup_Help::tip( __( 'Oldest files will be deleted first. 0 = no deletion', 'backwpup' ) ); ?></label>
117
+ <?php } else { ?>
118
+ <label for="idsugarsyncnodelete"><input class="checkbox" value="1"
119
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'sugarsyncnodelete' ), TRUE ); ?>
120
+ name="sugarsyncnodelete" id="idsugarsyncnodelete" /> <?php _e( 'Do not delete files on sync to destination!', 'backwpup' ); ?></label>
121
+ <?php } ?>
122
+ </td>
123
+ </tr>
124
+ </table>
125
+ <?php
126
+ }
127
+
128
+
129
+ /**
130
+ * @param $jobid
131
+ */
132
+ public function edit_form_post_save( $jobid ) {
133
+
134
+ $message="";
135
+ if ( ! empty( $_POST[ 'sugaremail' ] ) && ! empty( $_POST[ 'sugarpass' ] ) && $_POST[ 'authbutton' ] == __( 'Sugarsync authenticate!', 'backwpup' ) ) {
136
+ try {
137
+ $sugarsync = new BackWPup_Destination_SugarSync_API();
138
+ $refresh_token = $sugarsync->get_Refresh_Token( $_POST[ 'sugaremail' ], $_POST[ 'sugarpass' ] );
139
+ if ( ! empty( $refresh_token ) )
140
+ BackWPup_Option::update( $jobid, 'sugarrefreshtoken', $refresh_token );
141
+ }
142
+ catch ( Exception $e ) {
143
+ $message .= 'SUGARSYNC: ' . $e->getMessage() . '<br />';
144
+ }
145
+ }
146
+
147
+ if ( isset( $_POST[ 'authbutton' ] ) && $_POST[ 'authbutton' ] == __( 'Delete Sugarsync authentication!', 'backwpup' ) ) {
148
+ BackWPup_Option::delete( $jobid, 'sugarrefreshtoken' );
149
+ }
150
+
151
+ if ( isset( $_POST[ 'authbutton' ] ) && $_POST[ 'authbutton' ] == __( 'Create Sugarsync Account', 'backwpup' ) ) {
152
+ try {
153
+ $sugarsync = new BackWPup_Destination_SugarSync_API();
154
+ $sugarsync->create_account( $_POST[ 'sugaremail' ], $_POST[ 'sugarpass' ] );
155
+ }
156
+ catch ( Exception $e ) {
157
+ $message .= 'SUGARSYNC: ' . $e->getMessage() . '<br />';
158
+ }
159
+ }
160
+
161
+ $_POST[ 'sugardir' ] = trailingslashit( str_replace( '//', '/', str_replace( '\\', '/', trim( stripslashes( $_POST[ 'sugardir' ] ) ) ) ) );
162
+ if ( substr( $_POST[ 'sugardir' ], 0, 1 ) == '/' )
163
+ $_POST[ 'sugardir' ] = substr( $_POST[ 'sugardir' ], 1 );
164
+ if ( $_POST[ 'sugardir' ] == '/' )
165
+ $_POST[ 'sugardir' ] = '';
166
+ BackWPup_Option::update( $jobid, 'sugardir', $_POST[ 'sugardir' ] );
167
+
168
+ BackWPup_Option::update( $jobid, 'sugarroot', isset( $_POST[ 'sugarroot' ] ) ? $_POST[ 'sugarroot' ] : '' );
169
+ BackWPup_Option::update( $jobid, 'sugarmaxbackups', isset( $_POST[ 'sugarmaxbackups' ] ) ? (int)$_POST[ 'sugarmaxbackups' ] : 0 );
170
+
171
+ return $message;
172
+ }
173
+
174
+ /**
175
+ * @param $jobdest
176
+ * @param $backupfile
177
+ */
178
+ public function file_delete( $jobdest, $backupfile ) {
179
+
180
+ $files = get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
181
+ list( $jobid, $dest ) = explode( '_', $jobdest );
182
+
183
+ if ( BackWPup_Option::get( $jobid, 'sugarrefreshtoken' ) ) {
184
+ try {
185
+ $sugarsync = new BackWPup_Destination_SugarSync_API( BackWPup_Option::get( $jobid, 'sugarrefreshtoken' ) );
186
+ $sugarsync->delete( urldecode( $backupfile ) );
187
+ //update file list
188
+ foreach ( $files as $key => $file ) {
189
+ if ( is_array( $file ) && $file[ 'file' ] == $backupfile )
190
+ unset( $files[ $key ] );
191
+ }
192
+ unset( $sugarsync );
193
+ }
194
+ catch ( Exception $e ) {
195
+ BackWPup_Admin::message( 'SUGARSYNC: ' . $e->getMessage() );
196
+ }
197
+ }
198
+
199
+ set_site_transient( 'backwpup_' . strtolower( $jobdest ), $files, 60 * 60 * 24 * 7 );
200
+ }
201
+
202
+ /**
203
+ * @param $jobid
204
+ * @param $get_file
205
+ */
206
+ public function file_download( $jobid, $get_file ) {
207
+
208
+ try {
209
+ $sugarsync = new BackWPup_Destination_SugarSync_API( BackWPup_Option::get( $jobid, 'sugarrefreshtoken' ) );
210
+ $response = $sugarsync->get( urldecode( $get_file ) );
211
+ @apache_setenv( 'no-gzip', 1 );
212
+ @ini_set( 'zlib.output_compression', 0 );
213
+ header( "Pragma: public" );
214
+ header( "Expires: 0" );
215
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
216
+ header( "Content-Type: application/octet-stream" );
217
+ header( "Content-Disposition: attachment; filename=" . (string)$response->displayName . ";" );
218
+ header( "Content-Transfer-Encoding: binary" );
219
+ header( "Content-Length: " . (int)$response->size );
220
+ @set_time_limit( 0 );
221
+ echo $sugarsync->download( urldecode( $get_file ) );
222
+ die();
223
+ }
224
+ catch ( Exception $e ) {
225
+ die( $e->getMessage() );
226
+ }
227
+ }
228
+
229
+ /**
230
+ * @param $jobdest
231
+ * @return mixed
232
+ */
233
+ public function file_get_list( $jobdest ) {
234
+
235
+ return get_site_transient( 'backwpup_' . strtolower( $jobdest ) );
236
+ }
237
+
238
+ /**
239
+ * @param $job_object
240
+ * @return bool
241
+ */
242
+ public function job_run_archive( $job_object ) {
243
+
244
+ $job_object->substeps_todo = 2 + $job_object->backup_filesize;
245
+ $job_object->log( sprintf( __( '%d. Try to send backup to SugarSync &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
246
+
247
+ try {
248
+ $sugarsync = new BackWPup_Destination_SugarSync_API( $job_object->job[ 'sugarrefreshtoken' ] );
249
+ //Check Quota
250
+ $user = $sugarsync->user();
251
+ if ( ! empty( $user->nickname ) )
252
+ $job_object->log( sprintf( __( 'Authed to SugarSync with Nick %s', 'backwpup' ), $user->nickname ), E_USER_NOTICE );
253
+ $sugarsyncfreespase = (float)$user->quota->limit - (float)$user->quota->usage; //float fixes bug for display of no free space
254
+ if ( $job_object->backup_filesize > $sugarsyncfreespase ) {
255
+ $job_object->log( __( 'No free space left on SugarSync!', 'backwpup' ), E_USER_ERROR );
256
+ $job_object->substeps_todo = 1 + $job_object->backup_filesize;
257
+
258
+ return TRUE;
259
+ }
260
+ else {
261
+ $job_object->log( sprintf( __( '%s free on SugarSync', 'backwpup' ), size_format( $sugarsyncfreespase, 2 ) ), E_USER_NOTICE );
262
+ }
263
+ //Create and change folder
264
+ $sugarsync->mkdir( $job_object->job[ 'sugardir' ], $job_object->job[ 'sugarroot' ] );
265
+ $dirid = $sugarsync->chdir( $job_object->job[ 'sugardir' ], $job_object->job[ 'sugarroot' ] );
266
+ //Upload to SugarSync
267
+ $job_object->substeps_done = 0;
268
+ $job_object->log( __( 'Upload to SugarSync now started &hellip;', 'backwpup' ), E_USER_NOTICE );
269
+ $reponse = $sugarsync->upload( $job_object->backup_folder . $job_object->backup_file );
270
+ if ( is_object( $reponse ) ) {
271
+ if ( ! empty( $job_object->job[ 'jobid' ] ) )
272
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastbackupdownloadurl', network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloadsugarsync&file=' . (string)$reponse . '&jobid=' . $job_object->job[ 'jobid' ] );
273
+ $job_object->substeps_done ++;
274
+ $job_object->log( sprintf( __( 'Backup transferred to %s', 'backwpup' ), 'https://' . $user->nickname . '.sugarsync.com/' . $sugarsync->showdir( $dirid ) . $job_object->backup_file ), E_USER_NOTICE );
275
+ }
276
+ else {
277
+ $job_object->log( __( 'Can not transfer backup to SugarSync!', 'backwpup' ), E_USER_ERROR );
278
+
279
+ return FALSE;
280
+ }
281
+
282
+ $backupfilelist = array();
283
+ $files = array();
284
+ $filecounter = 0;
285
+ $dir = $sugarsync->showdir( $dirid );
286
+ $getfiles = $sugarsync->getcontents( 'file' );
287
+ if ( is_object( $getfiles ) ) {
288
+ foreach ( $getfiles->file as $getfile ) {
289
+ $getfile->displayName = utf8_decode( (string)$getfile->displayName );
290
+ if ( $job_object->is_backup_archive( $getfile->displayName ) )
291
+ $backupfilelist[ strtotime( (string)$getfile->lastModified ) ] = (string)$getfile->ref;
292
+ $files[ $filecounter ][ 'folder' ] = 'https://' . (string)$user->nickname . '.sugarsync.com/' . $dir;
293
+ $files[ $filecounter ][ 'file' ] = (string)$getfile->ref;
294
+ $files[ $filecounter ][ 'filename' ] = (string)$getfile->displayName;
295
+ $files[ $filecounter ][ 'downloadurl' ] = network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=downloadsugarsync&file=' . (string)$getfile->ref . '&jobid=' . $job_object->job[ 'jobid' ];
296
+ $files[ $filecounter ][ 'filesize' ] = (int)$getfile->size;
297
+ $files[ $filecounter ][ 'time' ] = strtotime( (string)$getfile->lastModified ) + ( get_option( 'gmt_offset' ) * 3600 );
298
+ $filecounter ++;
299
+ }
300
+ }
301
+ if ( ! empty( $job_object->job[ 'sugarmaxbackups' ] ) && $job_object->job[ 'sugarmaxbackups' ] > 0 ) { //Delete old backups
302
+ if ( count( $backupfilelist ) > $job_object->job[ 'sugarmaxbackups' ] ) {
303
+ ksort( $backupfilelist );
304
+ $numdeltefiles = 0;
305
+ while ( $file = array_shift( $backupfilelist ) ) {
306
+ if ( count( $backupfilelist ) < $job_object->job[ 'sugarmaxbackups' ] )
307
+ break;
308
+ $sugarsync->delete( $file ); //delete files on Cloud
309
+ foreach ( $files as $key => $filedata ) {
310
+ if ( $filedata[ 'file' ] == $file )
311
+ unset( $files[ $key ] );
312
+ }
313
+ $numdeltefiles ++;
314
+ }
315
+ if ( $numdeltefiles > 0 )
316
+ $job_object->log( sprintf( _n( 'One file deleted on SugarSync folder', '%d files deleted on SugarSync folder', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
317
+ }
318
+ }
319
+ set_site_transient( 'BackWPup_' . $job_object->job[ 'jobid' ] . '_SUGARSYNC', $files, 60 * 60 * 24 * 7 );
320
+ }
321
+ catch ( Exception $e ) {
322
+ $job_object->log( E_USER_ERROR, sprintf( __( 'SugarSync API: %s', 'backwpup' ), htmlentities( $e->getMessage() ) ), $e->getFile(), $e->getLine() );
323
+
324
+ return FALSE;
325
+ }
326
+ $job_object->substeps_done ++;
327
+
328
+ return TRUE;
329
+ }
330
+
331
+ /**
332
+ * @param $job_object
333
+ * @return bool
334
+ */
335
+ public function can_run( $job_object ) {
336
+
337
+ if ( empty( $job_object->job[ 'sugarrefreshtoken' ] ) )
338
+ return FALSE;
339
+
340
+ if ( empty( $job_object->job[ 'sugarroot' ] ) )
341
+ return FALSE;
342
+
343
+ return TRUE;
344
+ }
345
+ }
346
+
347
+ /**
348
+ *
349
+ */
350
+ class BackWPup_Destination_SugarSync_API {
351
+
352
+ /**
353
+ * url for the sugarsync-api
354
+ */
355
+ const API_URL = 'https://api.sugarsync.com';
356
+
357
+ /**
358
+ *
359
+ * @var string
360
+ */
361
+ protected $folder = '';
362
+
363
+ /**
364
+ * @var mixed|string
365
+ */
366
+ protected $encoding = 'UTF-8';
367
+
368
+ /**
369
+ * @var null|string
370
+ */
371
+ protected $refresh_token = '';
372
+
373
+ /**
374
+ * The Auth-token
375
+ *
376
+ * @var string
377
+ */
378
+ protected $access_token = '';
379
+
380
+ // class methods
381
+ /**
382
+ * Default constructor/Auth
383
+ */
384
+ public function __construct( $refresh_token = NULL ) {
385
+
386
+ //auth xml
387
+ $this->encoding = mb_internal_encoding();
388
+
389
+ //get access token
390
+ if ( isset( $refresh_token ) and ! empty( $refresh_token ) ) {
391
+ $this->refresh_token = $refresh_token;
392
+ $this->get_Access_Token();
393
+ }
394
+ }
395
+
396
+ /**
397
+ * Make the call
398
+ *
399
+ * @return string
400
+ *
401
+ * @param string $url The url to call.
402
+ * @param string $data
403
+ * @param string $method
404
+ * @throws BackWPup_Destination_SugarSync_API_Exception
405
+ * @internal param $string [optiona] $data File on put, xml on post.
406
+ * @internal param $string [optional] $method The method to use. Possible values are GET, POST, PUT, DELETE.
407
+ */
408
+ private function doCall( $url, $data = '', $method = 'GET' ) {
409
+
410
+ // allowed methods
411
+ $allowedMethods = array( 'GET', 'POST', 'PUT', 'DELETE' );
412
+
413
+ // redefine
414
+ $url = (string)$url;
415
+ $method = (string)$method;
416
+
417
+ // validate method
418
+ if ( ! in_array( $method, $allowedMethods ) )
419
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Unknown method (' . $method . '). Allowed methods are: ' . implode( ', ', $allowedMethods ) );
420
+
421
+ // check auth token
422
+ if ( empty( $this->access_token ) )
423
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Auth Token not set correctly!' );
424
+ else
425
+ $headers[ ] = 'Authorization: ' . $this->access_token;
426
+ $headers[ ] = 'Expect:';
427
+
428
+ // init
429
+ $curl = curl_init();
430
+ //set options
431
+ curl_setopt( $curl, CURLOPT_URL, $url );
432
+ curl_setopt( $curl, CURLOPT_USERAGENT, BackWPup::get_plugin_data( 'User-Agent' ) );
433
+ if ( ini_get( 'open_basedir' ) == '' ) curl_setopt( $curl, CURLOPT_FOLLOWLOCATION, TRUE );
434
+ curl_setopt( $curl, CURLOPT_RETURNTRANSFER, TRUE );
435
+ curl_setopt( $curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
436
+ curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, TRUE );
437
+ curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, 2 );
438
+ curl_setopt( $curl, CURLOPT_SSLVERSION, 3 );
439
+ if ( is_file( BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' ) )
440
+ curl_setopt( $curl, CURLOPT_CAINFO, BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' );
441
+
442
+ if ( $method == 'POST' ) {
443
+ $headers[ ] = 'Content-Type: application/xml; charset=UTF-8';
444
+ curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
445
+ curl_setopt( $curl, CURLOPT_POST, TRUE );
446
+ $headers[ ] = 'Content-Length: ' . strlen( $data );
447
+ }
448
+ elseif ( $method == 'PUT' ) {
449
+ if ( is_file( $data ) && is_readable( $data ) ) {
450
+ $headers[ ] = 'Content-Length: ' . filesize( $data );
451
+ $datafilefd = fopen( $data, 'r' );
452
+ curl_setopt( $curl, CURLOPT_PUT, TRUE );
453
+ curl_setopt( $curl, CURLOPT_INFILE, $datafilefd );
454
+ curl_setopt( $curl, CURLOPT_INFILESIZE, filesize( $data ) );
455
+ $job_object = BackWPup_Job::getInstance();
456
+ curl_setopt( $curl, CURLOPT_READFUNCTION, array( $job_object, 'curl_read_callback' ) );
457
+ }
458
+ else {
459
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Is not a readable file:' . $data );
460
+ }
461
+ }
462
+ elseif ( $method == 'DELETE' ) {
463
+ curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, 'DELETE' );
464
+ }
465
+ else {
466
+ curl_setopt( $curl, CURLOPT_POST, FALSE );
467
+ }
468
+
469
+ // set headers
470
+ curl_setopt( $curl, CURLOPT_HTTPHEADER, $headers );
471
+ curl_setopt( $curl, CURLINFO_HEADER_OUT, TRUE );
472
+ // execute
473
+ $response = curl_exec( $curl );
474
+ $curlgetinfo = curl_getinfo( $curl );
475
+
476
+ // fetch curl errors
477
+ if ( curl_errno( $curl ) != 0 )
478
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'cUrl Error: ' . curl_error( $curl ) );
479
+ curl_close( $curl );
480
+ if ( ! empty( $datafilefd ) && is_resource( $datafilefd ) )
481
+ fclose( $datafilefd );
482
+
483
+ if ( $curlgetinfo[ 'http_code' ] >= 200 && $curlgetinfo[ 'http_code' ] < 300 ) {
484
+ if ( FALSE !== stripos( $curlgetinfo[ 'content_type' ], 'xml' ) && ! empty( $response ) )
485
+ return simplexml_load_string( $response );
486
+ else
487
+ return $response;
488
+ }
489
+ else {
490
+ if ( $curlgetinfo[ 'http_code' ] == 401 )
491
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' Authorization required.' );
492
+ elseif ( $curlgetinfo[ 'http_code' ] == 403 )
493
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' (Forbidden) Authentication failed.' );
494
+ elseif ( $curlgetinfo[ 'http_code' ] == 404 )
495
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' Not found' );
496
+ else
497
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] );
498
+ }
499
+ }
500
+
501
+
502
+ /**
503
+ * @return string
504
+ * @throws BackWPup_Destination_SugarSync_API_Exception
505
+ */
506
+ private function get_Access_Token() {
507
+
508
+ $auth = '<?xml version="1.0" encoding="UTF-8" ?>';
509
+ $auth .= '<tokenAuthRequest>';
510
+ $auth .= '<accessKeyId>' . BackWPup_Option::get( 'cfg', 'sugarsynckey' ) . '</accessKeyId>';
511
+ $auth .= '<privateAccessKey>' . BackWPup_Option::get( 'cfg', 'sugarsyncsecret' ) . '</privateAccessKey>';
512
+ $auth .= '<refreshToken>' . trim( $this->refresh_token ) . '</refreshToken>';
513
+ $auth .= '</tokenAuthRequest>';
514
+ // init
515
+ $curl = curl_init();
516
+ //set options
517
+ curl_setopt( $curl, CURLOPT_URL, self::API_URL . '/authorization' );
518
+ curl_setopt( $curl, CURLOPT_USERAGENT, BackWPup::get_plugin_data( 'User-Agent' ) );
519
+ if ( ini_get( 'open_basedir' ) == '' ) curl_setopt( $curl, CURLOPT_FOLLOWLOCATION, TRUE );
520
+ curl_setopt( $curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
521
+ curl_setopt( $curl, CURLOPT_RETURNTRANSFER, TRUE );
522
+ curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, TRUE );
523
+ curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, 2 );
524
+ curl_setopt( $curl, CURLOPT_SSLVERSION, 3 );
525
+ if ( is_file( BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' ) )
526
+ curl_setopt( $curl, CURLOPT_CAINFO, BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' );
527
+ curl_setopt( $curl, CURLOPT_HEADER, TRUE );
528
+ curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/xml; charset=UTF-8', 'Content-Length: ' . strlen( $auth ) ) );
529
+ curl_setopt( $curl, CURLOPT_POSTFIELDS, $auth );
530
+ curl_setopt( $curl, CURLOPT_POST, TRUE );
531
+ // execute
532
+ $response = curl_exec( $curl );
533
+ $curlgetinfo = curl_getinfo( $curl );
534
+ // fetch curl errors
535
+ if ( curl_errno( $curl ) != 0 )
536
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'cUrl Error: ' . curl_error( $curl ) );
537
+
538
+ curl_close( $curl );
539
+
540
+ if ( $curlgetinfo[ 'http_code' ] >= 200 && $curlgetinfo[ 'http_code' ] < 300 ) {
541
+ if ( preg_match( '/Location:(.*?)\r/i', $response, $matches ) )
542
+ $this->access_token = trim( $matches[ 1 ] );
543
+
544
+ return $this->access_token;
545
+ }
546
+ else {
547
+ if ( $curlgetinfo[ 'http_code' ] == 401 )
548
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' Authorization required.' );
549
+ elseif ( $curlgetinfo[ 'http_code' ] == 403 )
550
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' (Forbidden) Authentication failed.' );
551
+ elseif ( $curlgetinfo[ 'http_code' ] == 404 )
552
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' Not found' );
553
+ else
554
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] );
555
+ }
556
+ }
557
+
558
+ /**
559
+ * @param $email
560
+ * @param $password
561
+ * @return null|string
562
+ * @throws BackWPup_Destination_SugarSync_API_Exception
563
+ */
564
+ public function get_Refresh_Token( $email, $password ) {
565
+
566
+ $auth = '<?xml version="1.0" encoding="UTF-8" ?>';
567
+ $auth .= '<appAuthorization>';
568
+ $auth .= '<username>' . mb_convert_encoding( $email, 'UTF-8', $this->encoding ) . '</username>';
569
+ $auth .= '<password>' . mb_convert_encoding( $password, 'UTF-8', $this->encoding ) . '</password>';
570
+ $auth .= '<application>' . BackWPup_Option::get( 'cfg', 'sugarsyncappid' ) . '</application>';
571
+ $auth .= '<accessKeyId>' . BackWPup_Option::get( 'cfg', 'sugarsynckey' ) . '</accessKeyId>';
572
+ $auth .= '<privateAccessKey>' . BackWPup_Option::get( 'cfg', 'sugarsyncsecret' ) . '</privateAccessKey>';
573
+ $auth .= '</appAuthorization>';
574
+ // init
575
+ $curl = curl_init();
576
+ //set options
577
+ curl_setopt( $curl, CURLOPT_URL, self::API_URL . '/app-authorization' );
578
+ curl_setopt( $curl, CURLOPT_USERAGENT, BackWPup::get_plugin_data( 'User-Agent' ) );
579
+ if ( ini_get( 'open_basedir' ) == '' ) curl_setopt( $curl, CURLOPT_FOLLOWLOCATION, TRUE );
580
+ curl_setopt( $curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
581
+ curl_setopt( $curl, CURLOPT_RETURNTRANSFER, TRUE );
582
+ curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, TRUE );
583
+ curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, 2 );
584
+ curl_setopt( $curl, CURLOPT_SSLVERSION, 3 );
585
+ if ( is_file( BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' ) )
586
+ curl_setopt( $curl, CURLOPT_CAINFO, BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' );
587
+ curl_setopt( $curl, CURLOPT_HEADER, TRUE );
588
+ curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/xml; charset=UTF-8', 'Content-Length: ' . strlen( $auth ) ) );
589
+ curl_setopt( $curl, CURLOPT_POSTFIELDS, $auth );
590
+ curl_setopt( $curl, CURLOPT_POST, TRUE );
591
+ // execute
592
+ $response = curl_exec( $curl );
593
+ $curlgetinfo = curl_getinfo( $curl );
594
+ // fetch curl errors
595
+ if ( curl_errno( $curl ) != 0 )
596
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'cUrl Error: ' . curl_error( $curl ) );
597
+
598
+ curl_close( $curl );
599
+
600
+ if ( $curlgetinfo[ 'http_code' ] >= 200 && $curlgetinfo[ 'http_code' ] < 300 ) {
601
+ if ( preg_match( '/Location:(.*?)\r/i', $response, $matches ) )
602
+ $this->refresh_token = trim( $matches[ 1 ] );
603
+
604
+ return $this->refresh_token;
605
+ }
606
+ else {
607
+ if ( $curlgetinfo[ 'http_code' ] == 401 )
608
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' Authorization required.' );
609
+ elseif ( $curlgetinfo[ 'http_code' ] == 403 )
610
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' (Forbidden) Authentication failed.' );
611
+ elseif ( $curlgetinfo[ 'http_code' ] == 404 )
612
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' Not found' );
613
+ else
614
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] );
615
+ }
616
+ }
617
+
618
+ /**
619
+ * @param $email
620
+ * @param $password
621
+ * @throws BackWPup_Destination_SugarSync_API_Exception
622
+ */
623
+ public function create_account( $email, $password ) {
624
+
625
+ $auth = '<?xml version="1.0" encoding="UTF-8" ?>';
626
+ $auth .= '<user>';
627
+ $auth .= '<email>' . mb_convert_encoding( $email, 'UTF-8', $this->encoding ) . '</email>';
628
+ $auth .= '<password>' . mb_convert_encoding( $password, 'UTF-8', $this->encoding ) . '</password>';
629
+ $auth .= '<accessKeyId>' . BackWPup_Option::get( 'cfg', 'sugarsynckey' ) . '</accessKeyId>';
630
+ $auth .= '<privateAccessKey>' . BackWPup_Option::get( 'cfg', 'sugarsyncsecret' ) . '</privateAccessKey>';
631
+ $auth .= '</user>';
632
+ // init
633
+ $curl = curl_init();
634
+ //set options
635
+ curl_setopt( $curl, CURLOPT_URL, 'https://provisioning-api.sugarsync.com/users' );
636
+ curl_setopt( $curl, CURLOPT_USERAGENT, BackWPup::get_plugin_data( 'User-Agent' ) );
637
+ if ( ini_get( 'open_basedir' ) == '' ) curl_setopt( $curl, CURLOPT_FOLLOWLOCATION, TRUE );
638
+ curl_setopt( $curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
639
+ curl_setopt( $curl, CURLOPT_RETURNTRANSFER, TRUE );
640
+ curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, TRUE );
641
+ curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, 2 );
642
+ curl_setopt( $curl, CURLOPT_SSLVERSION, 3 );
643
+ if ( is_file( BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' ) )
644
+ curl_setopt( $curl, CURLOPT_CAINFO, BackWPup::get_plugin_data( 'plugindir' ) . '/inc/cacert.pem' );
645
+ curl_setopt( $curl, CURLOPT_HEADER, TRUE );
646
+ curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/xml; charset=UTF-8', 'Content-Length: ' . strlen( $auth ) ) );
647
+ curl_setopt( $curl, CURLOPT_POSTFIELDS, $auth );
648
+ curl_setopt( $curl, CURLOPT_POST, TRUE );
649
+ // execute
650
+ $response = curl_exec( $curl );
651
+ $curlgetinfo = curl_getinfo( $curl );
652
+ // fetch curl errors
653
+ if ( curl_errno( $curl ) != 0 )
654
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'cUrl Error: ' . curl_error( $curl ) );
655
+
656
+ curl_close( $curl );
657
+
658
+ if ( $curlgetinfo[ 'http_code' ] == 201 ) {
659
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Account created.' );
660
+ }
661
+ else {
662
+ if ( $curlgetinfo[ 'http_code' ] == 400 )
663
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' ' . substr( $response, $curlgetinfo[ 'header_size' ] ) );
664
+ elseif ( $curlgetinfo[ 'http_code' ] == 401 )
665
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' Developer credentials cannot be verified. Either a developer with the specified accessKeyId does not exist or the privateKeyID does not match an assigned accessKeyId.' );
666
+ elseif ( $curlgetinfo[ 'http_code' ] == 403 )
667
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' ' . substr( $response, $curlgetinfo[ 'header_size' ] ) );
668
+ elseif ( $curlgetinfo[ 'http_code' ] == 503 )
669
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] . ' ' . substr( $response, $curlgetinfo[ 'header_size' ] ) );
670
+ else
671
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'Http Error: ' . $curlgetinfo[ 'http_code' ] );
672
+ }
673
+ }
674
+
675
+ /**
676
+ * @param $folder
677
+ * @param string $root
678
+ * @return string
679
+ * @throws BackWPup_Destination_SugarSync_API_Exception
680
+ */
681
+ public function chdir( $folder, $root = '' ) {
682
+
683
+ $folder = rtrim( $folder, '/' );
684
+ if ( substr( $folder, 0, 1 ) == '/' || empty( $this->folder ) ) {
685
+ if ( ! empty( $root ) )
686
+ $this->folder = $root;
687
+ else
688
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'chdir: root folder must set!' );
689
+ }
690
+ $folders = explode( '/', $folder );
691
+ foreach ( $folders as $dir ) {
692
+ if ( $dir == '..' ) {
693
+ $contents = $this->doCall( $this->folder );
694
+ if ( ! empty( $contents->parent ) )
695
+ $this->folder = $contents->parent;
696
+ }
697
+ elseif ( ! empty( $dir ) && $dir != '.' ) {
698
+ $isdir = FALSE;
699
+ $contents = $this->getcontents( 'folder' );
700
+ foreach ( $contents->collection as $collection ) {
701
+ if ( strtolower( $collection->displayName ) == strtolower( $dir ) ) {
702
+ $isdir = TRUE;
703
+ $this->folder = $collection->ref;
704
+ break;
705
+ }
706
+ }
707
+ if ( ! $isdir )
708
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'chdir: Folder ' . $folder . ' not exitst' );
709
+ }
710
+ }
711
+
712
+ return $this->folder;
713
+ }
714
+
715
+ /**
716
+ * @param $folderid
717
+ * @return string
718
+ */
719
+ public function showdir( $folderid ) {
720
+
721
+ $showfolder = '';
722
+ while ( $folderid ) {
723
+ $contents = $this->doCall( $folderid );
724
+ $showfolder = $contents->displayName . '/' . $showfolder;
725
+ if ( isset( $contents->parent ) )
726
+ $folderid = $contents->parent;
727
+ else
728
+ break;
729
+ }
730
+
731
+ return $showfolder;
732
+ }
733
+
734
+ /**
735
+ * @param $folder
736
+ * @param string $root
737
+ * @return bool
738
+ * @throws BackWPup_Destination_SugarSync_API_Exception
739
+ */
740
+ public function mkdir( $folder, $root = '' ) {
741
+
742
+ $savefolder = $this->folder;
743
+ $folder = rtrim( $folder, '/' );
744
+ if ( substr( $folder, 0, 1 ) == '/' || empty( $this->folder ) ) {
745
+ if ( ! empty( $root ) )
746
+ $this->folder = $root;
747
+ else
748
+ throw new BackWPup_Destination_SugarSync_API_Exception( 'mkdir: root folder must set!' );
749
+ }
750
+ $folders = explode( '/', $folder );
751
+ foreach ( $folders as $dir ) {
752
+ if ( $dir == '..' ) {
753
+ $contents = $this->doCall( $this->folder );
754
+ if ( ! empty( $contents->parent ) )
755
+ $this->folder = $contents->parent;
756
+ }
757
+ elseif ( ! empty( $dir ) && $dir != '.' ) {
758
+ $isdir = FALSE;
759
+ $contents = $this->getcontents( 'folder' );
760
+ foreach ( $contents->collection as $collection ) {
761
+ if ( strtolower( $collection->displayName ) == strtolower( $dir ) ) {
762
+ $isdir = TRUE;
763
+ $this->folder = $collection->ref;
764
+ break;
765
+ }
766
+ }
767
+ if ( ! $isdir ) {
768
+ $request = $this->doCall( $this->folder, '<?xml version="1.0" encoding="UTF-8"?><folder><displayName>' . mb_convert_encoding( $dir, 'UTF-8', $this->encoding ) . '</displayName></folder>', 'POST' );
769
+ $contents = $this->getcontents( 'folder' );
770
+ foreach ( $contents->collection as $collection ) {
771
+ if ( strtolower( $collection->displayName ) == strtolower( $dir ) ) {
772
+ $isdir = TRUE;
773
+ $this->folder = $collection->ref;
774
+ break;
775
+ }
776
+ }
777
+ }
778
+ }
779
+ }
780
+ $this->folder = $savefolder;
781
+
782
+ return TRUE;
783
+ }
784
+
785
+
786
+ /**
787
+ * @return string
788
+ */
789
+ public function user() {
790
+ return $this->doCall( self::API_URL . '/user' );
791
+ }
792
+
793
+
794
+ /**
795
+ * @param $url
796
+ * @return string
797
+ */
798
+ public function get( $url ) {
799
+ return $this->doCall( $url, '', 'GET' );
800
+ }
801
+
802
+ /**
803
+ * @param $url
804
+ * @return string
805
+ */
806
+ public function download( $url ) {
807
+ return $this->doCall( $url . '/data' );
808
+ }
809
+
810
+ /**
811
+ * @param $url
812
+ * @return string
813
+ */
814
+ public function delete( $url ) {
815
+ return $this->doCall( $url, '', 'DELETE' );
816
+ }
817
+
818
+
819
+ /**
820
+ * @param string $type
821
+ * @param int $start
822
+ * @param int $max
823
+ * @return string
824
+ */
825
+ public function getcontents( $type = '', $start = 0, $max = 500 ) {
826
+
827
+ $parameters = '';
828
+
829
+ if ( strtolower( $type ) == 'folder' || strtolower( $type ) == 'file' )
830
+ $parameters .= 'type=' . strtolower( $type );
831
+ if ( ! empty( $start ) && is_integer( $start ) ) {
832
+ if ( ! empty( $parameters ) )
833
+ $parameters .= '&';
834
+ $parameters .= 'start=' . $start;
835
+
836
+ }
837
+ if ( ! empty( $max ) && is_integer( $max ) ) {
838
+ if ( ! empty( $parameters ) )
839
+ $parameters .= '&';
840
+ $parameters .= 'max=' . $max;
841
+ }
842
+
843
+ $request = $this->doCall( $this->folder . '/contents?' . $parameters );
844
+
845
+ return $request;
846
+ }
847
+
848
+ /**
849
+ * @param $file
850
+ * @param string $name
851
+ * @return mixed
852
+ */
853
+ public function upload( $file, $name = '' ) {
854
+
855
+ if ( empty( $name ) )
856
+ $name = basename( $file );
857
+
858
+ $xmlrequest = '<?xml version="1.0" encoding="UTF-8"?>';
859
+ $xmlrequest .= '<file>';
860
+ $xmlrequest .= '<displayName>' . mb_convert_encoding( $name, 'UTF-8', $this->encoding ) . '</displayName>';
861
+
862
+ if ( ! is_file( $file ) ) {
863
+ $finfo = fopen( $file, 'r' );
864
+ $xmlrequest .= '<mediaType>' . mime_content_type( $finfo ) . '</mediaType>';
865
+ fclose( $finfo );
866
+ }
867
+
868
+ $xmlrequest .= '</file>';
869
+
870
+ $request = $this->doCall( $this->folder, $xmlrequest, 'POST' );
871
+ $getfiles = $this->getcontents( 'file' );
872
+ foreach ( $getfiles->file as $getfile ) {
873
+ if ( $getfile->displayName == $name ) {
874
+ $this->doCall( $getfile->ref . '/data', $file, 'PUT' );
875
+
876
+ return $getfile->ref;
877
+ }
878
+ }
879
+ }
880
+ }
881
+
882
+ /**
883
+ * SugarSync Exception class
884
+ *
885
+ * @author Daniel Hüsken <daniel@huesken-net.de>
886
+ */
887
+ class BackWPup_Destination_SugarSync_API_Exception extends Exception {
888
+
889
+ }
inc/class-destinations.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Base class for adding BackWPup destinations.
4
+ *
5
+ * @package BackWPup
6
+ * @subpackage BackWPup_Destinations
7
+ * @since 3.0.0
8
+ * @access private
9
+ */
10
+ abstract class BackWPup_Destinations {
11
+
12
+ public $info = array();
13
+
14
+ /**
15
+ *
16
+ */
17
+ abstract public function __construct();
18
+
19
+ /**
20
+ * @return array
21
+ */
22
+ abstract public function option_defaults();
23
+
24
+ /**
25
+ * @param $jobid
26
+ */
27
+ abstract public function edit_tab( $jobid );
28
+
29
+ /**
30
+ * @param $jobid
31
+ */
32
+ public function edit_auth( $jobid ) {
33
+
34
+ }
35
+
36
+ /**
37
+ * @param $jobid
38
+ */
39
+ abstract public function edit_form_post_save( $jobid );
40
+
41
+ /**
42
+ * use wp_enqueue_script() here to load js for tab
43
+ */
44
+ public function admin_print_scripts() {
45
+
46
+ }
47
+
48
+ /**
49
+ *
50
+ */
51
+ public function edit_inline_js() {
52
+
53
+ }
54
+
55
+ /**
56
+ *
57
+ */
58
+ public function edit_ajax() {
59
+
60
+ }
61
+
62
+ /**
63
+ *
64
+ */
65
+ public function wizard_admin_print_styles() {
66
+
67
+ }
68
+
69
+ /**
70
+ *
71
+ */
72
+ public function wizard_admin_print_scripts() {
73
+
74
+ }
75
+
76
+ /**
77
+ *
78
+ */
79
+ public function wizard_inline_js() {
80
+
81
+ }
82
+
83
+ /**
84
+ * @param $job_settings
85
+ */
86
+ public function wizard_page( $job_settings ) {
87
+
88
+ echo '<br /><pre>';
89
+ print_r( $job_settings );
90
+ echo '</pre>';
91
+ }
92
+
93
+ /**
94
+ * @param $job_settings
95
+ */
96
+ public function wizard_save( $job_settings ) {
97
+
98
+ return $job_settings;
99
+ }
100
+
101
+ /**
102
+ *
103
+ */
104
+ public function admin_print_styles() {
105
+
106
+ }
107
+
108
+ /**
109
+ * @param $jobdest
110
+ * @param $backupfile
111
+ */
112
+ public function file_delete( $jobdest, $backupfile ) {
113
+
114
+ }
115
+
116
+ /**
117
+ * @param $jobid
118
+ * @param $get_file
119
+ */
120
+ public function file_download( $jobid, $get_file ) {
121
+
122
+ }
123
+
124
+ /**
125
+ * @param $jobdest
126
+ * @return bool
127
+ */
128
+ public function file_get_list( $jobdest ) {
129
+
130
+ return FALSE;
131
+ }
132
+
133
+ /**
134
+ * @param $job_object BackWPup_Job Object
135
+ */
136
+ abstract public function job_run_archive( $job_object );
137
+
138
+ /**
139
+ * @param $job_object BackWPup_Job Object
140
+ */
141
+ public function job_run_sync( $job_object ) {
142
+
143
+ }
144
+
145
+ /**
146
+ * @return bool
147
+ */
148
+ public function can_sync() {
149
+
150
+ return FALSE;
151
+ }
152
+
153
+ /**
154
+ * @param $job_object BackWPup_Job Object
155
+ * @return bool
156
+ */
157
+ abstract public function can_run( $job_object );
158
+ }
inc/class-encryption.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_Encryption {
6
+
7
+ /**
8
+ *
9
+ * Encrypt a string (Passwords)
10
+ *
11
+ * @param string $string value to encrypt
12
+ *
13
+ * @return string encrypted string
14
+ */
15
+ public static function encrypt( $string ) {
16
+
17
+ if ( empty( $string ) )
18
+ return $string;
19
+
20
+ //only encrypt if needed
21
+ if ( strpos( $string, '$BackWPup$ENC1$' ) !== FALSE or strpos( $string, '$BackWPup$RIJNDAEL$' ) !== FALSE )
22
+ return $string;
23
+
24
+ $key = md5( DB_NAME . DB_USER . DB_PASSWORD );
25
+
26
+ if ( ! function_exists( 'mcrypt_encrypt' ) ) {
27
+ $result = '';
28
+ for ( $i = 0; $i < strlen( $string ); $i ++ ) {
29
+ $char = substr( $string, $i, 1 );
30
+ $keychar = substr( $key, ( $i % strlen( $key ) ) - 1, 1 );
31
+ $char = chr( ord( $char ) + ord( $keychar ) );
32
+ $result .= $char;
33
+ }
34
+
35
+ return '$BackWPup$ENC1$' . base64_encode( $result );
36
+ }
37
+
38
+ return '$BackWPup$RIJNDAEL$' . base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $key ), $string, MCRYPT_MODE_CBC, md5( md5( $key ) ) ) );
39
+ }
40
+
41
+ /**
42
+ *
43
+ * Decrypt a string (Passwords)
44
+ *
45
+ * @param string $string value to decrypt
46
+ *
47
+ * @return string decrypted string
48
+ */
49
+ public static function decrypt( $string ) {
50
+
51
+ if ( empty( $string ) )
52
+ return $string;
53
+
54
+ $key = md5( DB_NAME . DB_USER . DB_PASSWORD );
55
+
56
+ if ( strpos( $string, '$BackWPup$ENC1$' ) !== FALSE ) {
57
+ $string = str_replace( '$BackWPup$ENC1$', '', $string );
58
+ $result = '';
59
+ $string = base64_decode( $string );
60
+ for ( $i = 0; $i < strlen( $string ); $i ++ ) {
61
+ $char = substr( $string, $i, 1 );
62
+ $keychar = substr( $key, ( $i % strlen( $key ) ) - 1, 1 );
63
+ $char = chr( ord( $char ) - ord( $keychar ) );
64
+ $result .= $char;
65
+ }
66
+
67
+ return $result;
68
+ }
69
+
70
+ if ( strpos( $string, '$BackWPup$RIJNDAEL$' ) !== FALSE ) {
71
+ $string = str_replace( '$BackWPup$RIJNDAEL$', '', $string );
72
+
73
+ return rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5( $key ), base64_decode( $string ), MCRYPT_MODE_CBC, md5( md5( $key ) ) ), "\0" );
74
+ }
75
+
76
+ return $string;
77
+ }
78
+ }
inc/class-file.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for methods for file/folder related things
4
+ */
5
+ class BackWPup_File {
6
+
7
+ /**
8
+ *
9
+ * Get the folder for blog uploads
10
+ *
11
+ * @return string
12
+ */
13
+ public static function get_upload_dir() {
14
+
15
+ if ( is_multisite() ) {
16
+ if ( defined( 'UPLOADBLOGSDIR' ) )
17
+ return trailingslashit( str_replace( '\\', '/',ABSPATH . UPLOADBLOGSDIR ) );
18
+ else
19
+ return trailingslashit( str_replace( '\\', '/',ABSPATH . UPLOADS ) );
20
+ } else {
21
+ $upload_dir = wp_upload_dir();
22
+ return trailingslashit( str_replace( '\\', '/',$upload_dir[ 'basedir' ] ) );
23
+ }
24
+
25
+ }
26
+
27
+ /**
28
+ *
29
+ * check if path in open basedir
30
+ *
31
+ * @param string $dir the folder to check
32
+ *
33
+ * @return bool is it in open basedir
34
+ */
35
+ public static function is_in_open_basedir( $dir ) {
36
+
37
+ $ini_open_basedir = str_replace( '\\', '/',ini_get( 'open_basedir' ) );
38
+
39
+ if ( empty( $ini_open_basedir ) )
40
+ return TRUE;
41
+
42
+ $open_base_dirs = explode( PATH_SEPARATOR, $ini_open_basedir );
43
+ $dir = trailingslashit( str_replace( '\\', '/', $dir ) );
44
+
45
+ foreach ( $open_base_dirs as $open_base_dir ) {
46
+ if ( stripos( $dir, trailingslashit( $open_base_dir ) <= 1 ) )
47
+ return TRUE;
48
+ }
49
+
50
+ return FALSE;
51
+ }
52
+
53
+ /**
54
+ *
55
+ * get size of files in folder
56
+ *
57
+ * @param string $folder the folder to calculate
58
+ * @param bool $deep went thrue suborders
59
+ * @return int folder size in byte
60
+ */
61
+ public static function get_folder_size( $folder, $deep = TRUE ) {
62
+
63
+ $files_size = 0;
64
+
65
+ $folder_content = scandir( $folder );
66
+ foreach( $folder_content as $file ) {
67
+ if ( in_array( $file, array( '.', '..' ) ) )
68
+ continue;
69
+ if ( is_file( $folder . '/' . $file ) )
70
+ $files_size = $files_size + @filesize( $folder . '/' . $file );
71
+ if ( $deep && is_dir( $folder . '/' . $file ) )
72
+ $files_size = $files_size + self::get_folder_size( $folder . '/' . $file, TRUE );
73
+ }
74
+
75
+ return $files_size;
76
+ }
77
+ }
inc/class-frontend.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_FrontEnd {
6
+
7
+ private static $instance = NULL;
8
+
9
+ /**
10
+ *
11
+ * @return \BackWPup_FrontEnd
12
+ */
13
+ private function __construct() {
14
+
15
+ //add for job start/run with url
16
+ add_filter( 'query_vars', array( $this, 'add_start_job_query_vars' ) );
17
+ add_action( 'request', array( $this, 'request' ), 0 );
18
+ }
19
+
20
+ /**
21
+ * @static
22
+ * @return \BackWPup_FrontEnd
23
+ */
24
+ public static function getInstance() {
25
+
26
+ if (NULL === self::$instance) {
27
+ self::$instance = new self;
28
+ }
29
+ return self::$instance;
30
+ }
31
+
32
+ /**
33
+ * Add Query var for job start
34
+ */
35
+ public function add_start_job_query_vars($vars) {
36
+
37
+ $vars[] = 'backwpup_run';
38
+
39
+ return $vars;
40
+ }
41
+
42
+ /**
43
+ * Start job if run query's.
44
+ */
45
+ public function request( $query_vars ) {
46
+
47
+ //only work if backwpup_run as query var ist set and nothing else and the value ist right
48
+ if ( empty( $query_vars[ 'backwpup_run' ] ) || count( $query_vars ) != 1 || ! in_array( $query_vars[ 'backwpup_run' ], array( 'test','restart', 'runnow', 'runnowalt', 'runext', 'cronrun' ) ) )
49
+ return $query_vars;
50
+
51
+ // generate normal nonce
52
+ $nonce = substr( wp_hash( wp_nonce_tick() . 'backwup_job_run-' . $query_vars[ 'backwpup_run' ], 'nonce' ), - 12, 10 );
53
+ //special nonce on external start
54
+ if ( $query_vars[ 'backwpup_run' ] == 'runext' )
55
+ $nonce = BackWPup_Option::get( 'cfg', 'jobrunauthkey' );
56
+ // check nonce
57
+ if ( empty( $_GET['_nonce'] ) || $nonce != $_GET['_nonce'] )
58
+ return $query_vars;
59
+
60
+ //response on test
61
+ if ( $query_vars[ 'backwpup_run' ] == 'test') {
62
+ @header( 'Content-Type: text/html; charset=' . get_bloginfo( 'charset' ) );
63
+ @header( 'X-Robots-Tag: noindex, nofollow' );
64
+ send_nosniff_header();
65
+ nocache_headers();
66
+ die( 'Response Test O.K.' );
67
+ }
68
+
69
+ //check runext is allowed for job
70
+ if ( $query_vars[ 'backwpup_run' ] == 'runext' ) {
71
+ $jobids_external = BackWPup_Option::get_job_ids( 'activetype', 'link' );
72
+ if ( !isset( $_GET[ 'jobid' ] ) || ! in_array( $_GET[ 'jobid' ], $jobids_external ) )
73
+ return $query_vars;
74
+ }
75
+
76
+ //run BackWPup job
77
+ BackWPup_Job::start_http( $query_vars[ 'backwpup_run' ] );
78
+ die();
79
+ }
80
+
81
+ }
inc/class-help.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_Help {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public static function help() {
11
+
12
+ if ( method_exists( get_current_screen(), 'add_help_tab' ) ) {
13
+ get_current_screen()->add_help_tab( array(
14
+ 'id' => 'plugininfo',
15
+ 'title' => __( 'Plugin Info', 'backwpup' ),
16
+ 'content' =>
17
+ '<p> '.sprintf( _x( '%1$s version %2$s. A project of <a href="http://inpsyde.com">Inpsyde GmbH</a>. Developed by <a href="http://danielhuesken.de">Daniel Hüsken</a>.','Plugin name and link; Plugin Version','backwpup' ), '<a href="' . translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' ) . '">' . BackWPup::get_plugin_data( 'Name' ) . '</a>' , BackWPup::get_plugin_data( 'Version' ) ) . '</p>'
18
+ . '<p>' . __( 'BackWPup comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.', 'backwpup' ) . '</p>'
19
+ ) );
20
+
21
+ $text_help_sidebar = '<p><strong>' . __( 'For more information:', 'backwpup' ) . '</strong></p>';
22
+ $text_help_sidebar .= '<p><a href="' . translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' ) . '">' . BackWPup::get_plugin_data( 'Name' ) . '</a></p>';
23
+ $text_help_sidebar .= '<p><a href="http://wordpress.org/extend/plugins/backwpup/">' . __( 'Plugin on wordpress.org', 'backwpup' ) . '</a></p>';
24
+ $text_help_sidebar .= '<p><a href="' . __( 'https://marketpress.com/news/', 'backwpup' ) . '">' . __( 'News', 'backwpup' ) . '</a></p>';
25
+ if ( class_exists( 'BackWPup_Features', FALSE ) )
26
+ $text_help_sidebar .= '<p><a href="' . __( 'https://marketpress.com/support/forum/plugins/backwpup-pro/', 'backwpup' ) . '">' . __( 'Pro Support', 'backwpup' ) . '</a></p>';
27
+ else
28
+ $text_help_sidebar .= '<p><a href="' . __( 'http://wordpress.org/support/plugin/backwpup/', 'backwpup' ) . '">' . __( 'Support', 'backwpup' ) . '</a></p>';
29
+ $text_help_sidebar .= '<p><a href="' . __( 'https://marketpress.com/documentation/backwpup-pro/', 'backwpup' ) . '">' . __( 'Manual', 'backwpup' ) . '</a></p>';
30
+
31
+ get_current_screen()->set_help_sidebar( $text_help_sidebar );
32
+ }
33
+
34
+ }
35
+
36
+ /**
37
+ * @static
38
+ *
39
+ * @param array $tab
40
+ */
41
+ public static function add_tab( $tab = array() ) {
42
+
43
+ if ( method_exists( get_current_screen(), 'add_help_tab' ) )
44
+ get_current_screen()->add_help_tab( $tab );
45
+
46
+ }
47
+
48
+ /**
49
+ * @param $text
50
+ * @param bool $echo
51
+ * @return string
52
+ */
53
+ public static function tip( $text, $echo = TRUE ) {
54
+
55
+ if ( ! $echo )
56
+ return '<img class="help_tip" title="' . esc_attr( $text ) . '" src="' . BackWPup::get_plugin_data( 'URL' ) . '/images/help.png" />';
57
+
58
+ echo '<img class="help_tip" title="' . esc_attr( $text ) . '" src="' . BackWPup::get_plugin_data( 'URL' ) . '/images/help.png" />';
59
+ }
60
+ }
inc/class-install.php ADDED
@@ -0,0 +1,303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for upgrade / deactivation / uninstall
4
+ */
5
+ class BackWPup_Install {
6
+
7
+ /**
8
+ * Creates DB und updates settings
9
+ */
10
+ public static function activate() {
11
+
12
+ //do upgrade from version 2.x
13
+ if ( ! get_site_option( 'backwpup_version' ) && get_option( 'backwpup' ) && get_option( 'backwpup_jobs' ) )
14
+ self::upgrade_from_version_two();
15
+
16
+ //create new option on not ms blogs
17
+ if ( ! is_multisite() && ! get_option( 'backwpup_jobs', FALSE ) )
18
+ add_option( 'backwpup_jobs', array( ), NULL, 'no');
19
+
20
+ //remove old schedule
21
+ wp_clear_scheduled_hook( 'backwpup_cron' );
22
+ //make new schedule
23
+ $activejobs = BackWPup_Option::get_job_ids( 'activetype', 'wpcron' );
24
+ if ( ! empty( $activejobs ) ) {
25
+ foreach ( $activejobs as $id ) {
26
+ $cronnxet = BackWPup_Option::get( $id, 'cronnextrun' );
27
+ wp_schedule_single_event( $cronnxet, 'backwpup_cron', array( 'id' => $id ) );
28
+ }
29
+ }
30
+
31
+ //add check Cleanup schedule
32
+ wp_clear_scheduled_hook( 'backwpup_check_cleanup' );
33
+ wp_schedule_event( time(), 'twicedaily', 'backwpup_check_cleanup' );
34
+
35
+ //add user role
36
+ $role = get_role( 'administrator' );
37
+ $role->add_cap( 'backwpup' ); // BackWPup general accesses (like Dashboard)
38
+ $role->add_cap( 'backwpup_jobs' ); // accesses for job page
39
+ $role->add_cap( 'backwpup_jobs_edit' ); // user can edit/delete/copy/export jobs
40
+ $role->add_cap( 'backwpup_jobs_start' ); // user can start jobs
41
+ $role->add_cap( 'backwpup_backups' ); // accesses for backups page
42
+ $role->add_cap( 'backwpup_backups_download' ); // user can download backup files
43
+ $role->add_cap( 'backwpup_backups_delete' ); // user can delete backup files
44
+ $role->add_cap( 'backwpup_logs' ); // accesses for logs page
45
+ $role->add_cap( 'backwpup_logs_delete' ); // user can delete log files
46
+ $role->add_cap( 'backwpup_settings' ); // accesses for settings page
47
+
48
+ add_role( 'backwpup_admin', __( 'BackWPup Admin', 'backwpup' ), array(
49
+ 'backwpup' => TRUE,
50
+ 'backwpup_jobs' => TRUE,
51
+ 'backwpup_jobs_edit' => TRUE,
52
+ 'backwpup_jobs_start' => TRUE,
53
+ 'backwpup_backups' => TRUE,
54
+ 'backwpup_backups_download' => TRUE,
55
+ 'backwpup_backups_delete' => TRUE,
56
+ 'backwpup_logs' => TRUE,
57
+ 'backwpup_logs_delete' => TRUE,
58
+ 'backwpup_settings' => TRUE,
59
+ ) );
60
+
61
+ add_role( 'backwpup_check', __( 'BackWPup jobs checker', 'backwpup' ), array(
62
+ 'backwpup' => TRUE,
63
+ 'backwpup_jobs' => TRUE,
64
+ 'backwpup_jobs_edit' => FALSE,
65
+ 'backwpup_jobs_start' => FALSE,
66
+ 'backwpup_backups' => TRUE,
67
+ 'backwpup_backups_download' => FALSE,
68
+ 'backwpup_backups_delete' => FALSE,
69
+ 'backwpup_logs' => TRUE,
70
+ 'backwpup_logs_delete' => FALSE,
71
+ 'backwpup_settings' => FALSE,
72
+ ) );
73
+
74
+ add_role( 'backwpup_helper', __( 'BackWPup jobs helper', 'backwpup' ), array(
75
+ 'backwpup' => TRUE,
76
+ 'backwpup_jobs' => TRUE,
77
+ 'backwpup_jobs_edit' => FALSE,
78
+ 'backwpup_jobs_start' => TRUE,
79
+ 'backwpup_backups' => TRUE,
80
+ 'backwpup_backups_download' => TRUE,
81
+ 'backwpup_backups_delete' => TRUE,
82
+ 'backwpup_logs' => TRUE,
83
+ 'backwpup_logs_delete' => TRUE,
84
+ 'backwpup_settings' => FALSE,
85
+ ) );
86
+
87
+ //update version
88
+ update_site_option( 'backwpup_version', BackWPup::get_plugin_data( 'Version' ) );
89
+ //show trailing page again
90
+ update_site_option( 'backwpup_about_page', FALSE );
91
+ }
92
+
93
+ /**
94
+ *
95
+ * Cleanup on Plugin deactivation
96
+ *
97
+ * @return void
98
+ */
99
+ public static function deactivate() {
100
+
101
+ wp_clear_scheduled_hook( 'backwpup_cron' );
102
+ $activejobs = BackWPup_Option::get_job_ids( 'activetype', 'wpcron' );
103
+ if ( ! empty( $activejobs ) ) {
104
+ foreach ( $activejobs as $id ) {
105
+ wp_clear_scheduled_hook( 'backwpup_cron', array( 'id' => $id ) );
106
+ }
107
+ }
108
+ wp_clear_scheduled_hook( 'backwpup_check_cleanup' );
109
+ remove_role( 'backwpup_admin' );
110
+ remove_role( 'backwpup_helper' );
111
+ remove_role( 'backwpup_check' );
112
+ $role = get_role( 'administrator' );
113
+ $role->remove_cap( 'backwpup' );
114
+ $role->remove_cap( 'backwpup_jobs' );
115
+ $role->remove_cap( 'backwpup_jobs_edit' );
116
+ $role->remove_cap( 'backwpup_jobs_start' );
117
+ $role->remove_cap( 'backwpup_backups' );
118
+ $role->remove_cap( 'backwpup_backups_download' );
119
+ $role->remove_cap( 'backwpup_backups_delete' );
120
+ $role->remove_cap( 'backwpup_logs' );
121
+ $role->remove_cap( 'backwpup_logs_delete' );
122
+ $role->remove_cap( 'backwpup_settings' );
123
+ //delete temp folder
124
+ $temp_flies = scandir( BackWPup::get_plugin_data( 'TEMP') );
125
+ foreach ( $temp_flies as $temp_flie ) {
126
+ if ( is_file( BackWPup::get_plugin_data( 'TEMP') . $temp_flie ) )
127
+ unlink( BackWPup::get_plugin_data( 'TEMP') . $temp_flie );
128
+ }
129
+ rmdir( BackWPup::get_plugin_data( 'TEMP') );
130
+ //to reschedule on activation and so on
131
+ update_site_option( 'backwpup_version', BackWPup::get_plugin_data( 'version' ) .'-inactive' );
132
+ }
133
+
134
+
135
+ private static function upgrade_from_version_two() {
136
+
137
+ //load options
138
+ $cfg = get_option( 'backwpup' ); //only exists in Version 2
139
+ $jobs = get_option( 'backwpup_jobs' );
140
+
141
+ //delete old options
142
+ delete_option( 'backwpup' );
143
+ delete_option( 'backwpup_jobs' );
144
+
145
+ //add new option default structure and without auto load cache
146
+ if ( ! is_multisite() )
147
+ add_option( 'backwpup_jobs', array( ), NULL, 'no');
148
+
149
+ //upgrade cfg
150
+ //if old value switch it to new
151
+ if ( ! empty( $cfg[ 'dirlogs' ] ) )
152
+ $cfg[ 'logfolder' ] = $cfg[ 'dirlogs' ];
153
+ if ( ! empty( $cfg[ 'httpauthpassword' ] ) ) {
154
+ if ( preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $cfg[ 'httpauthpassword' ] ) )
155
+ $cfg[ 'httpauthpassword' ] = base64_decode( $cfg[ 'httpauthpassword' ] );
156
+ $cfg[ 'httpauthpassword' ] = BackWPup_Encryption::encrypt( $cfg[ 'httpauthpassword' ] );
157
+ }
158
+ // delete old not needed vars
159
+ unset( $cfg[ 'dirtemp' ], $cfg[ 'dirlogs' ], $cfg[ 'logfilelist' ], $cfg[ 'jobscriptruntime' ], $cfg[ 'jobscriptruntimelong' ], $cfg[ 'last_activate' ], $cfg[ 'disablewpcron' ], $cfg[ 'phpzip' ], $cfg[ 'apicronservice' ], $cfg[ 'mailsndemail' ], $cfg[ 'mailsndname' ], $cfg[ 'mailmethod' ], $cfg[ 'mailsendmail' ], $cfg[ 'mailhost' ], $cfg[ 'mailpass' ], $cfg[ 'mailhostport' ], $cfg[ 'mailsecure' ], $cfg[ 'mailuser' ] );
160
+ //save in options
161
+ foreach ( $cfg as $cfgname => $cfgvalue )
162
+ BackWPup_Option::update( 'cfg', $cfgname, $cfgvalue );
163
+
164
+ //Put old jobs to new if exists
165
+ foreach ( $jobs as $jobid => $jobvalue ) {
166
+ //convert general settings
167
+ if ( empty( $jobvalue[ 'jobid' ] ) )
168
+ $jobvalue[ 'jobid' ] = $jobid;
169
+ if ( empty( $jobvalue[ 'activated' ] ) )
170
+ $jobvalue[ 'activetype' ] = '';
171
+ else
172
+ $jobvalue[ 'activetype' ] = 'wpcron';
173
+ if ( ! isset( $jobvalue[ 'cronselect' ] ) && ! isset( $jobvalue[ 'cron' ] ) )
174
+ $jobvalue[ 'cronselect' ] = 'basic';
175
+ elseif ( ! isset( $jobvalue[ 'cronselect' ] ) && isset( $jobvalue[ 'cron' ] ) )
176
+ $jobvalue[ 'cronselect' ] = 'advanced';
177
+ $jobvalue[ 'backuptype' ] = 'archive';
178
+ $jobvalue[ 'type' ] = explode( '+', $jobvalue[ 'type' ] ); //save as array
179
+ foreach ( $jobvalue[ 'type' ] as $key => $type ) {
180
+ if ( $type == 'DB' )
181
+ $jobvalue[ 'type' ][ $key ] = 'DBDUMP';
182
+ if ( $type == 'OPTIMIZE' )
183
+ $jobvalue[ 'type' ][ $key ] = 'DBOPTIMIZE';
184
+ if ( $type == 'CHECK' )
185
+ $jobvalue[ 'type' ][ $key ] = 'DBCHECK';
186
+ if ( $type == 'MAIL' )
187
+ $jobvalue[ 'type' ][ $key ] = 'EMAIL';
188
+ }
189
+ $jobvalue[ 'archivename' ] = $jobvalue[ 'fileprefix' ] . '%Y-%m-%d_%H-%i-%s';
190
+ $jobvalue[ 'archiveformat' ] = $jobvalue[ 'fileformart' ];
191
+ //convert active destinations
192
+ $jobvalue[ 'destinations' ] = array();
193
+ if ( ! empty( $jobvalue[ 'backupdir' ] ) and $jobvalue[ 'backupdir' ] != '/' )
194
+ $jobvalue[ 'destinations' ][ ] = 'FOLDER';
195
+ if ( ! empty( $jobvalue[ 'mailaddress' ] ) )
196
+ $jobvalue[ 'destinations' ][ ] = 'MAIL';
197
+ if ( ! empty( $jobvalue[ 'ftphost' ] ) and ! empty( $jobvalue[ 'ftpuser' ] ) and ! empty( $jobvalue[ 'ftppass' ] ) )
198
+ $jobvalue[ 'destinations' ][ ] = 'FTP';
199
+ if ( ! empty( $jobvalue[ 'dropetoken' ] ) and ! empty( $jobvalue[ 'dropesecret' ] ) )
200
+ $jobvalue[ 'destinations' ][ ] = 'DROPBOX';
201
+ if ( ! empty( $jobvalue[ 'sugarrefreshtoken' ] ) and ! empty( $jobvalue[ 'sugarroot' ] ) )
202
+ $jobvalue[ 'destinations' ][ ] = 'SUGARSYNC';
203
+ if ( ! empty( $jobvalue[ 'awsAccessKey' ] ) and ! empty( $jobvalue[ 'awsSecretKey' ] ) and ! empty( $jobvalue[ 'awsBucket' ] ) )
204
+ $jobvalue[ 'destinations' ][ ] = 'S3';
205
+ if ( ! empty( $jobvalue[ 'GStorageAccessKey' ] ) and ! empty( $jobvalue[ 'GStorageSecret' ] ) and ! empty( $jobvalue[ 'GStorageBucket' ] ) and !in_array( 'S3', $jobvalue[ 'destinations' ] ) )
206
+ $jobvalue[ 'destinations' ][ ] = 'S3';
207
+ if ( ! empty( $jobvalue[ 'rscUsername' ] ) and ! empty( $jobvalue[ 'rscAPIKey' ] ) and ! empty( $jobvalue[ 'rscContainer' ] ) )
208
+ $jobvalue[ 'destinations' ][ ] = 'RSC';
209
+ if ( ! empty( $jobvalue[ 'msazureHost' ] ) and ! empty( $jobvalue[ 'msazureAccName' ] ) and ! empty( $jobvalue[ 'msazureKey' ] ) and ! empty( $jobvalue[ 'msazureContainer' ] ) )
210
+ $jobvalue[ 'destinations' ][ ] = 'MSAZURE';
211
+ //convert dropbox
212
+ $jobvalue[ 'dropboxtoken' ] = ''; //new app key are set must reauth
213
+ $jobvalue[ 'dropboxsecret' ] = '';
214
+ $jobvalue[ 'dropboxroot' ] = 'dropbox';
215
+ $jobvalue[ 'dropboxmaxbackups' ] = $jobvalue[ 'dropemaxbackups' ];
216
+ $jobvalue[ 'dropboxdir' ] = $jobvalue[ 'dropedir' ];
217
+ unset( $jobvalue[ 'dropetoken' ], $jobvalue[ 'dropesecret' ], $jobvalue[ 'droperoot' ], $jobvalue[ 'dropemaxbackups' ], $jobvalue[ 'dropedir' ] );
218
+ //convert amazon S3
219
+ $jobvalue[ 's3accesskey' ] = $jobvalue[ 'awsAccessKey' ];
220
+ $jobvalue[ 's3secretkey' ] = BackWPup_Encryption::encrypt( $jobvalue[ 'awsSecretKey' ] );
221
+ $jobvalue[ 's3bucket' ] = $jobvalue[ 'awsBucket' ];
222
+ //get aws region
223
+ $jobvalue[ 's3region' ] = 'us-east-1';
224
+ $jobvalue[ 's3base_url' ] = '';
225
+ $jobvalue[ 's3storageclass' ] = !empty( $jobvalue[ 'awsrrs' ] ) ? 'REDUCED_REDUNDANCY' : '';
226
+ $jobvalue[ 's3dir' ] = $jobvalue[ 'awsdir' ];
227
+ $jobvalue[ 's3maxbackups' ] = $jobvalue[ 'awsmaxbackups' ];
228
+ unset( $jobvalue[ 'awsAccessKey' ], $jobvalue[ 'awsSecretKey' ], $jobvalue[ 'awsBucket' ], $jobvalue[ 'awsrrs' ], $jobvalue[ 'awsdir' ], $jobvalue[ 'awsmaxbackups' ] );
229
+ //convert google storage
230
+ $jobvalue[ 's3accesskey' ] = $jobvalue[ 'GStorageAccessKey' ];
231
+ $jobvalue[ 's3secretkey' ] = BackWPup_Encryption::encrypt( $jobvalue[ 'GStorageSecret' ] );
232
+ $jobvalue[ 's3bucket' ] = $jobvalue[ 'GStorageBucket' ];
233
+ $jobvalue[ 's3region' ] = 'google-storage';
234
+ $jobvalue[ 's3base_url' ] = '';
235
+ $jobvalue[ 's3ssencrypt' ] = $jobvalue[ 'dropetoken' ];
236
+ $jobvalue[ 's3dir' ] = $jobvalue[ 'GStoragedir' ];
237
+ $jobvalue[ 's3maxbackups' ] = $jobvalue[ 'GStoragemaxbackups' ];
238
+ unset( $jobvalue[ 'GStorageAccessKey' ], $jobvalue[ 'GStorageSecret' ], $jobvalue[ 'GStorageBucket' ], $jobvalue[ 'GStoragedir' ], $jobvalue[ 'GStoragemaxbackups' ] );
239
+ //convert MS Azure storage
240
+ $jobvalue[ 'msazureaccname' ] = $jobvalue[ 'msazureAccName' ];
241
+ $jobvalue[ 'msazurekey' ] = BackWPup_Encryption::encrypt( $jobvalue[ 'msazureKey' ] );
242
+ $jobvalue[ 'msazurecontainer' ] = $jobvalue[ 'msazureContainer' ];
243
+ unset( $jobvalue[ 'msazureHost' ], $jobvalue[ 'msazureAccName' ], $jobvalue[ 'msazureKey' ], $jobvalue[ 'msazureContainer' ] );
244
+ //convert FTP
245
+ if ( preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $jobvalue[ 'ftppass' ]) )
246
+ $jobvalue[ 'ftppass' ] = base64_decode( $jobvalue[ 'ftppass' ] );
247
+ $jobvalue[ 'ftppass' ] = BackWPup_Encryption::encrypt( $jobvalue[ 'ftppass' ] );
248
+ if ( ! empty( $jobvalue[ 'ftphost' ] ) && strstr( $jobvalue[ 'ftphost' ], ':' ) )
249
+ list( $jobvalue[ 'ftphost' ], $jobvalue[ 'ftphostport' ] ) = explode( ':', $jobvalue[ 'ftphost' ], 2 );
250
+ //convert Sugarsync
251
+ //convert Mail
252
+ $jobvalue[ 'emailaddress' ] = $jobvalue[ 'mailaddress' ];
253
+ $jobvalue[ 'emailefilesize' ] = $jobvalue[ 'mailefilesize' ];
254
+ unset( $jobvalue[ 'mailaddress' ], $jobvalue[ 'mailefilesize' ] );
255
+ //convert RSC
256
+ $jobvalue[ 'rscusername' ] = $jobvalue[ 'rscUsername' ];
257
+ $jobvalue[ 'rscapikey' ] = $jobvalue[ 'rscAPIKey' ];
258
+ $jobvalue[ 'rsccontainer' ] = $jobvalue[ 'rscContainer' ];
259
+ //convert jobtype DB Dump
260
+ $jobvalue[ 'dbdumpexclude' ] = $jobvalue[ 'dbexclude' ];
261
+ unset( $jobvalue[ 'dbexclude' ], $jobvalue['dbshortinsert'] );
262
+ //convert jobtype DBDUMP, DBCHECK, DBOPTIMIZE
263
+ $jobvalue[ 'dbdumpmaintenance' ] = $jobvalue['maintenance'];
264
+ $jobvalue[ 'dbcheckmaintenance' ] = $jobvalue['maintenance'];
265
+ $jobvalue[ 'dboptimizemaintenance' ] = $jobvalue['maintenance'];
266
+ $jobvalue[ 'dbcheckrepair' ] = TRUE;
267
+ unset( $jobvalue[ 'maintenance' ] );
268
+ //convert jobtype wpexport
269
+ //convert jobtype file
270
+ $excludes = array();
271
+ foreach ( $jobvalue[ 'backuprootexcludedirs' ] as $folder ) {
272
+ $excludes[] = basename( $folder );
273
+ }
274
+ $jobvalue[ 'backuprootexcludedirs' ] = $excludes;
275
+ $excludes = array();
276
+ foreach ( $jobvalue[ 'backupcontentexcludedirs' ] as $folder ) {
277
+ $excludes[] = basename( $folder );
278
+ }
279
+ $jobvalue[ 'backupcontentexcludedirs' ] = $excludes;
280
+ $excludes = array();
281
+ foreach ( $jobvalue[ 'backuppluginsexcludedirs' ] as $folder ) {
282
+ $excludes[] = basename( $folder );
283
+ }
284
+ $jobvalue[ 'backuppluginsexcludedirs' ]= $excludes;
285
+ $excludes = array();
286
+ foreach ( $jobvalue[ 'backupthemesexcludedirs' ] as $folder ) {
287
+ $excludes[] = basename( $folder );
288
+ }
289
+ $jobvalue[ 'backupthemesexcludedirs' ] = $excludes;
290
+ $excludes = array();
291
+ foreach ( $jobvalue[ 'backupuploadsexcludedirs' ] as $folder ) {
292
+ $excludes[] = basename( $folder );
293
+ }
294
+ $jobvalue[ 'backupuploadsexcludedirs' ] = $excludes;
295
+ //delete not longer needed
296
+ unset( $jobvalue[ 'fileprefix' ], $jobvalue[ 'fileformart' ], $jobvalue[ 'scheduleintervaltype' ], $jobvalue[ 'scheduleintervalteimes' ], $jobvalue[ 'scheduleinterval' ], $jobvalue[ 'dropemail' ], $jobvalue[ 'dropepass' ], $jobvalue[ 'dropesignmethod' ] );
297
+ //save in options
298
+ foreach ( $jobvalue as $jobvaluename => $jobvaluevalue )
299
+ BackWPup_Option::update( $jobvalue[ 'jobid' ], $jobvaluename, $jobvaluevalue );
300
+ }
301
+ set_site_transient( 'backwpup_upgrade_from_version_two', TRUE, 3600*24*7);
302
+ }
303
+ }
inc/class-job.php ADDED
@@ -0,0 +1,1783 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class in that the BackWPup job runs
4
+ */
5
+ final class BackWPup_Job {
6
+ /**
7
+ * @var object The instance
8
+ */
9
+ private static $instance = NULL;
10
+
11
+ /**
12
+ * @var string The job start type
13
+ */
14
+ private $jobstarttype = '';
15
+ /**
16
+ * @var array of the job settings
17
+ */
18
+ public $job = array();
19
+
20
+ /**
21
+ * @var int The timestamp when the job starts
22
+ */
23
+ public $start_time = 0;
24
+
25
+ /**
26
+ * @var string the logfile
27
+ */
28
+ public $logfile = '';
29
+ /**
30
+ * @var array for temp values
31
+ */
32
+ public $temp = array();
33
+ /**
34
+ * @var string Folder where is Backup files in
35
+ */
36
+ public $backup_folder = '';
37
+ /**
38
+ * @var string the name of the Backup archive file
39
+ */
40
+ public $backup_file = '';
41
+ /**
42
+ * @var int The size of the Backup archive file
43
+ */
44
+ public $backup_filesize = 0;
45
+ /**
46
+ * @var int PID of script
47
+ */
48
+ public $pid = 0;
49
+ /**
50
+ * @var int Timestamp of last update off .running file
51
+ */
52
+ public $timestamp_last_update = 0;
53
+ /**
54
+ * @var int Number of warnings
55
+ */
56
+ public $warnings = 0;
57
+ /**
58
+ * @var int Number of errors
59
+ */
60
+ public $errors = 0;
61
+ /**
62
+ * @var string the last log massage
63
+ */
64
+ public $lastmsg = '';
65
+ /**
66
+ * @var int Number of restarts
67
+ */
68
+ private $restarts = 0;
69
+ /**
70
+ * @var array of steps to do
71
+ */
72
+ public $steps_todo = array( 'START' );
73
+ /**
74
+ * @var array of done steps
75
+ */
76
+ public $steps_done = array();
77
+ /**
78
+ * @var array of steps data
79
+ */
80
+ public $steps_data = array();
81
+ /**
82
+ * @var string working on step
83
+ */
84
+ public $step_working = 'START';
85
+ /**
86
+ * @var int Number of sub steps must do in step
87
+ */
88
+ public $substeps_todo = 0;
89
+ /**
90
+ * @var int Number of sub steps done in step
91
+ */
92
+ public $substeps_done = 0;
93
+ /**
94
+ * @var int Percent of steps done
95
+ */
96
+ public $step_percent = 1;
97
+ /**
98
+ * @var int Percent of sub steps done
99
+ */
100
+ public $substep_percent = 1;
101
+ /**
102
+ * @var array of files to additional to backup
103
+ */
104
+ public $additional_files_to_backup = array();
105
+ /**
106
+ * @var string file where folders listed for backup
107
+ */
108
+ public $folder_list_file = '';
109
+ /**
110
+ * @var array of files/folder to exclude from backup
111
+ */
112
+ public $exclude_from_backup = array();
113
+ /**
114
+ * @var int count of affected files
115
+ */
116
+ public $count_files = 0;
117
+ /**
118
+ * @var int count of affected file size
119
+ */
120
+ public $count_filesize = 0;
121
+ /**
122
+ * @var int count of affected folders
123
+ */
124
+ public $count_folder = 0;
125
+ /**
126
+ * @var int count of files in a folder
127
+ */
128
+ public $count_files_in_folder = 0;
129
+ /**
130
+ * @var int count of files size in a folder
131
+ */
132
+ public $count_filesize_in_folder = 0;
133
+ /**
134
+ * @var string path to remove from file path
135
+ */
136
+ public $remove_path = '';
137
+
138
+ /**
139
+ *
140
+ * This starts or restarts the job working
141
+ *
142
+ * @param string $starttype Start types are 'runnow', 'runnowalt', 'cronrun', 'runext', 'runcmd', 'apirun', 'restart'
143
+ * @param array|int $job_settings The id of job or the setttings of a job to start
144
+ */
145
+ private function __construct( $starttype, $job_settings = 0 ) {
146
+ global $wpdb;
147
+
148
+ //check startype
149
+ if ( ! in_array( $starttype, array( 'runnow', 'runnowalt', 'cronrun', 'runext', 'runcli' ) ) )
150
+ return;
151
+
152
+ //check $job_settings
153
+ if ( empty( $job_settings ) )
154
+ return;
155
+
156
+ if ( is_int( $job_settings ) )
157
+ $this->job = BackWPup_Option::get_job( $job_settings );
158
+ elseif( is_array( $job_settings ) )
159
+ $this->job = $job_settings;
160
+ else
161
+ return;
162
+ $this->jobstarttype = $starttype;
163
+ $this->start_time = current_time( 'timestamp' );
164
+ $this->lastmsg = '<samp>' . __( 'Starting job', 'backwpup' ) . '</samp>';
165
+ //set Logfile
166
+ $this->logfile = BackWPup_Option::get( 'cfg', 'logfolder' ) . 'backwpup_log_' . substr( md5( md5( SECURE_AUTH_KEY ) ), 10, 6 ). '_' . date_i18n( 'Y-m-d_H-i-s' ) . '.html';
167
+ //write settings to job
168
+ if ( ! empty( $this->job[ 'jobid' ] ) ) {
169
+ BackWPup_Option::update( $this->job[ 'jobid' ], 'lastrun', $this->start_time );
170
+ BackWPup_Option::update( $this->job[ 'jobid' ], 'logfile', $this->logfile ); //Set current logfile
171
+ BackWPup_Option::update( $this->job[ 'jobid' ], 'lastbackupdownloadurl', '' );
172
+ BackWPup_Option::update( $this->job[ 'jobid' ], 'cronnextrun', BackWPup_Cron::cron_next( BackWPup_Option::get( $this->job[ 'jobid' ], 'cron' ) ) );
173
+ }
174
+ //Set needed job values
175
+ $this->timestamp_last_update = microtime( TRUE );
176
+ $this->exclude_from_backup = explode( ',', trim( $this->job[ 'fileexclude' ] ) );
177
+ $this->exclude_from_backup = array_unique( $this->exclude_from_backup );
178
+ if ( trailingslashit( str_replace( '\\', '/', ABSPATH ) ) != '/' and trailingslashit( str_replace( '\\', '/', ABSPATH ) ) != '' ) //create path to remove
179
+ $this->remove_path = trailingslashit( str_replace( '\\', '/', ABSPATH ) );
180
+ //setup job steps
181
+ $this->steps_data[ 'START' ][ 'CALLBACK' ] = '';
182
+ $this->steps_data[ 'START' ][ 'NAME' ] = __( 'Job Start', 'backwpup' );
183
+ $this->steps_data[ 'START' ][ 'STEP_TRY' ] = 0;
184
+ //ADD Job types file
185
+ $job_need_dest = FALSE;
186
+ if ( $job_types = BackWPup::get_job_types() ) {
187
+ foreach ( $job_types as $id => $job_type_class ) {
188
+ if ( in_array( $id, $this->job[ 'type' ] ) && $job_type_class->creates_file( ) ) {
189
+ $this->steps_todo[ ] = 'JOB_' . $id;
190
+ $this->steps_data[ 'JOB_' . $id ][ 'NAME' ] = $job_type_class->info[ 'description' ];
191
+ $this->steps_data[ 'JOB_' . $id ][ 'STEP_TRY' ] = 0;
192
+ $job_need_dest = TRUE;
193
+ }
194
+ }
195
+ }
196
+ //add destinations and create archive if a job where files to backup
197
+ if ( $job_need_dest ) {
198
+ //Set file for folder list
199
+ $this->folder_list_file = BackWPup::get_plugin_data( 'temp' ) . 'backwpup-' . substr( md5( NONCE_SALT ), 19, 6 ) . '-folders.php';
200
+ //Add archive creation and backup filename on backup type archive
201
+ if ( $this->job[ 'backuptype' ] == 'archive' ) {
202
+ //set Backup folder to temp folder if not set
203
+ if ( in_array( 'FOLDER', $this->job[ 'destinations' ] ) )
204
+ $this->backup_folder = $this->job[ 'backupdir' ];
205
+ //check backups folder
206
+ if ( ! empty( $this->backup_folder ) )
207
+ self::check_folder( $this->backup_folder );
208
+ //set temp folder to backup folder if not set
209
+ if ( ! $this->backup_folder or $this->backup_folder == '/' )
210
+ $this->backup_folder = BackWPup::get_plugin_data( 'TEMP' );
211
+ //Create backup archive full file name
212
+ $this->backup_file = $this->generate_filename( $this->job[ 'archivename' ], $this->job[ 'archiveformat' ] );
213
+ //add archive create
214
+ $this->steps_todo[ ] = 'CREATE_ARCHIVE';
215
+ $this->steps_data[ 'CREATE_ARCHIVE' ][ 'NAME' ] = __( 'Creates archive', 'backwpup' );
216
+ $this->steps_data[ 'CREATE_ARCHIVE' ][ 'STEP_TRY' ] = 0;
217
+ }
218
+ //ADD Destinations
219
+ foreach ( BackWPup::get_destinations() as $id => $dest_class ) {
220
+ if ( in_array( $id, $this->job[ 'destinations' ] ) && $dest_class->can_run( $this ) ) {
221
+ if ( $this->job[ 'backuptype' ] == 'sync' ) {
222
+ if ( call_user_func( array( $dest_class, 'can_sync' ) ) ) {
223
+ $this->steps_todo[] = 'DEST_SYNC_' . $id;
224
+ $this->steps_data[ 'DEST_SYNC_' . $id ][ 'NAME' ] = $dest_class->info[ 'description' ];
225
+ $this->steps_data[ 'DEST_SYNC_' . $id ][ 'STEP_TRY' ] = 0;
226
+ }
227
+ } else {
228
+ $this->steps_todo[] = 'DEST_' . $id;
229
+ $this->steps_data[ 'DEST_' . $id ][ 'NAME' ] = $dest_class->info[ 'description' ];
230
+ $this->steps_data[ 'DEST_' . $id ][ 'STEP_TRY' ] = 0;
231
+ }
232
+ }
233
+ }
234
+ }
235
+ //ADD Job type no file
236
+ if ( $job_types = BackWPup::get_job_types() ) {
237
+ foreach ( $job_types as $id => $job_type_class ) {
238
+ if ( in_array( $id, $this->job[ 'type' ] ) && ! $job_type_class->creates_file() ) {
239
+ $this->steps_todo[ ] = 'JOB_' . $id;
240
+ $this->steps_data[ 'JOB_' . $id ][ 'NAME' ] = $job_type_class->info[ 'description' ];
241
+ $this->steps_data[ 'JOB_' . $id ][ 'STEP_TRY' ] = 0;
242
+ }
243
+ }
244
+ }
245
+ $this->steps_todo[] = 'END';
246
+ $this->steps_data[ 'END' ][ 'NAME' ] = __( 'Job End', 'backwpup' );
247
+ $this->steps_data[ 'END' ][ 'STEP_TRY' ] = 0;
248
+ //must write working data
249
+ file_put_contents( BackWPup::get_plugin_data( 'running_file' ), '<?php //'. serialize( $this ) );
250
+ //create log file
251
+ $fd = fopen( $this->logfile, 'w' );
252
+ fwrite( $fd, "<!DOCTYPE html>" . PHP_EOL . "<html lang=\"" . str_replace( '_', '-', get_locale() ) . "\">" . PHP_EOL . "<head>" . PHP_EOL );
253
+ fwrite( $fd, "<meta charset=\"" . get_bloginfo( 'charset' ) . "\" />" . PHP_EOL );
254
+ fwrite( $fd, "<title>" . sprintf( __( 'BackWPup log for %1$s from %2$s at %3$s', 'backwpup' ), $this->job[ 'name' ], date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) ) . "</title>" . PHP_EOL );
255
+ fwrite( $fd, "<meta name=\"robots\" content=\"noindex, nofollow\" />" . PHP_EOL );
256
+ fwrite( $fd, "<meta name=\"copyright\" content=\"Copyright &copy; 2009 - " . date_i18n( 'Y' ) . " Inpsyde GmbH\" />" . PHP_EOL );
257
+ fwrite( $fd, "<meta name=\"author\" content=\"Daniel H&uuml;sken\" />" . PHP_EOL );
258
+ fwrite( $fd, "<meta name=\"generator\" content=\"BackWPup " . BackWPup::get_plugin_data( 'Version' ) . "\" />" . PHP_EOL );
259
+ fwrite( $fd, "<meta http-equiv=\"cache-control\" content=\"no-cache\" />" . PHP_EOL );
260
+ fwrite( $fd, "<meta http-equiv=\"pragma\" content=\"no-cache\" />" . PHP_EOL );
261
+ fwrite( $fd, "<meta name=\"date\" content=\"" . date( 'c' ) . "\" />" . PHP_EOL );
262
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_errors\" content=\"0\" />", 100 ) . PHP_EOL );
263
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_warnings\" content=\"0\" />", 100 ) . PHP_EOL );
264
+ if ( ! empty( $this->job[ 'jobid' ] ) )
265
+ fwrite( $fd, "<meta name=\"backwpup_jobid\" content=\"" . $this->job[ 'jobid' ] . "\" />" . PHP_EOL );
266
+ fwrite( $fd, "<meta name=\"backwpup_jobname\" content=\"" . esc_attr( $this->job[ 'name' ] ) . "\" />" . PHP_EOL );
267
+ fwrite( $fd, "<meta name=\"backwpup_jobtype\" content=\"" . implode( '+', $this->job[ 'type' ] ) . "\" />" . PHP_EOL );
268
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_backupfilesize\" content=\"0\" />", 100 ) . PHP_EOL );
269
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_jobruntime\" content=\"0\" />", 100 ) . PHP_EOL );
270
+ fwrite( $fd, "</head>" . PHP_EOL . "<body style=\"margin:0;padding:3px;font-family:Fixedsys,Courier,monospace;font-size:12px;line-height:15px;background-color:#000;color:#fff;white-space:pre;\">" );
271
+ $info = '';
272
+ $info .= sprintf( _x( '[INFO] %1$s version %2$s; WordPress version %3$s; A project of Inpsyde GmbH developed by Daniel Hüsken','Plugin name; Plugin Version; WordPress Version','backwpup' ), BackWPup::get_plugin_data( 'name' ) , BackWPup::get_plugin_data( 'Version' ), BackWPup::get_plugin_data( 'wp_version' ) ) . PHP_EOL;
273
+ $info .= __( '[INFO] This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.', 'backwpup' ) . PHP_EOL;
274
+ $info .= sprintf(__( '[INFO] BackWPup job: %1$s; %2$s', 'backwpup' ), esc_attr( $this->job[ 'name' ] ) , implode( '+', $this->job[ 'type' ] ) ) . PHP_EOL;
275
+ if ( $this->job[ 'activetype' ] != '' )
276
+ $info .= __( '[INFO] BackWPup cron:', 'backwpup' ) . ' ' . $this->job[ 'cron' ] . '; ' . date_i18n( 'D, j M Y @ H:i', $this->job[ 'cronnextrun' ] + ( get_option( 'gmt_offset' ) * 3600 ), TRUE ) . PHP_EOL;
277
+ if ( $this->jobstarttype == 'cronrun' )
278
+ $info .= __( '[INFO] BackWPup job started from wp-cron', 'backwpup' ) . PHP_EOL;
279
+ elseif ( $this->jobstarttype == 'runnow' or $this->jobstarttype == 'runnowalt' )
280
+ $info .= __( '[INFO] BackWPup job started manually', 'backwpup' ) . PHP_EOL;
281
+ elseif ( $this->jobstarttype == 'runext' )
282
+ $info .= __( '[INFO] BackWPup job started from external url', 'backwpup' ) . PHP_EOL;
283
+ elseif ( $this->jobstarttype == 'runcli' )
284
+ $info .= __( '[INFO] BackWPup job started form commandline interface', 'backwpup' ) . PHP_EOL;
285
+ $info .= __( '[INFO] PHP ver.:', 'backwpup' ) . ' ' . phpversion() . '; ' . PHP_SAPI . '; ' . PHP_OS . PHP_EOL;
286
+ $info .= sprintf( __( '[INFO] Maximum script execution time is %1$d seconds', 'backwpup' ), ini_get( 'max_execution_time' ) ) . PHP_EOL;
287
+ $info .= sprintf( __( '[INFO] MySQL ver.: %s', 'backwpup' ), $wpdb->get_var( "SELECT VERSION() AS version" ) ) . PHP_EOL;
288
+ if ( function_exists( 'curl_init' ) ) {
289
+ $curlversion = curl_version();
290
+ $info .= sprintf( __( '[INFO] curl ver.: %1$s; %2$s', 'backwpup' ), $curlversion[ 'version' ], $curlversion[ 'ssl_version' ] ) . PHP_EOL;
291
+ }
292
+ $info .= sprintf( __( '[INFO] Temp folder is: %s', 'backwpup' ), BackWPup::get_plugin_data( 'TEMP' ) ) . PHP_EOL;
293
+ $info .= sprintf( __( '[INFO] Logfile folder is: %s', 'backwpup' ), BackWPup_Option::get( 'cfg', 'logfolder' ) ) . PHP_EOL;
294
+ $info .= sprintf( __( '[INFO] Backup type is: %s', 'backwpup' ), $this->job[ 'backuptype' ] ) . PHP_EOL;
295
+ if ( ! empty( $this->backup_file ) && $this->job[ 'backuptype' ] == 'archive' )
296
+ $info .= sprintf( __( '[INFO] Backup file is: %s', 'backwpup' ), $this->backup_folder . $this->backup_file ) . PHP_EOL;
297
+ fwrite( $fd, $info );
298
+ fwrite( $fd, '</header>' );
299
+ fclose( $fd );
300
+ //output info on cli
301
+ if ( defined( 'STDIN' ) && defined( 'STDOUT' ) )
302
+ fwrite( STDOUT, strip_tags( $info ) ) ;
303
+ //test for destinations
304
+ if ( $job_need_dest ) {
305
+ $desttest = FALSE;
306
+ foreach ( $this->steps_todo as $deststeptest ) {
307
+ if ( substr( $deststeptest, 0, 5 ) == 'DEST_' ) {
308
+ $desttest = TRUE;
309
+ break;
310
+ }
311
+ }
312
+ if ( ! $desttest )
313
+ $this->log( __( 'No destination correctly defined for backup! Please correct job settings.', 'backwpup' ), E_USER_ERROR );
314
+ }
315
+ //Set start as done
316
+ $this->steps_done[] = 'START';
317
+ }
318
+
319
+ // prevent 'clone()' from external.
320
+ private function __clone() {}
321
+
322
+ /**
323
+ *
324
+ * @return array
325
+ */
326
+ public function __sleep(){
327
+ //not saved: 'temp',
328
+ return array( 'jobstarttype', 'job', 'start_time', 'logfile', 'backup_folder', 'folder_list_file',
329
+ 'backup_file', 'backup_filesize', 'pid', 'timestamp_last_update', 'warnings', 'errors', 'lastmsg', 'restarts',
330
+ 'steps_todo', 'steps_done', 'steps_data', 'step_working', 'substeps_todo', 'substeps_done', 'step_percent',
331
+ 'substep_percent', 'additional_files_to_backup', 'exclude_from_backup', 'count_files',
332
+ 'count_filesize', 'count_folder', 'count_files_in_folder', 'count_filesize_in_folder', 'remove_path' );
333
+ }
334
+
335
+ /**
336
+ * get instance
337
+ *
338
+ * @return null|object
339
+ */
340
+ public static function getInstance() {
341
+
342
+ return self::$instance;
343
+ }
344
+
345
+
346
+ /**
347
+ *
348
+ * Get a url to run a job of BackWPup
349
+ *
350
+ * @param string $starttype Start types are 'runnow', 'runnowlink', 'cronrun', 'runext', 'runcmd', 'restart'
351
+ * @param int $jobid The id of job to start else 0
352
+ * @return array|object [url] is the job url [header] for auth header or object form wp_remote_get()
353
+ */
354
+ public static function get_jobrun_url( $starttype, $jobid = 0 ) {
355
+
356
+ $url = home_url( '/' );
357
+ $header = '';
358
+ $authurl = '';
359
+ $query_args = array(
360
+ '_nonce' => substr( wp_hash( wp_nonce_tick() . 'backwup_job_run-' . $starttype, 'nonce' ), - 12, 10 )
361
+ );
362
+
363
+ if ( in_array( $starttype, array( 'restart', 'runnow', 'cronrun', 'runext' ) ) )
364
+ $query_args[ 'backwpup_run' ] = $starttype;
365
+
366
+ if ( in_array( $starttype, array( 'runnowlink', 'runnow', 'cronrun', 'runext' ) ) && ! empty( $jobid ) )
367
+ $query_args[ 'jobid' ] = $jobid;
368
+
369
+ if ( BackWPup_Option::get( 'cfg', 'httpauthuser' ) && BackWPup_Option::get( 'cfg', 'httpauthpassword' ) ) {
370
+ $header = array( 'Authorization' => 'Basic ' . base64_encode( BackWPup_Option::get( 'cfg', 'httpauthuser' ) . ':' . BackWPup_Encryption::decrypt( BackWPup_Option::get( 'cfg', 'httpauthpassword' ) ) ) );
371
+ $authurl = BackWPup_Option::get( 'cfg', 'httpauthuser' ) . ':' . BackWPup_Encryption::decrypt( BackWPup_Option::get( 'cfg', 'httpauthpassword' ) ) . '@';
372
+ }
373
+
374
+ if ( $starttype == 'runext' ) {
375
+ $query_args[ '_nonce' ] = BackWPup_Option::get( 'cfg', 'jobrunauthkey' );
376
+ if ( ! empty( $authurl ) ) {
377
+ $url = str_replace( 'https://', 'https://' . $authurl, $url );
378
+ $url = str_replace( 'http://', 'http://' . $authurl, $url );
379
+ }
380
+ }
381
+
382
+ if ( $starttype == 'runnowlink' && ( ! defined( 'ALTERNATE_WP_CRON' ) || ! ALTERNATE_WP_CRON ) ) {
383
+ $url = wp_nonce_url( network_admin_url( 'admin.php' ), 'backwup_job_run-' . $starttype );
384
+ $query_args[ 'page' ] = 'backwpupjobs';
385
+ $query_args[ 'action' ] = 'runnow';
386
+ unset( $query_args[ '_nonce' ] );
387
+ }
388
+
389
+ if ( $starttype == 'runnowlink' && defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) {
390
+ $query_args[ 'backwpup_run' ] = 'runnowalt';
391
+ $query_args[ '_nonce' ] = substr( wp_hash( wp_nonce_tick() . 'backwup_job_run-runnowalt', 'nonce' ), - 12, 10 );
392
+ }
393
+
394
+ $url = array(
395
+ 'url' => add_query_arg( $query_args, $url ),
396
+ 'header' => $header
397
+ );
398
+
399
+ if ( ! in_array( $starttype, array( 'runnowlink', 'runext' ) ) ) {
400
+ return @wp_remote_get( $url[ 'url' ], array(
401
+ 'blocking' => FALSE,
402
+ 'sslverify' => apply_filters( 'https_local_ssl_verify', TRUE ),
403
+ 'timeout' => 0.01,
404
+ 'headers' => $url[ 'header' ],
405
+ 'user-agent' => BackWpup::get_plugin_data( 'User-Agent' )
406
+ ) );
407
+ }
408
+
409
+ return $url;
410
+ }
411
+
412
+
413
+ /**
414
+ *
415
+ */
416
+ public static function start_http($starttype) {
417
+
418
+ //define DOING_CRON to prevent caching
419
+ if( ! defined( 'DOING_CRON' ) )
420
+ define( 'DOING_CRON', TRUE );
421
+
422
+ //prevent W3TC object cache
423
+ define('DONOTCACHEOBJECT', TRUE);
424
+
425
+ //load text domain if needed
426
+ if ( ! is_textdomain_loaded( 'backwpup' ) && ! BackWPup_Option::get( 'cfg', 'jobnotranslate') )
427
+ load_plugin_textdomain( 'backwpup', FALSE, BackWPup::get_plugin_data( 'BaseName' ) . '/languages' );
428
+
429
+ //special header
430
+ @putenv( "nokeepalive=1" );
431
+ @header( 'Content-Type: text/html; charset=' . get_bloginfo( 'charset' ) );
432
+ @header( 'X-Robots-Tag: noindex, nofollow' );
433
+ send_nosniff_header();
434
+ nocache_headers();
435
+
436
+ //check get vars
437
+ if ( isset( $_GET[ 'jobid' ] ) )
438
+ $jobid = (int)$_GET[ 'jobid' ];
439
+ else
440
+ $jobid = 0;
441
+ //check job id exists
442
+ if ( $starttype != 'restart' && $jobid != BackWPup_Option::get( $jobid, 'jobid' ) ) {
443
+ trigger_error( __( 'Wrong BackWPup JobID', 'backwpup' ) . ' ' . $jobid, E_USER_ERROR );
444
+ wp_die( __( 'Wrong BackWPup JobID', 'backwpup' ), __( 'Wrong BackWPup JobID', 'backwpup' ), array( 'response' => 400 ) );
445
+ }
446
+ //check folders
447
+ if ( ! self::check_folder( BackWPup_Option::get( 'cfg', 'logfolder' ) ) ) {
448
+ trigger_error( __( 'Log folder does not exist or is not writable for BackWPup', 'backwpup' ), E_USER_ERROR );
449
+ wp_die( __( 'Log folder does not exist or is not writable for BackWPup', 'backwpup' ), __( 'Log folder does not exist or is not writable for BackWPup', 'backwpup' ), array( 'response' => 500 ) );
450
+ }
451
+ if ( ! self::check_folder( BackWPup::get_plugin_data( 'TEMP' ) ) ) {
452
+ trigger_error( __( 'Temp folder does not exist or is not writable for BackWPup', 'backwpup' ), E_USER_ERROR );
453
+ wp_die( __( 'Temp folder does not exist or is not writable for BackWPup', 'backwpup' ), __( 'Temp folder does not exist or is not writable for BackWPup', 'backwpup' ), array( 'response' => 500 ) );
454
+ }
455
+ //check running job
456
+ $backwpup_job_object = self::get_working_data();
457
+ if ( $starttype == 'restart' && ! $backwpup_job_object ) {
458
+ trigger_error( __( 'No BackWPup job running', 'backwpup' ), E_USER_ERROR );
459
+ wp_die( __( 'No BackWPup job running', 'backwpup' ), __( 'No BackWPup job running', 'backwpup' ), array( 'response' => 400 ) );
460
+ }
461
+ if ( $starttype != 'restart' && is_object( $backwpup_job_object ) ) {
462
+ trigger_error( __( 'A BackWPup job is already running', 'backwpup' ), E_USER_ERROR );
463
+ wp_die( __( 'A BackWPup job is already running', 'backwpup' ), __( 'A BackWPup job is already running', 'backwpup' ), array( 'response' => 503 ) );
464
+ }
465
+ if ( $starttype == 'restart' && is_object( $backwpup_job_object ) ) {
466
+ self::$instance = $backwpup_job_object;
467
+ }
468
+ //disable user abort
469
+ ignore_user_abort( TRUE );
470
+ //close session file on server side to avoid blocking other requests
471
+ session_write_close();
472
+ // disconnect or redirect
473
+ ob_start();
474
+ if ( $starttype == 'runnowalt' )
475
+ wp_redirect( add_query_arg( array( 'page' => 'backwpupjobs' ), network_admin_url( 'admin.php' ) ) );
476
+ header( "Content-Length: " . ob_get_length() );
477
+ header( "Connection: close" );
478
+ ob_end_flush();
479
+ flush();
480
+ //start class
481
+ if ( in_array( $starttype, array( 'runnow', 'runnowalt', 'runext' ) ) ) {
482
+ //schedule restart event
483
+ wp_schedule_single_event( time() + 60, 'backwpup_cron', array( 'id' => 'restart' ) );
484
+ //start job
485
+ self::$instance = new self( $starttype, (int)$jobid );
486
+ }
487
+ if( is_object( self::$instance ) )
488
+ self::$instance->run();
489
+ }
490
+
491
+ /**
492
+ * @param $jobid
493
+ */
494
+ public static function start_cli( $jobid ) {
495
+
496
+ if ( ! defined( 'STDIN' ) )
497
+ return;
498
+
499
+ //define DOING_CRON to prevent caching
500
+ if( ! defined( 'DOING_CRON' ) )
501
+ define( 'DOING_CRON', TRUE );
502
+
503
+ //prevent W3TC object cache
504
+ define('DONOTCACHEOBJECT', TRUE);
505
+
506
+ //load text domain if needed
507
+ if ( ! is_textdomain_loaded( 'backwpup' ) && ! BackWPup_Option::get( 'cfg', 'jobnotranslate') )
508
+ load_plugin_textdomain( 'backwpup', FALSE, BackWPup::get_plugin_data( 'BaseName' ) . '/languages' );
509
+
510
+ //check job id exists
511
+ $jobids = BackWPup_Option::get_job_ids();
512
+ if ( ! in_array( $jobid, $jobids ) ) {
513
+ trigger_error( __( 'Wrong BackWPup JobID', 'backwpup' ), E_USER_ERROR );
514
+ die( __( 'Wrong BackWPup JobID', 'backwpup' ) );
515
+ }
516
+ //check folders
517
+ if ( ! self::check_folder( BackWPup_Option::get( 'cfg', 'logfolder' ) ) ) {
518
+ trigger_error( __( 'Log folder does not exist or is not writable', 'backwpup' ), E_USER_ERROR );
519
+ die( __( 'Log folder does not exist or is not writable for BackWPup', 'backwpup' ) );
520
+ }
521
+ if ( ! self::check_folder( BackWPup::get_plugin_data( 'TEMP' ) ) ) {
522
+ trigger_error( __( 'Temp folder does not exist or is not writable', 'backwpup' ), E_USER_ERROR );
523
+ die( __( 'Temp folder does not exist or is not writable for BackWPup', 'backwpup' ) );
524
+ }
525
+ //check running job
526
+ if ( self::get_working_data( FALSE ) ) {
527
+ trigger_error( __( 'A BackWPup job is already running', 'backwpup' ), E_USER_ERROR );
528
+ die( __( 'A BackWPup job is already running', 'backwpup' ) );
529
+ }
530
+ //start/restart class
531
+ fwrite( STDOUT, __( 'Job Started' ) . PHP_EOL );
532
+ fwrite( STDOUT, '----------------------------------------------------------------------' . PHP_EOL );
533
+ self::$instance = new self( 'runcli', (int)$jobid );
534
+ if( is_object( self::$instance ) )
535
+ self::$instance->run();
536
+ }
537
+
538
+ /**
539
+ * @param int $jobid
540
+ */
541
+ public static function start_wp_cron( $jobid = 0 ) {
542
+
543
+ if ( ! defined( 'DOING_CRON' ) || ! DOING_CRON )
544
+ return;
545
+
546
+ //prevent W3TC object cache
547
+ define('DONOTCACHEOBJECT', TRUE);
548
+
549
+ //load text domain if needed
550
+ if ( ! is_textdomain_loaded( 'backwpup' ) && ! BackWPup_Option::get( 'cfg', 'jobnotranslate') )
551
+ load_plugin_textdomain( 'backwpup', FALSE, BackWPup::get_plugin_data( 'BaseName' ) . '/languages' );
552
+
553
+ //special header
554
+ @putenv( "nokeepalive=1" );
555
+ @header( 'Content-Type: text/html; charset=' . get_bloginfo( 'charset' ) );
556
+ @header( 'X-Robots-Tag: noindex, nofollow' );
557
+ send_nosniff_header();
558
+ nocache_headers();
559
+
560
+ //check job id exists
561
+ if ( $jobid != BackWPup_Option::get( $jobid, 'jobid' ) && $jobid != 0 ) {
562
+ trigger_error( __( 'Wrong BackWPup JobID', 'backwpup' ), E_USER_ERROR );
563
+
564
+ return;
565
+ }
566
+ //check folders
567
+ if ( ! self::check_folder( BackWPup_Option::get( 'cfg', 'logfolder' ) ) ) {
568
+ trigger_error( __( 'Log folder does not exist or is not writable for BackWPup', 'backwpup' ), E_USER_ERROR );
569
+
570
+ return;
571
+ }
572
+ if ( ! self::check_folder( BackWPup::get_plugin_data( 'TEMP' ) ) ) {
573
+ trigger_error( __( 'Temp folder does not exist or is not writable for BackWPup', 'backwpup' ), E_USER_ERROR);
574
+
575
+ return;
576
+ }
577
+ //check running job
578
+ self::$instance = self::get_working_data();
579
+ if ( $jobid != 0 && is_object( self::$instance ) ) {
580
+ trigger_error( __( 'A BackWPup job is already running', 'backwpup' ), E_USER_ERROR );
581
+
582
+ return;
583
+ }
584
+ //start/restart class
585
+ if ( ! is_object( self::$instance ) && $jobid != 0) {
586
+ //schedule restart event
587
+ wp_schedule_single_event( time() + 60, 'backwpup_cron', array( 'id' => 'restart' ) );
588
+ //start job
589
+ self::$instance = new self( 'cronrun', (int)$jobid );
590
+ }
591
+ if( is_object( self::$instance ) )
592
+ self::$instance->run();
593
+ }
594
+
595
+
596
+ /**
597
+ * Run baby run
598
+ */
599
+ public function run() {
600
+ global $wpdb;
601
+
602
+ //Check double running and inactivity
603
+ $job_object = self::get_working_data();
604
+ if ( ! $job_object )
605
+ return;
606
+ $last_update = microtime( TRUE ) - $job_object->timestamp_last_update;
607
+ if ( $job_object->pid != 0 && $last_update > 300) {
608
+ $this->log( __( 'Job restart due to inactivity for more than 5 minutes.', 'backwpup' ), E_USER_NOTICE );
609
+ }
610
+ elseif ( $this->pid != 0 && $job_object->pid != self::get_pid() ) {
611
+ $this->log( __( 'Second process start terminated, because a other job is already running!', 'backwpup' ), E_USER_WARNING );
612
+ return;
613
+ }
614
+ unset( $job_object );
615
+ //set Pid
616
+ $this->pid = self::get_pid();
617
+ //set function for PHP user defined error handling
618
+ $this->temp[ 'PHP' ][ 'INI' ][ 'ERROR_LOG' ] = ini_get( 'error_log' );
619
+ $this->temp[ 'PHP' ][ 'INI' ][ 'LOG_ERRORS' ] = ini_get( 'log_errors' );
620
+ $this->temp[ 'PHP' ][ 'INI' ][ 'DISPLAY_ERRORS' ] = ini_get( 'display_errors' );
621
+ @ini_set( 'error_log', $this->logfile );
622
+ @ini_set( 'display_errors', 'Off' );
623
+ @ini_set( 'log_errors', 'On' );
624
+ //set temp folder
625
+ $this->temp[ 'PHP' ][ 'ENV' ][ 'TEMPDIR' ] = getenv( 'TMPDIR' );
626
+ putenv( 'TMPDIR='.BackWPup::get_plugin_data( 'TEMP') );
627
+ //increase MySQL timeout
628
+ @ini_set( 'mysql.connect_timeout', '60' );
629
+ $wpdb->query( "SET session wait_timeout = 60" );
630
+ //Write Wordpress DB errors to log
631
+ $wpdb->suppress_errors( FALSE );
632
+ $wpdb->hide_errors();
633
+ //set php execution time
634
+ @set_time_limit( 0 );
635
+ //set wp max memory limit
636
+ @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
637
+ //set error handler
638
+ if ( defined( 'WP_DEBUG') && WP_DEBUG ) //on debug display all errors
639
+ set_error_handler( array( $this, 'log' ) );
640
+ else //on normal display all errors without notices
641
+ set_error_handler( array( $this, 'log' ), E_ALL ^ E_NOTICE );
642
+ set_exception_handler( array( $this, 'exception_handler' ) );
643
+ //not loading Textdomains and unload loaded
644
+ if ( BackWPup_Option::get( 'cfg', 'jobnotranslate') ) {
645
+ add_filter( 'override_load_textdomain', create_function( '','return TRUE;') );
646
+ $GLOBALS[ 'l10n' ] = array();
647
+ }
648
+ //clear caches then the backups smaller and lesser problems
649
+ if ( has_action('cachify_flush_cache') ) { //clear APC
650
+ apc_clear_cache();
651
+ }
652
+ if ( function_exists('w3tc_objectcache_flush') ) { //W3TC
653
+ w3tc_pgcache_flush();
654
+ w3tc_dbcache_flush();
655
+ w3tc_minify_flush();
656
+ //w3tc_objectcache_flush(); //can make problems if flushed
657
+ } elseif ( function_exists('wp_cache_clear_cache') ) { //WP Super Cache
658
+ wp_cache_clear_cache();
659
+ } elseif ( has_action('cachify_flush_cache') ) { //Cachify
660
+ do_action('cachify_flush_cache');
661
+ }
662
+ $job_types = BackWPup::get_job_types();
663
+ $destinations = BackWPup::get_destinations();
664
+ // execute function on job shutdown register_shutdown_function( array( $this, 'shutdown' ) );
665
+ add_action( 'shutdown', array( $this, 'shutdown' ) );
666
+ //remove_action('shutdown', array( $this, 'shutdown' ));
667
+ if ( function_exists( 'pcntl_signal' ) ) {
668
+ declare( ticks = 1 ) ; //set ticks
669
+ pcntl_signal( 15, array( $this, 'shutdown' ) ); //SIGTERM
670
+ //pcntl_signal(9, array($this,'shutdown')); //SIGKILL
671
+ pcntl_signal( 2, array( $this, 'shutdown' ) ); //SIGINT
672
+ }
673
+ foreach ( $this->steps_todo as $this->step_working ) {
674
+ //Run next step
675
+ if ( ! in_array( $this->step_working, $this->steps_done ) ) {
676
+ //calc step percent
677
+ if ( count( $this->steps_done ) > 0 )
678
+ $this->step_percent = round( count( $this->steps_done ) / count( $this->steps_todo ) * 100 );
679
+ else
680
+ $this->step_percent = 1;
681
+ while ( $this->steps_data[ $this->step_working ][ 'STEP_TRY' ] < BackWPup_Option::get( 'cfg', 'jobstepretry' ) ) {
682
+ if ( in_array( $this->step_working, $this->steps_done ) )
683
+ break;
684
+ $this->steps_data[ $this->step_working ][ 'STEP_TRY' ] ++;
685
+ $this->update_working_data( TRUE );
686
+ $done = FALSE;
687
+ //executes the methods of job process
688
+ if ( $this->step_working == 'CREATE_ARCHIVE')
689
+ $done = $this->create_archive();
690
+ elseif ( $this->step_working == 'END')
691
+ $this->end();
692
+ elseif ( strstr( $this->step_working, 'JOB_' ) )
693
+ $done = call_user_func( array( $job_types[ str_replace( 'JOB_', '', $this->step_working ) ], 'job_run' ), $this );
694
+ elseif ( strstr( $this->step_working, 'DEST_SYNC_' ) )
695
+ $done = call_user_func( array( $destinations[ str_replace( 'DEST_SYNC_', '', $this->step_working ) ], 'job_run_sync' ), $this );
696
+ elseif ( strstr( $this->step_working, 'DEST_' ) )
697
+ $done = call_user_func( array( $destinations[ str_replace( 'DEST_', '', $this->step_working ) ], 'job_run_archive' ), $this );
698
+ else
699
+ $done = call_user_func( $this->steps_data[ $this->step_working ][ 'CALLBACK' ], $this );
700
+ //set step as done
701
+ if ( $done == TRUE ) {
702
+ unset( $this->temp ); //Clean temp
703
+ $this->steps_done[ ] = $this->step_working;
704
+ $this->substeps_done = 0;
705
+ $this->substeps_todo = 0;
706
+ }
707
+ //restart on every job step expect end and only on http connection
708
+ if ( ! defined( 'STDIN' ) && ! defined( 'ALTERNATE_WP_CRON' ) && BackWPup_Option::get( 'cfg', 'jobsteprestart' ) && $this->step_working != 'END' ) {
709
+ //do things for a clean restart
710
+ $this->pid = 0;
711
+ $this->jobstarttype = 'restart';
712
+ $this->maintenance_mode( FALSE );
713
+ $this->update_working_data( TRUE );
714
+ remove_action( 'shutdown', array( $this, 'shutdown' ) );
715
+ self::get_jobrun_url( 'restart' );
716
+ exit();
717
+ }
718
+ }
719
+ if ( $this->steps_data[ $this->step_working ][ 'STEP_TRY' ] > BackWPup_Option::get( 'cfg', 'jobstepretry' ) )
720
+ $this->log( __( 'Step aborted: too many attempts!', 'backwpup' ), E_USER_ERROR );
721
+ }
722
+ }
723
+ }
724
+
725
+ /**
726
+ *
727
+ * Get data off a working job
728
+ *
729
+ * @param bool $get_object is full object needed or only that it working
730
+ *
731
+ * @return bool|object BackWPup_Job false if not working, true or object if working
732
+ */
733
+ public static function get_working_data( $get_object = TRUE ) {
734
+
735
+ if ( ! is_file( BackWPup::get_plugin_data( 'running_file' ) ) )
736
+ return FALSE;
737
+
738
+ if ( ! $get_object )
739
+ return TRUE;
740
+
741
+ if ( $running_data = file_get_contents( BackWPup::get_plugin_data( 'running_file' ), FALSE, NULL, 8 ) ) {
742
+ $job_object = unserialize( $running_data );
743
+ if ( is_object( $job_object ) && $job_object instanceof BackWPup_Job )
744
+ return $job_object;
745
+ else //running file is defect delete it
746
+ unlink( BackWPup::get_plugin_data( 'running_file' ) );
747
+ }
748
+
749
+ return FALSE;
750
+ }
751
+
752
+ /**
753
+ *
754
+ * Reads a BackWPup logfile header and gives back a array of information
755
+ *
756
+ * @param string $logfile full logfile path
757
+ *
758
+ * @return array|bool
759
+ */
760
+ public static function read_logheader( $logfile ) {
761
+
762
+ $usedmetas = array(
763
+ "date" => "logtime",
764
+ "backwpup_logtime" => "logtime", //old value of date
765
+ "backwpup_errors" => "errors",
766
+ "backwpup_warnings" => "warnings",
767
+ "backwpup_jobid" => "jobid",
768
+ "backwpup_jobname" => "name",
769
+ "backwpup_jobtype" => "type",
770
+ "backwpup_jobruntime" => "runtime",
771
+ "backwpup_backupfilesize" => "backupfilesize"
772
+ );
773
+
774
+ //get metadata of logfile
775
+ $metas = array();
776
+ if ( is_file( $logfile ) ) {
777
+ if ( '.gz' == substr( $logfile, -3 ) )
778
+ $metas = (array)get_meta_tags( 'compress.zlib://' . $logfile );
779
+ elseif ( '.bz2' == substr( $logfile, -4 ) )
780
+ $metas = (array)get_meta_tags( 'compress.bzip2://' . $logfile );
781
+ else
782
+ $metas = (array)get_meta_tags( $logfile );
783
+ }
784
+
785
+
786
+ //only output needed data
787
+ foreach ( $usedmetas as $keyword => $field ) {
788
+ if ( isset( $metas[ $keyword ] ) ) {
789
+ $joddata[ $field ] = $metas[ $keyword ];
790
+ }
791
+ else {
792
+ $joddata[ $field ] = '';
793
+ }
794
+ }
795
+
796
+ //convert date
797
+ if ( isset( $metas[ 'date' ] ) )
798
+ $joddata[ 'logtime' ] = strtotime( $metas[ 'date' ] ) + ( get_option( 'gmt_offset' ) * 3600 );
799
+
800
+ //use file create dat if none
801
+ if ( empty( $joddata[ 'logtime' ] ) )
802
+ $joddata[ 'logtime' ] = filectime( $logfile );
803
+
804
+ return $joddata;
805
+ }
806
+
807
+
808
+ /**
809
+ *
810
+ * Shutdown function is call if script terminates try to make a restart if needed
811
+ *
812
+ * Prepare the job for start
813
+ *
814
+ * @internal param int the signal that terminates the job
815
+ */
816
+ public function shutdown() {
817
+
818
+ $args = func_get_args();
819
+
820
+ //nothing on empty
821
+ if ( empty( $this->logfile ) )
822
+ return;
823
+ //Put last error to log if one
824
+ $lasterror = error_get_last();
825
+ if ( $lasterror[ 'type' ] == E_ERROR or $lasterror[ 'type' ] == E_PARSE or $lasterror[ 'type' ] == E_CORE_ERROR or $lasterror[ 'type' ] == E_CORE_WARNING or $lasterror[ 'type' ] == E_COMPILE_ERROR or $lasterror[ 'type' ] == E_COMPILE_WARNING )
826
+ $this->log( $lasterror[ 'type' ], $lasterror[ 'message' ], $lasterror[ 'file' ], $lasterror[ 'line' ] );
827
+ //Put sigterm to log
828
+ if ( ! empty( $args[ 0 ] ) )
829
+ $this->log( sprintf( __( 'Signal %d is sent to script!', 'backwpup' ), $args[ 0 ] ), E_USER_ERROR );
830
+ //restarts count
831
+ $this->restarts ++;
832
+ //Back from maintenance
833
+ $this->maintenance_mode( FALSE );
834
+ //set jobstarttype to restart
835
+ $this->jobstarttype = 'restart';
836
+ $this->pid = 0;
837
+ //no restart if no working job
838
+ if ( ! self::get_working_data( FALSE ) )
839
+ exit();
840
+
841
+ //Restart on http job
842
+ $this->update_working_data( TRUE );
843
+
844
+ if ( ! defined( 'STDIN' ) ) {
845
+ $this->log( sprintf( __( '%d. Script stopped! Will start again.', 'backwpup' ), $this->restarts ) );
846
+ if ( ! defined( 'ALTERNATE_WP_CRON' ) || ! ALTERNATE_WP_CRON )
847
+ self::get_jobrun_url( 'restart' );
848
+ } elseif ( $this->step_working != 'END' ) {
849
+ $this->end();
850
+ }
851
+ exit();
852
+ }
853
+
854
+
855
+ /**
856
+ *
857
+ * Check is folder readable and exists create it if not
858
+ * add .htaccess or index.html file in folder to prevent directory listing
859
+ *
860
+ * @param string $folder the folder to check
861
+ *
862
+ * @return bool ok or not
863
+ */
864
+ public static function check_folder( $folder ) {
865
+
866
+ $folder = untrailingslashit( str_replace( '\\', '/', $folder ) );
867
+ if ( empty( $folder ) )
868
+ return FALSE;
869
+ //check that is not home of WP
870
+ if ( $folder == untrailingslashit( str_replace( '\\', '/', ABSPATH ) ) ||
871
+ $folder == untrailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) ) ||
872
+ $folder == untrailingslashit( str_replace( '\\', '/', WP_CONTENT_DIR ) )
873
+ ) {
874
+ trigger_error( sprintf( __( 'Please use another folder: %1$s', 'backwpup' ), $folder ), E_USER_WARNING );
875
+
876
+ return FALSE;
877
+ }
878
+ //create folder if it not exists
879
+ if ( ! is_dir( $folder ) ) {
880
+ if ( ! wp_mkdir_p( $folder ) ) {
881
+ trigger_error( sprintf( __( 'Can not create folder: %1$s', 'backwpup' ), $folder ), E_USER_ERROR );
882
+
883
+ return FALSE;
884
+ }
885
+ }
886
+
887
+ //check is writable dir
888
+ if ( ! is_writable( $folder ) ) {
889
+ trigger_error( sprintf( __( 'Folder "%1$s" is not writable', 'backwpup' ), $folder ), E_USER_ERROR );
890
+
891
+ return FALSE;
892
+ }
893
+
894
+ //create .htaccess for apache and index.php for folder security
895
+ if ( BackWPup_Option::get( 'cfg', 'protectfolders') && ! is_file( $folder . '/.htaccess' ) )
896
+ file_put_contents( $folder . '/.htaccess', "<Files \"*\">" . PHP_EOL . "<IfModule mod_access.c>" . PHP_EOL . "Deny from all" . PHP_EOL . "</IfModule>" . PHP_EOL . "<IfModule !mod_access_compat>" . PHP_EOL . "<IfModule mod_authz_host.c>" . PHP_EOL . "Deny from all" . PHP_EOL . "</IfModule>" . PHP_EOL . "</IfModule>" . PHP_EOL . "<IfModule mod_access_compat>" . PHP_EOL . "Deny from all" . PHP_EOL . "</IfModule>" . PHP_EOL . "</Files>" );
897
+ if ( BackWPup_Option::get( 'cfg', 'protectfolders') && ! is_file( $folder . '/index.php' ) )
898
+ file_put_contents( $folder . '/index.php', "<?php" . PHP_EOL . "header( \$_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found' );" . PHP_EOL . "header( 'Status: 404 Not Found' );" . PHP_EOL );
899
+ if ( ! BackWPup_Option::get( 'cfg', 'protectfolders') && is_file( $folder . '/.htaccess' ) )
900
+ unlink( $folder . '/.htaccess' );
901
+ if ( ! BackWPup_Option::get( 'cfg', 'protectfolders') && is_file( $folder . '/index.php' ) )
902
+ unlink( $folder . '/index.php' );
903
+
904
+ return TRUE;
905
+ }
906
+
907
+ /**
908
+ *
909
+ * The uncouth exception handler
910
+ *
911
+ * @param object $exception
912
+ */
913
+ public function exception_handler( $exception ) {
914
+ $this->log( E_USER_ERROR, sprintf( __( 'Exception caught in %1$s: %2$s', 'backwpup' ), get_class( $exception ), htmlentities( $exception->getMessage() ) ), $exception->getFile(), $exception->getLine() );
915
+ }
916
+
917
+ /**
918
+ *
919
+ * The error handler to write massage to log
920
+ *
921
+ * @internal param int the error number (E_USER_ERROR,E_USER_WARNING,E_USER_NOTICE, ...)
922
+ * @internal param string the error massage
923
+ * @internal param string the full path of file with error (__FILE__)
924
+ * @internal param int the line in that is the error (__LINE__)
925
+ *
926
+ * @return bool true
927
+ */
928
+ public function log() {
929
+
930
+ $args = func_get_args();
931
+ // if error has been suppressed with an @
932
+ if ( error_reporting() == 0 )
933
+ return TRUE;
934
+
935
+ //if first the massage an second the type switch it on user errors
936
+ if ( isset( $args[ 1 ] ) && in_array( $args[ 1 ], array( E_USER_NOTICE, E_USER_WARNING, E_USER_ERROR, 16384 ) ) ) {
937
+ $temp = $args[ 0 ];
938
+ $args[ 0 ] = $args[ 1 ];
939
+ $args[ 1 ] = $temp;
940
+ }
941
+
942
+ //if first the massage and not type set
943
+ if ( ! isset( $args[ 1 ] ) && ! is_int( $args[ 0 ] ) ) {
944
+ $args[ 1 ] = $args[ 0 ];
945
+ $args[ 0 ] = E_USER_NOTICE;
946
+ }
947
+
948
+ //serialize message if array or object
949
+ if ( is_array( $args[ 1 ] ) || is_object( $args[ 1 ] ) )
950
+ $args[ 1 ] = serialize( $args[ 1 ] );
951
+
952
+ //if not set line and file get it
953
+ if ( empty( $args[ 2 ] ) || empty( $args[ 3 ] ) ) {
954
+ $debug_info = debug_backtrace();
955
+ $args[ 2 ] = $debug_info[ 0 ][ 'file' ];
956
+ $args[ 3 ] = $debug_info[ 0 ][ 'line' ];
957
+ }
958
+
959
+ $adderrorwarning = FALSE;
960
+
961
+ switch ( $args[ 0 ] ) {
962
+ case E_NOTICE:
963
+ case E_USER_NOTICE:
964
+ $messagetype = '<samp>';
965
+ break;
966
+ case E_WARNING:
967
+ case E_CORE_WARNING:
968
+ case E_COMPILE_WARNING:
969
+ case E_USER_WARNING:
970
+ $this->warnings ++;
971
+ $adderrorwarning = TRUE;
972
+ $messagetype = '<samp style="background-color:#ffc000;color:#fff">' . __( 'WARNING:', 'backwpup' ) . ' ';
973
+ break;
974
+ case E_ERROR:
975
+ case E_PARSE:
976
+ case E_CORE_ERROR:
977
+ case E_COMPILE_ERROR:
978
+ case E_USER_ERROR:
979
+ $this->errors ++;
980
+ $adderrorwarning = TRUE;
981
+ $messagetype = '<samp style="background-color:red;color:#fff">' . __( 'ERROR:', 'backwpup' ) . ' ';
982
+ break;
983
+ case 8192: //E_DEPRECATED comes with php 5.3
984
+ case 16384: //E_USER_DEPRECATED comes with php 5.3
985
+ $messagetype = '<samp>' . __( 'DEPRECATED:', 'backwpup' ) . ' ';
986
+ break;
987
+ case E_STRICT:
988
+ $messagetype = '<samp>' . __( 'STRICT NOTICE:', 'backwpup' ) . ' ';
989
+ break;
990
+ case E_RECOVERABLE_ERROR:
991
+ $messagetype = '<samp>' . __( 'RECOVERABLE ERROR:', 'backwpup' ) . ' ';
992
+ break;
993
+ default:
994
+ $messagetype = '<samp>' . $args[ 0 ] . ": ";
995
+ break;
996
+ }
997
+
998
+ $in_file = str_replace( str_replace( '\\', '/', ABSPATH ), '', str_replace( '\\', '/', $args[ 2 ] ) );
999
+
1000
+ //print massage to cli
1001
+ if ( defined( 'STDIN' ) && defined( 'STDOUT' ) )
1002
+ fwrite( STDOUT, '[' . date_i18n( 'd-M-Y H:i:s' ) . '] ' . strip_tags( $messagetype ) . str_replace( '&hellip;', '...', strip_tags( $args[ 1 ] ) ) . PHP_EOL ) ;
1003
+ //log line
1004
+ $timestamp = '<span datetime="' . date_i18n( 'c' ) . '" title="[Type: ' . $args[ 0 ] . '|Line: ' . $args[ 3 ] . '|File: ' . $in_file . '|Mem: ' . size_format( @memory_get_usage( TRUE ), 2 ) . '|Mem Max: ' . size_format( @memory_get_peak_usage( TRUE ), 2 ) . '|Mem Limit: ' . ini_get( 'memory_limit' ) . '|PID: ' . self::get_pid() . '|Query\'s: ' . get_num_queries() . ']">[' . date_i18n( 'd-M-Y H:i:s' ) . ']</span> ';
1005
+ //ste last Message
1006
+ $this->lastmsg = $messagetype . $args[ 1 ] . '</samp>';
1007
+ //write log file
1008
+ file_put_contents( $this->logfile, $timestamp . $messagetype . $args[ 1 ] . '</samp>' . PHP_EOL, FILE_APPEND );
1009
+
1010
+ //write new log header
1011
+ if ( $adderrorwarning ) {
1012
+ $found = 0;
1013
+ $fd = fopen( $this->logfile, 'r+' );
1014
+ $filepos = ftell( $fd );
1015
+ while ( ! feof( $fd ) ) {
1016
+ $line = fgets( $fd );
1017
+ if ( stripos( $line, "<meta name=\"backwpup_errors\" content=\"" ) !== FALSE ) {
1018
+ fseek( $fd, $filepos );
1019
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_errors\" content=\"" . $this->errors . "\" />", 100 ) . PHP_EOL );
1020
+ $found ++;
1021
+ }
1022
+ if ( stripos( $line, "<meta name=\"backwpup_warnings\" content=\"" ) !== FALSE ) {
1023
+ fseek( $fd, $filepos );
1024
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_warnings\" content=\"" . $this->warnings . "\" />", 100 ) . PHP_EOL );
1025
+ $found ++;
1026
+ }
1027
+ if ( $found >= 2 )
1028
+ break;
1029
+ $filepos = ftell( $fd );
1030
+ }
1031
+ fclose( $fd );
1032
+ }
1033
+
1034
+ //write working data
1035
+ $this->update_working_data( $adderrorwarning );
1036
+
1037
+ //true for no more php error handling.
1038
+ return TRUE;
1039
+ }
1040
+
1041
+ /**
1042
+ *
1043
+ * Write the Working data to display the process or that i can executes again
1044
+ *
1045
+ * @global wpdb $wpdb
1046
+ * @param bool $mustwrite overwrite the only ever 1 sec writing
1047
+ * @return bool true if working date written
1048
+ */
1049
+ public function update_working_data( $mustwrite = FALSE ) {
1050
+ global $wpdb;
1051
+
1052
+ //to reduce server load
1053
+ if ( BackWPup_Option::get( 'cfg', 'jobwaittimems' ) > 0 && BackWPup_Option::get( 'cfg', 'jobwaittimems') <= 500000 )
1054
+ usleep( BackWPup_Option::get( 'cfg', 'jobwaittimems' ) );
1055
+
1056
+ //only run every 1 sec.
1057
+ $timetoupdate = microtime( TRUE ) - $this->timestamp_last_update;
1058
+ if ( ! $mustwrite && $timetoupdate < 1 )
1059
+ return TRUE;
1060
+
1061
+ //set execution time again
1062
+ @set_time_limit( 0 );
1063
+
1064
+ //check MySQL connection to WordPress Database and reconnect if needed
1065
+ if ( ! mysql_ping( $wpdb->dbh ) )
1066
+ $wpdb->db_connect();
1067
+
1068
+ //check if job already aborted
1069
+ if ( ! self::get_working_data( FALSE ) && $this->step_working != 'END') {
1070
+ $this->end();
1071
+
1072
+ return FALSE;
1073
+ }
1074
+
1075
+ //calc sub step percent
1076
+ if ( $this->substeps_todo > 0 && $this->substeps_done > 0 )
1077
+ $this->substep_percent = round( $this->substeps_done / $this->substeps_todo * 100 );
1078
+ else
1079
+ $this->substep_percent = 1;
1080
+ $this->timestamp_last_update = microtime( TRUE );
1081
+
1082
+ //write data to file
1083
+ if ( self::get_working_data( FALSE ) )
1084
+ file_put_contents( BackWPup::get_plugin_data( 'running_file' ), '<?php //'. serialize( $this ) );
1085
+
1086
+ return TRUE;
1087
+ }
1088
+
1089
+ /**
1090
+ *
1091
+ * Called on job stop makes cleanup and terminates the script
1092
+ *
1093
+ */
1094
+ private function end() {
1095
+
1096
+ $this->step_working = 'END';
1097
+ $this->substeps_todo = 1;
1098
+
1099
+ //Back from maintenance if not
1100
+ if ( is_file( ABSPATH . '.maintenance' ) || ( defined( 'FB_WM_TEXTDOMAIN' ) && ( get_site_option( FB_WM_TEXTDOMAIN . '-msqld' ) == 1 || get_option( FB_WM_TEXTDOMAIN . '-msqld' ) == 1 ) ) )
1101
+ $this->maintenance_mode( FALSE );
1102
+
1103
+ //delete old logs
1104
+ if ( BackWPup_Option::get( 'cfg', 'maxlogs' ) ) {
1105
+ $logfilelist = array();
1106
+ if ( $dir = opendir( BackWPup_Option::get( 'cfg', 'logfolder' ) ) ) { //make file list
1107
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
1108
+ if ( strstr( $file, 'backwpup_log_' ) && ( strstr( $file, '.html' ) || strstr( $file, '.html.gz' ) ) )
1109
+ $logfilelist[ ] = $file;
1110
+ }
1111
+ closedir( $dir );
1112
+ }
1113
+ if ( sizeof( $logfilelist ) > 0 ) {
1114
+ rsort( $logfilelist );
1115
+ $numdeltefiles = 0;
1116
+ for ( $i = BackWPup_Option::get( 'cfg', 'maxlogs' ); $i < sizeof( $logfilelist ); $i ++ ) {
1117
+ unlink( BackWPup_Option::get( 'cfg', 'logfolder' ) . $logfilelist[ $i ] );
1118
+ $numdeltefiles ++;
1119
+ }
1120
+ if ( $numdeltefiles > 0 )
1121
+ $this->log( sprintf( _n( 'One old log deleted', '%d old logs deleted', $numdeltefiles, 'backwpup' ), $numdeltefiles ), E_USER_NOTICE );
1122
+ }
1123
+ }
1124
+
1125
+ //Display job working time
1126
+ $this->log( sprintf( __( 'Job done in %s seconds.', 'backwpup' ), current_time( 'timestamp' ) - $this->start_time, E_USER_NOTICE ) );
1127
+
1128
+ //clean up temp
1129
+ if ( ! empty( $this->backup_file ) && is_file( BackWPup::get_plugin_data( 'TEMP' ) . $this->backup_file ) )
1130
+ unlink( BackWPup::get_plugin_data( 'TEMP' ) . $this->backup_file );
1131
+ if ( ! empty( $this->folder_list_file ) && is_file( $this->folder_list_file ) )
1132
+ unlink( $this->folder_list_file );
1133
+ if ( ! empty( $this->additional_files_to_backup ) ) {
1134
+ foreach ( $this->additional_files_to_backup as $additional_file ) {
1135
+ if ( $additional_file == BackWPup::get_plugin_data( 'TEMP' ) . basename( $additional_file ) && is_file( $additional_file ) )
1136
+ unlink( $additional_file );
1137
+ }
1138
+ }
1139
+ //delete running file
1140
+ if ( is_file( BackWPup::get_plugin_data( 'running_file' ) ) )
1141
+ unlink( BackWPup::get_plugin_data( 'running_file' ) );
1142
+
1143
+ //Update job options
1144
+ if ( ! empty( $this->job[ 'jobid' ] ) ) {
1145
+ $this->job[ 'lastruntime' ] = current_time( 'timestamp' ) - $this->start_time;
1146
+ BackWPup_Option::update( $this->job[ 'jobid' ], 'lastruntime', $this->job[ 'lastruntime' ] );
1147
+ }
1148
+
1149
+ //write header info
1150
+ if ( is_writable( $this->logfile ) ) {
1151
+ $fd = fopen( $this->logfile, 'r+' );
1152
+ $filepos = ftell( $fd );
1153
+ $found = 0;
1154
+ while ( ! feof( $fd ) ) {
1155
+ $line = fgets( $fd );
1156
+ if ( stripos( $line, "<meta name=\"backwpup_jobruntime\"" ) !== FALSE ) {
1157
+ fseek( $fd, $filepos );
1158
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_jobruntime\" content=\"" . $this->job[ 'lastruntime' ] . "\" />", 100 ) . PHP_EOL );
1159
+ $found ++;
1160
+ }
1161
+ if ( stripos( $line, "<meta name=\"backwpup_backupfilesize\"" ) !== FALSE ) {
1162
+ fseek( $fd, $filepos );
1163
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_backupfilesize\" content=\"" . $this->backup_filesize . "\" />", 100 ) . PHP_EOL );
1164
+ $found ++;
1165
+ }
1166
+ if ( $found >= 2 )
1167
+ break;
1168
+ $filepos = ftell( $fd );
1169
+ }
1170
+ fclose( $fd );
1171
+ }
1172
+ //Restore error handler
1173
+ restore_exception_handler();
1174
+ restore_error_handler();
1175
+ @ini_set( 'log_errors', $this->temp[ 'PHP' ][ 'INI' ][ 'LOG_ERRORS' ] );
1176
+ @ini_set( 'error_log', $this->temp[ 'PHP' ][ 'INI' ][ 'ERROR_LOG' ] );
1177
+ @ini_set( 'display_errors', $this->temp[ 'PHP' ][ 'INI' ][ 'DISPLAY_ERRORS' ] );
1178
+ if ( $this->temp[ 'PHP' ][ 'ENV' ][ 'TEMPDIR' ] )
1179
+ putenv('TMPDIR=' . $this->temp[ 'PHP' ][ 'ENV' ][ 'TEMPDIR' ] );
1180
+ //logfile end
1181
+ file_put_contents( $this->logfile, "</body>" . PHP_EOL . "</html>", FILE_APPEND );
1182
+
1183
+ //Send mail with log
1184
+ $sendmail = FALSE;
1185
+ if ( $this->errors > 0 && $this->job[ 'mailerroronly' ] && $this->job[ 'mailaddresslog' ] )
1186
+ $sendmail = TRUE;
1187
+ if ( ! $this->job[ 'mailerroronly' ] && $this->job[ 'mailaddresslog' ] )
1188
+ $sendmail = TRUE;
1189
+ if ( $sendmail ) {
1190
+ //special subject
1191
+ $status = __( 'SUCCESSFUL', 'backwpup' );
1192
+ $priority = 3; //Normal
1193
+ if ( $this->warnings > 0 ) {
1194
+ $status = __( 'WARNING', 'backwpup' );
1195
+ $priority = 2; //High
1196
+ }
1197
+ if ( $this->errors > 0 ) {
1198
+ $status = __( 'ERROR', 'backwpup' );
1199
+ $priority = 1; //Highest
1200
+ }
1201
+
1202
+ $subject = sprintf( __( '[%3$s] BackWPup log %1$s: %2$s', 'backwpup' ), date_i18n( 'd-M-Y H:i', $this->start_time, TRUE ), esc_attr( $this->job[ 'name' ] ), $status );
1203
+ $headers = array();
1204
+ $headers[] = 'Content-Type: text/html; charset='. get_bloginfo( 'charset' );
1205
+ $headers[] = 'X-Priority: '.$priority;
1206
+ $headers[] = 'From: BackWPup <' . sanitize_email( get_bloginfo( 'admin_email' ) ).'>';
1207
+
1208
+ wp_mail( $this->job[ 'mailaddresslog' ], $subject, file_get_contents( $this->logfile ), $headers );
1209
+ }
1210
+
1211
+ //remove restart cron
1212
+ wp_clear_scheduled_hook( 'backwpup_cron', array( 'id' => 'restart' ) );
1213
+
1214
+ //remove shutdown action
1215
+ remove_action( 'shutdown', array( $this, 'shutdown' ) );
1216
+
1217
+ //set done
1218
+ $this->substeps_done = 1;
1219
+ $this->steps_done[ ] = 'END';
1220
+
1221
+ //run cleanup and check
1222
+ BackWPup_Cron::check_cleanup();
1223
+
1224
+ exit();
1225
+ }
1226
+
1227
+ /**
1228
+ *
1229
+ * Ste blog to maintenance mode
1230
+ *
1231
+ * @param bool $enable set to true to enable maintenance
1232
+ */
1233
+ public function maintenance_mode( $enable = FALSE ) {
1234
+
1235
+ if ( $enable ) {
1236
+ $this->log( __( 'Set blog into maintenance mode', 'backwpup' ), E_USER_NOTICE );
1237
+ if ( class_exists( 'WPMaintenanceMode' ) ) { //Support for WP Maintenance Mode Plugin (Frank Bueltge)
1238
+ if ( is_multisite() && is_plugin_active_for_network( FB_WM_BASENAME ) )
1239
+ update_site_option( FB_WM_TEXTDOMAIN . '-msqld', 1 );
1240
+ else
1241
+ update_option( FB_WM_TEXTDOMAIN . '-msqld', 1 );
1242
+ }
1243
+ else { //WP Support
1244
+ if ( $this->jobstarttype == 'runnow' || $this->jobstarttype == 'runnowalt' ) {
1245
+ $this->log( __( 'WordPress Maintenance mode not activated on Manual run. Because it disappears displaying of working progress.', 'backwpup' ), E_USER_NOTICE );
1246
+ return;
1247
+ }
1248
+ if ( FALSE === file_put_contents( ABSPATH . '.maintenance', '<?php $upgrading = ' . time() . '; ?>' ) )
1249
+ $this->log( __( 'Cannot set blog into maintenance mode! .maintenance is not writable!', 'backwpup' ), E_USER_WARNING );
1250
+ }
1251
+ }
1252
+ else {
1253
+ if ( is_file( ABSPATH . '.maintenance' ) or ( defined( 'FB_WM_TEXTDOMAIN' ) && ( get_site_option( FB_WM_TEXTDOMAIN . '-msqld' ) == 1 or get_option( FB_WM_TEXTDOMAIN . '-msqld' ) == 1 ) ) ) {
1254
+ $this->log( __( 'Set blog to normal mode', 'backwpup' ), E_USER_NOTICE );
1255
+ if ( class_exists( 'WPMaintenanceMode' ) ) { //Support for WP Maintenance Mode Plugin (Frank Bueltge)
1256
+ if ( is_multisite() && is_plugin_active_for_network( FB_WM_BASENAME ) )
1257
+ update_site_option( FB_WM_TEXTDOMAIN . '-msqld', 0 );
1258
+ else
1259
+ update_option( FB_WM_TEXTDOMAIN . '-msqld', 0 );
1260
+ }
1261
+ else { //WP Support
1262
+ @unlink( ABSPATH . '.maintenance' );
1263
+ }
1264
+ }
1265
+ }
1266
+ }
1267
+
1268
+ /**
1269
+ *
1270
+ * Increase automatically the memory that is needed
1271
+ *
1272
+ * @param int|string $memneed of the needed memory
1273
+ */
1274
+ public function need_free_memory( $memneed ) {
1275
+
1276
+ //need memory
1277
+ $needmemory = @memory_get_usage( TRUE ) + self::convert_hr_to_bytes( $memneed );
1278
+ // increase Memory
1279
+ if ( $needmemory > self::convert_hr_to_bytes( ini_get( 'memory_limit' ) ) ) {
1280
+ $newmemory = round( $needmemory / 1024 / 1024 ) + 1 . 'M';
1281
+ if ( $needmemory >= 1073741824 )
1282
+ $newmemory = round( $needmemory / 1024 / 1024 / 1024 ) . 'G';
1283
+ if ( $oldmem = @ini_set( 'memory_limit', $newmemory ) )
1284
+ $this->log( sprintf( __( 'Memory increased from %1$s to %2$s', 'backwpup' ), $oldmem, @ini_get( 'memory_limit' ) ), E_USER_NOTICE );
1285
+ else
1286
+ $this->log( sprintf( __( 'Can not increase memory limit. The current value is %1$s', 'backwpup' ), @ini_get( 'memory_limit' ) ), E_USER_WARNING );
1287
+ }
1288
+ }
1289
+
1290
+
1291
+ /**
1292
+ *
1293
+ * Converts hr to bytes
1294
+ *
1295
+ * @param $size
1296
+ * @return int
1297
+ */
1298
+ public static function convert_hr_to_bytes( $size ) {
1299
+ $size = strtolower( $size );
1300
+ $bytes = (int) $size;
1301
+ if ( strpos( $size, 'k' ) !== FALSE )
1302
+ $bytes = intval( $size ) * 1024;
1303
+ elseif ( strpos( $size, 'm' ) !== FALSE )
1304
+ $bytes = intval($size) * 1024 * 1024;
1305
+ elseif ( strpos( $size, 'g' ) !== FALSE )
1306
+ $bytes = intval( $size ) * 1024 * 1024 * 1024;
1307
+ return $bytes;
1308
+ }
1309
+
1310
+ /**
1311
+ *
1312
+ * Callback for the CURLOPT_READFUNCTION that submit the transferred bytes
1313
+ * to build the process bar
1314
+ *
1315
+ * @param $curl_handle
1316
+ * @param $file_handle
1317
+ * @param $read_count
1318
+ * @return string
1319
+ * @internal param $out
1320
+ */
1321
+ public function curl_read_callback( $curl_handle, $file_handle, $read_count ) {
1322
+
1323
+ $data = NULL;
1324
+ if ( ! empty( $file_handle ) )
1325
+ $data = fread( $file_handle, $read_count );
1326
+
1327
+ if ( $this->substeps_todo > 10 && $this->job[ 'backuptype' ] != 'sync' )
1328
+ $this->substeps_done = $this->substeps_done + $read_count ;
1329
+ $this->update_working_data();
1330
+
1331
+ return $data;
1332
+ }
1333
+
1334
+
1335
+ /**
1336
+ *
1337
+ * Get the mime type of a file
1338
+ *
1339
+ * @param string $file The full file name
1340
+ *
1341
+ * @return bool|string the mime type or false
1342
+ */
1343
+ public function get_mime_type( $file ) {
1344
+
1345
+ if ( ! is_file( $file ) )
1346
+ return FALSE;
1347
+
1348
+ if ( function_exists( 'fileinfo' ) ) {
1349
+ $finfo = finfo_open( FILEINFO_MIME_TYPE );
1350
+
1351
+ return finfo_file( $finfo, $file );
1352
+ }
1353
+
1354
+ if ( function_exists( 'mime_content_type' ) ) {
1355
+ return mime_content_type( $file );
1356
+ }
1357
+
1358
+ $mime_types = array(
1359
+ '3gp' => 'video/3gpp',
1360
+ 'ai' => 'application/postscript',
1361
+ 'aif' => 'audio/x-aiff',
1362
+ 'aifc' => 'audio/x-aiff',
1363
+ 'aiff' => 'audio/x-aiff',
1364
+ 'asc' => 'text/plain',
1365
+ 'atom' => 'application/atom+xml',
1366
+ 'au' => 'audio/basic',
1367
+ 'avi' => 'video/x-msvideo',
1368
+ 'bcpio' => 'application/x-bcpio',
1369
+ 'bin' => 'application/octet-stream',
1370
+ 'bmp' => 'image/bmp',
1371
+ 'cdf' => 'application/x-netcdf',
1372
+ 'cgm' => 'image/cgm',
1373
+ 'class' => 'application/octet-stream',
1374
+ 'cpio' => 'application/x-cpio',
1375
+ 'cpt' => 'application/mac-compactpro',
1376
+ 'csh' => 'application/x-csh',
1377
+ 'css' => 'text/css',
1378
+ 'dcr' => 'application/x-director',
1379
+ 'dif' => 'video/x-dv',
1380
+ 'dir' => 'application/x-director',
1381
+ 'djv' => 'image/vnd.djvu',
1382
+ 'djvu' => 'image/vnd.djvu',
1383
+ 'dll' => 'application/octet-stream',
1384
+ 'dmg' => 'application/octet-stream',
1385
+ 'dms' => 'application/octet-stream',
1386
+ 'doc' => 'application/msword',
1387
+ 'dtd' => 'application/xml-dtd',
1388
+ 'dv' => 'video/x-dv',
1389
+ 'dvi' => 'application/x-dvi',
1390
+ 'dxr' => 'application/x-director',
1391
+ 'eps' => 'application/postscript',
1392
+ 'etx' => 'text/x-setext',
1393
+ 'exe' => 'application/octet-stream',
1394
+ 'ez' => 'application/andrew-inset',
1395
+ 'flv' => 'video/x-flv',
1396
+ 'gif' => 'image/gif',
1397
+ 'gram' => 'application/srgs',
1398
+ 'grxml' => 'application/srgs+xml',
1399
+ 'gtar' => 'application/x-gtar',
1400
+ 'gz' => 'application/x-gzip',
1401
+ 'hdf' => 'application/x-hdf',
1402
+ 'hqx' => 'application/mac-binhex40',
1403
+ 'htm' => 'text/html',
1404
+ 'html' => 'text/html',
1405
+ 'ice' => 'x-conference/x-cooltalk',
1406
+ 'ico' => 'image/x-icon',
1407
+ 'ics' => 'text/calendar',
1408
+ 'ief' => 'image/ief',
1409
+ 'ifb' => 'text/calendar',
1410
+ 'iges' => 'model/iges',
1411
+ 'igs' => 'model/iges',
1412
+ 'jnlp' => 'application/x-java-jnlp-file',
1413
+ 'jp2' => 'image/jp2',
1414
+ 'jpe' => 'image/jpeg',
1415
+ 'jpeg' => 'image/jpeg',
1416
+ 'jpg' => 'image/jpeg',
1417
+ 'js' => 'application/x-javascript',
1418
+ 'kar' => 'audio/midi',
1419
+ 'latex' => 'application/x-latex',
1420
+ 'lha' => 'application/octet-stream',
1421
+ 'lzh' => 'application/octet-stream',
1422
+ 'm3u' => 'audio/x-mpegurl',
1423
+ 'm4a' => 'audio/mp4a-latm',
1424
+ 'm4p' => 'audio/mp4a-latm',
1425
+ 'm4u' => 'video/vnd.mpegurl',
1426
+ 'm4v' => 'video/x-m4v',
1427
+ 'mac' => 'image/x-macpaint',
1428
+ 'man' => 'application/x-troff-man',
1429
+ 'mathml' => 'application/mathml+xml',
1430
+ 'me' => 'application/x-troff-me',
1431
+ 'mesh' => 'model/mesh',
1432
+ 'mid' => 'audio/midi',
1433
+ 'midi' => 'audio/midi',
1434
+ 'mif' => 'application/vnd.mif',
1435
+ 'mov' => 'video/quicktime',
1436
+ 'movie' => 'video/x-sgi-movie',
1437
+ 'mp2' => 'audio/mpeg',
1438
+ 'mp3' => 'audio/mpeg',
1439
+ 'mp4' => 'video/mp4',
1440
+ 'mpe' => 'video/mpeg',
1441
+ 'mpeg' => 'video/mpeg',
1442
+ 'mpg' => 'video/mpeg',
1443
+ 'mpga' => 'audio/mpeg',
1444
+ 'ms' => 'application/x-troff-ms',
1445
+ 'msh' => 'model/mesh',
1446
+ 'mxu' => 'video/vnd.mpegurl',
1447
+ 'nc' => 'application/x-netcdf',
1448
+ 'oda' => 'application/oda',
1449
+ 'ogg' => 'application/ogg',
1450
+ 'ogv' => 'video/ogv',
1451
+ 'pbm' => 'image/x-portable-bitmap',
1452
+ 'pct' => 'image/pict',
1453
+ 'pdb' => 'chemical/x-pdb',
1454
+ 'pdf' => 'application/pdf',
1455
+ 'pgm' => 'image/x-portable-graymap',
1456
+ 'pgn' => 'application/x-chess-pgn',
1457
+ 'pic' => 'image/pict',
1458
+ 'pict' => 'image/pict',
1459
+ 'png' => 'image/png',
1460
+ 'pnm' => 'image/x-portable-anymap',
1461
+ 'pnt' => 'image/x-macpaint',
1462
+ 'pntg' => 'image/x-macpaint',
1463
+ 'ppm' => 'image/x-portable-pixmap',
1464
+ 'ppt' => 'application/vnd.ms-powerpoint',
1465
+ 'ps' => 'application/postscript',
1466
+ 'qt' => 'video/quicktime',
1467
+ 'qti' => 'image/x-quicktime',
1468
+ 'qtif' => 'image/x-quicktime',
1469
+ 'ra' => 'audio/x-pn-realaudio',
1470
+ 'ram' => 'audio/x-pn-realaudio',
1471
+ 'ras' => 'image/x-cmu-raster',
1472
+ 'rdf' => 'application/rdf+xml',
1473
+ 'rgb' => 'image/x-rgb',
1474
+ 'rm' => 'application/vnd.rn-realmedia',
1475
+ 'roff' => 'application/x-troff',
1476
+ 'rtf' => 'text/rtf',
1477
+ 'rtx' => 'text/richtext',
1478
+ 'sgm' => 'text/sgml',
1479
+ 'sgml' => 'text/sgml',
1480
+ 'sh' => 'application/x-sh',
1481
+ 'shar' => 'application/x-shar',
1482
+ 'silo' => 'model/mesh',
1483
+ 'sit' => 'application/x-stuffit',
1484
+ 'skd' => 'application/x-koan',
1485
+ 'skm' => 'application/x-koan',
1486
+ 'skp' => 'application/x-koan',
1487
+ 'skt' => 'application/x-koan',
1488
+ 'smi' => 'application/smil',
1489
+ 'smil' => 'application/smil',
1490
+ 'snd' => 'audio/basic',
1491
+ 'so' => 'application/octet-stream',
1492
+ 'spl' => 'application/x-futuresplash',
1493
+ 'src' => 'application/x-wais-source',
1494
+ 'sv4cpio' => 'application/x-sv4cpio',
1495
+ 'sv4crc' => 'application/x-sv4crc',
1496
+ 'svg' => 'image/svg+xml',
1497
+ 'swf' => 'application/x-shockwave-flash',
1498
+ 't' => 'application/x-troff',
1499
+ 'tar' => 'application/x-tar',
1500
+ 'tcl' => 'application/x-tcl',
1501
+ 'tex' => 'application/x-tex',
1502
+ 'texi' => 'application/x-texinfo',
1503
+ 'texinfo' => 'application/x-texinfo',
1504
+ 'tif' => 'image/tiff',
1505
+ 'tiff' => 'image/tiff',
1506
+ 'tr' => 'application/x-troff',
1507
+ 'tsv' => 'text/tab-separated-values',
1508
+ 'txt' => 'text/plain',
1509
+ 'ustar' => 'application/x-ustar',
1510
+ 'vcd' => 'application/x-cdlink',
1511
+ 'vrml' => 'model/vrml',
1512
+ 'vxml' => 'application/voicexml+xml',
1513
+ 'wav' => 'audio/x-wav',
1514
+ 'wbmp' => 'image/vnd.wap.wbmp',
1515
+ 'wbxml' => 'application/vnd.wap.wbxml',
1516
+ 'webm' => 'video/webm',
1517
+ 'wml' => 'text/vnd.wap.wml',
1518
+ 'wmlc' => 'application/vnd.wap.wmlc',
1519
+ 'wmls' => 'text/vnd.wap.wmlscript',
1520
+ 'wmlsc' => 'application/vnd.wap.wmlscriptc',
1521
+ 'wmv' => 'video/x-ms-wmv',
1522
+ 'wrl' => 'model/vrml',
1523
+ 'xbm' => 'image/x-xbitmap',
1524
+ 'xht' => 'application/xhtml+xml',
1525
+ 'xhtml' => 'application/xhtml+xml',
1526
+ 'xls' => 'application/vnd.ms-excel',
1527
+ 'xml' => 'application/xml',
1528
+ 'xpm' => 'image/x-xpixmap',
1529
+ 'xsl' => 'application/xml',
1530
+ 'xslt' => 'application/xslt+xml',
1531
+ 'xul' => 'application/vnd.mozilla.xul+xml',
1532
+ 'xwd' => 'image/x-xwindowdump',
1533
+ 'xyz' => 'chemical/x-xyz',
1534
+ 'zip' => 'application/zip'
1535
+ );
1536
+
1537
+ $filesuffix = pathinfo($file, PATHINFO_EXTENSION);
1538
+ $suffix = strtolower( $filesuffix );
1539
+ if ( isset( $mime_types[ $suffix ] ) )
1540
+ return $mime_types[ $suffix ];
1541
+
1542
+ return 'application/octet-stream';
1543
+ }
1544
+
1545
+
1546
+ /**
1547
+ *
1548
+ * Gifs back a array of files to backup in the selected folder
1549
+ *
1550
+ * @param string $folder the folder to get the files from
1551
+ *
1552
+ * @return array files to backup
1553
+ */
1554
+ public function get_files_in_folder( $folder ) {
1555
+
1556
+ $files = array();
1557
+
1558
+ if ( ! is_dir( $folder ) ) {
1559
+ $this->log( sprintf( _x( 'Folder %s not exists', 'Folder name', 'backwpup' ), $folder ), E_USER_WARNING );
1560
+ return $files;
1561
+ }
1562
+ if ( ! is_readable( $folder ) ) {
1563
+ $this->log( sprintf( _x( 'Folder %s not readable', 'Folder name', 'backwpup' ), $folder ), E_USER_WARNING );
1564
+ return $files;
1565
+ }
1566
+
1567
+ if ( $dir = scandir( $folder ) ) {
1568
+ foreach ( $dir as $file ) {
1569
+ if ( in_array( $file, array( '.', '..' ) ) )
1570
+ continue;
1571
+ foreach ( $this->exclude_from_backup as $exclusion ) { //exclude files
1572
+ $exclusion = trim( $exclusion );
1573
+ if ( FALSE !== stripos( $folder . $file, trim( $exclusion ) ) && ! empty( $exclusion ) )
1574
+ continue 2;
1575
+ }
1576
+ if ( $this->job[ 'backupexcludethumbs' ] && strpos( $folder, BackWPup_File::get_upload_dir() ) !== FALSE && preg_match( "/\-[0-9]{2,4}x[0-9]{2,4}\.(jpg|png|gif)$/i", $file ) )
1577
+ continue;
1578
+ if ( ! is_readable( $folder . $file ) )
1579
+ $this->log( sprintf( __( 'File "%s" is not readable!', 'backwpup' ), $folder . $file ), E_USER_WARNING );
1580
+ elseif ( is_link( $folder . $file ) )
1581
+ $this->log( sprintf( __( 'Link "%s" not followed.', 'backwpup' ), $folder . $file ), E_USER_WARNING );
1582
+ elseif ( is_file( $folder . $file ) ) {
1583
+ $files[ ] = $folder . $file;
1584
+ $this->count_files_in_folder ++;
1585
+ $this->count_filesize_in_folder = $this->count_filesize_in_folder + @filesize( $folder . $file );
1586
+ }
1587
+ }
1588
+ }
1589
+
1590
+ return $files;
1591
+ }
1592
+
1593
+ /**
1594
+ * Creates the backup archive
1595
+ */
1596
+ private function create_archive() {
1597
+
1598
+ //load folders to backup
1599
+ $folders_to_backup = $this->get_folders_to_backup();
1600
+
1601
+ $this->substeps_todo = $this->count_folder + 1;
1602
+
1603
+ $this->log( sprintf( __( '%d. Trying to create backup archive &hellip;', 'backwpup' ), $this->steps_data[ $this->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
1604
+
1605
+ try {
1606
+ $backup_archive = new BackWPup_Create_Archive( $this->backup_folder . $this->backup_file );
1607
+
1608
+ //schow method for creation
1609
+ if( defined( 'WP_DEBUG' ) && WP_DEBUG )
1610
+ $this->log( sprintf( _x( 'Compression method is %s', 'Archive compression method', 'backwpup'), $backup_archive->get_method() ) );
1611
+
1612
+ //add extra files
1613
+ if ( $this->substeps_done == 0 ) {
1614
+ if ( ! empty( $this->additional_files_to_backup ) && $this->substeps_done == 0 ) {
1615
+ foreach ( $this->additional_files_to_backup as $file ) {
1616
+ $backup_archive->add_file( $file, basename( $file ) );
1617
+ $this->count_files ++;
1618
+ $this->count_filesize = filesize( $file );
1619
+ $this->update_working_data();
1620
+ }
1621
+ }
1622
+ $this->substeps_done ++;
1623
+ }
1624
+ //add normal files
1625
+ for ( $i = $this->substeps_done - 1; $i < $this->substeps_todo - 1; $i ++ ) {
1626
+ $files = $this->get_files_in_folder( $folders_to_backup[ $i ] );
1627
+ if ( count( $files ) > 0 ) {
1628
+ foreach ( $files as $file ) {
1629
+ $in_archive_filename = ltrim( str_replace( $this->remove_path, '', $file ), '/' );
1630
+ $backup_archive->add_file( $file, $in_archive_filename );
1631
+ $this->update_working_data();
1632
+ }
1633
+ }
1634
+ $this->substeps_done ++;
1635
+ }
1636
+ unset( $backup_archive );
1637
+ $this->log( __( 'Backup archive created.', 'backwpup' ), E_USER_NOTICE );
1638
+ } catch ( Exception $e ) {
1639
+ $this->log( $e->getMessage(), E_USER_ERROR, $e->getFile(), $e->getLine() );
1640
+ unset( $backup_archive );
1641
+ return FALSE;
1642
+ }
1643
+
1644
+ $this->backup_filesize = filesize( $this->backup_folder . $this->backup_file );
1645
+ if ( $this->backup_filesize )
1646
+ $this->log( sprintf( __( 'Archive size is %s.', 'backwpup' ), size_format( $this->backup_filesize, 2 ) ), E_USER_NOTICE );
1647
+ $this->log( sprintf( __( '%1$d Files with %2$s in Archive.', 'backwpup' ), $this->count_files + $this->count_files_in_folder, size_format( $this->count_filesize + $this->count_filesize_in_folder, 2 ) ), E_USER_NOTICE );
1648
+
1649
+ return TRUE;
1650
+ }
1651
+
1652
+ /**
1653
+ * @param $name
1654
+ * @param string $suffix
1655
+ * @param bool $delete_temp_file
1656
+ * @return string
1657
+ */
1658
+ public function generate_filename( $name, $suffix = '', $delete_temp_file = TRUE ) {
1659
+
1660
+ $datevars = array( '%d', '%j', '%m', '%n', '%Y', '%y', '%a', '%A', '%B', '%g', '%G', '%h', '%H', '%i', '%s', '%u', '%U' );
1661
+ $datevalues = array( date_i18n( 'd' ), date_i18n( 'j' ), date_i18n( 'm' ), date_i18n( 'n' ), date_i18n( 'Y' ), date_i18n( 'y' ), date_i18n( 'a' ), date_i18n( 'A' ), date_i18n( 'B' ), date_i18n( 'g' ), date_i18n( 'G' ), date_i18n( 'h' ), date_i18n( 'H' ), date_i18n( 'i' ), date_i18n( 's' ), date_i18n( 'u' ), date_i18n( 'U' ) );
1662
+
1663
+ if ( ! empty( $suffix ) && substr( $suffix, 0, 1 ) != '.' )
1664
+ $suffix = '.' . $suffix;
1665
+
1666
+ $name = str_replace( $datevars, $datevalues, $name ) . $suffix;
1667
+ $name = sanitize_file_name( $name );
1668
+ if ( $delete_temp_file && is_file( BackWPup::get_plugin_data( 'TEMP' ) . $name ) )
1669
+ unlink( BackWPup::get_plugin_data( 'TEMP' ) . $name );
1670
+
1671
+ return $name;
1672
+ }
1673
+
1674
+ /**
1675
+ * @param $filename
1676
+ * @return bool
1677
+ */
1678
+ public function is_backup_archive( $filename ) {
1679
+
1680
+ $filename = basename( $filename );
1681
+ $datevars = array( '%d', '%j', '%m', '%n', '%Y', '%y', '%a', '%A', '%B', '%g', '%G', '%h', '%H', '%i', '%s', '%u', '%U' );
1682
+ $dateregex = array( '(0[1-9]|[12][0-9]|3[01])', '([1-9]|[12][0-9]|3[01])', '(0[1-9]|1[0-2])', '([1-9]|1[0-2])', '((19|20|21)[0-9]{2})', '([0-9]{2})', '(am|pm)', '(AM|PM)', '([0-9]{3})', '([1-9]|1[0-2])', '([1-9]|1[0-9]|2[0-4])', '(0[1-9]|1[0-2])', '(0[1-9]|1[0-9]|2[0-4])', '(0[1-9]|[1-5][0-9])', '(0[1-9]|[1-5][0-9])', '\d', '\d' );
1683
+
1684
+ $regex = "/^" . str_replace( $datevars, $dateregex, str_replace( "\/", "/", $this->job[ 'archivename' ] ) . $this->job[ 'archiveformat' ] ) . "$/";
1685
+
1686
+ preg_match( $regex, basename( $filename ), $matches );
1687
+ if ( ! empty( $matches[ 0 ] ) && $matches[ 0 ] == $filename )
1688
+ return TRUE;
1689
+
1690
+ return FALSE;
1691
+ }
1692
+
1693
+ /**
1694
+ * Get the Process id of working script
1695
+ *
1696
+ * @return int
1697
+ */
1698
+ private static function get_pid( ) {
1699
+
1700
+ if ( function_exists( 'posix_getpid' ) ) {
1701
+
1702
+ return posix_getpid();
1703
+ } elseif ( function_exists( 'getmypid' ) ) {
1704
+
1705
+ return getmypid();
1706
+ }
1707
+
1708
+ return -1;
1709
+ }
1710
+
1711
+ /**
1712
+ * Add a Folder to list of Folders to Backup
1713
+ *
1714
+ * @param $folder
1715
+ */
1716
+ public function add_folder_to_backup( $folder ) {
1717
+
1718
+ if ( empty( $folder ) || empty( $this->folder_list_file ) || ! is_dir( $folder ) )
1719
+ return;
1720
+
1721
+ if ( empty( $this->count_folder ) ) {
1722
+ if ( is_file( $this->folder_list_file ) )
1723
+ unlink( $this->folder_list_file );
1724
+ file_put_contents( $this->folder_list_file ,'<?php' . PHP_EOL .'$folders = array();', FILE_APPEND );
1725
+ }
1726
+
1727
+ file_put_contents( $this->folder_list_file , PHP_EOL . '$folders[] = utf8_decode( \'' . utf8_encode( $folder ) .'\' );', FILE_APPEND );
1728
+
1729
+ $this->count_folder ++;
1730
+ }
1731
+
1732
+ /**
1733
+ * Get list of Folder for backup
1734
+ *
1735
+ * @return array folder list
1736
+ */
1737
+ public function get_folders_to_backup( ) {
1738
+
1739
+ $folders = array();
1740
+
1741
+ if ( empty( $this->count_folder ) || empty( $this->folder_list_file ) || ! is_file( $this->folder_list_file ) )
1742
+ return $folders;
1743
+
1744
+ //add memory if needed
1745
+ $this->need_free_memory( filesize( $this->folder_list_file ) * 2 );
1746
+
1747
+ //get folders from file
1748
+ include $this->folder_list_file;
1749
+
1750
+ //all folders only one time in list and sort
1751
+ $folders = array_unique( $folders );
1752
+ sort( $folders );
1753
+ //save count of folders again
1754
+ $this->count_folder = count( $folders );
1755
+
1756
+ return $folders;
1757
+ }
1758
+
1759
+ /**
1760
+ * Check whether shell_exec has been disabled.
1761
+ *
1762
+ * @access public
1763
+ * @static
1764
+ * @return bool
1765
+ */
1766
+ public static function is_shell_exec() {
1767
+
1768
+ // Is function avail
1769
+ if ( ! function_exists( 'shell_exec' ) )
1770
+ return false;
1771
+
1772
+ // Is shell_exec disabled?
1773
+ if ( in_array( 'shell_exec', array_map( 'trim', explode( ',', @ini_get( 'disable_functions' ) ) ) ) )
1774
+ return false;
1775
+
1776
+ // Can we issue a simple echo command?
1777
+ if ( ! @shell_exec( 'echo backwpup' ) )
1778
+ return false;
1779
+
1780
+ return true;
1781
+
1782
+ }
1783
+ }
inc/class-jobtype-dbcheck.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_JobType_DBCheck extends BackWPup_JobTypes {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'DBCHECK';
13
+ $this->info[ 'name' ] = __( 'DB Check', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'Check database tables', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+ /**
23
+ * @return array
24
+ */
25
+ public function option_defaults() {
26
+ return array( 'dbcheckwponly' => TRUE, 'dbcheckmaintenance' => FALSE, 'dbcheckrepair' => FALSE );
27
+ }
28
+
29
+
30
+ /**
31
+ * @param $jobid
32
+ */
33
+ public function edit_tab( $jobid ) {
34
+ ?>
35
+ <h3 class="title"><?php _e( 'Settings for database check', 'backwpup' ) ?></h3>
36
+ <p></p>
37
+ <table class="form-table">
38
+ <tr valign="top">
39
+ <th scope="row"><?php _e( 'WordPress tables only', 'backwpup' ); ?></th>
40
+ <td>
41
+ <label for="iddbcheckwponly">
42
+ <input class="checkbox" value="1" id="iddbcheckwponly"
43
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dbcheckwponly' ), TRUE ); ?>
44
+ name="dbcheckwponly"/> <?php _e( 'Check WordPress database tables only', 'backwpup' ); ?>
45
+ </label>
46
+ </td>
47
+ </tr>
48
+ <tr valign="top">
49
+ <th scope="row"><?php _e( 'Maintenance mode', 'backwpup' ); ?></th>
50
+ <td>
51
+ <label for="iddbcheckmaintenance">
52
+ <input class="checkbox" value="1" id="iddbcheckmaintenance"
53
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dbcheckmaintenance' ), TRUE ); ?>
54
+ name="dbcheckmaintenance" /> <?php _e( 'Activate Maintenance mode during table check', 'backwpup' ); ?>
55
+ </label>
56
+ </td>
57
+ </tr>
58
+ <tr valign="top">
59
+ <th scope="row"><?php _e( 'Repair', 'backwpup' ); ?></th>
60
+ <td>
61
+ <label for="iddbcheckrepair">
62
+ <input class="checkbox" value="1" id="iddbcheckrepair"
63
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dbcheckrepair' ), TRUE ); ?>
64
+ name="dbcheckrepair" /> <?php _e( 'Try to repair defect table', 'backwpup' ); ?>
65
+ </label>
66
+ </td>
67
+ </tr>
68
+ </table>
69
+ <?php
70
+ }
71
+
72
+
73
+ /**
74
+ * @param $jobid
75
+ */
76
+ public function edit_form_post_save( $jobid ) {
77
+ BackWPup_Option::update( $jobid, 'dbcheckwponly', ( isset( $_POST[ 'dbcheckwponly' ] ) && $_POST[ 'dbcheckwponly' ] == 1 ) ? TRUE : FALSE );
78
+ BackWPup_Option::update( $jobid, 'dbcheckmaintenance', ( isset( $_POST[ 'dbcheckmaintenance' ] ) && $_POST[ 'dbcheckmaintenance' ] == 1 ) ? TRUE : FALSE );
79
+ BackWPup_Option::update( $jobid, 'dbcheckrepair', ( isset( $_POST[ 'dbcheckrepair' ] ) && $_POST[ 'dbcheckrepair' ] == 1 ) ? TRUE : FALSE );
80
+ }
81
+
82
+ /**
83
+ * @param $job_object
84
+ * @return bool
85
+ */
86
+ public function job_run( $job_object ) {
87
+ global $wpdb;
88
+
89
+ trigger_error( sprintf( __( '%d. Trying to check database &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
90
+ if ( ! isset( $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] ) || ! is_array( $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] ) )
91
+ $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] = array();
92
+
93
+ //to check
94
+ $tables = array();
95
+ $restables = $wpdb->get_results( 'SHOW FULL TABLES FROM `' . $wpdb->dbname . '`', ARRAY_N );
96
+ foreach ( $restables as $table ) {
97
+ if ( ! empty( $job_object->job[ 'dbcheckwponly' ] ) ) {
98
+ $tables[ ] = $table[ 0 ];
99
+ $tablestype[ $table[ 0 ] ] = $table[ 1 ];
100
+ } elseif ( strstr($table[ 0 ], $wpdb->prefix ) ) {
101
+ $tables[ ] = $table[ 0 ];
102
+ $tablestype[ $table[ 0 ] ] = $table[ 1 ];
103
+ }
104
+ }
105
+
106
+ //Set num
107
+ $job_object->substeps_todo = sizeof( $tables );
108
+
109
+ //Get table status
110
+ $resstatus = $wpdb->get_results( "SHOW TABLE STATUS FROM `" . $wpdb->dbname . "`", ARRAY_A );
111
+ foreach ( $resstatus as $tablestatus ) {
112
+ $status[ $tablestatus[ 'Name' ] ] = $tablestatus;
113
+ }
114
+
115
+ //check tables
116
+ if ( $job_object->substeps_todo > 0 ) {
117
+ if ( ! empty( $job_object->job[ 'dbcheckmaintenance' ] ) )
118
+ $job_object->maintenance_mode( TRUE );
119
+ foreach ( $tables as $table ) {
120
+ if ( in_array( $table, $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] ) )
121
+ continue;
122
+
123
+ if ( $tablestype[ $table ] == 'VIEW' ) {
124
+ trigger_error( sprintf( __( 'Table %1$s is a View. Not checked.', 'backwpup' ), $table ), E_USER_NOTICE );
125
+ continue;
126
+ }
127
+
128
+ if ( $status[ $table ][ 'Engine' ] != 'MyISAM' && $status[ $table ][ 'Engine' ] != 'InnoDB' ) {
129
+ trigger_error( sprintf( __( 'Table %1$s is not a MyISAM/InnoDB table. Not checked.', 'backwpup' ), $table ), E_USER_NOTICE );
130
+ continue;
131
+ }
132
+
133
+ //CHECK TABLE funktioniert bei MyISAM- und InnoDB-Tabellen (http://dev.mysql.com/doc/refman/5.1/de/check-table.html)
134
+ $check = $wpdb->get_row( "CHECK TABLE `" . $table . "` MEDIUM", OBJECT );
135
+ if ( $check->Msg_text == 'OK' )
136
+ trigger_error( sprintf( __( 'Result of table check for %1$s is: %2$s', 'backwpup' ), $table, $check->Msg_text ), E_USER_NOTICE );
137
+ elseif ( strtolower( $check->Msg_type ) == 'warning' )
138
+ trigger_error( sprintf( __( 'Result of table check for %1$s is: %2$s', 'backwpup' ), $table, $check->Msg_text ), E_USER_WARNING );
139
+ else
140
+ trigger_error( sprintf( __( 'Result of table check for %1$s is: %2$s', 'backwpup' ), $table, $check->Msg_text ), E_USER_ERROR );
141
+
142
+ //Try to Repair table
143
+ if ( ! empty( $job_object->job[ 'dbcheckrepair' ] ) && $check->Msg_text != 'OK' && $status[ $table ][ 'Engine' ] == 'MyISAM' ) {
144
+ $repair = $wpdb->get_row( 'REPAIR TABLE `' . $table . '` EXTENDED', OBJECT );
145
+ if ( $repair->Msg_type == 'OK' )
146
+ trigger_error( sprintf( __( 'Result of table repair for %1$s is: %2$s', 'backwpup' ), $table, $repair->Msg_text ), E_USER_NOTICE );
147
+ elseif ( strtolower( $repair->Msg_type ) == 'warning' )
148
+ trigger_error( sprintf( __( 'Result of table repair for %1$s is: %2$s', 'backwpup' ), $table, $repair->Msg_text ), E_USER_WARNING );
149
+ else
150
+ trigger_error( sprintf( __( 'Result of table repair for %1$s is: %2$s', 'backwpup' ), $table, $repair->Msg_text ), E_USER_ERROR );
151
+ }
152
+ $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ][ ] = $table;
153
+ $job_object->substeps_done ++;
154
+ }
155
+ $job_object->maintenance_mode( FALSE );
156
+ trigger_error( __( 'Database check done!', 'backwpup' ), E_USER_NOTICE );
157
+ }
158
+ else {
159
+ trigger_error( __( 'No tables to check.', 'backwpup' ), E_USER_WARNING );
160
+ }
161
+
162
+ unset( $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] );
163
+ return TRUE;
164
+ }
165
+ }
inc/class-jobtype-dbdump.php ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_JobType_DBDump extends BackWPup_JobTypes {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'DBDUMP';
13
+ $this->info[ 'name' ] = __( 'DB Backup', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'Database backup', 'backwpup' );
15
+ $this->info[ 'help' ] = __( 'Creates a .sql database dump file', 'backwpup' );
16
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
17
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
18
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
19
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
20
+
21
+ }
22
+
23
+ /**
24
+ * @return bool
25
+ */
26
+ public function creates_file() {
27
+
28
+ return TRUE;
29
+ }
30
+
31
+ /**
32
+ * @return array
33
+ */
34
+ public function option_defaults() {
35
+ global $wpdb;
36
+
37
+ $defaults = array(
38
+ 'dbdumpexclude' => array(), 'dbdumpfile' => sanitize_title_with_dashes( $wpdb->dbname ), 'dbdumptype' => 'sql', 'dbdumpfilecompression' => '',
39
+ 'dbdumpmaintenance' => FALSE
40
+ );
41
+ //set only wordpress tables as default
42
+ $dbtables = $wpdb->get_results( 'SHOW TABLES FROM `' . $wpdb->dbname . '`', ARRAY_N );
43
+ foreach ( $dbtables as $dbtable) {
44
+ if ( ! strstr( $dbtable[ 0 ], $wpdb->prefix ) )
45
+ $defaults[ 'dbdumpexclude' ][] = $dbtable[ 0 ];
46
+ }
47
+
48
+ return $defaults;
49
+ }
50
+
51
+
52
+ /**
53
+ * @param $jobid
54
+ */
55
+ public function edit_tab( $jobid ) {
56
+ global $wpdb;
57
+
58
+ ?>
59
+ <input name="dbdumpwpony" type="hidden" value="1" />
60
+ <h3 class="title"><?php _e( 'Settings for database dump', 'backwpup' ) ?></h3>
61
+ <p></p>
62
+ <table class="form-table">
63
+ <tr valign="top">
64
+ <th scope="row"><?php _e( 'Tables to dump', 'backwpup' ); ?></th>
65
+ <td>
66
+ <input type="button" class="button-secondary" id="dball" value="<?php _e( 'all', 'backwpup' ); ?>">&nbsp;
67
+ <input type="button" class="button-secondary" id="dbnone" value="<?php _e( 'none', 'backwpup' ); ?>">&nbsp;
68
+ <input type="button" class="button-secondary" id="dbwp" value="<?php echo $wpdb->prefix; ?>">
69
+ <?php
70
+ $tables = $wpdb->get_results( 'SHOW FULL TABLES FROM `' . $wpdb->dbname . '`', ARRAY_N );
71
+ $num_rows = count( $tables );
72
+ echo '<table id="dbtables"><tr><td valign="top">';
73
+ $next_row = round( $num_rows / 3, 0 );
74
+ $counter = 0;
75
+ foreach ( $tables as $table ) {
76
+ $tabletype = '';
77
+ if ( $table[ 1 ] != 'BASE TABLE' )
78
+ $tabletype = ' <i>(' . strtolower( $table[ 1 ] ) . ')</i>';
79
+ echo '<label for="idtabledb-' . rawurlencode( $table[ 0 ] ) . '""><input class="checkbox" type="checkbox"' . checked( ! in_array( $table[ 0 ], BackWPup_Option::get( $jobid, 'dbdumpexclude' ) ), TRUE, FALSE ) . ' name="tabledb[]" id="idtabledb-' . rawurlencode( $table[ 0 ] ) . '" value="' . rawurlencode( $table[ 0 ] ) . '"/> ' . $table[ 0 ] . $tabletype . '</label><br />';
80
+ $counter++;
81
+ if ($next_row <= $counter) {
82
+ echo '</td><td valign="top">';
83
+ $counter = 0;
84
+ }
85
+ }
86
+ echo '</td></tr></table>';
87
+ ?>
88
+ </td>
89
+ </tr>
90
+ <tr valign="top">
91
+ <th scope="row"><?php _e( 'Maintenance mode', 'backwpup' ); ?></th>
92
+ <td>
93
+ <label for="iddbdumpmaintenance"><input class="checkbox" value="1" id="iddbdumpmaintenance"
94
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dbdumpmaintenance' ), TRUE ); ?>
95
+ name="dbdumpmaintenance" /> <?php _e( 'Activate maintenance mode on database dump', 'backwpup' ); ?></label>
96
+ </td>
97
+ </tr>
98
+ <tr valign="top">
99
+ <th scope="row"><label for="iddbdumpfile"><?php _e( 'Dumpfile name', 'backwpup' ) ?></label></th>
100
+ <td>
101
+ <input id="iddbdumpfile" name="dbdumpfile" type="text"
102
+ value="<?php echo BackWPup_Option::get( $jobid, 'dbdumpfile' );?>"
103
+ class="medium-text code"/>.sql
104
+ </td>
105
+ </tr>
106
+ <tr valign="top">
107
+ <th scope="row"><?php _e( 'Dumpfile compression', 'backwpup' ) ?></th>
108
+ <td>
109
+ <?php
110
+ echo '<label for="iddbdumpfilecompression"><input class="radio" type="radio"' . checked( '', BackWPup_Option::get( $jobid, 'dbdumpfilecompression' ), FALSE ) . ' name="dbdumpfilecompression" id="iddbdumpfilecompression" value="" /> ' . __( 'none', 'backwpup' ). '</label><br />';
111
+ if ( function_exists( 'gzopen' ) )
112
+ echo '<label for="iddbdumpfilecompression-gz"><input class="radio" type="radio"' . checked( '.gz', BackWPup_Option::get( $jobid, 'dbdumpfilecompression' ), FALSE ) . ' name="dbdumpfilecompression" id="iddbdumpfilecompression-gz" value=".gz" /> ' . __( 'GZip', 'backwpup' ). '</label><br />';
113
+ else
114
+ echo '<label for="iddbdumpfilecompression-gz"><input class="radio" type="radio"' . checked( '.gz', BackWPup_Option::get( $jobid, 'dbdumpfilecompression' ), FALSE ) . ' name="dbdumpfilecompression" id="iddbdumpfilecompression-gz" value=".gz" disabled="disabled" /> ' . __( 'GZip', 'backwpup' ). '</label><br />';
115
+ if ( function_exists( 'bzopen' ) )
116
+ echo '<label for="iddbdumpfilecompression-bz2"><input class="radio" type="radio"' . checked( '.bz2', BackWPup_Option::get( $jobid, 'dbdumpfilecompression' ), FALSE ) . ' name="dbdumpfilecompression" id="iddbdumpfilecompression-bz2" value=".bz2" /> ' . __( 'BZip2', 'backwpup' ). '</label><br />';
117
+ else
118
+ echo '<label for="iddbdumpfilecompression-bz2"><input class="radio" type="radio"' . checked( '.bz2', BackWPup_Option::get( $jobid, 'dbdumpfilecompression' ), FALSE ) . ' name="dbdumpfilecompression" id="iddbdumpfilecompression-bz2" value=".bz2" disabled="disabled" /> ' . __( 'BZip2', 'backwpup' ). '</label><br />';
119
+ ?>
120
+ </td>
121
+ </tr>
122
+ </table>
123
+ <?php
124
+ }
125
+
126
+
127
+ /**
128
+ * @param $id
129
+ */
130
+ public function edit_form_post_save( $id ) {
131
+ global $wpdb;
132
+
133
+ BackWPup_Option::update( $id, 'dbdumpmaintenance', ( isset( $_POST[ 'dbdumpmaintenance' ] ) && $_POST[ 'dbdumpmaintenance' ] == 1 ) ? TRUE : FALSE );
134
+ if ( $_POST[ 'dbdumpfilecompression' ] == '' || $_POST[ 'dbdumpfilecompression' ] == '.gz' || $_POST[ 'dbdumpfilecompression' ] == '.bz2' )
135
+ BackWPup_Option::update( $id, 'dbdumpfilecompression', $_POST[ 'dbdumpfilecompression' ] );
136
+ BackWPup_Option::update( $id, 'dbdumpfile', sanitize_title_with_dashes( $_POST[ 'dbdumpfile' ]) );
137
+ //selected tables
138
+ $dbdumpexclude = array();
139
+ $checked_db_tables = array();
140
+ if ( isset( $_POST[ 'tabledb' ] ) ) {
141
+ foreach ( $_POST[ 'tabledb' ] as $dbtable )
142
+ $checked_db_tables[ ] = rawurldecode( $dbtable );
143
+ }
144
+ $dbtables = $wpdb->get_results( 'SHOW TABLES FROM `' . $wpdb->dbname . '`', ARRAY_N );
145
+ foreach ( $dbtables as $dbtable ) {
146
+ if ( ! in_array( $dbtable[ 0 ], $checked_db_tables ) )
147
+ $dbdumpexclude[ ] = $dbtable[ 0 ];
148
+ }
149
+ BackWPup_Option::update( $id, 'dbdumpexclude', $dbdumpexclude );
150
+
151
+ }
152
+
153
+ /**
154
+ * @param $job_object BackWPup_Job
155
+ * @return bool
156
+ */
157
+ public function job_run( $job_object ) {
158
+
159
+ $job_object->substeps_done = 0;
160
+ $job_object->substeps_todo = 1;
161
+
162
+ trigger_error( sprintf( __( '%d. Try for database dump &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
163
+
164
+ //build filename
165
+ if ( empty( $job_object->temp[ 'dbdumpfile' ] ) )
166
+ $job_object->temp[ 'dbdumpfile' ] = $job_object->generate_filename( $job_object->job[ 'dbdumpfile' ], 'sql' ) . $job_object->job[ 'dbdumpfilecompression' ];
167
+
168
+ //Set maintenance
169
+ if ( ! empty( $job_object->job[ 'dbdumpmaintenance'] ) )
170
+ $job_object->maintenance_mode( TRUE );
171
+
172
+ try {
173
+
174
+ //Connect to Database
175
+ $sql_dump = new BackWPup_MySQLDump( array( 'dumpfile' => BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'dbdumpfile' ] ) );
176
+
177
+ if ( is_object( $sql_dump ) )
178
+ $job_object->log( sprintf( __( 'Connected to database %1$s on %2$s', 'backwpup' ), $job_object->job[ 'dbdumpdbname' ], $job_object->job[ 'dbdumpdbhost' ] ) );
179
+
180
+ //Exclude Tables
181
+ foreach ( $sql_dump->tables_to_dump as $key => $table ) {
182
+ if ( in_array( $table, $job_object->job[ 'dbdumpexclude' ] ) )
183
+ unset( $sql_dump->tables_to_dump[ $key ] );
184
+ }
185
+
186
+ //set steps must done
187
+ $job_object->substeps_todo = count( $sql_dump->tables_to_dump );
188
+
189
+ if ( $job_object->substeps_todo == 0 ) {
190
+ $job_object->log( __( 'No tables to dump.', 'backwpup' ), E_USER_WARNING );
191
+ unset( $sql_dump );
192
+ $job_object->maintenance_mode( FALSE );
193
+
194
+ return TRUE;
195
+ }
196
+
197
+ //dump head
198
+ $sql_dump->dump_head( TRUE );
199
+ //dump tables
200
+ foreach( $sql_dump->tables_to_dump as $table ) {
201
+ $job_object->log( sprintf( __( 'Dump database table "%s"', 'backwpup' ), $table ) );
202
+ $job_object->substeps_done ++;
203
+ $sql_dump->dump_table( $table );
204
+ }
205
+ //dump footer
206
+ $sql_dump->dump_footer();
207
+ unset( $sql_dump );
208
+ $job_object->maintenance_mode( FALSE );
209
+
210
+ } catch ( Exception $e ) {
211
+ $job_object->log( $e->getMessage(), E_USER_ERROR, $e->getFile(), $e->getLine() );
212
+ $job_object->maintenance_mode( FALSE );
213
+ unset( $sql_dump );
214
+ return FALSE;
215
+ }
216
+
217
+
218
+ //add database file to backup files
219
+ if ( is_readable( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'dbdumpfile' ] ) ) {
220
+ $job_object->additional_files_to_backup[ ] = BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'dbdumpfile' ];
221
+ $job_object->count_files ++;
222
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'dbdumpfile' ] );
223
+ $job_object->log( sprintf( __( 'Added database dump "%1$s" with %2$s to backup file list', 'backwpup' ), $job_object->temp[ 'dbdumpfile' ], size_format( filesize( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'dbdumpfile' ] ), 2 ) ) );
224
+ }
225
+
226
+ $job_object->log( __( 'Database dump done!', 'backwpup' ) );
227
+
228
+ return TRUE;
229
+ }
230
+
231
+ /**
232
+ *
233
+ */
234
+ public function admin_print_scripts() {
235
+
236
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
237
+ wp_enqueue_script( 'backwpupjobtypedbdump', BackWPup::get_plugin_data( 'URL' ) . '/js/page_edit_jobtype_dbdump.dev.js', array('jquery'), time(), TRUE );
238
+ } else {
239
+ wp_enqueue_script( 'backwpupjobtypedbdump', BackWPup::get_plugin_data( 'URL' ) . '/js/page_edit_jobtype_dbdump.js', array('jquery'), BackWPup::get_plugin_data( 'Version' ), TRUE );
240
+ }
241
+ }
242
+
243
+
244
+ }
inc/class-jobtype-dboptimize.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_JobType_DBOptimize extends BackWPup_JobTypes {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'DBOPTIMIZE';
13
+ $this->info[ 'name' ] = __( 'DB Optimize', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'Optimize database tables', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+ /**
23
+ * @return array
24
+ */
25
+ public function option_defaults() {
26
+
27
+ return array( 'dboptimizewponly' => TRUE, 'dboptimizemyisam' => TRUE, 'dboptimizeinnodb' => TRUE, 'dboptimizemaintenance' => FALSE );
28
+ }
29
+
30
+
31
+ /**
32
+ * @param $jobid
33
+ */
34
+ public function edit_tab( $jobid ) {
35
+ ?>
36
+ <h3 class="title"><?php _e( 'Settings for database optimization', 'backwpup' ) ?></h3>
37
+ <p></p>
38
+ <table class="form-table">
39
+ <tr valign="top">
40
+ <th scope="row"><?php _e( 'WordPress tables only', 'backwpup' ); ?></th>
41
+ <td>
42
+ <label for="iddboptimizewponly">
43
+ <input class="checkbox" value="1" id="iddboptimizewponly"
44
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dboptimizewponly' ), TRUE ); ?>
45
+ name="dboptimizewponly" /> <?php _e( 'Optimize WordPress Database tables only', 'backwpup' ); ?>
46
+ </label>
47
+ </td>
48
+ </tr>
49
+ <tr valign="top">
50
+ <th scope="row"><?php _e( 'Maintenance mode', 'backwpup' ); ?></th>
51
+ <td>
52
+ <label for="iddboptimizemaintenance">
53
+ <input class="checkbox" value="1" id="iddboptimizemaintenance"
54
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dboptimizemaintenance' ), TRUE ); ?>
55
+ name="dboptimizemaintenance" /> <?php _e( 'Activate maintenance mode during table optimize', 'backwpup' ); ?>
56
+ </label>
57
+ </td>
58
+ </tr>
59
+
60
+ <tr valign="top">
61
+ <th scope="row"><?php _e( 'Table types to optimize', 'backwpup' ); ?></th>
62
+ <td>
63
+ <fieldset>
64
+ <legend class="screen-reader-text"><span><?php _e( 'Table types to optimize', 'backwpup' ) ?></span>
65
+ </legend>
66
+ <label for="iddboptimizemyisam"><input class="checkbox" value="1" id="iddboptimizemyisam"
67
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dboptimizemyisam' ), TRUE ); ?>
68
+ name="dboptimizemyisam" /> <?php _e( 'Optimize MyISAM Tables', 'backwpup' ); ?>
69
+ <?php BackWPup_help::tip( __( 'Optimize will done with OPTIMIZE TABLE `table`.', 'backwpup' ) ); ?></label>
70
+ <br />
71
+ <label for="iddboptimizeinnodb"><input class="checkbox" value="1" id="iddboptimizeinnodb"
72
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'dboptimizeinnodb' ), TRUE ); ?>
73
+ name="dboptimizeinnodb" /> <?php _e( 'Optimize InnoDB tables', 'backwpup' ); ?>
74
+ <?php BackWPup_help::tip( __( 'Optimize will done with ALTER TABLE `table` ENGINE=InnoDB', 'backwpup' ) ); ?></label>
75
+ </fieldset>
76
+ </td>
77
+ </tr>
78
+ </table>
79
+ <?php
80
+ }
81
+
82
+
83
+ /**
84
+ * @param $jobid
85
+ */
86
+ public function edit_form_post_save( $jobid ) {
87
+
88
+ BackWPup_Option::update( $jobid, 'dboptimizewponly', ( isset( $_POST[ 'dboptimizewponly' ] ) && $_POST[ 'dboptimizewponly' ] == 1 ) ? TRUE : FALSE );
89
+ BackWPup_Option::update( $jobid, 'dboptimizemaintenance', ( isset( $_POST[ 'dboptimizemaintenance' ] ) && $_POST[ 'dboptimizemaintenance' ] == 1 ) ? TRUE : FALSE );
90
+ BackWPup_Option::update( $jobid, 'dboptimizemyisam', ( isset( $_POST[ 'dboptimizemyisam' ] ) && $_POST[ 'dboptimizemyisam' ] == 1 ) ? TRUE : FALSE );
91
+ BackWPup_Option::update( $jobid, 'dboptimizeinnodb', ( isset( $_POST[ 'dboptimizeinnodb' ] ) && $_POST[ 'dboptimizeinnodb' ] == 1 ) ? TRUE : FALSE );
92
+ }
93
+
94
+ /**
95
+ * @param $job_object
96
+ * @return bool
97
+ */
98
+ public function job_run( $job_object ) {
99
+ global $wpdb;
100
+
101
+ trigger_error( sprintf( __( '%d. Trying to optimize database &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
102
+ if ( ! isset( $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] ) || ! is_array( $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] ) )
103
+ $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] = array();
104
+
105
+ //tables to otimize
106
+ $tables = array();
107
+ $restables = $wpdb->get_results( 'SHOW FULL TABLES FROM `' . $wpdb->dbname . '`', ARRAY_N );
108
+ foreach ( $restables as $table ) {
109
+ if ( ! empty( $job_object->job[ 'dboptimizewponly' ] ) ) {
110
+ $tables[ ] = $table[ 0 ];
111
+ $tablestype[ $table[ 0 ] ] = $table[ 1 ];
112
+ } elseif ( strstr($table[ 0 ], $wpdb->prefix ) ) {
113
+ $tables[ ] = $table[ 0 ];
114
+ $tablestype[ $table[ 0 ] ] = $table[ 1 ];
115
+ }
116
+ }
117
+ //Set num
118
+ $job_object->substeps_todo = sizeof( $tables );
119
+
120
+ //Get table status
121
+ $resstatus = $wpdb->get_results( "SHOW TABLE STATUS FROM `" . $wpdb->dbname . "`", ARRAY_A );
122
+ foreach ( $resstatus as $tablestatus ) {
123
+ $status[ $tablestatus[ 'Name' ] ] = $tablestatus;
124
+ }
125
+
126
+ if ( $job_object->substeps_todo > 0 ) {
127
+ if ( ! empty( $job_object->job[ 'dboptimizemaintenance' ] ) )
128
+ $job_object->maintenance_mode( TRUE );
129
+ foreach ( $tables as $table ) {
130
+ if ( in_array( $table, $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ] ) )
131
+ continue;
132
+ if ( $tablestype[ $table ] == 'VIEW' ) {
133
+ trigger_error( sprintf( __( 'Views can\'t optimize! View %1$s', 'backwpup' ), $table ), E_USER_NOTICE );
134
+ continue;
135
+ }
136
+ //OPTIMIZE TABLE funktioniert nur bei MyISAM-, BDB- und InnoDB-Tabellen. (http://dev.mysql.com/doc/refman/5.1/de/optimize-table.html)
137
+ if ( ! empty( $job_object->job[ 'dboptimizemyisam' ] ) && $status[ $table ][ 'Engine' ] == 'MyISAM' ) {
138
+ $optimize = $wpdb->get_row( "OPTIMIZE TABLE `" . $table . "`", OBJECT );
139
+ if ( strtolower( $optimize->Msg_type ) == 'error' )
140
+ trigger_error( sprintf( __( 'Result of MyISAM table optimize for %1$s is: %2$s', 'backwpup' ), $table, $optimize->Msg_text ), E_USER_ERROR );
141
+ elseif ( strtolower( $optimize->Msg_type ) == 'warning' )
142
+ trigger_error( sprintf( __( 'Result of MyISAM table optimize for %1$s is: %2$s', 'backwpup' ), $table, $optimize->Msg_text ), E_USER_WARNING );
143
+ else
144
+ trigger_error( sprintf( __( 'Result of MyISAM table optimize for %1$s is: %2$s', 'backwpup' ), $table, $optimize->Msg_text ), E_USER_NOTICE );
145
+ }
146
+ elseif ( ! empty( $job_object->job[ 'dboptimizeinnodb' ] ) && $status[ $table ][ 'Engine' ] == 'InnoDB' ) {
147
+ $res = $wpdb->query( "ALTER TABLE `" . $table . "` ENGINE='InnoDB'" );
148
+ if ( ! empty( $res ) )
149
+ trigger_error( sprintf( __( 'InnoDB Table %1$s optimizing done.', 'backwpup' ), $table ), E_USER_NOTICE );
150
+ }
151
+ else {
152
+ trigger_error( sprintf( __( '%2$s table %1$s not optimized.', 'backwpup' ), $table, $status[ $table ][ 'Engine' ] ), E_USER_NOTICE );
153
+ }
154
+ $job_object->steps_data[ $job_object->step_working ][ 'DONETABLE' ][ ] = $table;
155
+ $job_object->substeps_done ++;
156
+ }
157
+ trigger_error( __( 'Database optimize done!', 'backwpup' ), E_USER_NOTICE );
158
+ $job_object->maintenance_mode( FALSE );
159
+ }
160
+ else {
161
+ trigger_error( __( 'No tables to optimize.', 'backwpup' ), E_USER_WARNING );
162
+ }
163
+
164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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_JobType_File extends BackWPup_JobTypes {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'FILE';
13
+ $this->info[ 'name' ] = __( 'Files', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'File backup', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+ /**
23
+ *
24
+ */
25
+ public function admin_print_scripts() {
26
+
27
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
28
+ wp_enqueue_script( 'backwpupjobtypefile', BackWPup::get_plugin_data( 'URL' ) . '/js/page_edit_jobtype_file.dev.js', array( 'jquery' ), time(), TRUE );
29
+ } else {
30
+ wp_enqueue_script( 'backwpupjobtypefile', BackWPup::get_plugin_data( 'URL' ) . '/js/page_edit_jobtype_file.js', array( 'jquery' ), BackWPup::get_plugin_data( 'Version' ), TRUE );
31
+ }
32
+ }
33
+
34
+ /**
35
+ * @return bool
36
+ */
37
+ public function creates_file() {
38
+
39
+ return TRUE;
40
+ }
41
+
42
+ /**
43
+ * @return array
44
+ */
45
+ public function option_defaults() {
46
+
47
+ return array(
48
+ 'backupexcludethumbs' => FALSE, 'backupspecialfiles' => TRUE, 'backupexcludetempfolder' => TRUE,
49
+ 'backuproot' => TRUE, 'backupcontent' => TRUE, 'backupplugins' => FALSE, 'backupthemes' => TRUE, 'backupuploads' => TRUE,
50
+ 'backuprootexcludedirs' => array(), 'backupcontentexcludedirs' => array(), 'backuppluginsexcludedirs' => array(), 'backupthemesexcludedirs' => array(), 'backupuploadsexcludedirs' => array(),
51
+ 'fileexclude' => '.tmp,.svn,.git', 'dirinclude' => ''
52
+ );
53
+ }
54
+
55
+ /**
56
+ * @param $main
57
+ */
58
+ public function edit_tab( $main ) {
59
+ ?>
60
+ <h3 class="title"><?php _e( 'Folders to backup', 'backwpup' ) ?></h3>
61
+ <p></p>
62
+ <table class="form-table">
63
+ <tr valign="top">
64
+ <th scope="row"><label for="idbackuproot"><?php _e( 'Backup root folder', 'backwpup' ); ?></label></th>
65
+ <td>
66
+ <?php $folder = untrailingslashit( str_replace( '\\', '/', ABSPATH ) ); ?>
67
+ <input class="checkbox"
68
+ type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backuproot' ), TRUE, TRUE );?>
69
+ name="backuproot" id="idbackuproot" value="1" /> <code><?php echo $folder; ?></code> (<?php echo size_format( BackWPup_File::get_folder_size( $folder, FALSE ), 2 ); ?>)
70
+
71
+ <fieldset id="backuprootexcludedirs" style="padding-left:15px; margin:2px;">
72
+ <legend><?php _e( 'Exclude:', 'backwpup' ); ?></legend>
73
+ <?php
74
+ if ( $dir = @opendir( $folder ) ) {
75
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
76
+ if ( ! in_array( $file, array( '.', '..' ) ) && is_dir( $folder . '/' . $file ) && ! in_array( $folder . '/' . $file . '/', $this->get_exclude_dirs( $folder ) ) ) {
77
+ $class='';
78
+ if ( stristr( $file, 'backup') || stristr( $file, 'cache') || stristr( $file, 'temp') )
79
+ $class="tempfolder";
80
+ echo '<nobr class="' . $class . '"><label for="idrootexcludedirs-'.sanitize_title_with_dashes( $file ).'"><input class="checkbox" type="checkbox"' . checked( in_array( $file, BackWPup_Option::get( $main, 'backuprootexcludedirs' ) ), TRUE, FALSE ) . ' name="backuprootexcludedirs[]" id="idrootexcludedirs-'.sanitize_title_with_dashes( $file ).'" value="' . $file . '" /> ' . $file . ' (' . size_format( BackWPup_File::get_folder_size( $folder . '/' . $file ), 2 ) . ')</label><br /></nobr>';
81
+ }
82
+ }
83
+ @closedir( $dir );
84
+ }
85
+ ?>
86
+ </fieldset>
87
+ </td>
88
+ </tr>
89
+ <tr valign="top">
90
+ <th scope="row"><label for="idbackupcontent"><?php _e( 'Backup content folder', 'backwpup' ); ?></label></th>
91
+ <td>
92
+ <?php $folder = untrailingslashit( str_replace( '\\', '/', WP_CONTENT_DIR ) ); ?>
93
+ <input class="checkbox"
94
+ type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupcontent' ), TRUE, TRUE );?>
95
+ name="backupcontent" id="idbackupcontent" value="1" /> <code><?php echo $folder; ?></code> (<?php echo size_format( BackWPup_File::get_folder_size( $folder, FALSE ), 2 ); ?>)
96
+
97
+ <fieldset id="backupcontentexcludedirs" style="padding-left:15px; margin:2px;">
98
+ <legend><?php _e( 'Exclude:', 'backwpup' ); ?></legend>
99
+ <?php
100
+ if ( $dir = @opendir( $folder ) ) {
101
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
102
+ if ( ! in_array( $file, array( '.', '..' ) ) && is_dir( $folder . '/' . $file ) && ! in_array( $folder . '/' . $file . '/', $this->get_exclude_dirs( $folder ) ) ) {
103
+ $class='';
104
+ if ( stristr( $file, 'backup') || stristr( $file, 'cache') || stristr( $file, 'temp') )
105
+ $class="tempfolder";
106
+ echo '<nobr class="' . $class . '"><label for="idcontentexcludedirs-'.sanitize_title_with_dashes( $file ).'"><input class="checkbox" type="checkbox"' . checked( in_array( $file, BackWPup_Option::get( $main, 'backupcontentexcludedirs' ) ), TRUE, FALSE ) . ' name="backupcontentexcludedirs[]" id="idcontentexcludedirs-'.sanitize_title_with_dashes( $file ).'" value="' . $file . '" /> ' . $file . ' (' . size_format( BackWPup_File::get_folder_size( $folder . '/' . $file ), 2 ) . ')</label><br /></nobr>';
107
+ }
108
+ }
109
+ @closedir( $dir );
110
+ }
111
+ ?>
112
+ </fieldset>
113
+ </td>
114
+ </tr>
115
+ <tr valign="top">
116
+ <th scope="row"><label for="idbackupplugins"><?php _e( 'Backup plugins', 'backwpup' ); ?></label></th>
117
+ <td>
118
+ <?php $folder = untrailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) ); ?>
119
+ <input class="checkbox"
120
+ type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupplugins' ), TRUE, TRUE );?>
121
+ name="backupplugins" id="idbackupplugins" value="1" /> <code><?php echo $folder; ?></code> (<?php echo size_format( BackWPup_File::get_folder_size( $folder, FALSE ), 2 ); ?>)
122
+
123
+ <fieldset id="backuppluginsexcludedirs" style="padding-left:15px; margin:2px;">
124
+ <legend><?php _e( 'Exclude:', 'backwpup' ); ?></legend>
125
+ <?php
126
+ if ( $dir = @opendir( $folder ) ) {
127
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
128
+ if ( ! in_array( $file, array( '.', '..' ) ) && is_dir( $folder . '/' . $file ) && ! in_array( $folder . '/' . $file . '/', $this->get_exclude_dirs( $folder ) ) ) {
129
+ $class='';
130
+ if ( stristr( $file, 'backup') || stristr( $file, 'cache') || stristr( $file, 'temp') )
131
+ $class="tempfolder";
132
+ echo '<nobr class="' . $class . '"><label for="idpluginexcludedirs-'.sanitize_title_with_dashes( $file ).'"><input class="checkbox" type="checkbox"' . checked( in_array( $file, BackWPup_Option::get( $main, 'backuppluginsexcludedirs' ) ), TRUE, FALSE ) . ' name="backuppluginsexcludedirs[]" id="idpluginexcludedirs-'.sanitize_title_with_dashes( $file ).'" value="' . $file . '" /> ' . $file . ' (' . size_format( BackWPup_File::get_folder_size( $folder . '/' . $file ), 2 ) . ')</label><br /></nobr>';
133
+ }
134
+ }
135
+ @closedir( $dir );
136
+ }
137
+ ?>
138
+ </fieldset>
139
+ </td>
140
+ </tr>
141
+ <tr valign="top">
142
+ <th scope="row"><label for="idbackupthemes"><?php _e( 'Backup themes', 'backwpup' ); ?></label></th>
143
+ <td>
144
+ <?php $folder = untrailingslashit( str_replace( '\\', '/', trailingslashit( get_theme_root() ) ) ); ?>
145
+ <input class="checkbox"
146
+ type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupthemes' ), TRUE, TRUE );?>
147
+ name="backupthemes" id="idbackupthemes" value="1" /> <code><?php echo $folder; ?></code> (<?php echo size_format( BackWPup_File::get_folder_size( $folder, FALSE ), 2 ); ?>)
148
+
149
+ <fieldset id="backupthemesexcludedirs" style="padding-left:15px; margin:2px;">
150
+ <legend><?php _e( 'Exclude:', 'backwpup' ); ?></legend>
151
+ <?php
152
+ if ( $dir = @opendir( $folder ) ) {
153
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
154
+ if ( ! in_array( $file, array( '.', '..' ) ) && is_dir( $folder . '/' . $file ) && ! in_array( $folder . '/' . $file . '/', $this->get_exclude_dirs( $folder ) ) ) {
155
+ $class='';
156
+ if ( stristr( $file, 'backup') || stristr( $file, 'cache') || stristr( $file, 'temp') )
157
+ $class="tempfolder";
158
+ echo '<nobr class="' . $class . '"><label for="idthemesexcludedirs-'.sanitize_title_with_dashes( $file ).'"><input class="checkbox" type="checkbox"' . checked( in_array( $file, BackWPup_Option::get( $main, 'backupthemesexcludedirs' ) ), TRUE, FALSE ) . ' name="backupthemesexcludedirs[]" id="idthemesexcludedirs-'.sanitize_title_with_dashes( $file ).'" value="' . $file . '" /> ' . $file . ' (' . size_format( BackWPup_File::get_folder_size( $folder . '/' . $file ), 2 ) . ')</label><br /></nobr>';
159
+ }
160
+ }
161
+ @closedir( $dir );
162
+ }
163
+ ?>
164
+ </fieldset>
165
+ </td>
166
+ </tr>
167
+ <tr valign="top">
168
+ <th scope="row"><label for="idbackupuploads"><?php _e( 'Backup uploads folder', 'backwpup' ); ?></label></th>
169
+ <td>
170
+ <?php $folder = untrailingslashit( BackWPup_File::get_upload_dir() ); ?>
171
+ <input class="checkbox"
172
+ type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupuploads' ), TRUE, TRUE );?>
173
+ name="backupuploads" id="idbackupuploads" value="1" /> <code><?php echo $folder; ?></code> (<?php echo size_format( BackWPup_File::get_folder_size( $folder, FALSE ), 2 ); ?>)
174
+
175
+ <fieldset id="backupuploadsexcludedirs" style="padding-left:15px; margin:2px;">
176
+ <legend><?php _e( 'Exclude:', 'backwpup' ); ?></legend>
177
+ <?php
178
+ if ( $dir = @opendir( $folder ) ) {
179
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
180
+ if ( ! in_array( $file, array( '.', '..' ) ) && is_dir( $folder . '/' . $file ) && ! in_array( $folder . '/' . $file . '/', $this->get_exclude_dirs( $folder ) ) ) {
181
+ $class='';
182
+ if ( stristr( $file, 'backup') || stristr( $file, 'cache') || stristr( $file, 'temp') )
183
+ $class="tempfolder";
184
+ echo '<nobr class="' . $class . '"><label for="iduploadexcludedirs-'.sanitize_title_with_dashes( $file ).'"><input class="checkbox" type="checkbox"' . checked( in_array( $file, BackWPup_Option::get( $main, 'backupuploadsexcludedirs' ) ), TRUE, FALSE ) . ' name="backupuploadsexcludedirs[]" id="iduploadexcludedirs-'.sanitize_title_with_dashes( $file ).'" value="' . $file . '" /> ' . $file . ' (' . size_format( BackWPup_File::get_folder_size( $folder . '/' . $file ), 2 ) . ')</label><br /></nobr>';
185
+ }
186
+ }
187
+ @closedir( $dir );
188
+ }
189
+ ?>
190
+ </fieldset>
191
+ </td>
192
+ </tr>
193
+ <tr valign="top">
194
+ <th scope="row"><label for="dirinclude"><?php _e( 'Extra folders to backup', 'backwpup' ); ?></label> <?php BackWPup_Help::tip( __( 'Separate folder names with a newline or a comma. The folder must set with full path!', 'backwpup' ) )?></th>
195
+ <td>
196
+ <textarea name="dirinclude" id="dirinclude" class="text code" rows="7" cols="50"><?php echo BackWPup_Option::get( $main, 'dirinclude' ); ?></textarea>
197
+ </td>
198
+ </tr>
199
+ </table>
200
+
201
+ <h3 class="title"><?php _e( 'Exclude from backup', 'backwpup' ) ?></h3>
202
+ <p></p>
203
+ <table class="form-table">
204
+ <tr valign="top">
205
+ <th scope="row"><?php _e( 'Exclude special folders', 'backwpup' ); ?></th>
206
+ <td>
207
+ <label for="idbackupexcludetempfolder"><input class="checkbox"
208
+ type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupexcludetempfolder' ), TRUE, TRUE );?>
209
+ name="backupexcludetempfolder" id="idbackupexcludetempfolder" value="1" /> <?php _e( 'Don\'t backup folders with backup, cache, or temp in their name.', 'backwpup' ); ?></label>
210
+ </td>
211
+ </tr>
212
+ <tr valign="top">
213
+ <th scope="row"><?php _e( 'Thumbnails in uploads', 'backwpup' ); ?></th>
214
+ <td>
215
+ <label for="idbackupexcludethumbs"><input class="checkbox"
216
+ type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupexcludethumbs' ), TRUE, TRUE );?>
217
+ name="backupexcludethumbs" id="idbackupexcludethumbs" value="1" /> <?php _e( 'Don\'t backup thumbnails in blog uploads folder.', 'backwpup' ); BackWPup_Help::add_tab( __( 'All Images with -???x???. will be excluded. Use a Plugin like Regenerate Thumbnails to rebuild them after a restore.', 'backwpup' ) );?></label>
218
+ </td>
219
+ </tr>
220
+ <tr valign="top">
221
+ <th scope="row"><label for="idfileexclude"><?php _e( 'Exclude files/folders from backup', 'backwpup' ); ?></label> <?php BackWPup_Help::tip( __( 'Separate file / folder name parts with a newline or a comma. Excluding will look if the exclude a part of a file or folder name. For example /logs/,.log,.tmp', 'backwpup' ) )?></th>
222
+ <td>
223
+ <textarea name="fileexclude" id="idfileexclude" class="text code" rows="7" cols="50"><?php echo BackWPup_Option::get( $main, 'fileexclude' ); ?></textarea>
224
+ </td>
225
+ </tr>
226
+ </table>
227
+
228
+ <h3 class="title"><?php _e( 'Special option', 'backwpup' ) ?></h3>
229
+ <p></p>
230
+ <table class="form-table">
231
+ <tr valign="top">
232
+ <th scope="row"><?php _e( 'Include special files', 'backwpup' ); ?></th>
233
+ <td>
234
+ <label for="idbackupspecialfiles"><input class="checkbox" id="idbackupspecialfiles"
235
+ type="checkbox"<?php checked( BackWPup_Option::get( $main, 'backupspecialfiles' ), TRUE, TRUE );?>
236
+ name="backupspecialfiles" value="1" /> <?php _e( 'Backup wp-config.php, robots.txt, .htaccess, .htpasswd and favicon.ico from root.', 'backwpup' ); BackWPup_Help::add_tab( __( 'This will backup the files if they not in backup. Wp-config.php will backup to if it one folder higher.', 'backwpup' ) ); ?></label>
237
+ </td>
238
+ </tr>
239
+ </table>
240
+ <?php
241
+ }
242
+
243
+
244
+ /**
245
+ * @param $id
246
+ */
247
+ public function edit_form_post_save( $id ) {
248
+
249
+ $fileexclude = explode( ',', stripslashes( str_replace( array( "\r\n", "\r" ), ',', $_POST[ 'fileexclude' ] ) ) );
250
+
251
+ foreach ( $fileexclude as $key => $value ) {
252
+ $fileexclude[ $key ] = str_replace( '//', '/', str_replace( '\\', '/', trim( $value ) ) );
253
+ if ( empty( $fileexclude[ $key ] ) )
254
+ unset( $fileexclude[ $key ] );
255
+ }
256
+ sort( $fileexclude );
257
+ BackWPup_Option::update( $id, 'fileexclude', implode( ',', $fileexclude ) );
258
+
259
+ $dirinclude = explode( ',', stripslashes( str_replace( array( "\r\n", "\r" ), ',', $_POST[ 'dirinclude' ] ) ) );
260
+ foreach ( $dirinclude as $key => $value ) {
261
+ $dirinclude[ $key ] = trailingslashit( str_replace( '//', '/', str_replace( '\\', '/', trim( $value ) ) ) );
262
+ if ( $dirinclude[ $key ] == '/' || empty( $dirinclude[ $key ] ) || ! is_dir( $dirinclude[ $key ] ) )
263
+ unset( $dirinclude[ $key ] );
264
+ }
265
+ sort( $dirinclude );
266
+ BackWPup_Option::update( $id, 'dirinclude', implode( ',', $dirinclude ) );
267
+
268
+ BackWPup_Option::update( $id, 'backupexcludetempfolder', ( isset( $_POST[ 'backupexcludetempfolder' ] ) && $_POST[ 'backupexcludetempfolder' ] == 1 ) ? TRUE : FALSE );
269
+ BackWPup_Option::update( $id, 'backupexcludethumbs', ( isset( $_POST[ 'backupexcludethumbs' ] ) && $_POST[ 'backupexcludethumbs' ] == 1 ) ? TRUE : FALSE );
270
+ BackWPup_Option::update( $id, 'backupspecialfiles', ( isset( $_POST[ 'backupspecialfiles' ] ) && $_POST[ 'backupspecialfiles' ] == 1 ) ? TRUE : FALSE );
271
+ BackWPup_Option::update( $id, 'backuproot', ( isset( $_POST[ 'backuproot' ] ) && $_POST[ 'backuproot' ] == 1 ) ? TRUE : FALSE );
272
+
273
+
274
+ if ( ! isset( $_POST[ 'backuprootexcludedirs' ] ) || ! is_array( $_POST[ 'backuprootexcludedirs' ] ) )
275
+ $_POST[ 'backuprootexcludedirs' ] = array();
276
+ sort( $_POST[ 'backuprootexcludedirs' ] );
277
+ BackWPup_Option::update( $id, 'backuprootexcludedirs', $_POST[ 'backuprootexcludedirs' ] );
278
+
279
+ BackWPup_Option::update( $id, 'backupcontent', ( isset( $_POST[ 'backupcontent' ] ) && $_POST[ 'backupcontent' ] == 1 ) ? TRUE : FALSE );
280
+
281
+ if ( ! isset( $_POST[ 'backupcontentexcludedirs' ] ) || ! is_array( $_POST[ 'backupcontentexcludedirs' ] ) )
282
+ $_POST[ 'backupcontentexcludedirs' ] = array();
283
+ sort( $_POST[ 'backupcontentexcludedirs' ] );
284
+ BackWPup_Option::update( $id, 'backupcontentexcludedirs', $_POST[ 'backupcontentexcludedirs' ] );
285
+
286
+ BackWPup_Option::update( $id, 'backupplugins', ( isset( $_POST[ 'backupplugins' ] ) && $_POST[ 'backupplugins' ] == 1 ) ? TRUE : FALSE );
287
+
288
+ if ( ! isset( $_POST[ 'backuppluginsexcludedirs' ] ) || ! is_array( $_POST[ 'backuppluginsexcludedirs' ] ) )
289
+ $_POST[ 'backuppluginsexcludedirs' ] = array();
290
+ sort( $_POST[ 'backuppluginsexcludedirs' ] );
291
+ BackWPup_Option::update( $id, 'backuppluginsexcludedirs', $_POST[ 'backuppluginsexcludedirs' ] );
292
+
293
+ BackWPup_Option::update( $id, 'backupthemes', ( isset( $_POST[ 'backupthemes' ] ) && $_POST[ 'backupthemes' ] == 1 ) ? TRUE : FALSE );
294
+
295
+ if ( ! isset( $_POST[ 'backupthemesexcludedirs' ] ) || ! is_array( $_POST[ 'backupthemesexcludedirs' ] ) )
296
+ $_POST[ 'backupthemesexcludedirs' ] = array();
297
+ sort( $_POST[ 'backupthemesexcludedirs' ] );
298
+ BackWPup_Option::update( $id, 'backupthemesexcludedirs', $_POST[ 'backupthemesexcludedirs' ] );
299
+
300
+ BackWPup_Option::update( $id, 'backupuploads', ( isset( $_POST[ 'backupuploads' ] ) && $_POST[ 'backupuploads' ] == 1 ) ? TRUE : FALSE );
301
+
302
+ if ( ! isset( $_POST[ 'backupuploadsexcludedirs' ] ) || ! is_array( $_POST[ 'backupuploadsexcludedirs' ] ) )
303
+ $_POST[ 'backupuploadsexcludedirs' ] = array();
304
+ sort( $_POST[ 'backupuploadsexcludedirs' ] );
305
+ BackWPup_Option::update( $id, 'backupuploadsexcludedirs', $_POST[ 'backupuploadsexcludedirs' ] );
306
+ }
307
+
308
+ /**
309
+ * @param $job_object
310
+ * @return bool
311
+ */
312
+ public function job_run( $job_object ) {
313
+
314
+ trigger_error( sprintf( __( '%d. Trying to make a list of folders to back up &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
315
+ $job_object->substeps_todo = 7;
316
+
317
+ //Check free memory for file list
318
+ $job_object->need_free_memory( '4M' ); //4MB free memory
319
+
320
+ $job_object->temp[ 'folders_to_backup' ]=array();
321
+
322
+ //Folder lists for blog folders
323
+ if ( ! empty( $job_object->job[ 'backuproot'] ) && $job_object->substeps_done == 0 ) {
324
+ $excludes = $this->get_exclude_dirs( ABSPATH );
325
+ foreach( $job_object->job[ 'backuprootexcludedirs' ] as $folder ) {
326
+ $excludes[] = trailingslashit( str_replace( '\\', '/', ABSPATH ) ) . $folder . '/';
327
+ }
328
+ $this->get_folder_list( $job_object, trailingslashit( str_replace( '\\', '/', ABSPATH ) ), $excludes );
329
+ }
330
+ if ( $job_object->substeps_done == 0 )
331
+ $job_object->substeps_done = 1;
332
+ $job_object->update_working_data();
333
+
334
+ if ( ! empty( $job_object->job[ 'backupcontent'] ) && $job_object->substeps_done == 1 ) {
335
+ $excludes = $this->get_exclude_dirs( WP_CONTENT_DIR );
336
+ foreach( $job_object->job[ 'backupcontentexcludedirs' ] as $folder ) {
337
+ $excludes[] = trailingslashit( str_replace( '\\', '/', ABSPATH ) ) . $folder . '/';
338
+ }
339
+ $this->get_folder_list( $job_object, trailingslashit( str_replace( '\\', '/', WP_CONTENT_DIR ) ), $excludes );
340
+ }
341
+ if ( $job_object->substeps_done == 1 )
342
+ $job_object->substeps_done = 2;
343
+ $job_object->update_working_data();
344
+
345
+ if ( ! empty( $job_object->job[ 'backupplugins'] ) && $job_object->substeps_done == 2 ) {
346
+ $excludes = $this->get_exclude_dirs( WP_PLUGIN_DIR );
347
+ foreach( $job_object->job[ 'backuppluginsexcludedirs' ] as $folder ) {
348
+ $excludes[] = trailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) ) . $folder . '/';
349
+ }
350
+ $this->get_folder_list( $job_object, trailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) ), $excludes );
351
+ }
352
+ if ( $job_object->substeps_done == 2 )
353
+ $job_object->substeps_done = 3;
354
+ $job_object->update_working_data();
355
+
356
+ if ( ! empty( $job_object->job[ 'backupthemes'] ) && $job_object->substeps_done == 3 ) {
357
+ $excludes = $this->get_exclude_dirs( get_theme_root() );
358
+ foreach( $job_object->job[ 'backupthemesexcludedirs' ] as $folder ) {
359
+ $excludes[] = trailingslashit( str_replace( '\\', '/', get_theme_root() ) ) . $folder . '/';
360
+ }
361
+ $this->get_folder_list( $job_object, trailingslashit( str_replace( '\\', '/', get_theme_root() ) ), $excludes );
362
+ }
363
+ if ( $job_object->substeps_done == 3 )
364
+ $job_object->substeps_done = 4;
365
+ $job_object->update_working_data();
366
+
367
+ if ( ! empty( $job_object->job[ 'backupuploads'] ) && $job_object->substeps_done == 4 ) {
368
+ $excludes = $this->get_exclude_dirs( BackWPup_File::get_upload_dir() );
369
+ foreach( $job_object->job[ 'backupuploadsexcludedirs' ] as $folder ) {
370
+ $excludes[] = BackWPup_File::get_upload_dir() . $folder . '/';
371
+ }
372
+ $this->get_folder_list( $job_object, BackWPup_File::get_upload_dir(), $excludes );
373
+ }
374
+ if ( $job_object->substeps_done == 4 )
375
+ $job_object->substeps_done = 5;
376
+ $job_object->update_working_data();
377
+
378
+ //include dirs
379
+ if ( $job_object->job[ 'dirinclude' ] && $job_object->substeps_done == 5 ) {
380
+ $dirinclude = explode( ',', $job_object->job[ 'dirinclude' ] );
381
+ $dirinclude = array_unique( $dirinclude );
382
+ //Crate file list for includes
383
+ foreach ( $dirinclude as $dirincludevalue ) {
384
+ if ( is_dir( $dirincludevalue ) )
385
+ $this->get_folder_list( $job_object, $dirincludevalue );
386
+ }
387
+ }
388
+ if ( $job_object->substeps_done == 5 )
389
+ $job_object->substeps_done = 6;
390
+ $job_object->update_working_data();
391
+
392
+
393
+ //add extra files if selected
394
+ if ( ! empty( $job_object->job[ 'backupspecialfiles'] ) ) {
395
+ if ( is_file( ABSPATH . 'wp-config.php' ) && empty( $job_object->job[ 'backuproot' ] ) ) {
396
+ $job_object->additional_files_to_backup[ ] = str_replace( '\\', '/', ABSPATH . 'wp-config.php' );
397
+ $job_object->count_files ++;
398
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( ABSPATH . 'wp-config.php' );
399
+ trigger_error( sprintf( __( 'Added "%s" to backup file list', 'backwpup' ), 'wp-config.php' ), E_USER_NOTICE );
400
+ }
401
+ elseif ( is_file( dirname( ABSPATH ) . '/wp-config.php' ) && ! is_file( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
402
+ $job_object->additional_files_to_backup[ ] = str_replace( '\\', '/', dirname( ABSPATH ) . '/wp-config.php' );
403
+ $job_object->count_files ++;
404
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( dirname( ABSPATH ) . '/wp-config.php' );
405
+ trigger_error( sprintf( __( 'Added "%s" to backup file list', 'backwpup' ), 'wp-config.php' ), E_USER_NOTICE );
406
+ }
407
+ if ( is_file( ABSPATH . '.htaccess' ) && empty( $job_object->job[ 'backuproot' ] ) ) {
408
+ $job_object->additional_files_to_backup[ ] = str_replace( '\\', '/', ABSPATH . '.htaccess' );
409
+ $job_object->count_files ++;
410
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( ABSPATH . '.htaccess' );
411
+ trigger_error( sprintf( __( 'Added "%s" to backup file list', 'backwpup' ), '.htaccess' ), E_USER_NOTICE );
412
+ }
413
+ if ( is_file( ABSPATH . '.htpasswd' ) && empty( $job_object->job[ 'backuproot' ] ) ) {
414
+ $job_object->additional_files_to_backup[ ] = str_replace( '\\', '/', ABSPATH . '.htpasswd' );
415
+ $job_object->count_files ++;
416
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( ABSPATH . '.htpasswd' );
417
+ trigger_error( sprintf( __( 'Added "%s" to backup file list', 'backwpup' ), '.htpasswd' ), E_USER_NOTICE );
418
+ }
419
+ if ( is_file( ABSPATH . 'robots.txt' ) && empty( $job_object->job[ 'backuproot' ] ) ) {
420
+ $job_object->additional_files_to_backup[ ] = str_replace( '\\', '/', ABSPATH . 'robots.txt' );
421
+ $job_object->count_files ++;
422
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( ABSPATH . 'robots.txt' );
423
+ trigger_error( sprintf( __( 'Added "%s" to backup file list', 'backwpup' ), 'robots.txt' ), E_USER_NOTICE );
424
+ }
425
+ if ( is_file( ABSPATH . 'favicon.ico' ) && empty( $job_object->job[ 'backuproot' ] ) ) {
426
+ $job_object->additional_files_to_backup[ ] = str_replace( '\\', '/', ABSPATH . 'favicon.ico' );
427
+ $job_object->count_files ++;
428
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( ABSPATH . 'favicon.ico' );
429
+ trigger_error( sprintf( __( 'Added "%s" to backup file list', 'backwpup' ), 'favicon.ico' ), E_USER_NOTICE );
430
+ }
431
+ }
432
+
433
+ if ( empty( $job_object->count_folder ) )
434
+ trigger_error( __( 'No folder to back up.', 'backwpup' ), E_USER_ERROR );
435
+ else
436
+ trigger_error( sprintf( __( '%1$d folders to back up.', 'backwpup' ), $job_object->count_folder ), E_USER_NOTICE );
437
+
438
+ $job_object->substeps_done = 7;
439
+
440
+ return TRUE;
441
+ }
442
+
443
+ /**
444
+ *
445
+ * Helper function for folder_list()
446
+ *
447
+ * @param $job_object BackWPup_Job
448
+ * @param string $folder
449
+ * @param array $excludedirs
450
+ *
451
+ * @return bool
452
+ */
453
+ private function get_folder_list( $job_object, $folder, $excludedirs = array() ) {
454
+
455
+ $folder = trailingslashit( $folder );
456
+
457
+ if ( $dir = scandir( $folder ) ) {
458
+ //add folder to folder list
459
+ $job_object->add_folder_to_backup( $folder );
460
+ $job_object->temp[ 'folders_to_backup' ][] = $folder;
461
+ //scan folder
462
+ foreach ( $dir as $file ) {
463
+ if ( in_array( $file, array( '.', '..' ) ) )
464
+ continue;
465
+ if ( ! empty( $job_object->job[ 'backupexcludetempfolder' ] ) && ( stristr( $file, 'backup') || stristr( $file, 'cache') || stristr( $file, 'temp') ))
466
+ continue;
467
+ foreach ( $job_object->exclude_from_backup as $exclusion ) { //exclude files
468
+ $exclusion = trim( $exclusion );
469
+ if ( FALSE !== stripos( $folder . $file, trim( $exclusion ) ) && ! empty( $exclusion ) )
470
+ continue 2;
471
+ }
472
+ if ( is_dir( $folder . $file ) ) {
473
+ if ( ! is_readable( $folder . $file ) ) {
474
+ trigger_error( sprintf( __( 'Folder "%s" is not readable!', 'backwpup' ), $folder . $file ), E_USER_WARNING );
475
+ continue;
476
+ }
477
+ if ( in_array( trailingslashit( $folder . $file ), $excludedirs ) || in_array( trailingslashit( $folder . $file ), $job_object->temp[ 'folders_to_backup' ] ) )
478
+ continue;
479
+ $this->get_folder_list( $job_object, trailingslashit( $folder . $file ), $excludedirs );
480
+ }
481
+ }
482
+ }
483
+
484
+ return TRUE;
485
+ }
486
+
487
+
488
+ /**
489
+ *
490
+ * Get folder to exclude from a given folder for file backups
491
+ *
492
+ * @param $folder string folder to check for excludes
493
+ *
494
+ * @return array of folder to exclude
495
+ */
496
+ private function get_exclude_dirs( $folder ) {
497
+
498
+ $folder = trailingslashit( str_replace( '\\', '/', $folder ) );
499
+ $excludedir = array();
500
+ $excludedir[ ] = BackWPup::get_plugin_data( 'TEMP' ); //exclude temp
501
+ $excludedir[ ] = BackWPup_Option::get( 'cfg', 'logfolder' ); //exclude log folder
502
+
503
+ if ( FALSE !== strpos( trailingslashit( str_replace( '\\', '/', ABSPATH ) ), $folder ) && trailingslashit( str_replace( '\\', '/', ABSPATH ) ) != $folder )
504
+ $excludedir[ ] = trailingslashit( str_replace( '\\', '/', ABSPATH ) );
505
+ if ( FALSE !== strpos( trailingslashit( str_replace( '\\', '/', WP_CONTENT_DIR ) ), $folder ) && trailingslashit( str_replace( '\\', '/', WP_CONTENT_DIR ) ) != $folder )
506
+ $excludedir[ ] = trailingslashit( str_replace( '\\', '/', WP_CONTENT_DIR ) );
507
+ if ( FALSE !== strpos( trailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) ), $folder ) && trailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) ) != $folder )
508
+ $excludedir[ ] = trailingslashit( str_replace( '\\', '/', WP_PLUGIN_DIR ) );
509
+ if ( FALSE !== strpos( str_replace( '\\', '/', trailingslashit( get_theme_root() ) ), $folder ) && str_replace( '\\', '/', trailingslashit( get_theme_root() ) ) != $folder )
510
+ $excludedir[ ] = str_replace( '\\', '/', trailingslashit( get_theme_root() ) );
511
+ if ( FALSE !== strpos( BackWPup_File::get_upload_dir(), $folder ) && BackWPup_File::get_upload_dir() != $folder )
512
+ $excludedir[ ] = BackWPup_File::get_upload_dir();
513
+
514
+ //Exclude Backup dirs
515
+ $jobids = BackWPup_Option::get_job_ids();
516
+ foreach ( $jobids as $id ) {
517
+ $backupdir = BackWPup_Option::get( $id, 'backupdir' );
518
+ if ( ! empty( $backupdir ) && $backupdir != '/' ) {
519
+ $excludedir[ ] = $backupdir;
520
+ }
521
+ }
522
+
523
+ return array_unique( $excludedir );
524
+ }
525
+ }
inc/class-jobtype-wpexp.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_JobType_WPEXP extends BackWPup_JobTypes {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'WPEXP';
13
+ $this->info[ 'name' ] = __( 'XML export', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'WordPress XML export', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+ /**
23
+ * @return bool
24
+ */
25
+ public function creates_file() {
26
+
27
+ return TRUE;
28
+ }
29
+
30
+ /**
31
+ * @return array
32
+ */
33
+ public function option_defaults() {
34
+ return array( 'wpexportcontent' => 'all', 'wpexportfilecompression' => '', 'wpexportfile' => sanitize_title_with_dashes( get_bloginfo( 'name' ) ) . '.wordpress.%Y-%m-%d' );
35
+ }
36
+
37
+
38
+ /**
39
+ * @param $main
40
+ */
41
+ public function edit_tab( $jobid ) {
42
+ ?>
43
+ <table class="form-table">
44
+ <tr valign="top">
45
+ <th scope="row"><?php _e( 'What to export', 'backwpup' ) ?></th>
46
+ <td>
47
+ <p><label for="idwpexportcontent-all"><input type="radio" name="wpexportcontent" id="idwpexportcontent-all" value="all" <?php checked( BackWPup_Option::get( $jobid, 'wpexportcontent' ), 'all' ); ?> /> <?php _e( 'All content', 'backwpup' ); ?></label></p>
48
+ <p><label for="idwpexportcontent-posts"><input type="radio" name="wpexportcontent" id="idwpexportcontent-posts" value="posts" <?php checked( BackWPup_Option::get( $jobid, 'wpexportcontent' ), 'posts' ); ?> /> <?php _e( 'Posts', 'backwpup' ); ?></label></p>
49
+ <p><label for="idwpexportcontent-pages"><input type="radio" name="wpexportcontent" id="idwpexportcontent-pages" value="pages" <?php checked( BackWPup_Option::get( $jobid, 'wpexportcontent' ), 'pages' ); ?> /> <?php _e( 'Pages', 'backwpup' ); ?></label></p>
50
+ <?php
51
+ foreach ( get_post_types( array( '_builtin' => FALSE, 'can_export' => TRUE ), 'objects' ) as $post_type ) {
52
+ ?>
53
+ <p><label for="idwpexportcontent-<?php echo esc_attr( $post_type->name ); ?>"><input type="radio" name="wpexportcontent" id="idwpexportcontent-<?php echo esc_attr( $post_type->name ); ?>" value="<?php echo esc_attr( $post_type->name ); ?>" <?php checked( BackWPup_Option::get( $jobid, 'wpexportcontent' ), esc_attr( $post_type->name ) ); ?> /> <?php echo esc_html( $post_type->label ); ?></label></p>
54
+ <?php } ?>
55
+ </td>
56
+ </tr>
57
+ <tr valign="top">
58
+ <th scope="row"><label for="idwpexportfile"><?php _e( 'XML Export file name', 'backwpup' ) ?></label></th>
59
+ <td>
60
+ <input name="wpexportfile" type="text" id="idwpexportfile"
61
+ value="<?php echo BackWPup_Option::get( $jobid, 'wpexportfile' );?>"
62
+ class="medium-text code"/>.xml
63
+ </td>
64
+ </tr>
65
+ <tr valign="top">
66
+ <th scope="row"><?php _e( 'File compression', 'backwpup' ) ?></th>
67
+ <td>
68
+ <?php
69
+ echo '<label for="idwpexportfilecompression"><input class="radio" type="radio"' . checked( '', BackWPup_Option::get( $jobid, 'wpexportfilecompression' ), FALSE ) . ' name="wpexportfilecompression" id="idwpexportfilecompression" value="" /> ' . __( 'none', 'backwpup' ). '</label><br />';
70
+ if ( function_exists( 'gzopen' ) )
71
+ echo '<label for="idwpexportfilecompression-gz"><input class="radio" type="radio"' . checked( '.gz', BackWPup_Option::get( $jobid, 'wpexportfilecompression' ), FALSE ) . ' name="wpexportfilecompression" id="idwpexportfilecompression-gz" value=".gz" /> ' . __( 'GZip', 'backwpup' ). '</label><br />';
72
+ else
73
+ echo '<label for="idwpexportfilecompression-gz"><input class="radio" type="radio"' . checked( '.gz', BackWPup_Option::get( $jobid, 'wpexportfilecompression' ), FALSE ) . ' name="wpexportfilecompression" id="idwpexportfilecompression-gz" value=".gz" disabled="disabled" /> ' . __( 'GZip', 'backwpup' ). '</label><br />';
74
+ if ( function_exists( 'bzopen' ) )
75
+ echo '<label for="idwpexportfilecompression-bz2"><input class="radio" type="radio"' . checked( '.bz2', BackWPup_Option::get( $jobid, 'wpexportfilecompression' ), FALSE ) . ' name="wpexportfilecompression" id="idwpexportfilecompression-bz2" value=".bz2" /> ' . __( 'BZip2', 'backwpup' ). '</label><br />';
76
+ else
77
+ echo '<label for="idwpexportfilecompression-bz2"><input class="radio" type="radio"' . checked( '.bz2', BackWPup_Option::get( $jobid, 'wpexportfilecompression' ), FALSE ) . ' name="wpexportfilecompression" id="idwpexportfilecompression-bz2" value=".bz2" disabled="disabled" /> ' . __( 'BZip2', 'backwpup' ). '</label><br />';
78
+ ?>
79
+ </td>
80
+ </tr>
81
+ </table>
82
+ <?php
83
+ }
84
+
85
+ /**
86
+ * @param $id
87
+ */
88
+ public function edit_form_post_save( $id ) {
89
+
90
+ BackWPup_Option::update( $id, 'wpexportcontent', $_POST[ 'wpexportcontent' ] );
91
+ BackWPup_Option::update( $id, 'wpexportfile', $_POST[ 'wpexportfile' ] );
92
+ if ( $_POST[ 'wpexportfilecompression' ] == '' || $_POST[ 'wpexportfilecompression' ] == '.gz' || $_POST[ 'wpexportfilecompression' ] == '.bz2' )
93
+ BackWPup_Option::update( $id, 'wpexportfilecompression', $_POST[ 'wpexportfilecompression' ] );
94
+ }
95
+
96
+ /**
97
+ * @param $job_object
98
+ * @return bool
99
+ */
100
+ public function job_run( $job_object ) {
101
+
102
+ $job_object->substeps_todo = 1;
103
+
104
+ trigger_error( sprintf( __( '%d. Trying to make a WordPress export to XML file &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
105
+ $job_object->need_free_memory( '5M' ); //5MB free memory
106
+ //build filename
107
+ if ( empty( $job_object->temp[ 'wpexportfile' ] ) )
108
+ $job_object->temp[ 'wpexportfile' ] = $job_object->generate_filename( $job_object->job[ 'wpexportfile' ], 'xml' ) . $job_object->job[ 'wpexportfilecompression' ];
109
+
110
+ error_reporting( 0 ); //disable error reporting
111
+ //include WP export function
112
+ require_once ABSPATH . 'wp-admin/includes/export.php';
113
+ ob_flush();
114
+ ob_clean();
115
+ ob_start( array( $this, 'wp_export_ob_bufferwrite' ), 1048576 ); //start output buffering
116
+ $args = array(
117
+ 'content' => $job_object->job[ 'wpexportcontent' ]
118
+ );
119
+ export_wp( $args ); //WP export
120
+ ob_end_clean(); //End output buffering
121
+ error_reporting( E_ALL | E_STRICT ); //enable error reporting
122
+
123
+ //add XML file to backup files
124
+ if ( is_readable( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'wpexportfile' ] ) ) {
125
+ $job_object->additional_files_to_backup[ ] = BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'wpexportfile' ];
126
+ $job_object->count_files ++;
127
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'wpexportfile' ] );
128
+ trigger_error( sprintf( __( 'Added XML export "%1$s" with %2$s to backup file list.', 'backwpup' ), $job_object->temp[ 'wpexportfile' ], size_format( filesize( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'wpexportfile' ] ), 2 ) ), E_USER_NOTICE );
129
+ }
130
+ $job_object->substeps_done = 1;
131
+
132
+ return TRUE;
133
+ }
134
+
135
+ /**
136
+ *
137
+ * Helper for wp-export()
138
+ *
139
+ * @param $output
140
+ */
141
+ public function wp_export_ob_bufferwrite( $output ) {
142
+
143
+ $job_object = BackWPup_Job::getInstance();
144
+ if ( $job_object->job[ 'pluginlistfilecompression' ] == '.gz' )
145
+ file_put_contents( 'compress.zlib://' . BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'wpexportfile' ], $output, FILE_APPEND );
146
+ elseif ( $job_object->job[ 'pluginlistfilecompression' ] == '.bz2' )
147
+ file_put_contents( 'compress.bzip2://' . BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'wpexportfile' ], $output, FILE_APPEND );
148
+ else
149
+ file_put_contents( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'wpexportfile' ], $output, FILE_APPEND );
150
+ $job_object->update_working_data();
151
+ }
152
+ }
inc/class-jobtype-wpplugin.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_JobType_WPPlugin extends BackWPup_JobTypes {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public function __construct() {
11
+
12
+ $this->info[ 'ID' ] = 'WPPLUGIN';
13
+ $this->info[ 'name' ] = __( 'Plugins', 'backwpup' );
14
+ $this->info[ 'description' ] = __( 'Installed plugins list', 'backwpup' );
15
+ $this->info[ 'URI' ] = translate( BackWPup::get_plugin_data( 'PluginURI' ), 'backwpup' );
16
+ $this->info[ 'author' ] = BackWPup::get_plugin_data( 'Author' );
17
+ $this->info[ 'authorURI' ] = translate( BackWPup::get_plugin_data( 'AuthorURI' ), 'backwpup' );
18
+ $this->info[ 'version' ] = BackWPup::get_plugin_data( 'Version' );
19
+
20
+ }
21
+
22
+ /**
23
+ * @return bool
24
+ */
25
+ public function creates_file() {
26
+
27
+ return TRUE;
28
+ }
29
+
30
+ /**
31
+ * @return array
32
+ */
33
+ public function option_defaults() {
34
+ return array( 'pluginlistfilecompression' => '', 'pluginlistfile' => sanitize_title_with_dashes( get_bloginfo( 'name' ) ) . '.pluginlist.%Y-%m-%d' );
35
+ }
36
+
37
+ /**
38
+ * @param $jobid
39
+ * @return void
40
+ */
41
+ public function edit_tab( $jobid ) {
42
+ ?>
43
+ <table class="form-table">
44
+ <tr valign="top">
45
+ <th scope="row"><label for="idpluginlistfile"><?php _e( 'Plugin list file name', 'backwpup' ) ?></label></th>
46
+ <td>
47
+ <input name="pluginlistfile" type="text" id="idpluginlistfile"
48
+ value="<?php echo BackWPup_Option::get( $jobid, 'pluginlistfile' );?>"
49
+ class="medium-text code"/>.txt
50
+ </td>
51
+ </tr>
52
+ <tr valign="top">
53
+ <th scope="row"><?php _e( 'File compression', 'backwpup' ) ?></th>
54
+ <td>
55
+ <?php
56
+ echo '<label for="idpluginlistfilecompression"><input class="radio" type="radio"' . checked( '', BackWPup_Option::get( $jobid, 'pluginlistfilecompression' ), FALSE ) . ' name="pluginlistfilecompression" id="idpluginlistfilecompression" value="" /> ' . __( 'none', 'backwpup' ). '</label><br />';
57
+ if ( function_exists( 'gzopen' ) )
58
+ echo '<label for="idpluginlistfilecompression-gz"><input class="radio" type="radio"' . checked( '.gz', BackWPup_Option::get( $jobid, 'pluginlistfilecompression' ), FALSE ) . ' name="pluginlistfilecompression" id="idpluginlistfilecompression-gz" value=".gz" /> ' . __( 'GZip', 'backwpup' ). '</label><br />';
59
+ else
60
+ echo '<label for="idpluginlistfilecompression-gz"><input class="radio" type="radio"' . checked( '.gz', BackWPup_Option::get( $jobid, 'pluginlistfilecompression' ), FALSE ) . ' name="pluginlistfilecompression" id="idpluginlistfilecompression-gz" value=".gz" disabled="disabled" /> ' . __( 'GZip', 'backwpup' ). '</label><br />';
61
+ if ( function_exists( 'bzopen' ) )
62
+ echo '<label for="idpluginlistfilecompression-bz2"><input class="radio" type="radio"' . checked( '.bz2', BackWPup_Option::get( $jobid, 'pluginlistfilecompression' ), FALSE ) . ' name="pluginlistfilecompression" id="idpluginlistfilecompression-bz2" value=".bz2" /> ' . __( 'BZip2', 'backwpup' ). '</label><br />';
63
+ else
64
+ echo '<label for="idpluginlistfilecompression-bz2"><input class="radio" type="radio"' . checked( '.bz2', BackWPup_Option::get( $jobid, 'pluginlistfilecompression' ), FALSE ) . ' name="pluginlistfilecompression" id="idpluginlistfilecompression-bz2" value=".bz2" disabled="disabled" /> ' . __( 'BZip2', 'backwpup' ). '</label><br />';
65
+ ?>
66
+ </td>
67
+ </tr>
68
+ </table>
69
+ <?php
70
+ }
71
+
72
+
73
+ /**
74
+ * @param $id
75
+ */
76
+ public function edit_form_post_save( $id ) {
77
+
78
+ BackWPup_Option::update( $id, 'pluginlistfile', $_POST[ 'pluginlistfile' ] );
79
+ if ( $_POST[ 'pluginlistfilecompression' ] == '' || $_POST[ 'pluginlistfilecompression' ] == '.gz' || $_POST[ 'pluginlistfilecompression' ] == '.bz2' )
80
+ BackWPup_Option::update( $id, 'pluginlistfilecompression', $_POST[ 'pluginlistfilecompression' ] );
81
+ }
82
+
83
+ /**
84
+ * @param $job_object
85
+ * @return bool
86
+ */
87
+ public function job_run( $job_object ) {
88
+
89
+ $job_object->substeps_todo = 1;
90
+
91
+ trigger_error( sprintf( __( '%d. Trying to generate a file with installed Plugin names &hellip;', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'STEP_TRY' ] ), E_USER_NOTICE );
92
+ //build filename
93
+ if ( empty( $job_object->temp[ 'pluginlistfile' ] ) )
94
+ $job_object->temp[ 'pluginlistfile' ] = $job_object->generate_filename( $job_object->job[ 'pluginlistfile' ], 'txt' ) . $job_object->job[ 'pluginlistfilecompression' ];
95
+
96
+ if ( $job_object->job[ 'pluginlistfilecompression' ] == '.gz' )
97
+ $handle = fopen( 'compress.zlib://' . BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'pluginlistfile' ], 'w' );
98
+ elseif ( $job_object->job[ 'pluginlistfilecompression' ] == '.bz2' )
99
+ $handle = fopen( 'compress.bzip2://' . BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'pluginlistfile' ], 'w' );
100
+ else
101
+ $handle = fopen( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'pluginlistfile' ], 'w' );
102
+
103
+ //open file
104
+ $header = "------------------------------------------------------------" . PHP_EOL;
105
+ $header .= " Plugin list generated with BackWPup version: " . BackWPup::get_plugin_data( 'Version' ) . PHP_EOL;
106
+ $header .= " " . translate( BackWPup::get_plugin_data( 'pluginuri' ), 'backwpup' ) . PHP_EOL;
107
+ $header .= " Blog Name: " . get_bloginfo( 'name' ) . PHP_EOL;
108
+ $header .= " Blog URL: " . get_bloginfo( 'url' ) . PHP_EOL;
109
+ $header .= " Generated on: " . date_i18n( 'Y-m-d H:i.s' ) . PHP_EOL;
110
+ $header .= "------------------------------------------------------------" . PHP_EOL . PHP_EOL;
111
+ fwrite( $handle, $header );
112
+ //get Plugins
113
+ if ( ! function_exists( 'get_plugins' ) )
114
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
115
+ $plugins = get_plugins();
116
+ $plugins_active = get_option( 'active_plugins' );
117
+ //write it to file
118
+ fwrite( $handle, PHP_EOL . __( 'All plugins information:', 'backwpup' ) . PHP_EOL . '------------------------------' . PHP_EOL );
119
+ foreach ( $plugins as $plugin ) {
120
+ fwrite( $handle, $plugin[ 'Name' ] . ' (v.' . $plugin[ 'Version' ] . ') ' . html_entity_decode( sprintf( __( 'from %s', 'backwpup' ), $plugin[ 'Author' ] ), ENT_QUOTES ) . PHP_EOL . "\t" . $plugin[ 'PluginURI' ] . PHP_EOL );
121
+ }
122
+ fwrite( $handle, PHP_EOL . __( 'Active plugins:', 'backwpup' ) . PHP_EOL . '------------------------------' . PHP_EOL );
123
+
124
+ foreach ( $plugins as $key => $plugin ) {
125
+ if ( in_array( $key, $plugins_active ) )
126
+ fwrite( $handle, $plugin[ 'Name' ] . PHP_EOL );
127
+ }
128
+ fwrite( $handle, PHP_EOL . __( 'Inactive plugins:', 'backwpup' ) . PHP_EOL . '------------------------------' . PHP_EOL );
129
+ foreach ( $plugins as $key => $plugin ) {
130
+ if ( ! in_array( $key, $plugins_active ) )
131
+ fwrite( $handle, $plugin[ 'Name' ] . PHP_EOL );
132
+ }
133
+ fclose( $handle );
134
+
135
+ //add file to backup files
136
+ if ( is_readable( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'pluginlistfile' ] ) ) {
137
+ $job_object->additional_files_to_backup[ ] = BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'pluginlistfile' ];
138
+ $job_object->count_files ++;
139
+ $job_object->count_filesize = $job_object->count_filesize + @filesize( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'pluginlistfile' ] );
140
+ trigger_error( sprintf( __( 'Added plugin list file "%1$s" with %2$s to backup file list.', 'backwpup' ), $job_object->temp[ 'pluginlistfile' ], size_format( filesize( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->temp[ 'pluginlistfile' ] ), 2 ) ), E_USER_NOTICE );
141
+ }
142
+ $job_object->substeps_done = 1;
143
+
144
+ return TRUE;
145
+ }
146
+ }
inc/class-jobtypes.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ abstract class BackWPup_JobTypes {
6
+
7
+ public $info = array();
8
+
9
+ /**
10
+ *
11
+ */
12
+ abstract public function __construct();
13
+
14
+ /**
15
+ * Get the default Options
16
+ *
17
+ * @return array of default options
18
+ */
19
+ abstract public function option_defaults();
20
+
21
+ /**
22
+ * @param $jobid
23
+ */
24
+ abstract public function edit_tab( $jobid );
25
+
26
+ /**
27
+ * @param $jobid
28
+ */
29
+ abstract public function edit_form_post_save( $jobid );
30
+
31
+ /**
32
+ * use wp_enqueue_script() here to load js for tab
33
+ */
34
+ public function admin_print_scripts() {
35
+
36
+ }
37
+
38
+ /**
39
+ *
40
+ */
41
+ public function edit_inline_js() {
42
+
43
+ }
44
+
45
+ /**
46
+ *
47
+ */
48
+ public function edit_ajax() {
49
+
50
+ }
51
+
52
+ /**
53
+ *
54
+ */
55
+ public function wizard_admin_print_styles() {
56
+
57
+ }
58
+
59
+ /**
60
+ *
61
+ */
62
+ public function wizard_admin_print_scripts() {
63
+
64
+ }
65
+
66
+ /**
67
+ *
68
+ */
69
+ public function wizard_inline_js() {
70
+
71
+ }
72
+
73
+ /**
74
+ * @param $job_settings
75
+ */
76
+ public function wizard_page( $job_settings ) {
77
+
78
+ echo '<br /><pre>';
79
+ print_r( $job_settings );
80
+ echo '</pre>';
81
+ }
82
+
83
+ /**
84
+ * @param $job_settings
85
+ */
86
+ public function wizard_save( $job_settings ) {
87
+
88
+ return $job_settings;
89
+ }
90
+
91
+ /**
92
+ *
93
+ */
94
+ public function admin_print_styles() {
95
+
96
+ }
97
+
98
+ /**
99
+ * @return bool
100
+ */
101
+ public function creates_file() {
102
+
103
+ return FALSE;
104
+ }
105
+
106
+ /**
107
+ * @param $job_object BackWPup_Job Object
108
+ * @return bool
109
+ */
110
+ abstract public function job_run( $job_object );
111
+ }
inc/class-mysqldump.php ADDED
@@ -0,0 +1,400 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class to create a MYSQL dump with mysqli as sql file
4
+ */
5
+ class BackWPup_MySQLDump {
6
+
7
+ /**
8
+ * Holder for mysqli recourse
9
+ */
10
+ private $mysqli = NULL;
11
+
12
+ /**
13
+ * Holder for dump file handle
14
+ */
15
+ private $handle = NULL;
16
+
17
+ /**
18
+ * Table names of Tables in Database
19
+ */
20
+ public $tables_to_dump = array();
21
+
22
+ /**
23
+ * Table names of Tables in Database
24
+ */
25
+ private $table_types = array();
26
+
27
+ /**
28
+ * Table information of Tables in Database
29
+ */
30
+ private $table_status = array();
31
+
32
+ /**
33
+ * Database name
34
+ */
35
+ private $dbname = '';
36
+
37
+ /**
38
+ * Compression to use
39
+ * empty for none
40
+ * gz for Gzip
41
+ * bz2 for Bzip
42
+ */
43
+ private $compression = '';
44
+
45
+ /**
46
+ * Check params and makes confections
47
+ * gets the table information too
48
+ *
49
+ * @param $args array with arguments
50
+ * @throws BackWPup_MySQLDump_Exception
51
+ * @global $wpdb wpdb
52
+ */
53
+ public function __construct( $args = array() ) {
54
+ global $wpdb;
55
+
56
+ $default_args = array(
57
+ 'dbhost' => $wpdb->dbhost,
58
+ 'dbname' => $wpdb->dbname,
59
+ 'dbuser' => $wpdb->dbuser,
60
+ 'dbpassword' => $wpdb->dbpassword,
61
+ 'dbcharset' => $wpdb->charset,
62
+ 'dumpfilehandle' => fopen( 'php://output', 'wb' ),
63
+ 'dumpfile' => NULL,
64
+ 'compression' => ''
65
+ );
66
+
67
+ $args = wp_parse_args( $args , $default_args );
68
+
69
+ //check if port or socket in hostname and set port and socket
70
+ $args[ 'dbport' ] = NULL;
71
+ $args[ 'dbsocket' ] = NULL;
72
+ if ( strstr( ':', $args[ 'dbhost' ] ) ) {
73
+ $hostparts = explode( ':', $args[ 'dbhost' ] );
74
+ $args[ 'dbhost' ] = $hostparts[ 0 ];
75
+ if ( is_numeric( $hostparts[ 1 ] ) )
76
+ $args[ 'dbport' ] = (string) $hostparts[ 1];
77
+ else
78
+ $args[ 'dbsocket' ] = $hostparts[ 1 ] ;
79
+ if ( isset( $hostparts[ 2 ] ) )
80
+ $args[ 'dbsocket' ] = $hostparts[ 2 ];
81
+ }
82
+
83
+ //connect to Database
84
+ $this->mysqli = new mysqli( $args[ 'dbhost' ], $args[ 'dbuser' ], $args[ 'dbpassword' ], $args[ 'dbname' ], $args[ 'dbport' ], $args[ 'dbsocket' ] );
85
+ if ( $this->mysqli->connect_error )
86
+ throw new BackWPup_MySQLDump_Exception( sprintf( __( 'Can not connect to MySQL Database %1$d: %2$s', 'backwpup' ), $this->mysqli->connect_errno, $this->mysqli->connect_error ) );
87
+
88
+ //set charset
89
+ $res = $this->mysqli->set_charset( $args[ 'dbcharset' ] );
90
+ if ( ! $res )
91
+ throw new BackWPup_MySQLDump_Exception( sprintf( _x( 'Can not set DB charset to %s','Database Charset', 'backwpup' ), $args[ 'dbcharset' ] ) );
92
+
93
+ //set db name
94
+ $this->dbname = $args[ 'dbname' ];
95
+
96
+ //set compression
97
+ if ( ! empty( $args[ 'compression' ] ) && in_array( $args[ 'compression' ], array( 'gz', 'bz2' ) ) )
98
+ $this->compression = $args[ 'compression' ];
99
+
100
+ //open file if set
101
+ if ( $args[ 'dumpfile' ] ) {
102
+ if ( substr( strtolower( $args[ 'dumpfile' ] ), -3 ) == '.gz' ) {
103
+ if ( ! function_exists( 'gzencode' ) )
104
+ throw new BackWPup_MySQLDump_Exception( __( 'Functions for gz compression not available', 'backwpup' ) );
105
+ $this->compression = 'gz';
106
+ } elseif ( substr( strtolower( $args[ 'dumpfile' ] ), -4 ) == '.bz2' ) {
107
+ if ( ! function_exists( 'bzcompress' ) )
108
+ throw new BackWPup_MySQLDump_Exception( __( 'Functions for bz2 compression not available', 'backwpup' ) );
109
+ $this->compression = 'bz2';
110
+ } else {
111
+ $this->compression = '';
112
+ }
113
+ $this->handle = fopen( $args[ 'dumpfile' ], 'wb' );
114
+ } else {
115
+ $this->handle = $args[ 'dumpfilehandle' ];
116
+ }
117
+
118
+ //check file handle
119
+ if ( ! is_resource( $this->handle ) )
120
+ throw new BackWPup_MySQLDump_Exception( __( 'Can not open dump file', 'backwpup' ) );
121
+
122
+ //get table names and types from Database
123
+ $res = $this->mysqli->query( 'SHOW FULL TABLES FROM `' . $this->dbname . '`' );
124
+ if ( $this->mysqli->error )
125
+ throw new BackWPup_MySQLDump_Exception( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, 'SHOW FULL TABLES FROM `' . $this->dbname . '`' ) );
126
+ while ( $table = $res->fetch_array( MYSQLI_NUM ) ) {
127
+ $this->tables_to_dump[] = $table[ 0 ];
128
+ $this->table_types[ $table[ 0 ] ] = $table[ 1 ];
129
+ }
130
+ $res->close();
131
+
132
+ //get table info
133
+ $res = $this->mysqli->query( "SHOW TABLE STATUS FROM `" . $this->dbname . "`" );
134
+ if ( $this->mysqli->error )
135
+ throw new BackWPup_MySQLDump_Exception( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW TABLE STATUS FROM `" .$this->dbname . "`" ) );
136
+ while ( $tablestatus = $res->fetch_assoc() ) {
137
+ $this->table_status[ $tablestatus[ 'Name' ] ] = $tablestatus;
138
+ }
139
+ $res->close();
140
+ }
141
+
142
+ /**
143
+ * Start the dump
144
+ */
145
+ public function execute() {
146
+
147
+ //increase time limit
148
+ @set_time_limit( 0 );
149
+ //write dump head
150
+ $this->dump_head();
151
+ //write tables
152
+ foreach( $this->tables_to_dump as $table )
153
+ $this->dump_table( $table );
154
+ //write footer
155
+ $this->dump_footer();
156
+
157
+ }
158
+
159
+ /**
160
+ * Write Dump Header
161
+ *
162
+ * @param bool $wp_info Dump WordPress info in dump head
163
+ */
164
+ public function dump_head( $wp_info = FALSE ) {
165
+
166
+ // get sql timezone
167
+ $res = $this->mysqli->query( "SELECT @@time_zone" );
168
+ $mysqltimezone = $res->fetch_row();
169
+ $mysqltimezone = $mysqltimezone[0];
170
+ $res->close();
171
+
172
+
173
+ //For SQL always use \n as MySQL wants this on all platforms.
174
+ $dbdumpheader = "-- ---------------------------------------------------------\n";
175
+ $dbdumpheader .= "-- Dumped with BackWPup ver.: " . BackWPup::get_plugin_data( 'Version' ) . "\n";
176
+ $dbdumpheader .= "-- https://marketpress.de/product/backwpup-pro/\n";
177
+ if ( $wp_info ) {
178
+ $dbdumpheader .= "-- Blog Name: " . get_bloginfo( 'name' ) . "\n";
179
+ $dbdumpheader .= "-- Blog URL: " . trailingslashit( get_bloginfo( 'url' ) ) . "\n";
180
+ $dbdumpheader .= "-- Blog ABSPATH: " . trailingslashit( str_replace( '\\', '/', ABSPATH ) ) . "\n";
181
+ $dbdumpheader .= "-- Blog Charset: " . get_bloginfo( 'charset' ) . "\n";
182
+ $dbdumpheader .= "-- Table Prefix: " . $GLOBALS[ 'wpdb' ]->prefix . "\n";
183
+ }
184
+ $dbdumpheader .= "-- Database Name: " . $this->dbname . "\n";
185
+ $dbdumpheader .= "-- Dumped on: " . date_i18n( 'Y-m-d H:i.s' ) . "\n";
186
+ $dbdumpheader .= "-- ---------------------------------------------------------\n\n";
187
+ //for better import with mysql client
188
+ $dbdumpheader .= "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n";
189
+ $dbdumpheader .= "/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n";
190
+ $dbdumpheader .= "/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n";
191
+ $dbdumpheader .= "/*!40101 SET NAMES " . $this->mysqli->get_charset()->charset . " */;\n";
192
+ $dbdumpheader .= "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n";
193
+ $dbdumpheader .= "/*!40103 SET TIME_ZONE='" . $mysqltimezone . "' */;\n";
194
+ $dbdumpheader .= "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n";
195
+ $dbdumpheader .= "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n";
196
+ $dbdumpheader .= "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n";
197
+ $dbdumpheader .= "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n";
198
+ $this->write( $dbdumpheader );
199
+ }
200
+
201
+ /**
202
+ * Write Dump Footer with dump of functions and procedures
203
+ */
204
+ public function dump_footer() {
205
+
206
+ //dump procedures and functions
207
+ $this->write( "\n--\n-- Dumping routines for database '" . $this->dbname . "'\n--\n" );
208
+
209
+ //dump Functions
210
+ $res = $this->mysqli->query( "SHOW FUNCTION STATUS" );
211
+ if ( $this->mysqli->error )
212
+ trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW FUNCTION STATUS" ), E_USER_WARNING );
213
+ while ( $function_status = $res->fetch_assoc() ) {
214
+ if ( $this->dbname != $function_status[ 'Db' ] )
215
+ continue;
216
+ $create = "\n--\n-- Function structure for " . $function_status[ 'Name' ] . "\n--\n\n";
217
+ $create .= "DROP FUNCTION IF EXISTS `" . $function_status[ 'Name' ] . "`;\n";
218
+ $create .= "/*!40101 SET @saved_cs_client = @@character_set_client */;\n";
219
+ $create .= "/*!40101 SET character_set_client = '" . $this->mysqli->get_charset()->charset . "' */;\n";
220
+ //Dump the view structure
221
+ $res2 = $this->mysqli->query( "SHOW CREATE FUNCTION `" . $function_status[ 'Db' ] . "`.`" . $function_status[ 'Name' ] . "`" );
222
+ if ( $this->mysqli->error )
223
+ trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE FUNCTION `" . $function_status[ 'Db' ] . "`.`" . $function_status[ 'Name' ] . "`" ), E_USER_WARNING );
224
+ $create_function = $res2->fetch_assoc();
225
+ $res2->close();
226
+ $create .= $create_function[ 'Create Function' ] . ";\n";
227
+ $create .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
228
+ $this->write( $create );
229
+ }
230
+ $res->close();
231
+
232
+ //dump Procedures
233
+ $res = $this->mysqli->query( "SHOW PROCEDURE STATUS" );
234
+ if ( $this->mysqli->error )
235
+ trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW PROCEDURE STATUS" ), E_USER_WARNING );
236
+ while ( $procedure_status = $res->fetch_assoc() ) {
237
+ if ( $this->dbname != $procedure_status[ 'Db' ] )
238
+ continue;
239
+ $create = "\n--\n-- Procedure structure for " . $procedure_status[ 'Name' ] . "\n--\n\n";
240
+ $create .= "DROP PROCEDURE IF EXISTS `" . $procedure_status[ 'Name' ] . "`;\n";
241
+ $create .= "/*!40101 SET @saved_cs_client = @@character_set_client */;\n";
242
+ $create .= "/*!40101 SET character_set_client = '" . $this->mysqli->get_charset()->charset . "' */;\n";
243
+ //Dump the view structure
244
+ $res2 = $this->mysqli->query( "SHOW CREATE PROCEDURE `" . $procedure_status[ 'Db' ] . "`.`" . $procedure_status[ 'Name' ] . "`" );
245
+ if ( $this->mysqli->error )
246
+ trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE PROCEDURE `" . $procedure_status[ 'Db' ] . "`.`" . $procedure_status[ 'Name' ] . "`" ), E_USER_WARNING );
247
+ $create_procedure = $res2->fetch_assoc();
248
+ $res2->close();
249
+ $create .= $create_procedure[ 'Create Procedure' ] . ";\n";
250
+ $create .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
251
+ $this->write( $create );
252
+ }
253
+ $res->close();
254
+
255
+ //for better import with mysql client
256
+ $dbdumpfooter = "\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n";
257
+ $dbdumpfooter .= "/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n";
258
+ $dbdumpfooter .= "/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n";
259
+ $dbdumpfooter .= "/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n";
260
+ $dbdumpfooter .= "/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n";
261
+ $dbdumpfooter .= "/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n";
262
+ $dbdumpfooter .= "/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n";
263
+ $dbdumpfooter .= "/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n";
264
+ $dbdumpfooter .= "\n-- Dump completed on " . date_i18n( 'Y-m-d H:i:s' ). "\n";
265
+ $this->write( $dbdumpfooter );
266
+ }
267
+
268
+ /**
269
+ * Dump table structure and Data
270
+ *
271
+ * @param string $table name of Table to dump
272
+ */
273
+ public function dump_table( $table ) {
274
+
275
+ //dump View
276
+ if ( $this->table_types[ $table ] == 'VIEW' ) {
277
+ $tablecreate = "\n--\n-- View structure for `" . $table . "`\n--\n\n";
278
+ $tablecreate .= "DROP VIEW IF EXISTS `" . $table . "`;\n";
279
+ $tablecreate .= "/*!40101 SET @saved_cs_client = @@character_set_client */;\n";
280
+ $tablecreate .= "/*!40101 SET character_set_client = '" . $this->mysqli->get_charset()->charset . "' */;\n";
281
+ //Dump the view structure
282
+ $res = $this->mysqli->query( "SHOW CREATE VIEW `" . $table . "`" );
283
+ if ( $this->mysqli->error )
284
+ trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE VIEW `" . $table . "`" ), E_USER_WARNING );
285
+ $createview = $res->fetch_assoc();
286
+ $res->close();
287
+ $tablecreate .= $createview[ 'Create View' ] . ";\n";
288
+ $tablecreate .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
289
+ $this->write( $tablecreate );
290
+
291
+ return;
292
+ }
293
+
294
+ if ( $this->table_types[ $table ] != 'BASE TABLE' )
295
+ return;
296
+
297
+ //dump normal Table
298
+ $tablecreate = "\n--\n-- Table structure for `" . $table . "`\n--\n\n";
299
+ $tablecreate .= "DROP TABLE IF EXISTS `" . $table . "`;\n";
300
+ $tablecreate .= "/*!40101 SET @saved_cs_client = @@character_set_client */;\n";
301
+ $tablecreate .= "/*!40101 SET character_set_client = '" . $this->mysqli->get_charset()->charset . "' */;\n";
302
+ //Dump the table structure
303
+ $res = $this->mysqli->query( "SHOW CREATE TABLE `" . $table . "`" );
304
+ if ( $this->mysqli->error )
305
+ trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SHOW CREATE TABLE `" . $table . "`" ), E_USER_WARNING );
306
+ $createtable = $res->fetch_assoc();
307
+ $res->close();
308
+ $tablecreate .= $createtable[ 'Create Table' ] . ";\n";
309
+ $tablecreate .= "/*!40101 SET character_set_client = @saved_cs_client */;\n";
310
+ $this->write( $tablecreate );
311
+
312
+
313
+ //Dump Table data
314
+ $this->write( "\n--\n-- Dumping data for table `" . $table . "`\n--\n\nLOCK TABLES `" . $table . "` WRITE;\n/*!40000 ALTER TABLE `" . $table . "` DISABLE KEYS */;\n" );
315
+
316
+ //get data from table
317
+ $res = $this->mysqli->query( "SELECT * FROM `" . $table . "`", MYSQLI_USE_RESULT );
318
+ if ( $this->mysqli->error )
319
+ trigger_error( sprintf( __( 'Database error %1$s for query %2$s', 'backwpup' ), $this->mysqli->error, "SELECT * FROM `" . $table . "`" ), E_USER_WARNING );
320
+
321
+ $fieldsarray = array();
322
+ $fieldinfo = array();
323
+ $fields = $res->fetch_fields();
324
+ $i = 0;
325
+ foreach ( $fields as $filed ) {
326
+ $fieldsarray[ $i ] = $filed->orgname;
327
+ $fieldinfo[ $fieldsarray[ $i ] ] = $filed;
328
+ $i ++;
329
+ }
330
+
331
+ $dump = '';
332
+ while ( $data = $res->fetch_assoc() ) {
333
+ $values = array();
334
+ foreach ( $data as $key => $value ) {
335
+ if ( is_null( $value ) || ! isset( $value ) ) // Make Value NULL to string NULL
336
+ $value = "NULL";
337
+ elseif ( in_array($fieldinfo[ $key ]->type, array( MYSQLI_TYPE_DECIMAL, MYSQLI_TYPE_TINY, MYSQLI_TYPE_SHORT, MYSQLI_TYPE_LONG, MYSQLI_TYPE_FLOAT, MYSQLI_TYPE_DOUBLE, MYSQLI_TYPE_LONGLONG, MYSQLI_TYPE_INT24 ) ) ) //is value numeric no esc
338
+ $value = empty( $value ) ? 0 : $value;
339
+ else
340
+ $value = "'" . $this->mysqli->real_escape_string( $value ) . "'";
341
+ $values[ ] = $value;
342
+ }
343
+ //new query in dump on more than 50000 chars.
344
+ if ( empty( $dump ) )
345
+ $dump = "INSERT INTO `" . $table . "` (`" . implode( "`, `", $fieldsarray ) . "`) VALUES \n";
346
+ if ( strlen( $dump ) <= 50000 ) {
347
+ $dump .= "(" . implode( ", ", $values ) . "),\n";
348
+ } else {
349
+ $dump .= "(" . implode( ", ", $values ) . ");\n";
350
+ $this->write( $dump );
351
+ $dump = '';
352
+ }
353
+ }
354
+ if ( ! empty( $dump ) ) {
355
+ $dump = substr( $dump, 0, -2 ) . ";\n" ;
356
+ $this->write( $dump );
357
+ }
358
+ $res->close();
359
+
360
+ $this->write( "/*!40000 ALTER TABLE `" . $table . "` ENABLE KEYS */;\nUNLOCK TABLES;\n" );
361
+
362
+
363
+ }
364
+
365
+ /**
366
+ * Writes data to handle and compress
367
+ *
368
+ * @param $data string to write
369
+ * @throws BackWPup_MySQLDump_Exception
370
+ */
371
+ private function write( $data ) {
372
+
373
+ if ( $this->compression == 'gz' )
374
+ $written = fwrite( $this->handle, gzencode( $data ) );
375
+ elseif ( $this->compression == 'bz2' )
376
+ $written = fwrite( $this->handle, bzcompress( $data ) );
377
+ else
378
+ $written = fwrite( $this->handle, $data );
379
+
380
+ if ( ! $written )
381
+ throw new BackWPup_MySQLDump_Exception( __( 'Error on writing to file!', 'backwpup' ) );
382
+ }
383
+
384
+ /**
385
+ * Closes all confections on shutdown.
386
+ */
387
+ public function __destruct() {
388
+
389
+ //close MySQL connection
390
+ $this->mysqli->close();
391
+ //close file handle
392
+ fclose( $this->handle );
393
+ }
394
+
395
+ }
396
+
397
+ /**
398
+ * Exception Handler
399
+ */
400
+ class BackWPup_MySQLDump_Exception extends Exception { }
inc/class-option.php ADDED
@@ -0,0 +1,310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for options
4
+ */
5
+ final class BackWPup_Option {
6
+
7
+ /**
8
+ *
9
+ * Load BackWPup Options
10
+ *
11
+ * @param bool $use_cache
12
+ * @return array of options
13
+ */
14
+ private static function jobs_options( $use_cache = TRUE ) {
15
+
16
+ //disable cache for non multisite
17
+ if ( ! is_multisite() && ! $use_cache ) {
18
+ //remove from options cache
19
+ wp_cache_delete( 'backwpup_jobs' , 'options' );
20
+ //remove from all options
21
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
22
+ if ( isset( $alloptions[ 'backwpup_jobs' ] )) {
23
+ unset( $alloptions[ 'backwpup_jobs' ] );
24
+ wp_cache_set('alloptions', $alloptions, 'options');
25
+ }
26
+ }
27
+
28
+ return get_site_option( 'backwpup_jobs', array( ), $use_cache );
29
+ }
30
+
31
+ /**
32
+ *
33
+ * Update BackWPup Options
34
+ *
35
+ * @param array $options The options array to save
36
+ * @return bool updated or not
37
+ */
38
+ private static function update_jobs_options( $options ) {
39
+
40
+ return update_site_option( 'backwpup_jobs', $options );
41
+ }
42
+
43
+ /**
44
+ *
45
+ * Get default option for BackWPup option
46
+ *
47
+ * @param string $group Option group
48
+ * @param string $key Option key
49
+ *
50
+ * @return bool|mixed
51
+ */
52
+ public static function defaults( $group, $key ) {
53
+
54
+ $group = sanitize_key( trim( $group ) );
55
+ $key = sanitize_key( trim( $key ) );
56
+
57
+ $upload_dir = wp_upload_dir();
58
+ $default[ 'cfg' ] = array();
59
+ //set defaults
60
+ if ( $group == 'cfg' ) { //for settings
61
+ //generel
62
+ $default[ 'cfg' ][ 'showadminbar' ] = TRUE;
63
+ $default[ 'cfg' ][ 'protectfolders' ] = TRUE;
64
+ //job
65
+ $default[ 'cfg' ][ 'jobstepretry' ] = 3;
66
+ $default[ 'cfg' ][ 'jobsteprestart' ] = TRUE;
67
+ $default[ 'cfg' ][ 'jobrunauthkey' ] = substr( md5( md5( SECURE_AUTH_KEY ) ), 11, 8 );
68
+ $default[ 'cfg' ][ 'jobnotranslate' ] = FALSE;
69
+ $default[ 'cfg' ][ 'jobwaittimems' ] = 10000;
70
+ //Logs
71
+ $default[ 'cfg' ][ 'maxlogs' ] = 50;
72
+ $default[ 'cfg' ][ 'gzlogs' ] = FALSE;
73
+ $default[ 'cfg' ][ 'logfolder' ] = trailingslashit( str_replace( '\\', '/',$upload_dir[ 'basedir' ] ) ) . 'backwpup-' . substr( md5( md5( SECURE_AUTH_KEY ) ), 9, 5 ) . '-logs/';
74
+ //Network Auth
75
+ $default[ 'cfg' ][ 'httpauthuser' ] = '';
76
+ $default[ 'cfg' ][ 'httpauthpassword' ] = '';
77
+ //API Keys
78
+ $default[ 'cfg' ][ 'dropboxappkey' ] = base64_decode( 'dHZkcjk1MnRhZnM1NmZ2' );
79
+ $default[ 'cfg' ][ 'dropboxappsecret' ] = base64_decode( 'OWV2bDR5MHJvZ2RlYmx1' );
80
+ $default[ 'cfg' ][ 'dropboxsandboxappkey' ] = base64_decode( 'cHVrZmp1a3JoZHR5OTFk' );
81
+ $default[ 'cfg' ][ 'dropboxsandboxappsecret' ] = base64_decode( 'eGNoYzhxdTk5eHE0eWdq' );
82
+ $default[ 'cfg' ][ 'sugarsynckey' ] = base64_decode( 'TlRBek1EY3lOakV6TkRrMk1URXhNemM0TWpJ' );
83
+ $default[ 'cfg' ][ 'sugarsyncsecret' ] = base64_decode( 'TkRFd01UazRNVEpqTW1Ga05EaG1NR0k1TVRFNFpqa3lPR1V6WlRVMk1tTQ==' );
84
+ $default[ 'cfg' ][ 'sugarsyncappid' ] = '/sc/5030726/449_18207099';
85
+ }
86
+ //return defaults of main
87
+ if ( empty( $key ) )
88
+ return $default[ $group ];
89
+ //return one default setting
90
+ if ( isset( $default[ $group ][ $key ] ) )
91
+ return $default[ $group ][ $key ];
92
+ else
93
+ return FALSE;
94
+ }
95
+
96
+ /**
97
+ *
98
+ * Get default option for BackWPup option
99
+ *
100
+ * @param string $key Option key
101
+ * @param int $id The job id
102
+ *
103
+ * @return bool|mixed
104
+ */
105
+ public static function defaults_job( $key = '' ) {
106
+
107
+ $key = sanitize_key( trim( $key ) );
108
+
109
+ //set defaults
110
+ $default[ 'type' ] = array( 'DBDUMP', 'FILE', 'WPPLUGIN' );
111
+ $default[ 'destinations' ] = array();
112
+ $default[ 'name' ] = __( 'Please enter a name', 'backwpup' );
113
+ $default[ 'activetype' ] = '';
114
+ $default[ 'logfile' ] = '';
115
+ $default[ 'lastbackupdownloadurl' ] = '';
116
+ $default[ 'cronselect' ] = 'basic';
117
+ $default[ 'cron' ] = '0 3 * * *';
118
+ $default[ 'mailaddresslog' ] = sanitize_email( get_bloginfo( 'admin_email' ) );
119
+ $default[ 'mailerroronly' ] = TRUE;
120
+ $default[ 'backuptype' ] = 'archive';
121
+ $default[ 'archiveformat' ] = '.tar.gz';
122
+ $default[ 'archivename' ] = 'backwpup_' . substr( md5( md5( SECURE_AUTH_KEY ) ), 15, 6 ). '_%Y-%m-%d_%H-%i-%s';
123
+ //defaults vor destinations
124
+ foreach ( BackWPup::get_destinations() as $dest ) {
125
+ $default = array_merge( $default, $dest->option_defaults() );
126
+ }
127
+ //defaults vor job types
128
+ foreach ( BackWPup::get_job_types() as $job_type ) {
129
+ $default = array_merge( $default, $job_type->option_defaults() );
130
+ }
131
+
132
+ //return all
133
+ if ( empty( $key ) )
134
+ return $default;
135
+ //return one default setting
136
+ if ( isset( $default[ $key ] ) )
137
+ return $default[ $key ];
138
+ else
139
+ return FALSE;
140
+ }
141
+
142
+ /**
143
+ *
144
+ * Update a BackWPup option
145
+ *
146
+ * @param string|int $group Option group or the job id
147
+ * @param string $key Option key
148
+ * @param mixed $value the value to store
149
+ *
150
+ * @return bool if option save or not
151
+ */
152
+ public static function update( $group, $key, $value ) {
153
+
154
+ $group = sanitize_key( trim( $group ) );
155
+ $key = sanitize_key( trim( $key ) );
156
+
157
+ if ( empty( $group ) || empty( $key ) || $group == 'jobs' )
158
+ return FALSE;
159
+
160
+ //Update option
161
+ if ( is_numeric( $group ) ) { //update job option
162
+ $jobs_options = self::jobs_options( FALSE );
163
+ $group = intval( $group );
164
+ $jobs_options[ $group ][ $key ] = $value;
165
+ return self::update_jobs_options( $jobs_options );
166
+ }
167
+ else {
168
+ return update_site_option( 'backwpup_' . $group . '_' . $key , $value );
169
+ }
170
+
171
+
172
+ }
173
+
174
+
175
+ /**
176
+ *
177
+ * Get a BackWPup Option
178
+ *
179
+ * @param string|int $group Option group or the job id
180
+ * @param string $key Option key
181
+ * @param mixed $default returned if no value, if null the the default BackWPup option will get
182
+ * @param bool $use_cache
183
+ *
184
+ * @return bool|mixed false if nothing can get else the option value
185
+ */
186
+ public static function get( $group, $key, $default = NULL, $use_cache = TRUE ) {
187
+
188
+ $group = sanitize_key( trim( $group ) );
189
+ $key = sanitize_key( trim( $key ) );
190
+
191
+ if ( empty( $group ) || empty( $key ) || $group == 'jobs' )
192
+ return FALSE;
193
+
194
+ if ( is_numeric( $group ) ) { //get job option
195
+ $jobs_options = self::jobs_options( $use_cache );
196
+ $group = intval( $group );
197
+ if ( ! isset( $jobs_options[ $group ][ $key ] ) && isset( $default ) )
198
+ return $default;
199
+ elseif ( ! isset($jobs_options[ $group ][ $key ] ) )
200
+ return self::defaults_job( $key );
201
+ else
202
+ return $jobs_options[ $group ][ $key ];
203
+ }
204
+ else {
205
+ return get_site_option( 'backwpup_' . $group . '_' . $key , self::defaults( $group, $key ) , $use_cache );
206
+ }
207
+
208
+ }
209
+
210
+ /**
211
+ *
212
+ * BackWPup Job Options
213
+ *
214
+ * @param int $id The job id
215
+ * @param bool $use_cache
216
+ *
217
+ * @return array of all job options
218
+ */
219
+ public static function get_job( $id, $use_cache = TRUE ) {
220
+
221
+ if ( ! is_numeric( $id ) )
222
+ return FALSE;
223
+
224
+ $id = intval( $id );
225
+ $jobs_options = self::jobs_options( $use_cache );
226
+
227
+ return wp_parse_args( $jobs_options[ $id ], self::defaults_job( ) );
228
+ }
229
+
230
+
231
+ /**
232
+ *
233
+ * Delete a BackWPup Option
234
+ *
235
+ * @param string|int $group Option group or the job id
236
+ * @param string $key Option key
237
+ *
238
+ * @return bool deleted or not
239
+ */
240
+ public static function delete( $group, $key ) {
241
+
242
+ $group = sanitize_key( trim( $group ) );
243
+ $key = sanitize_key( trim( $key ) );
244
+
245
+ if ( empty( $group ) || empty( $key ) || $group == 'jobs' )
246
+ return FALSE;
247
+
248
+ //delete option
249
+ if ( is_numeric( $group ) ) { //update job option
250
+ $jobs_options = self::jobs_options( FALSE );
251
+ $group = intval( $group );
252
+ unset( $jobs_options[ $group ][ $key ] );
253
+ return self::update_jobs_options( $jobs_options );
254
+ }
255
+ else {
256
+ return delete_site_option( 'backwpup_' . $group . '_' . $key );
257
+ }
258
+
259
+
260
+ }
261
+
262
+ /**
263
+ *
264
+ * Delete a BackWPup Job
265
+ *
266
+ * @param int $id The job id
267
+ *
268
+ * @return bool deleted or not
269
+ */
270
+ public static function delete_job( $id ) {
271
+
272
+ if ( ! is_numeric( $id ) )
273
+ return FALSE;
274
+
275
+ $id = intval( $id );
276
+ $jobs_options = self::jobs_options( FALSE );
277
+ unset( $jobs_options[ $id ] );
278
+
279
+ return self::update_jobs_options( $jobs_options );
280
+ }
281
+
282
+ /**
283
+ *
284
+ * get the id's of jobs
285
+ *
286
+ * @param string|null $key Option key or null for getting all id's
287
+ * @param bool $value Value that the option must have to get the id
288
+ *
289
+ * @return array job id's
290
+ */
291
+ public static function get_job_ids( $key = NULL, $value = FALSE ) {
292
+
293
+ $key = sanitize_key( trim( $key ) );
294
+ $jobs_options = self::jobs_options( FALSE );
295
+
296
+ //get option job ids
297
+ if ( empty( $key ) )
298
+ return array_keys( $jobs_options );
299
+
300
+ //get option ids for option with the defined value
301
+ $new_option_job_ids = array();
302
+ foreach ( $jobs_options as $id => $option ) {
303
+ if ( isset( $option[ $key ] ) && $value == $option[ $key ] )
304
+ $new_option_job_ids[ ] = $id;
305
+ }
306
+ sort( $new_option_job_ids );
307
+
308
+ return $new_option_job_ids;
309
+ }
310
+ }
inc/class-page-about.php ADDED
@@ -0,0 +1,366 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Render plugin about Page.
4
+ *
5
+ * @author danielhuesken
6
+ */
7
+ class BackWPup_Page_About {
8
+
9
+ /**
10
+ * Enqueue style.
11
+ *
12
+ * @return void
13
+ */
14
+ public static function admin_print_styles() {
15
+
16
+ wp_enqueue_style('backwpupgeneral');
17
+
18
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
19
+ wp_enqueue_style( 'backwpuppageabout', BackWPup::get_plugin_data( 'URL' ) . '/css/page_about.dev.css', '', time(), 'screen' );
20
+ } else {
21
+ wp_enqueue_style( 'backwpuppageabout', BackWPup::get_plugin_data( 'URL' ) . '/css/page_about.css', '', BackWPup::get_plugin_data( 'Version' ), 'screen' );
22
+ }
23
+
24
+ }
25
+
26
+ /**
27
+ * Enqueue script.
28
+ *
29
+ * @return void
30
+ */
31
+ public static function admin_print_scripts() {
32
+
33
+ wp_enqueue_script( 'backwpupgeneral' );
34
+
35
+ }
36
+
37
+
38
+ /**
39
+ * Print the markup.
40
+ *
41
+ * @return void
42
+ */
43
+ public static function page() {
44
+
45
+ //set_site_transient( 'backwpup_upgrade_from_version_two', TRUE, 3600*24*7); // See update notice
46
+ ?>
47
+ <div class="wrap">
48
+ <div class="inpsyde">
49
+ <a href="http://inpsyde.com/" title="Inpsyde GmbH">inpsyde</a>
50
+ </div>
51
+ <?php screen_icon(); ?>
52
+ <h2><?php echo sprintf( __( '%s Welcome', 'backwpup' ), BackWPup::get_plugin_data( 'name') ); ?></h2>
53
+ <div class="welcome">
54
+ <div class="welcome_inner">
55
+ <div class="top">
56
+ <?php if ( get_site_transient( 'backwpup_upgrade_from_version_two') ) { ?>
57
+ <div id="update-notice" class="backwpup-welcome updated">
58
+ <h3><?php _e( 'Attention! You have updated from version 2.x', 'backwpup' ); ?></h3>
59
+ <p><?php echo sprintf( __( 'Please <a href="%s">check your settings</a> after the update from version 2.x:', 'backwpup' ), network_admin_url( 'admin.php').'?page=backwpupjobs'); ?></a></p>
60
+ <ul><li><?php _e('Dropbox authentication must be done again','backwpup'); ?></li>
61
+ <li><?php _e('SugarSync authentication must be done again','backwpup'); ?></li>
62
+ <li><?php _e('S3 Settings','backwpup'); ?></li>
63
+ <li><?php _e('Google Storage is now in S3','backwpup'); ?></li>
64
+ <li><?php _e('All your passwords','backwpup'); ?></li>
65
+ </ul>
66
+ </div>
67
+ <?php } ?>
68
+ </div>
69
+ <?php if ( class_exists( 'BackWPup_Features', FALSE ) ) { ?>
70
+ <div class="welcometxt">
71
+ <div class="backwpup-welcome">
72
+ <div class="banner-pro"></div>
73
+ <h3><?php _e( 'Welcome to BackWPup Pro', 'backwpup' ); ?></h3>
74
+ <p><?php _e( 'Here you can schedule backup plans with a wizard.', 'backwpup' );
75
+ _e( 'The backup files can be used to save your whole installation including <code>/wp-content/</code> and push them to an external Backup Service, if you don’t want to save the backups on the same server. With a single backup file you are able to restore an installation.', 'backwpup' ); ?></p>
76
+ <p><?php echo sprintf( __( 'First <a href="%1$s">set up a job</a>, and plan what you want to save. You can <a href="%2$s">use the wizards</a> or the expert mode.', 'backwpup' ), network_admin_url( 'admin.php').'?page=backwpupeditjob' , network_admin_url( 'admin.php').'?page=backwpupwizard' ); ?></p>
77
+ </div>
78
+ </div>
79
+ <?php } else {?>
80
+ <div class="welcometxt">
81
+ <div class="backwpup-welcome">
82
+ <div class="banner"></div>
83
+ <h3><?php _e( 'Welcome to BackWPup', 'backwpup' ); ?></h3>
84
+ <p><?php
85
+ _e( 'The backup files can be used to save your whole installation including <code>/wp-content/</code> and push them to an external Backup Service, if you don’t want to save the backups on the same server. With a single backup file you are able to restore an installation.', 'backwpup' ); ?></p>
86
+ <p><?php _e( 'First set up a job, and plan what you want to save.', 'backwpup' ); ?></p>
87
+ </div>
88
+ </div>
89
+ <?php } ?>
90
+ <?php
91
+ if ( class_exists( 'marketpress_autoupdate' ) && class_exists( 'BackWPup_Features' ) ) :
92
+ $autoupdate = $autoupdate = marketpress_autoupdate::get_instance( BackWPup::get_plugin_data( 'Slug' ) , BackWPup::get_plugin_data( 'MainFile' ) );
93
+ if ( $autoupdate->license_check() == 'false' ) :
94
+ $plugins = get_plugins();
95
+ $localplugin = FALSE;
96
+ foreach ( $plugins as $plugin ) {
97
+ if ( BackWPup::get_plugin_data( 'Name' ) == $plugin[ 'Name' ] )
98
+ $localplugin = TRUE;
99
+ }
100
+ ?>
101
+ <div class="welcometxt">
102
+ <div class="backwpup-welcome">
103
+ <h3><?php _e( 'Please activate your license', 'backwpup' ); ?></h3>
104
+ <p><a href="<?php echo $localplugin ? admin_url( 'plugins.php' ) : network_admin_url( 'plugins.php' ); ?>"><?php _e( 'Please go to your plugin page and active the license to have the autoupdates enabled.', 'backwpup' ); ?></a></p>
105
+ </div>
106
+ </div>
107
+ <?php endif; ?>
108
+ <?php endif; ?>
109
+ <div class="features">
110
+
111
+ <div class="feature_box">
112
+ <div class="feature_image <?php self::feature_class(); ?>">
113
+ <img title="<?php _e( 'Save your database', 'backwpup' ); ?>" src="<?php echo BackWPup::get_plugin_data( 'URL' ); ?>/images/imagesave.png" />
114
+ </div>
115
+ <div class="feature_text <?php self::feature_class(); ?>">
116
+ <h3><?php _e( 'Save your database regularly', 'backwpup' ); ?></h3>
117
+ <p><?php echo sprintf( __( 'With BackWPup you can schedule the database backup to run automatically. With a single backup file you can restore your database. You should <a href="%s">set up a backup job</a>, so you will never forget it. There is also an option to repair and optimize the database after each backup.', 'backwpup' ), network_admin_url( 'admin.php').'?page=backwpupeditjob' ); ?></p>
118
+ </div>
119
+ </div>
120
+ <div class="feature_box">
121
+ <div class="feature_text <?php self::feature_class(); ?>">
122
+ <h3><?php _e('WordPress XML Export', 'backwpup' ); ?></h3>
123
+ <p><?php _e('You can choose the built-in WordPress export format in addition or exclusive to save your data. This works in automated backups too of course. The advantage is: you can import these files into a blog with the regular WordPress importer.', 'backwpup'); ?></p>
124
+ </div>
125
+ <div class="feature_image <?php self::feature_class(); ?>">
126
+ <img title="<?php _e( 'WordPress XML Export', 'backwpup' ); ?>" src="<?php echo BackWPup::get_plugin_data( 'URL' ); ?>/images/imagexml.png" />
127
+ </div>
128
+ </div>
129
+ <div class="feature_box">
130
+ <div class="feature_image <?php self::feature_class(); ?>">
131
+ <img title="<?php _e( 'Save all data from the webserver', 'backwpup' ); ?>" src="<?php echo BackWPup::get_plugin_data( 'URL' ); ?>/images/imagedata.png" />
132
+ </div>
133
+ <div class="feature_text <?php self::feature_class(); ?>">
134
+ <h3><?php _e('Save all files', 'backwpup'); ?></h3>
135
+ <p><?php echo sprintf( __('You can back up all your attachments, also all system files, plugins and themes in a single file. You can <a href="%s">create a job</a> to update a backup copy of your file system only when files are changed.', 'backwpup'), network_admin_url( 'admin.php' ) . '?page=backwpupeditjob' ); ?></p>
136
+ </div>
137
+ </div>
138
+ <div class="feature_box">
139
+ <div class="feature_text <?php self::feature_class(); ?>">
140
+ <h3><?php _e( 'Security!', 'backwpup' ); ?></h3>
141
+ <p><?php _e('By default everything is encrypted: connections to external services, local files and access to directories.', 'backwpup'); ?></p>
142
+ </div>
143
+ <div class="feature_image <?php self::feature_class(); ?>">
144
+ <img title="<?php _e( 'Security!', 'backwpup' ); ?>" src="<?php echo BackWPup::get_plugin_data( 'URL' ); ?>/images/imagesec.png" />
145
+ </div>
146
+ </div>
147
+ <div class="feature_box">
148
+ <div class="feature_image <?php self::feature_class(); ?>">
149
+ <img title="<?php _e( 'Cloud Support', 'backwpup' ); ?>" src="<?php echo BackWPup::get_plugin_data( 'URL' ); ?>/images/imagecloud.png" />
150
+ </div>
151
+ <div class="feature_text <?php self::feature_class(); ?>">
152
+ <h3><?php _e( 'Cloud Support', 'backwpup' ); ?></h3>
153
+ <p><?php _e('BackWPup supports multiple cloud services in parallel. This ensures the backups are redundant.', 'backwpup'); ?></p>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ </div>
158
+
159
+ <?php if ( ! class_exists( 'BackWPup_features' ) ) : ?>
160
+ <div class="backwpup_comp">
161
+ <h3><?php _e( 'Features / differences between Free and Pro', 'backwpup' ); ?></h3>
162
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
163
+ <tr class="even ub">
164
+ <td><?php _e( 'Features', 'backwpup' ); ?></td>
165
+ <td class="free"><?php _e( 'FREE', 'backwpup' ); ?></td>
166
+ <td class="pro"><?php _e( 'PRO', 'backwpup' ); ?></td>
167
+ </tr>
168
+ <tr class="odd">
169
+ <td><?php _e( 'Complete database backup', 'backwpup' ); ?></td>
170
+ <td class="tick"></td>
171
+ <td class="tick"></td>
172
+ </tr>
173
+ <tr class="even">
174
+ <td><?php _e( 'Complete file backup', 'backwpup' ); ?></td>
175
+ <td class="tick"></td>
176
+ <td class="tick"></td>
177
+ </tr>
178
+ <tr class="odd">
179
+ <td><?php _e( 'Database check', 'backwpup' ); ?></td>
180
+ <td class="tick"></td>
181
+ <td class="tick"></td>
182
+ </tr>
183
+ <tr class="even">
184
+ <td><?php _e( 'Data compression', 'backwpup' ); ?></td>
185
+ <td class="tick"></td>
186
+ <td class="tick"></td>
187
+ </tr>
188
+ <tr class="odd">
189
+ <td><?php _e( 'WordPress XML export', 'backwpup' ); ?></td>
190
+ <td class="tick"></td>
191
+ <td class="tick"></td>
192
+ </tr>
193
+ <tr class="even">
194
+ <td><?php _e( 'List of installed plugins', 'backwpup' ); ?></td>
195
+ <td class="tick"></td>
196
+ <td class="tick"></td>
197
+ </tr>
198
+ <tr class="odd">
199
+ <td><?php _e( 'Backup archives management', 'backwpup' ); ?></td>
200
+ <td class="tick"></td>
201
+ <td class="tick"></td>
202
+ </tr>
203
+ <tr class="even">
204
+ <td><?php _e( 'Log file management', 'backwpup' ); ?></td>
205
+ <td class="tick"></td>
206
+ <td class="tick"></td>
207
+ </tr>
208
+ <tr class="odd">
209
+ <td><?php _e( 'Start jobs per WP-Cron, URL, system, backend or WP-CLI', 'backwpup' ); ?></td>
210
+ <td class="tick"></td>
211
+ <td class="tick"></td>
212
+ </tr>
213
+ <tr class="even">
214
+ <td><?php _e( 'Log report via email', 'backwpup' ); ?></td>
215
+ <td class="tick"></td>
216
+ <td class="tick"></td>
217
+ </tr>
218
+ <tr class="odd">
219
+ <td><?php _e( 'Backup to Microsoft Azure', 'backwpup' ); ?></td>
220
+ <td class="tick"></td>
221
+ <td class="tick"></td>
222
+ </tr>
223
+ <tr class="even">
224
+ <td><?php _e( 'Backup as email', 'backwpup' ); ?></td>
225
+ <td class="tick"></td>
226
+ <td class="tick"></td>
227
+ </tr>
228
+ <tr class="odd">
229
+ <td><?php _e( 'Backup to S3 services <small>(Amazon, Google Storage, Hosteurope and more)</small>', 'backwpup' ); ?></td>
230
+ <td class="tick"></td>
231
+ <td class="tick"></td>
232
+ </tr>
233
+ <tr class="even">
234
+ <td><?php _e( 'Backup to Dropbox', 'backwpup' ); ?></td>
235
+ <td class="tick"></td>
236
+ <td class="tick"></td>
237
+ </tr>
238
+ <tr class="odd">
239
+ <td><?php _e( 'Backup to Rackspace Cloud Files', 'backwpup' ); ?></td>
240
+ <td class="tick"></td>
241
+ <td class="tick"></td>
242
+ </tr>
243
+ <tr class="even">
244
+ <td><?php _e( 'Backup to FTP server', 'backwpup' ); ?></td>
245
+ <td class="tick"></td>
246
+ <td class="tick"></td>
247
+ </tr>
248
+ <tr class="odd">
249
+ <td><?php _e( 'Backup to your web space', 'backwpup' ); ?></td>
250
+ <td class="tick"></td>
251
+ <td class="tick"></td>
252
+ </tr>
253
+ <tr class="even">
254
+ <td><?php _e( 'Backup to SugarSync', 'backwpup' ); ?></td>
255
+ <td class="tick"></td>
256
+ <td class="tick"></td>
257
+ </tr>
258
+ <tr class="odd">
259
+ <td><?php _e( 'Custom API keys for DropBox and SugarSync', 'backwpup' ); ?></td>
260
+ <td class="error"></td>
261
+ <td class="tick"></td>
262
+ </tr>
263
+ <tr class="even">
264
+ <td><?php _e( 'XML database backup as PHPMyAdmin schema', 'backwpup' ); ?></td>
265
+ <td class="error"></td>
266
+ <td class="tick"></td>
267
+ </tr>
268
+ <tr class="odd">
269
+ <td><?php _e( 'Database backup as mysqldump per command line', 'backwpup' ); ?></td>
270
+ <td class="error"></td>
271
+ <td class="tick"></td>
272
+ </tr>
273
+ <tr class="even">
274
+ <td><?php _e( 'Database backup for additional MySQL databases', 'backwpup' ); ?></td>
275
+ <td class="error"></td>
276
+ <td class="tick"></td>
277
+ </tr>
278
+ <tr class="odd">
279
+ <td><?php _e( 'Import and export job settings as XML', 'backwpup' ); ?></td>
280
+ <td class="error"></td>
281
+ <td class="tick"></td>
282
+ </tr>
283
+ <tr class="even">
284
+ <td><?php _e( 'Wizard for system tests', 'backwpup' ); ?></td>
285
+ <td class="error"></td>
286
+ <td class="tick"></td>
287
+ </tr>
288
+ <tr class="odd">
289
+ <td><?php _e( 'Wizard for scheduled backup jobs', 'backwpup' ); ?></td>
290
+ <td class="error"></td>
291
+ <td class="tick"></td>
292
+ </tr>
293
+ <tr class="even">
294
+ <td><?php _e( 'Wizard to import settings and backup jobs', 'backwpup' ); ?></td>
295
+ <td class="error"></td>
296
+ <td class="tick"></td>
297
+ </tr>
298
+ <tr class="odd">
299
+ <td><?php _e( 'Differential backup of changed directories to Dropbox', 'backwpup' ); ?></td>
300
+ <td class="error"></td>
301
+ <td class="tick"></td>
302
+ </tr>
303
+ <tr class="even">
304
+ <td><?php _e( 'Differential backup of changed directories to Rackspace Cloud Files', 'backwpup' ); ?></td>
305
+ <td class="error"></td>
306
+ <td class="tick"></td>
307
+ </tr>
308
+ <tr class="odd">
309
+ <td><?php _e( 'Differential backup of changed directories to S3', 'backwpup' ); ?></td>
310
+ <td class="error"></td>
311
+ <td class="tick"></td>
312
+ </tr>
313
+ <tr class="even">
314
+ <td><?php _e( 'Differential backup of changed directories to MS Azure', 'backwpup' ); ?></td>
315
+ <td class="error"></td>
316
+ <td class="tick"></td>
317
+ </tr>
318
+ <tr class="odd">
319
+ <td><?php _e( '<strong>Premium support</strong>', 'backwpup' ); ?></td>
320
+ <td class="error"></td>
321
+ <td class="tick"></td>
322
+ </tr>
323
+ <tr class="even">
324
+ <td><?php _e( '<strong>Dynamically loaded documentation</strong>', 'backwpup' ); ?></td>
325
+ <td class="error" style="border-bottom:none;"></td>
326
+ <td class="tick" style="border-bottom:none;"></td>
327
+ </tr>
328
+ <tr class="odd">
329
+ <td><?php _e( '<strong>Automatic update from MarketPress</strong>', 'backwpup' ); ?></td>
330
+ <td class="error" style="border-bottom:none;"></td>
331
+ <td class="tick" style="border-bottom:none;"></td>
332
+ </tr>
333
+ <tr class="even ubdown">
334
+ <td></td>
335
+ <td></td>
336
+ <td class="pro buylink"><a href="<?php _e( 'http://marketpress.com/product/backwpup-pro/', 'backwpup' ); ?>"><?php _e( 'GET PRO', 'backwpup' ); ?></a></td>
337
+ </tr>
338
+ </table>
339
+ </div>
340
+ <?php endif; ?>
341
+
342
+ <?php if ( ! get_site_option( 'backwpup_about_page' ) ) { ?>
343
+ <a href="<?php network_admin_url( 'admin.php' )?>?page=backwpup" class="button-primary-bwp"><?php _e( 'Now back up!', 'backwpup' ); ?></a>
344
+ <?php
345
+ update_site_option( 'backwpup_about_page', TRUE );
346
+ } ?>
347
+ </div>
348
+ </div>
349
+ <?php
350
+ }
351
+
352
+ /**
353
+ * Alternate between 'left' and 'right' CSS class.
354
+ *
355
+ * @since 2013.02.19
356
+ * @return void
357
+ */
358
+ protected static function feature_class() {
359
+
360
+ static $class = 'alignleft';
361
+
362
+ print $class;
363
+
364
+ $class = 'alignleft' === $class ? 'alignright' : 'alignleft';
365
+ }
366
+ }
inc/class-page-backups.php ADDED
@@ -0,0 +1,426 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_Page_Backups extends WP_List_Table {
6
+
7
+ private static $listtable = NULL;
8
+
9
+ /**
10
+ * @var int
11
+ */
12
+ private $jobid = 1;
13
+ /**
14
+ * @var string
15
+ */
16
+ private $dest = 'FOLDER';
17
+
18
+ /**
19
+ *
20
+ */
21
+ function __construct() {
22
+
23
+ parent::__construct( array(
24
+ 'plural' => 'backups',
25
+ 'singular' => 'backup',
26
+ 'ajax' => TRUE
27
+ ) );
28
+ }
29
+
30
+ /**
31
+ * @return bool
32
+ */
33
+ function ajax_user_can() {
34
+
35
+ return current_user_can( 'backwpup_backups' );
36
+ }
37
+
38
+ /**
39
+ *
40
+ */
41
+ function prepare_items() {
42
+
43
+ $destinations=BackWPup::get_destinations();
44
+
45
+ $per_page = $this->get_items_per_page( 'backwpupbackups_per_page' );
46
+ if ( empty( $per_page ) || $per_page < 1 )
47
+ $per_page = 20;
48
+
49
+ if ( isset( $_GET[ 'jobdest' ] ) ) {
50
+ $jobdest = $_GET[ 'jobdest' ];
51
+ }
52
+ else {
53
+ $jobdests = $this->get_destinations_list();
54
+ if ( empty( $jobdests ) )
55
+ $jobdests = array( '_' );
56
+ $jobdest = $jobdests[ 0 ];
57
+ $_GET[ 'jobdest' ] = $jobdests[ 0 ];
58
+ }
59
+
60
+ list( $this->jobid, $this->dest ) = explode( '_', $jobdest );
61
+
62
+ if ( isset($destinations[ $this->dest ] ) && is_object( $destinations[ $this->dest ] ) )
63
+ $this->items = $destinations[ $this->dest ]->file_get_list( $jobdest );
64
+
65
+ //if no items brake
66
+ if ( ! $this->items ) {
67
+ $this->items = '';
68
+
69
+ return;
70
+ }
71
+
72
+ //Sorting
73
+ $order = isset( $_GET[ 'order' ] ) ? $_GET[ 'order' ] : 'desc';
74
+ $orderby = isset( $_GET[ 'orderby' ] ) ? $_GET[ 'orderby' ] : 'time';
75
+ $tmp = Array();
76
+ if ( $orderby == 'time' ) {
77
+ if ( $order == 'asc' ) {
78
+ foreach ( $this->items as &$ma ) {
79
+ $tmp[ ] = & $ma[ "time" ];
80
+ }
81
+ array_multisort( $tmp, SORT_ASC, $this->items );
82
+ }
83
+ else {
84
+ foreach ( $this->items as &$ma ) {
85
+ $tmp[ ] = & $ma[ "time" ];
86
+ }
87
+ array_multisort( $tmp, SORT_DESC, $this->items );
88
+ }
89
+ }
90
+ elseif ( $orderby == 'file' ) {
91
+ if ( $order == 'asc' ) {
92
+ foreach ( $this->items as &$ma ) {
93
+ $tmp[ ] = & $ma[ "filename" ];
94
+ }
95
+ array_multisort( $tmp, SORT_ASC, $this->items );
96
+ }
97
+ else {
98
+ foreach ( $this->items as &$ma ) {
99
+ $tmp[ ] = & $ma[ "filename" ];
100
+ }
101
+ array_multisort( $tmp, SORT_DESC, $this->items );
102
+ }
103
+ }
104
+ elseif ( $orderby == 'folder' ) {
105
+ if ( $order == 'asc' ) {
106
+ foreach ( $this->items as &$ma ) {
107
+ $tmp[ ] = & $ma[ "folder" ];
108
+ }
109
+ array_multisort( $tmp, SORT_ASC, $this->items );
110
+ }
111
+ else {
112
+ foreach ( $this->items as &$ma ) {
113
+ $tmp[ ] = & $ma[ "folder" ];
114
+ }
115
+ array_multisort( $tmp, SORT_DESC, $this->items );
116
+ }
117
+ }
118
+ elseif ( $orderby == 'size' ) {
119
+ if ( $order == 'asc' ) {
120
+ foreach ( $this->items as &$ma ) {
121
+ $tmp[ ] = & $ma[ "filesize" ];
122
+ }
123
+ array_multisort( $tmp, SORT_ASC, $this->items );
124
+ }
125
+ else {
126
+ foreach ( $this->items as &$ma ) {
127
+ $tmp[ ] = & $ma[ "filesize" ];
128
+ }
129
+ array_multisort( $tmp, SORT_DESC, $this->items );
130
+ }
131
+ }
132
+
133
+ //by page
134
+ $start = intval( ( $this->get_pagenum() - 1 ) * $per_page );
135
+ $end = $start + $per_page;
136
+ if ( $end > count( $this->items ) )
137
+ $end = count( $this->items );
138
+
139
+ $this->set_pagination_args( array(
140
+ 'total_items' => count( $this->items ),
141
+ 'per_page' => $per_page,
142
+ 'jobdest' => $jobdest,
143
+ 'orderby' => $orderby,
144
+ 'order' => $order
145
+ ) );
146
+
147
+ }
148
+
149
+ /**
150
+ *
151
+ */
152
+ function no_items() {
153
+ _e( 'No Files found. (List will be generated during next backup.)', 'backwpup' );
154
+ }
155
+
156
+ /**
157
+ * @return array
158
+ */
159
+ function get_bulk_actions() {
160
+
161
+ if ( ! $this->has_items() )
162
+ return array ();
163
+
164
+ $actions = array();
165
+ $actions[ 'delete' ] = __( 'Delete', 'backwpup' );
166
+
167
+ return $actions;
168
+ }
169
+
170
+ /**
171
+ * @param $which
172
+ *
173
+ * @return mixed
174
+ */
175
+ function extra_tablenav( $which ) {
176
+
177
+ if ( 'top' != $which )
178
+ return;
179
+
180
+ $destinations_list = $this->get_destinations_list();
181
+ if ( count( $destinations_list ) <= 1 )
182
+ return;
183
+
184
+ echo '<div class="alignleft actions">';
185
+ echo "<select name=\"jobdest\" id=\"jobdest\" class=\"postform\">" . PHP_EOL;
186
+ foreach ( $this->get_destinations_list() as $jobdest ) {
187
+ list( $jobid, $dest ) = explode( '_', $jobdest );
188
+ echo "\t<option value=\"" . $jobdest . "\" " . selected( $this->jobid . '_' . $this->dest, $jobdest ) . ">" . $dest . ": " . esc_html( BackWPup_Option::get( $jobid, 'name' ) ) . "</option>" . PHP_EOL;
189
+ }
190
+
191
+ echo "</select>" . PHP_EOL;
192
+ submit_button( __( 'Change destination', 'backwpup' ), 'secondary', '', FALSE, array( 'id' => 'post-query-submit' ) );
193
+ echo '</div>';
194
+ }
195
+
196
+ /**
197
+ * @return array
198
+ */
199
+ function get_destinations_list() {
200
+
201
+ $jobdest = array();
202
+ $jobids = BackWPup_Option::get_job_ids();
203
+ $destinations = BackWPup::get_destinations();
204
+
205
+ if ( ! empty( $jobids )) {
206
+ foreach ( $jobids as $jobid ) {
207
+ if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'sync') // jump over sync
208
+ continue;
209
+ $dests = BackWPup_Option::get( $jobid, 'destinations' );
210
+ foreach ( $dests as $dest ) {
211
+ if ( ! isset( $destinations[ $dest ] ) )
212
+ continue;
213
+ $can_do_dest = $destinations[ $dest ]->file_get_list( $jobid . '_' . $dest );
214
+ if ( ! empty($can_do_dest) )
215
+ $jobdest[ ] = $jobid . '_' . $dest;
216
+ }
217
+ }
218
+ }
219
+
220
+ return $jobdest;
221
+ }
222
+
223
+ /**
224
+ * @return array
225
+ */
226
+ function get_columns() {
227
+
228
+ $posts_columns = array();
229
+ $posts_columns[ 'cb' ] = '<input type="checkbox" />';
230
+ $posts_columns[ 'file' ] = __( 'File', 'backwpup' );
231
+ $posts_columns[ 'folder' ] = __( 'Folder', 'backwpup' );
232
+ $posts_columns[ 'size' ] = __( 'Size', 'backwpup' );
233
+ $posts_columns[ 'time' ] = __( 'Time', 'backwpup' );
234
+
235
+ return $posts_columns;
236
+ }
237
+
238
+ /**
239
+ * @return array
240
+ */
241
+ function get_sortable_columns() {
242
+
243
+ return array(
244
+ 'file' => array( 'file', FALSE ),
245
+ 'folder' => 'folder',
246
+ 'size' => 'size',
247
+ 'time' => array( 'time', FALSE )
248
+ );
249
+ }
250
+
251
+ /**
252
+ *
253
+ */
254
+ function display_rows() {
255
+
256
+ $style = '';
257
+
258
+ foreach ( $this->items as $backup ) {
259
+ $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
260
+ echo PHP_EOL . "\t", $this->single_row( $backup, $style );
261
+ }
262
+ }
263
+
264
+ /**
265
+ * @param object $backup
266
+ * @param string $style
267
+ * @return string
268
+ */
269
+ function single_row( $backup, $style = '' ) {
270
+
271
+ list( $columns, $hidden, $sortable ) = $this->get_column_info();
272
+ $r = '<tr ' . $style . '>';
273
+
274
+ foreach ( $columns as $column_name => $column_display_name ) {
275
+ $class = "class=\"$column_name column-$column_name\"";
276
+
277
+ $style = '';
278
+ if ( in_array( $column_name, $hidden ) )
279
+ $style = ' style="display:none;"';
280
+
281
+ $attributes = "$class$style";
282
+
283
+ switch ( $column_name ) {
284
+ case 'cb':
285
+ $r .= '<th scope="row" class="check-column"><input type="checkbox" name="backupfiles[]" value="' . esc_attr( $backup[ 'file' ] ) . '" /></th>';
286
+ break;
287
+ case 'file':
288
+ $r .= "<td $attributes><strong>" . $backup[ 'filename' ] . "</strong>";
289
+ $actions = array();
290
+ if ( current_user_can( 'backwpup_backups_delete' ) )
291
+ $actions[ 'delete' ] = "<a class=\"submitdelete\" href=\"" . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupbackups&action=delete&jobdest=' . $this->jobid . '_' . $this->dest . '&paged=' . $this->get_pagenum() . '&backupfiles[]=' . esc_attr( $backup[ 'file' ] ), 'bulk-backups' ) . "\" onclick=\"if ( confirm('" . esc_js( __( "You are about to delete this Backup Archive. \n 'Cancel' to stop, 'OK' to delete.", "backwpup" ) ) . "') ) { return true;}return false;\">" . __( 'Delete', 'backwpup' ) . "</a>";
292
+ if ( current_user_can( 'backwpup_backups_download' ) )
293
+ $actions[ 'download' ] = "<a href=\"" . wp_nonce_url( $backup[ 'downloadurl' ], 'download-backup' ) . "\">" . __( 'Download', 'backwpup' ) . "</a>";
294
+ $r .= $this->row_actions( $actions );
295
+ $r .= "</td>";
296
+ break;
297
+ case 'folder':
298
+ $r .= "<td $attributes>";
299
+ $r .= $backup[ 'folder' ];
300
+ $r .= "</td>";
301
+ break;
302
+ case 'size':
303
+ $r .= "<td $attributes>";
304
+ if ( ! empty( $backup[ 'filesize' ] ) && $backup[ 'filesize' ] != - 1 ) {
305
+ $r .= size_format( $backup[ 'filesize' ], 2 );
306
+ }
307
+ else {
308
+ $r .= __( '?', 'backwpup' );
309
+ }
310
+ $r .= "</td>";
311
+ break;
312
+ case 'time':
313
+ $r .= "<td $attributes>";
314
+ $backup[ 'time' ] = $backup[ 'time' ] + get_option( 'gmt_offset' ) * 3600;
315
+ $r .= sprintf( __( '%1$s at %2$s', 'backwpup' ), date_i18n( get_option( 'date_format' ), $backup[ 'time' ], TRUE ), date_i18n( get_option( 'time_format' ), $backup[ 'time' ], TRUE ) );
316
+ $r .= "</td>";
317
+ break;
318
+ }
319
+ }
320
+ $r .= '</tr>';
321
+
322
+ return $r;
323
+ }
324
+
325
+ /**
326
+ *
327
+ */
328
+ public static function load() {
329
+
330
+ //Create Table
331
+ self::$listtable = new BackWPup_Page_Backups;
332
+
333
+ switch ( self::$listtable->current_action() ) {
334
+ case 'delete': //Delete Backup archives
335
+ check_admin_referer( 'bulk-backups' );
336
+ if ( ! current_user_can( 'backwpup_backups_delete' ) )
337
+ wp_die( __( 'No rights!', 'backwpup') );
338
+ $destinations = BackWpup::get_destinations();
339
+ list( $jobid, $dest ) = explode( '_', $_GET[ 'jobdest' ] );
340
+ foreach ( $_GET[ 'backupfiles' ] as $backupfile ) {
341
+ $destinations[ $dest ]->file_delete( $_GET[ 'jobdest' ], $backupfile );
342
+ }
343
+ break;
344
+ default:
345
+ $dest = strtoupper( str_replace( 'download', '', self::$listtable->current_action() ) );
346
+ if ( !empty( $dest ) && strstr( self::$listtable->current_action(), 'download') ) {
347
+ $destinations = BackWpup::get_destinations();
348
+ if ( ! current_user_can( 'backwpup_backups_download' ) )
349
+ wp_die( __( 'No rights!', 'backwpup') );
350
+ check_admin_referer( 'download-backup' );
351
+ $destinations[ $dest ]->file_download( (int)$_GET[ 'jobid' ], $_GET[ 'file' ] );
352
+ die();
353
+ }
354
+ break;
355
+ }
356
+
357
+ //Save per page
358
+ if ( isset( $_POST[ 'screen-options-apply' ] ) && isset( $_POST[ 'wp_screen_options' ][ 'option' ] ) && isset( $_POST[ 'wp_screen_options' ][ 'value' ] ) && $_POST[ 'wp_screen_options' ][ 'option' ] == 'backwpupbackups_per_page' ) {
359
+ check_admin_referer( 'screen-options-nonce', 'screenoptionnonce' );
360
+ global $current_user;
361
+ if ( $_POST[ 'wp_screen_options' ][ 'value' ] > 0 && $_POST[ 'wp_screen_options' ][ 'value' ] < 1000 ) {
362
+ update_user_option( $current_user->ID, 'backwpupbackups_per_page', (int)$_POST[ 'wp_screen_options' ][ 'value' ] );
363
+ wp_redirect( remove_query_arg( array( 'pagenum', 'apage', 'paged' ), wp_get_referer() ) );
364
+ exit;
365
+ }
366
+ }
367
+
368
+ add_screen_option( 'per_page', array(
369
+ 'label' => __( 'Logs', 'backwpup' ),
370
+ 'default' => 20,
371
+ 'option' => 'backwpupbackups_per_page'
372
+ ) );
373
+
374
+ self::$listtable->prepare_items();
375
+ }
376
+
377
+ /**
378
+ *
379
+ * Output css
380
+ *
381
+ * @return nothing
382
+ */
383
+ public static function admin_print_styles() {
384
+
385
+ wp_enqueue_style('backwpupgeneral');
386
+
387
+ ?>
388
+ <style type="text/css" media="screen">
389
+ .column-size, .column-time {
390
+ width: 10%;
391
+ }
392
+ </style>
393
+ <?php
394
+ }
395
+
396
+ /**
397
+ *
398
+ * Output js
399
+ *
400
+ * @return void
401
+ */
402
+ public static function admin_print_scripts() {
403
+
404
+ wp_enqueue_script( 'backwpupgeneral' );
405
+ }
406
+
407
+ /**
408
+ * Display the page content
409
+ */
410
+ public static function page() {
411
+
412
+ ?>
413
+ <div class="wrap">
414
+ <?php screen_icon(); ?>
415
+ <h2><?php echo esc_html( sprintf( __( '%s Manage Backup Archives', 'backwpup' ), BackWPup::get_plugin_data( 'name' ) ) ); ?></h2>
416
+ <?php BackWPup_Admin::display_messages(); ?>
417
+ <form id="posts-filter" action="" method="get">
418
+ <input type="hidden" name="page" value="backwpupbackups" />
419
+ <?php self::$listtable->display(); ?>
420
+ <div id="ajax-response"></div>
421
+ </form>
422
+ </div>
423
+ <?php
424
+ }
425
+ }
426
+
inc/class-page-backwpup.php ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Render plugin dashboard.
4
+ *
5
+ * @author danielhuesken
6
+ */
7
+ class BackWPup_Page_BackWPup {
8
+
9
+
10
+ /**
11
+ * Called on load action.
12
+ *
13
+ * @return void
14
+ */
15
+ public static function load() {
16
+ global $wpdb;
17
+
18
+ if ( isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'dbdumpdl' ) {
19
+
20
+ //check permissions
21
+ check_admin_referer( 'backwpupdbdumpdl' );
22
+
23
+ if ( ! current_user_can( 'backwpup_jobs_edit' ) )
24
+ die();
25
+
26
+ //doing dump
27
+ header( "Pragma: public" );
28
+ header( "Expires: 0" );
29
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
30
+ header( "Content-Type: application/octet-stream; charset=". get_bloginfo( 'charset' ) );
31
+ header( "Content-Disposition: attachment; filename=" . $wpdb->dbname . ".sql.gz;" );
32
+ try {
33
+ $sql_dump = new BackWPup_MySQLDump( array( 'compression'=> 'gz' ) );
34
+ foreach ( $sql_dump->tables_to_dump as $key => $table ) {
35
+ if ( $wpdb->prefix != substr( $table,0 , strlen( $wpdb->prefix ) ) )
36
+ unset( $sql_dump->tables_to_dump[ $key ] );
37
+ }
38
+ $sql_dump->execute();
39
+ unset( $sql_dump );
40
+ } catch ( Exception $e ) {
41
+ die( $e->getMessage() );
42
+ }
43
+ die();
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Enqueue style.
49
+ *
50
+ * @return void
51
+ */
52
+ public static function admin_print_styles() {
53
+
54
+ wp_enqueue_style('backwpupgeneral');
55
+
56
+ }
57
+
58
+ /**
59
+ * Enqueue script.
60
+ *
61
+ * @return void
62
+ */
63
+ public static function admin_print_scripts() {
64
+
65
+ wp_enqueue_script( 'backwpupgeneral' );
66
+
67
+ }
68
+
69
+ /**
70
+ * Print the markup.
71
+ *
72
+ * @return void
73
+ */
74
+ public static function page() {
75
+ // get wizards
76
+ $wizards = BackWPup::get_wizards();
77
+ ?>
78
+ <div class="wrap">
79
+ <?php screen_icon(); ?>
80
+ <h2><?php echo sprintf( __( '%s Dashboard', 'backwpup' ), BackWPup::get_plugin_data( 'name') ); ?></h2>
81
+
82
+ <div style="float:left;width:63%;margin-right:10px;min-width:500px">
83
+ <?php
84
+ if ( class_exists( 'BackWPup_Features') ) { ?>
85
+ <div class="backwpup-welcome">
86
+ <p><?php _e('Here you can schedule backup plans with a wizard.','backwpup' ) ?><br />
87
+ <?php _e('The backup files can be used to save your whole installation including <code>/wp-content/</code> and push them to an external Backup Service, if you don’t want to save the backups on the same server. With a single backup file you are able to restore an installation.','backwpup'); ?></p>
88
+ <p><?php _e('First set up a job, and plan what you want to save. You can use the wizards or the normal mode. Please note: the plugin author gives no warranty for your data.','backwpup'); ?></p>
89
+ </div>
90
+ <?php } else {?>
91
+ <div class="backwpup-welcome">
92
+ <p><?php _e('Use the short links in the <b>First steps</b> box to schedule backup plans.','backwpup' ) ?><br />
93
+ <?php _e('The backup files can be used to save your whole installation including <code>/wp-content/</code> and push them to an external Backup Service, if you don’t want to save the backups on the same server. With a single backup file you are able to restore an installation.','backwpup'); ?></p>
94
+ <p><?php _e('First set up a job, and plan what you want to save. Please note: the plugin author gives no warranty for your data.','backwpup'); ?></p>
95
+ </div>
96
+ <?php }
97
+
98
+ if ( class_exists( 'BackWPup_Features' ) ) {
99
+
100
+ foreach ( $wizards as $wizard_class ) {
101
+ //check permissions
102
+ if ( ! current_user_can( $wizard_class->info[ 'cap' ] ) )
103
+ continue;
104
+ //get info of wizard
105
+ echo '<div class="wizardbox" id="wizard-' . strtolower( $wizard_class->info[ 'ID' ] ) . '"><form method="get" action="' . network_admin_url( 'admin.php' ) . '">';
106
+ echo '<div class="wizardbox_name">' . $wizard_class->info[ 'name' ] . '</div>';
107
+ echo '<div class="wizardbox_description">' . $wizard_class->info[ 'description' ] . '</div>';
108
+ $conf_names = $wizard_class->get_pre_configurations();
109
+ if ( ! empty ( $conf_names ) ) {
110
+ echo '<select id="wizardbox_pre_conf" name="pre_conf" size="1">';
111
+ foreach( $conf_names as $conf_key => $conf_name) {
112
+ echo '<option value="' . esc_attr( $conf_key ) . '">' . esc_attr( $conf_name ) . '</option>';
113
+ }
114
+ echo '</select>';
115
+ } else {
116
+ echo '<input type="hidden" name="pre_conf" value="" />';
117
+ }
118
+ wp_nonce_field( 'wizard' );
119
+ echo '<input type="hidden" name="page" value="backwpupwizard" />';
120
+ echo '<input type="hidden" name="wizard_start" value="' . esc_attr( $wizard_class->info[ 'ID' ] ) . '" />';
121
+ echo '<div class="wizardbox_start"><input type="submit" name="submit" class="button-primary-bwp" value="' . esc_attr( __( 'Start wizard', 'backwpup' ) ) . '" /></div>';
122
+ echo '</form></div>';
123
+ }
124
+ }
125
+ ?>
126
+ </div>
127
+
128
+ <?php if ( current_user_can( 'backwpup_jobs_edit' ) && current_user_can( 'backwpup_logs' ) && current_user_can( 'backwpup_jobs_start' ) ) {?>
129
+ <div class="metabox-holder postbox" style="padding-top:0;margin:10px;cursor:auto;width:30%;float:left;min-width:300px">
130
+ <h3 class="hndle" style="cursor: auto;"><span><?php _e( 'First steps', 'backwpup' ); ?></span></h3>
131
+ <div class="inside">
132
+ <ul style="margin-left: 30px;">
133
+ <?php if ( class_exists( 'BackWPup_Features' ) ) { ?>
134
+ <li type="1"><a href="<?php echo wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupwizard&wizard_start=SYSTEMTEST', 'wizard' ); ?>"><?php _e( 'Test the installation', 'backwpup' ); ?></a></li>
135
+ <li type="1"><a href="<?php echo wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupwizard&wizard_start=JOB', 'wizard' ); ?>"><?php _e( 'Create a Job', 'backwpup' ); ?></a></li>
136
+ <?php } else { ?>
137
+ <li type="1"><a href="<?php echo network_admin_url( 'admin.php' ) . '?page=backwpupsettings#backwpup-tab-information'; ?>"><?php _e( 'Check the installation', 'backwpup' ); ?></a></li>
138
+ <li type="1"><a href="<?php echo network_admin_url( 'admin.php' ) . '?page=backwpupeditjob'; ?>"><?php _e( 'Create a Job', 'backwpup' ); ?></a></li>
139
+ <?php } ?>
140
+ <li type="1"><a href="<?php echo network_admin_url( 'admin.php' ) . '?page=backwpupjobs'; ?>"><?php _e( 'Run the created job', 'backwpup' ); ?></a></li>
141
+ <li type="1"><a href="<?php echo network_admin_url( 'admin.php' ) . '?page=backwpuplogs'; ?>"><?php _e( 'Check the job log', 'backwpup' ); ?></a></li>
142
+ </ul>
143
+ </div>
144
+ </div>
145
+ <?php }
146
+
147
+ if ( current_user_can( 'backwpup_jobs_start' ) ) {?>
148
+ <div class="metabox-holder postbox" style="padding-top:0;margin:10px;cursor:auto;width:30%;float:left;min-width:300px">
149
+ <h3 class="hndle" style="cursor: auto;"><span><?php _e( 'One click backup', 'backwpup' ); ?></span></h3>
150
+ <div class="inside" style="text-align: center;">
151
+ <a href="<?php echo wp_nonce_url( network_admin_url( 'admin.php' ). '?page=backwpup&action=dbdumpdl', 'backwpupdbdumpdl' ); ?>" class="button-primary" title="<?php _e( 'Generate a database backup of WordPress tables and download it immediately!', 'backwpup' ); ?>"><?php _e( 'Download database backup', 'backwpup' ); ?></a><br />
152
+ </div>
153
+ </div>
154
+ <?php }
155
+
156
+ self::mb_next_jobs();
157
+ self::mb_last_logs();
158
+ ?>
159
+
160
+ </div>
161
+ <?php
162
+ }
163
+
164
+ /**
165
+ * Displaying last logs
166
+ */
167
+ private static function mb_last_logs() {
168
+
169
+ if ( ! current_user_can( 'backwpup_logs' ) )
170
+ return;
171
+ ?>
172
+ <table class="wp-list-table widefat" cellspacing="0" style="margin:10px;width:30%;float:left;clear:none;min-width:300px">
173
+ <thead>
174
+ <tr><th colspan="3" style="font-size:15px"><?php _e( 'Last logs', 'backwpup' ); ?></tr>
175
+ <tr><th style="width:30%"><?php _e( 'Time', 'backwpup' ); ?></th><th style="width:55%"><?php _e( 'Job', 'backwpup' ); ?></th><th style="width:20%"><?php _e( 'Result', 'backwpup' ); ?></th></tr>
176
+ </thead>
177
+ <?php
178
+ //get log files
179
+ $logfiles = array();
180
+ if ( is_writeable( BackWPup_Option::get( 'cfg', 'logfolder' ) ) && $dir = @opendir( BackWPup_Option::get( 'cfg', 'logfolder' ) ) ) {
181
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
182
+ if ( is_file( BackWPup_Option::get( 'cfg', 'logfolder' ) . $file ) && strstr( $file, 'backwpup_log_' ) && ( strstr( $file, '.html' ) || strstr( $file, '.html.gz' ) ) )
183
+ $logfiles[ ] = $file;
184
+ }
185
+ closedir( $dir );
186
+ rsort( $logfiles );
187
+ }
188
+
189
+ if ( count( $logfiles ) > 0 ) {
190
+ $count = 0;
191
+ $alternate = TRUE;
192
+ foreach ( $logfiles as $logfile ) {
193
+ $logdata = BackWPup_Job::read_logheader( BackWPup_Option::get( 'cfg', 'logfolder' ) . $logfile );
194
+ if ( ! $alternate ) {
195
+ echo '<tr>';
196
+ $alternate = TRUE;
197
+ } else {
198
+ echo '<tr class="alternate">';
199
+ $alternate = FALSE;
200
+ }
201
+ echo '<td>' . date_i18n( get_option( 'date_format' ) , $logdata[ 'logtime' ] ). '<br />' . date_i18n( get_option( 'time_format' ), $logdata[ 'logtime' ] ) . '</td>';
202
+ echo '<td><a class="backwpup-fancybox" data-fancybox-type="iframe" href="' . admin_url( 'admin-ajax.php' ) . '?&action=backwpup_view_log&logfile=' . basename( $logfile ) .'&_ajax_nonce=' . wp_create_nonce( 'view-logs' ) . '" title="' . esc_attr( basename( $logfile ) ) . '">' . $logdata[ 'name' ] . '</i></a></td>';
203
+ echo '<td>';
204
+ if ( $logdata[ 'errors' ] > 0 )
205
+ printf( '<span style="color:red;font-weight:bold;">' . _n( "%d ERROR", "%d ERRORS", $logdata[ 'errors' ], 'backwpup' ) . '</span><br />', $logdata[ 'errors' ] );
206
+ if ( $logdata[ 'warnings' ] > 0 )
207
+ printf( '<span style="color:#e66f00;font-weight:bold;">' . _n( "%d WARNING", "%d WARNINGS", $logdata[ 'warnings' ], 'backwpup' ) . '</span><br />', $logdata[ 'warnings' ] );
208
+ if ( $logdata[ 'errors' ] == 0 && $logdata[ 'warnings' ] == 0 )
209
+ echo '<span style="color:green;font-weight:bold;">' . __( 'O.K.', 'backwpup' ) . '</span>';
210
+ echo '</td></tr>';
211
+ $count ++;
212
+ if ( $count >= 5 )
213
+ break;
214
+ }
215
+ }
216
+ else {
217
+ echo '<tr><td colspan="3">' . __( 'none', 'backwpup' ) . '</td></tr>';
218
+ }
219
+ ?>
220
+ </table>
221
+ <?php
222
+ }
223
+
224
+ /**
225
+ * Displaying next jobs
226
+ */
227
+ private static function mb_next_jobs() {
228
+
229
+ if ( ! current_user_can( 'backwpup_jobs' ) )
230
+ return;
231
+ ?>
232
+ <table class="wp-list-table widefat" cellspacing="0" style="margin:10px;width:30%;float:left;clear:none;min-width:300px">
233
+ <thead>
234
+ <tr><th colspan="2" style="font-size:15px"><?php _e( 'Next scheduled jobs', 'backwpup' ); ?></th></tr>
235
+ <tr>
236
+ <th style="width: 30%"><?php _e( 'Time', 'backwpup' ); ?></th>
237
+ <th style="width: 70%"><?php _e( 'Job', 'backwpup' ); ?></th>
238
+ </tr>
239
+ </thead>
240
+ <?php
241
+ //get next jobs
242
+ $job_object = BackWPup_Job::get_working_data();
243
+ $mainsactive = BackWPup_Option::get_job_ids( 'activetype', 'wpcron' );
244
+ sort( $mainsactive );
245
+ $alternate = TRUE;
246
+ // add working job if it not in active jobs
247
+ if ( is_object( $job_object ) && ! empty( $job_object->job[ 'jobid' ] ) && ! in_array( $job_object->job[ 'jobid' ], $mainsactive ) )
248
+ $mainsactive[ ] = $job_object->job[ 'jobid' ];
249
+ foreach ( $mainsactive as $jobid ) {
250
+ $name = BackWPup_Option::get( $jobid, 'name' );
251
+ if ( is_object( $job_object ) && ! empty( $job_object->job[ 'jobid' ] ) && $job_object->job[ 'jobid' ] == $jobid ) {
252
+ $runtime = current_time( 'timestamp' ) - $job_object->start_time;
253
+ if ( ! $alternate ) {
254
+ echo '<tr>';
255
+ $alternate = TRUE;
256
+ } else {
257
+ echo '<tr class="alternate">';
258
+ $alternate = FALSE;
259
+ }
260
+ echo '<td>' . sprintf( '<span style="color:#e66f00;">' . __( 'working since %d seconds', 'backwpup' ) . '</span>', $runtime ) . '</td>';
261
+ echo '<td><span style="font-weight:bold;">' . $name . '</span><br />';
262
+ echo "<a style=\"color:red;\" href=\"" . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupjobs&action=abort', 'abort-job' ) . "\">" . __( 'Abort', 'backwpup' ) . "</a>";
263
+ echo "</td></tr>";
264
+ }
265
+ else {
266
+ $cronnextrun = BackWPup_Option::get( $jobid, 'cronnextrun' );
267
+ $cronnextrun = $cronnextrun + ( get_option( 'gmt_offset' ) * 3600 );
268
+ if ( ! $alternate ) {
269
+ echo '<tr>';
270
+ $alternate = TRUE;
271
+ } else {
272
+ echo '<tr class="alternate">';
273
+ $alternate = FALSE;
274
+ }
275
+ echo '<td>' . date_i18n( get_option( 'date_format' ), $cronnextrun ) . '<br />' . date_i18n( get_option( 'time_format' ), $cronnextrun ) . '</td>';
276
+ echo '<td><a href="' . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupeditjob&jobid=' . $jobid, 'edit-job' ) . '" title="' . esc_attr( __( 'Edit Job', 'backwpup' ) ) . '">' . $name . '</a></td></tr>';
277
+ }
278
+ }
279
+ if ( empty( $mainsactive ) and ! $job_object ) {
280
+ echo '<tr><td colspan="2"><i>' . __( 'none', 'backwpup' ) . '</i></td></tr>';
281
+ }
282
+ ?>
283
+ </table>
284
+ <?php
285
+ }
286
+
287
+
288
+ }
inc/class-page-editjob.php ADDED
@@ -0,0 +1,873 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+ class BackWPup_Page_Editjob {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public static function auth() {
11
+
12
+ if ( isset($_GET[ 'tab' ]) && strstr( $_GET[ 'tab' ], 'dest-' ) ) {
13
+ $destinations = BackWPup::get_destinations();
14
+ $jobid = (int)$_GET[ 'jobid' ];
15
+ $id = strtoupper( str_replace( 'dest-', '', $_GET[ 'tab' ] ) );
16
+ $destinations[ $id ]->edit_auth( $jobid );
17
+ }
18
+ }
19
+
20
+ /**
21
+ *
22
+ */
23
+ public static function load() {
24
+
25
+ //add Help tab
26
+ BackWPup_Help::add_tab( array(
27
+ 'id' => 'overview',
28
+ 'title' => __( 'Overview','backwpup' ),
29
+ 'content' =>
30
+ '<p>' . '</p>'
31
+ ) );
32
+
33
+ }
34
+ /**
35
+ *
36
+ * Save Form data
37
+ */
38
+ public static function save_post_form($tab, $jobid) {
39
+
40
+ if ( ! current_user_can( 'backwpup_jobs_edit' ) )
41
+ return __( 'Not allowed!', 'backwpup');
42
+
43
+ $message="";
44
+ $destinations = BackWPup::get_destinations();
45
+ $job_types = BackWPup::get_job_types();
46
+
47
+ switch ( $tab ) {
48
+ case 'job':
49
+ BackWPup_Option::update( $jobid, 'jobid', $jobid );
50
+
51
+ if ( isset( $_POST[ 'type' ] ) && is_array( $_POST[ 'type' ] ) ) {
52
+ foreach ( (array)$_POST[ 'type' ] as $typeid ) {
53
+ if ( empty( $job_types[ $typeid ] ) )
54
+ unset( $_POST[ 'type' ][ $typeid ] );
55
+ }
56
+ if ( is_array( $_POST[ 'type' ] ) )
57
+ sort( $_POST[ 'type' ] );
58
+ } else {
59
+ $_POST[ 'type' ]= array();
60
+ }
61
+ //test if jobtype makes backup
62
+ $makes_file = FALSE;
63
+ foreach ( $job_types as $type_id => $job_type) {
64
+ if ( in_array( $type_id, $_POST[ 'type' ] ) ) {
65
+ if ( $job_type->creates_file() ) {
66
+ $makes_file = TRUE;
67
+ break;
68
+ }
69
+ }
70
+ }
71
+ if ( ! $makes_file )
72
+ $_POST[ 'destinations' ] = array();
73
+ BackWPup_Option::update( $jobid, 'type', $_POST[ 'type' ] );
74
+
75
+ if ( isset( $_POST[ 'destinations' ] ) && is_array( $_POST[ 'destinations' ] ) ) {
76
+ foreach ( (array)$_POST[ 'destinations' ] as $key => $destid ) {
77
+ if ( empty( $destinations[ $destid ] ) ) //remove all destinations that not exists
78
+ unset( $_POST[ 'destinations' ][ $key ] );
79
+ if ( $_POST[ 'backuptype' ] == 'sync' ) { //if sync remove all not sync destinations
80
+ if ( ! $destinations[ $destid ]->can_sync() )
81
+ unset( $_POST[ 'destinations' ][ $key ] );
82
+ }
83
+ }
84
+ if ( is_array( $_POST[ 'destinations' ] ) )
85
+ sort( $_POST[ 'destinations' ] );
86
+ } else {
87
+ $_POST[ 'destinations' ] = array();
88
+ }
89
+ BackWPup_Option::update( $jobid, 'destinations', $_POST[ 'destinations' ] );
90
+
91
+ BackWPup_Option::update( $jobid, 'name', esc_html( $_POST[ 'name' ] ) );
92
+ BackWPup_Option::update( $jobid, 'mailaddresslog', sanitize_email( $_POST[ 'mailaddresslog' ] ) );
93
+ BackWPup_Option::update( $jobid, 'mailerroronly', ( isset( $_POST[ 'mailerroronly' ] ) && $_POST[ 'mailerroronly' ] == 1 ) ? TRUE : FALSE );
94
+ if ( class_exists( 'BackWPup_Features', FALSE ) )
95
+ BackWPup_Option::update( $jobid, 'backuptype', $_POST[ 'backuptype' ] );
96
+ else
97
+ BackWPup_Option::update( $jobid, 'backuptype', 'archive' );
98
+ BackWPup_Option::update( $jobid, 'archiveformat', $_POST[ 'archiveformat' ] );
99
+ BackWPup_Option::update( $jobid, 'archivename', $_POST[ 'archivename' ] );
100
+ break;
101
+ case 'cron':
102
+ if ( $_POST[ 'activetype' ] == '' || $_POST[ 'activetype' ] == 'wpcron' || $_POST[ 'activetype' ] == 'link' )
103
+ BackWPup_Option::update( $jobid, 'activetype', $_POST[ 'activetype' ] );
104
+
105
+ BackWPup_Option::update( $jobid, 'cronselect', $_POST[ 'cronselect' ] == 'advanced' ? 'advanced' : 'basic' );
106
+
107
+ if ( isset($_POST[ 'cronselect' ]) && $_POST[ 'cronselect' ] == 'advanced' ) { //save advanced
108
+ if ( empty( $_POST[ 'cronminutes' ] ) || $_POST[ 'cronminutes' ][ 0 ] == '*' ) {
109
+ if ( ! empty( $_POST[ 'cronminutes' ][ 1 ] ) )
110
+ $_POST[ 'cronminutes' ] = array( '*/' . $_POST[ 'cronminutes' ][ 1 ] );
111
+ else
112
+ $_POST[ 'cronminutes' ] = array( '*' );
113
+ }
114
+ if ( empty( $_POST[ 'cronhours' ] ) || $_POST[ 'cronhours' ][ 0 ] == '*' ) {
115
+ if ( ! empty( $_POST[ 'cronhours' ][ 1 ] ) )
116
+ $_POST[ 'cronhours' ] = array( '*/' . $_POST[ 'cronhours' ][ 1 ] );
117
+ else
118
+ $_POST[ 'cronhours' ] = array( '*' );
119
+ }
120
+ if ( empty( $_POST[ 'cronmday' ] ) || $_POST[ 'cronmday' ][ 0 ] == '*' ) {
121
+ if ( ! empty( $_POST[ 'cronmday' ][ 1 ] ) )
122
+ $_POST[ 'cronmday' ] = array( '*/' . $_POST[ 'cronmday' ][ 1 ] );
123
+ else
124
+ $_POST[ 'cronmday' ] = array( '*' );
125
+ }
126
+ if ( empty( $_POST[ 'cronmon' ] ) || $_POST[ 'cronmon' ][ 0 ] == '*' ) {
127
+ if ( ! empty( $_POST[ 'cronmon' ][ 1 ] ) )
128
+ $_POST[ 'cronmon' ] = array( '*/' . $_POST[ 'cronmon' ][ 1 ] );
129
+ else
130
+ $_POST[ 'cronmon' ] = array( '*' );
131
+ }
132
+ if ( empty( $_POST[ 'cronwday' ] ) || $_POST[ 'cronwday' ][ 0 ] == '*' ) {
133
+ if ( ! empty( $_POST[ 'cronwday' ][ 1 ] ) )
134
+ $_POST[ 'cronwday' ] = array( '*/' . $_POST[ 'cronwday' ][ 1 ] );
135
+ else
136
+ $_POST[ 'cronwday' ] = array( '*' );
137
+ }
138
+ $cron = implode( ",", $_POST[ 'cronminutes' ] ) . ' ' . implode( ",", $_POST[ 'cronhours' ] ) . ' ' . implode( ",", $_POST[ 'cronmday' ] ) . ' ' . implode( ",", $_POST[ 'cronmon' ] ) . ' ' . implode( ",", $_POST[ 'cronwday' ] );
139
+ BackWPup_Option::update( $jobid, 'cron', $cron );
140
+ } else { //Save basic
141
+ if ( $_POST[ 'cronbtype' ] == 'mon' )
142
+ BackWPup_Option::update( $jobid, 'cron', $_POST[ 'moncronminutes' ] . ' ' . $_POST[ 'moncronhours' ] . ' ' . $_POST[ 'moncronmday' ] . ' * *' );
143
+ if ( $_POST[ 'cronbtype' ] == 'week' )
144
+ BackWPup_Option::update( $jobid, 'cron', $_POST[ 'weekcronminutes' ] . ' ' . $_POST[ 'weekcronhours' ] . ' * * ' . $_POST[ 'weekcronwday' ] );
145
+ if ( $_POST[ 'cronbtype' ] == 'day' )
146
+ BackWPup_Option::update( $jobid, 'cron', $_POST[ 'daycronminutes' ] . ' ' . $_POST[ 'daycronhours' ] . ' * * *' );
147
+ if ( $_POST[ 'cronbtype' ] == 'hour' )
148
+ BackWPup_Option::update( $jobid, 'cron', $_POST[ 'hourcronminutes' ] . ' * * * *' );
149
+ }
150
+ //Save next run time
151
+ BackWPup_Option::update( $jobid, 'cronnextrun', BackWPup_Cron::cron_next( BackWPup_Option::get( $jobid, 'cron' ) ) );
152
+ //reschedule
153
+ wp_clear_scheduled_hook( 'backwpup_cron', array( 'id' => $jobid ) );
154
+ if ( BackWPup_Option::get( $jobid, 'activetype' ) == 'wpcron' ) {
155
+ $cronnxet = BackWPup_Option::get( $jobid, 'cronnextrun' );
156
+ wp_schedule_single_event( $cronnxet, 'backwpup_cron', array( 'id' => $jobid ) );
157
+ }
158
+ break;
159
+ default:
160
+ if ( strstr( $tab, 'dest-' ) ) {
161
+ $id = strtoupper( str_replace( 'dest-', '', $tab ) );
162
+ $message.=call_user_func( array( $destinations[ $id ], 'edit_form_post_save'), $jobid );
163
+ }
164
+ if ( strstr( $tab, 'jobtype-' ) ) {
165
+ $id = strtoupper( str_replace( 'jobtype-', '', $tab ) );
166
+ $message.=call_user_func( array( $job_types[ $id ], 'edit_form_post_save' ), $jobid );
167
+ }
168
+ }
169
+ //saved massage
170
+ $message .= sprintf( __( 'Changes for job <i>%s</i> saved.', 'backwpup' ), BackWPup_Option::get( $jobid, 'name' ) );
171
+
172
+ return $message;
173
+
174
+ }
175
+
176
+ /**
177
+ *
178
+ * Output css
179
+ *
180
+ * @return void
181
+ */
182
+ public static function admin_print_styles() {
183
+
184
+ wp_enqueue_style('backwpupgeneral');
185
+
186
+ //add css for the first tabs
187
+ if ( empty($_GET[ 'tab' ]) || $_GET[ 'tab' ]=='job' ) {
188
+ $_GET[ 'tab' ] = 'job';
189
+ }
190
+ elseif ( $_GET[ 'tab' ]=='cron' ) {
191
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
192
+ wp_enqueue_style( 'backwpuptabcron', BackWPup::get_plugin_data( 'URL' ) . '/css/page_edit_tab_cron.dev.css', '', time(), 'screen' );
193
+ } else {
194
+ wp_enqueue_style( 'backwpuptabcron', BackWPup::get_plugin_data( 'URL' ) . '/css/page_edit_tab_cron.css', '', BackWPup::get_plugin_data( 'Version' ), 'screen' );
195
+ }
196
+ }
197
+ //add css for all other tabs
198
+ elseif ( strstr( $_GET[ 'tab' ], 'dest-' ) ) {
199
+ $destinations = BackWPup::get_destinations();
200
+ $id = strtoupper( str_replace( 'dest-', '', $_GET[ 'tab' ] ) );
201
+ $destinations[ $id ]->admin_print_styles();
202
+ }
203
+ elseif ( strstr( $_GET[ 'tab' ], 'jobtype-' ) ) {
204
+ $job_type = BackWPup::get_job_types();
205
+ $id = strtoupper( str_replace( 'jobtype-', '', $_GET[ 'tab' ] ) );
206
+ $job_type[ $id ]->admin_print_styles( );
207
+ }
208
+ }
209
+
210
+ /**
211
+ *
212
+ * Output js
213
+ *
214
+ * @return void
215
+ */
216
+ public static function admin_print_scripts() {
217
+
218
+ wp_enqueue_script( 'backwpupgeneral' );
219
+
220
+ //add js for the first tabs
221
+ if ( empty($_GET[ 'tab' ]) || $_GET[ 'tab' ] == 'job' ) {
222
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
223
+ wp_enqueue_script( 'backwpuptabjob', BackWPup::get_plugin_data( 'URL' ) . '/js/page_edit_tab_job.dev.js', array('jquery'), time(), TRUE );
224
+ } else {
225
+ wp_enqueue_script( 'backwpuptabjob', BackWPup::get_plugin_data( 'URL' ) . '/js/page_edit_tab_job.js', array('jquery'), BackWPup::get_plugin_data( 'Version' ), TRUE );
226
+ }
227
+ }
228
+ elseif ( $_GET[ 'tab' ] == 'cron' ) {
229
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
230
+ wp_enqueue_script( 'backwpuptabcron', BackWPup::get_plugin_data( 'URL' ) . '/js/page_edit_tab_cron.dev.js', array('jquery'), time(), TRUE );
231
+ wp_enqueue_style( 'backwpuptabcron', BackWPup::get_plugin_data( 'URL' ) . '/css/page_edit_tab_cron.dev.css', '', time(), 'screen' );
232
+ } else {
233
+ wp_enqueue_script( 'backwpuptabcron', BackWPup::get_plugin_data( 'URL' ) . '/js/page_edit_tab_cron.js', array('jquery'), BackWPup::get_plugin_data( 'Version' ), TRUE );
234
+ wp_enqueue_style( 'backwpuptabcron', BackWPup::get_plugin_data( 'URL' ) . '/css/page_edit_tab_cron.css', '', BackWPup::get_plugin_data( 'Version' ), 'screen' );
235
+ }
236
+ }
237
+ //add js for all other tabs
238
+ elseif ( strstr( $_GET[ 'tab' ], 'dest-' ) ) {
239
+ $destinations = BackWPup::get_destinations();
240
+ $id = strtoupper( str_replace( 'dest-', '', $_GET[ 'tab' ] ) );
241
+ $destinations[ $id ]->admin_print_scripts( );
242
+ }
243
+ elseif ( strstr( $_GET[ 'tab' ], 'jobtype-' ) ) {
244
+ $job_type = BackWPup::get_job_types();
245
+ $id = strtoupper( str_replace( 'jobtype-', '', $_GET[ 'tab' ] ) );
246
+ $job_type[ $id ]->admin_print_scripts( );
247
+ }
248
+ }
249
+
250
+ /**
251
+ * @static
252
+ *
253
+ * @param string $args
254
+ *
255
+ * @return mixed
256
+ */
257
+ public static function ajax_cron_text( $args = '' ) {
258
+
259
+ if ( is_array( $args ) ) {
260
+ extract( $args );
261
+ $ajax = FALSE;
262
+ } else {
263
+ if ( ! current_user_can( 'backwpup_jobs_edit' ) )
264
+ wp_die( -1 );
265
+ check_ajax_referer( 'backwpup_ajax_nonce' );
266
+ if ( empty( $_POST[ 'cronminutes' ] ) || $_POST[ 'cronminutes' ][ 0 ] == '*' ) {
267
+ if ( ! empty( $_POST[ 'cronminutes' ][ 1 ] ) )
268
+ $_POST[ 'cronminutes' ] = array( '*/' . $_POST[ 'cronminutes' ][ 1 ] );
269
+ else
270
+ $_POST[ 'cronminutes' ] = array( '*' );
271
+ }
272
+ if ( empty( $_POST[ 'cronhours' ] ) || $_POST[ 'cronhours' ][ 0 ] == '*' ) {
273
+ if ( ! empty( $_POST[ 'cronhours' ][ 1 ] ) )
274
+ $_POST[ 'cronhours' ] = array( '*/' . $_POST[ 'cronhours' ][ 1 ] );
275
+ else
276
+ $_POST[ 'cronhours' ] = array( '*' );
277
+ }
278
+ if ( empty( $_POST[ 'cronmday' ] ) || $_POST[ 'cronmday' ][ 0 ] == '*' ) {
279
+ if ( ! empty( $_POST[ 'cronmday' ][ 1 ] ) )
280
+ $_POST[ 'cronmday' ] = array( '*/' . $_POST[ 'cronmday' ][ 1 ] );
281
+ else
282
+ $_POST[ 'cronmday' ] = array( '*' );
283
+ }
284
+ if ( empty( $_POST[ 'cronmon' ] ) || $_POST[ 'cronmon' ][ 0 ] == '*' ) {
285
+ if ( ! empty( $_POST[ 'cronmon' ][ 1 ] ) )
286
+ $_POST[ 'cronmon' ] = array( '*/' . $_POST[ 'cronmon' ][ 1 ] );
287
+ else
288
+ $_POST[ 'cronmon' ] = array( '*' );
289
+ }
290
+ if ( empty( $_POST[ 'cronwday' ] ) || $_POST[ 'cronwday' ][ 0 ] == '*' ) {
291
+ if ( ! empty( $_POST[ 'cronwday' ][ 1 ] ) )
292
+ $_POST[ 'cronwday' ] = array( '*/' . $_POST[ 'cronwday' ][ 1 ] );
293
+ else
294
+ $_POST[ 'cronwday' ] = array( '*' );
295
+ }
296
+ $crontype = $_POST[ 'crontype' ];
297
+ $cronstamp = implode( ",", $_POST[ 'cronminutes' ] ) . ' ' . implode( ",", $_POST[ 'cronhours' ] ) . ' ' . implode( ",", $_POST[ 'cronmday' ] ) . ' ' . implode( ",", $_POST[ 'cronmon' ] ) . ' ' . implode( ",", $_POST[ 'cronwday' ] );
298
+ $ajax = TRUE;
299
+ }
300
+ echo '<p class="wpcron" id="schedulecron">';
301
+
302
+ if ( $crontype == 'advanced' ) {
303
+ _e( 'Working as <a href="http://wikipedia.org/wiki/Cron">Cron</a> schedule:', 'backwpup' );
304
+ echo ' <i><b>' . $cronstamp . '</b></i><br />';
305
+ }
306
+
307
+ list( $cronstr[ 'minutes' ], $cronstr[ 'hours' ], $cronstr[ 'mday' ], $cronstr[ 'mon' ], $cronstr[ 'wday' ] ) = explode( ' ', $cronstamp, 5 );
308
+ if ( FALSE !== strpos( $cronstr[ 'minutes' ], '*/' ) || ( $cronstr[ 'minutes' ] == '*' ) ) {
309
+ $repeatmins = str_replace( '*/', '', $cronstr[ 'minutes' ] );
310
+ if ( $repeatmins == '*' || empty( $repeatmins ) )
311
+ $repeatmins = 10;
312
+ echo '<span style="color:red;">' . sprintf( __( 'ATTENTION: Job runs every %d minutes!', 'backwpup' ), $repeatmins ) . '</span><br />';
313
+ }
314
+ if ( FALSE !== strpos( $cronstr[ 'hours' ], '*/' ) || ( $cronstr[ 'hours' ] == '*' ) ) {
315
+ $repeathouer = str_replace( '*/', '', $cronstr[ 'hours' ] );
316
+ if ( $repeathouer == '*' || empty( $repeathouer ) )
317
+ $repeathouer = 1;
318
+ echo '<span style="color:red;">' . sprintf( __( 'ATTENTION: Job runs every %d hours!', 'backwpup' ), $repeathouer ) . '</span><br />';
319
+ }
320
+ $nextrun = BackWPup_Cron::cron_next( $cronstamp );
321
+ if ( 2147483647 == $nextrun ) {
322
+ echo '<span style="color:red;">' . __( 'ATTENTION: Can\'t calculate cron!', 'backwpup' ) . '</span><br />';
323
+ }
324
+ else {
325
+ _e( 'Next runtime:', 'backwpup' );
326
+ echo ' <b>' . date_i18n( 'D, j M Y, H:i', BackWPup_Cron::cron_next( $cronstamp ) + ( get_option( 'gmt_offset' ) * 3600 ),TRUE ) . '</b>';
327
+ }
328
+ echo "</p>";
329
+
330
+ if ( $ajax )
331
+ die();
332
+ else
333
+ return;
334
+ }
335
+
336
+ /**
337
+ *
338
+ */
339
+ public static function page() {
340
+
341
+ if ( ! empty( $_GET[ 'jobid' ] ) ) {
342
+ $jobid = (int)$_GET[ 'jobid' ];
343
+ }
344
+ else {
345
+ //generate jobid if not exists
346
+ $newjobid = BackWPup_Option::get_job_ids();
347
+ sort( $newjobid );
348
+ $jobid = end( $newjobid ) + 1;
349
+ }
350
+
351
+ if ( empty( $_GET[ 'tab' ] ) )
352
+ $_GET[ 'tab' ] = 'job';
353
+
354
+ $destinations = BackWPup::get_destinations();
355
+ $job_types = BackWPup::get_job_types();
356
+
357
+ ?>
358
+ <div class="wrap">
359
+ <?php
360
+ screen_icon();
361
+
362
+ //default tabs
363
+ $tabs = array( 'job' => array( 'name' => __( 'General', 'backwpup' ), 'display' => TRUE ), 'cron' => array( 'name' => __( 'Schedule', 'backwpup' ), 'display' => TRUE ) );
364
+ //add jobtypes to tabs
365
+ $job_job_types = BackWPup_Option::get( $jobid, 'type' );
366
+ foreach ( $job_types as $typeid => $typeclass ) {
367
+ $tabid = 'jobtype-' . strtolower( $typeid );
368
+ $tabs[ $tabid ][ 'name' ] = $typeclass->info[ 'name' ];
369
+ $tabs[ $tabid ][ 'display' ] = TRUE;
370
+ if ( ! in_array( $typeid, $job_job_types ) )
371
+ $tabs[ $tabid ][ 'display' ] = FALSE;
372
+
373
+ }
374
+ //add destinations to tabs
375
+ $jobdests = BackWPup_Option::get( $jobid, 'destinations' );
376
+ foreach ( $destinations as $destid => $destclass ) {
377
+ $tabid = 'dest-' . strtolower( $destid );
378
+ $tabs[ $tabid ][ 'name' ] = sprintf(__( 'To: %s', 'backwpup' ), $destclass->info[ 'name' ]);
379
+ $tabs[ $tabid ][ 'display' ] = TRUE;
380
+ if ( ! in_array( $destid, $jobdests ) )
381
+ $tabs[ $tabid ][ 'display' ] = FALSE;
382
+ }
383
+ //display tabs
384
+ echo '<h2 class="nav-tab-wrapper">' . sprintf( __( '%s Job:', 'backwpup' ), BackWPup::get_plugin_data( 'name' ) ). '&nbsp;';
385
+ echo '<span id="h2jobtitle">' .htmlspecialchars( BackWPup_Option::get( $jobid, 'name' ) ) . '</span><br /><br />';
386
+ foreach ( $tabs as $id => $tab ) {
387
+ $addclass = '';
388
+ if ( $id == $_GET[ 'tab' ] )
389
+ $addclass = ' nav-tab-active';
390
+ $display = '';
391
+ if ( ! $tab[ 'display' ] )
392
+ $display = ' style="display:none;"';
393
+ echo '<a href="' . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupeditjob&tab=' . $id . '&jobid=' . $jobid, 'edit-job' ) . '" class="nav-tab' . $addclass . '" id="tab-' . $id . '" data-nexttab="' . $id . '" ' . $display . '>' . $tab[ 'name' ] . '</a>';
394
+ }
395
+ echo '</h2>';
396
+ //display messages
397
+ BackWPup_Admin::display_messages();
398
+ echo '<form name="editjob" id="editjob" method="post" action="' . admin_url( 'admin-post.php?action=backwpup' ) . '">';
399
+ echo '<input type="hidden" id="jobid" name="jobid" value="' . $jobid . '" />';
400
+ echo '<input type="hidden" name="tab" value="' . $_GET[ 'tab' ] . '" />';
401
+ echo '<input type="hidden" name="nexttab" value="' . $_GET[ 'tab' ] . '" />';
402
+ echo '<input type="hidden" name="page" value="backwpupeditjob" />';
403
+ echo '<input type="hidden" name="anchor" value="" />';
404
+ wp_nonce_field( 'backwpupeditjob_page' );
405
+ wp_nonce_field( 'backwpup_ajax_nonce', 'backwpupajaxnonce', FALSE );
406
+
407
+ switch ( $_GET[ 'tab' ] ) {
408
+ case 'job':
409
+ echo '<div class="table" id="info-tab-job">';
410
+ ?>
411
+ <h3 class="title"><?php _e( 'Name of this job', 'backwpup' ) ?></h3>
412
+ <p></p>
413
+ <table class="form-table">
414
+ <tr valign="top">
415
+ <th scope="row"><label for="name"><?php _e( 'Name', 'backwpup' ) ?></label></th>
416
+ <td>
417
+ <input name="name" type="text" id="name"
418
+ value="<?php echo BackWPup_Option::get( $jobid, 'name' );?>" class="regular-text" />
419
+ </td>
420
+ </tr>
421
+ </table>
422
+
423
+ <h3 class="title"><?php _e( 'What the job does', 'backwpup' ) ?></h3>
424
+ <p></p>
425
+ <table class="form-table">
426
+ <tr valign="top">
427
+ <th scope="row"><?php _e( 'Tasks', 'backwpup' ) ?></th>
428
+ <td>
429
+ <fieldset>
430
+ <legend class="screen-reader-text"><span><?php _e( 'Job tasks', 'backwpup' ) ?></span>
431
+ </legend><?php
432
+ foreach ( $job_types as $id => $typeclass ) {
433
+ $fileclass = '';
434
+ if ( call_user_func( array( $typeclass, 'creates_file' ) ) )
435
+ $fileclass = ' filetype';
436
+ echo '<label for="jobtype-select-' . strtolower( $id ) . '"><input class="jobtype-select checkbox' . $fileclass . '" id="jobtype-select-' . strtolower( $id ) . '" type="checkbox" ' . checked( TRUE, in_array( $id, BackWPup_Option::get( $jobid, 'type' ) ), FALSE ) . ' name="type[]" value="' . $id . '" /> ' . $typeclass->info[ 'description' ];
437
+ if ( ! empty( $info[ 'help' ] ) )
438
+ BackWPup_Help::tip( $typeclass->info[ 'help' ] );
439
+ echo "</label><br />";
440
+ }
441
+ ?></fieldset>
442
+ </td>
443
+ </tr>
444
+ </table>
445
+
446
+ <h3 class="title hasdests"><?php _e( 'Backup file creation settings', 'backwpup' ) ?></h3>
447
+ <p class="hasdests"></p>
448
+ <table class="form-table hasdests">
449
+ <?php if ( class_exists( 'BackWPup_Features', FALSE ) ) { ?>
450
+ <tr valign="top">
451
+ <th scope="row"><?php _e( 'Backup type', 'backwpup' ); ?></th>
452
+ <td>
453
+ <fieldset>
454
+ <legend class="screen-reader-text"><span><?php _e( 'Backup type', 'backwpup' ) ?></span>
455
+ </legend>
456
+ <label for="idbackuptype-sync"><input class="radio"
457
+ type="radio"<?php checked( 'sync', BackWPup_Option::get( $jobid, 'backuptype' ), TRUE ); ?>
458
+ name="backuptype" id="idbackuptype-sync"
459
+ value="sync"/> <?php _e( 'Synchronize file by file to destination', 'backwpup' ); ?></label><br/>
460
+ <label for="idbackuptype-archive"><input class="radio"
461
+ type="radio"<?php checked( 'archive', BackWPup_Option::get( $jobid, 'backuptype' ), TRUE ); ?>
462
+ name="backuptype" id="idbackuptype-archive"
463
+ value="archive"/> <?php _e( 'Create a backup archive', 'backwpup' ); ?></label><br/>
464
+ </fieldset>
465
+ </td>
466
+ </tr>
467
+ <?php } ?>
468
+ <tr valign="top" class="nosync">
469
+ <th scope="row"><label for="archivename"><?php _e( 'Archive name', 'backwpup' ) ?></label></th>
470
+ <td>
471
+ <input name="archivename" type="text" id="archivename"
472
+ value="<?php echo BackWPup_Option::get( $jobid, 'archivename' );?>"
473
+ class="regular-text code" />
474
+ <?php
475
+ $patterns = array (
476
+ __( '%d = Day of the month, 2 digits with leading zeros', 'backwpup' ),
477
+ __( '%j = Day of the month without leading zeros', 'backwpup' ),
478
+ __( '%m = Numeric representation of a month, two digits with leading zeros', 'backwpup' ),
479
+ __( '%n = Numeric representation of a month without leading zeros', 'backwpup' ),
480
+ __( '%Y = Four digit representation of a year', 'backwpup' ),
481
+ __( '%y = Two digit representation of a year with leading zeros', 'backwpup' ),
482
+ __( '%a = Lowercase Ante meridiem and Post meridiem', 'backwpup' ),
483
+ __( '%A = Uppercase Ante meridiem and Post meridiem', 'backwpup' ),
484
+ __( '%B = Swatch Internet time', 'backwpup' ),
485
+ __( '%g = 12-hour format of an hour without leading zeros', 'backwpup' ),
486
+ __( '%G = 24-hour format of an hour without leading zeros', 'backwpup' ),
487
+ __( '%h = 12-hour format of an hour with leading zeros', 'backwpup' ),
488
+ __( '%H = 24-hour format of an hour with leading zeros', 'backwpup' ),
489
+ __( '%i = Minutes with leading zeros', 'backwpup' ),
490
+ __( '%s = Seconds with leading zeros', 'backwpup' ),
491
+ __( '%u = Microseconds', 'backwpup' ),
492
+ __( '%U = Seconds since the Unix epoch', 'backwpup' ),
493
+ );
494
+
495
+ BackWPup_Help::tip(
496
+ "<strong>" . __( 'Replacement patterns:', 'backwpup' ) . "</strong><br />"
497
+ . join( '<br />', $patterns )
498
+ );
499
+
500
+ $datevars = array( '%d', '%j', '%m', '%n', '%Y', '%y', '%a', '%A', '%B', '%g', '%G', '%h', '%H', '%i', '%s', '%u', '%U' );
501
+ $datevalues = array( date_i18n( 'd' ), date_i18n( 'j' ), date_i18n( 'm' ), date_i18n( 'n' ), date_i18n( 'Y' ), date_i18n( 'y' ), date_i18n( 'a' ), date_i18n( 'A' ), date_i18n( 'B' ), date_i18n( 'g' ), date_i18n( 'G' ), date_i18n( 'h' ), date_i18n( 'H' ), date_i18n( 'i' ), date_i18n( 's' ), date_i18n( 'u' ), date_i18n( 'U' ) );
502
+ $archivename = str_replace( $datevars, $datevalues, BackWPup_Option::get( $jobid, 'archivename' ) );
503
+ $archivename = sanitize_title_with_dashes( $archivename );
504
+ echo '<p>Preview: <code><span id="archivefilename">' . $archivename . '</span><span id="archiveformat">' . BackWPup_Option::get( $jobid, 'archiveformat' ) . '</span></code></p>';
505
+ ?>
506
+ </td>
507
+ </tr>
508
+ <tr valign="top" class="nosync">
509
+ <th scope="row"><?php _e( 'Archive Format', 'backwpup' ); ?></th>
510
+ <td>
511
+ <fieldset>
512
+ <legend class="screen-reader-text"><span><?php _e( 'Archive Format', 'backwpup' ) ?></span>
513
+ </legend><?php
514
+ if ( function_exists( 'gzopen' ) || class_exists( 'ZipArchive' ) )
515
+ echo '<label for="idarchiveformat-zip"><input class="radio" type="radio"' . checked( '.zip', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-zip" value=".zip" /> ' . __( 'Zip', 'backwpup' ) . BackWPup_Help::tip( __( 'PHP Zip functions will be used if available (needs less memory). Otherwise the PCLZip Class will be used.', 'backwpup' ), FALSE ) . '</label><br />';
516
+ else
517
+ echo '<label for="idarchiveformat-zip"><input class="radio" type="radio"' . checked( '.zip', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-zip" value=".zip" disabled="disabled" /> ' . __( 'Zip', 'backwpup' ) . BackWPup_Help::tip( __( 'Disabled because missing PHP function.', 'backwpup' ), FALSE ) . '</label><br />';
518
+ echo '<label for="idarchiveformat-tar"><input class="radio" type="radio"' . checked( '.tar', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-tar" value=".tar" /> ' . __( 'Tar', 'backwpup' ) . BackWPup_Help::tip( __( 'Tar (fast and less memory)', 'backwpup' ), FALSE ) . '</label><br />';
519
+ if ( function_exists( 'gzopen' ) )
520
+ echo '<label for="idarchiveformat-targz"><input class="radio" type="radio"' . checked( '.tar.gz', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-targz" value=".tar.gz" /> ' . __( 'Tar GZip', 'backwpup' ) . BackWPup_Help::tip( __( 'A tarballed and GZipped archive (fast and less memory)', 'backwpup' ), FALSE ) . '</label><br />';
521
+ else
522
+ echo '<label for="idarchiveformat-targz"><input class="radio" type="radio"' . checked( '.tar.gz', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-targz" value=".tar.gz" disabled="disabled" /> ' . __( 'Tar GZip', 'backwpup' ) . BackWPup_Help::tip( __( 'Disabled because missing PHP function.', 'backwpup' ), FALSE ) . '</label><br />';
523
+ if ( function_exists( 'bzopen' ) )
524
+ echo '<label for="idarchiveformat-tarbz2"><input class="radio" type="radio"' . checked( '.tar.bz2', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-tarbz2" value=".tar.bz2" /> ' . __( 'Tar BZip2', 'backwpup' ) . BackWPup_Help::tip( __( 'A tarballed and BZipped archive (fast and less memory)', 'backwpup' ), FALSE ) . '</label><br />';
525
+ else
526
+ echo '<label for="idarchiveformat-tarbz2"><input class="radio" type="radio"' . checked( '.tar.bz2', BackWPup_Option::get( $jobid, 'archiveformat' ), FALSE ) . ' name="archiveformat" id="idarchiveformat-tarbz2" value=".tar.bz2" disabled="disabled" /> ' . __( 'Tar BZip2', 'backwpup' ) . BackWPup_Help::tip( __( 'Disabled because missing PHP function.', 'backwpup' ), FALSE ) . '</label><br />';
527
+ ?></fieldset>
528
+ </td>
529
+ </tr>
530
+ </table>
531
+
532
+ <h3 class="title hasdests"><?php _e( 'Where to store the files', 'backwpup' ) ?></h3>
533
+ <p class="hasdests"></p>
534
+ <table class="form-table hasdests">
535
+ <tr valign="top">
536
+ <th scope="row"><?php _e( 'Destinations', 'backwpup' ) ?></th>
537
+ <td>
538
+ <fieldset>
539
+ <legend class="screen-reader-text"><span><?php _e( 'Destinations', 'backwpup' ) ?></span>
540
+ </legend><?php
541
+ foreach ( $destinations as $id => $destclass ) {
542
+ $syncclass = '';
543
+ if ( ! call_user_func( array( $destclass, 'can_sync' ) ) )
544
+ $syncclass = 'nosync';
545
+ echo '<span class="' . $syncclass . '"><label for="dest-select-' . strtolower( $id ) . '"><input class="checkbox" id="dest-select-' . strtolower( $id ) . '" type="checkbox" ' . checked( TRUE, in_array( $id, BackWPup_Option::get( $jobid, 'destinations' ) ), FALSE ) . ' name="destinations[]" value="' . $id . '"/> ' . $destclass->info[ 'description' ];
546
+ if ( ! empty( $info[ 'help' ] ) )
547
+ BackWPup_Help::tip( $destclass->info[ 'help' ] );
548
+ echo '</label><br /></span>';
549
+ }
550
+ ?></fieldset>
551
+ </td>
552
+ </tr>
553
+ </table>
554
+
555
+ <h3 class="title"><?php _e( 'Send log to email address', 'backwpup' ) ?></h3>
556
+ <p></p>
557
+ <table class="form-table">
558
+ <tr valign="top">
559
+ <th scope="row"><label for="mailaddresslog"><?php _e( 'Email address', 'backwpup' ) ?></label></th>
560
+ <td>
561
+ <input name="mailaddresslog" type="text" id="mailaddresslog"
562
+ value="<?php echo BackWPup_Option::get( $jobid, 'mailaddresslog' );?>"
563
+ class="regular-text" /><?php BackWPup_Help::tip( __( 'Leave empty and don\'t get a log sent.', 'backwpup' ) ); ?>
564
+ </td>
565
+ </tr>
566
+ <tr valign="top">
567
+ <th scope="row"><?php _e( 'When to send', 'backwpup' ); ?></th>
568
+ <td>
569
+ <label for="idmailerroronly">
570
+ <input class="checkbox" value="1" id="idmailerroronly"
571
+ type="checkbox" <?php checked( BackWPup_Option::get( $jobid, 'mailerroronly' ), TRUE ); ?>
572
+ name="mailerroronly" /> <?php _e( 'Send mail with log only when errors occur during job execution.', 'backwpup' ); ?>
573
+ </label>
574
+ </td>
575
+ </tr>
576
+ </table>
577
+ <?php
578
+ echo '</div>';
579
+ break;
580
+ case 'cron':
581
+ echo '<div class="table" id="info-tab-cron">';
582
+ ?>
583
+ <h3 class="title"><?php _e( 'Schedule start setting', 'backwpup' ) ?></h3>
584
+ <p></p>
585
+ <table class="form-table">
586
+ <tr valign="top">
587
+ <th scope="row"><?php _e( 'Start job', 'backwpup' ); ?></th>
588
+ <td>
589
+ <fieldset>
590
+ <legend class="screen-reader-text"><span><?php _e( 'Start job', 'backwpup' ) ?></span></legend>
591
+ <label for="idactivetype"><input class="radio"
592
+ type="radio"<?php checked( '', BackWPup_Option::get( $jobid, 'activetype' ), TRUE ); ?>
593
+ name="activetype" id="idactivetype"
594
+ value="" /> <?php _e( 'manually only', 'backwpup' ); ?></label><br/>
595
+ <label for="idactivetype-wpcron"><input class="radio"
596
+ type="radio"<?php checked( 'wpcron', BackWPup_Option::get( $jobid, 'activetype' ), TRUE ); ?>
597
+ name="activetype" id="idactivetype-wpcron"
598
+ value="wpcron" /> <?php _e( 'with WordPress cron', 'backwpup' ); ?></label><br/>
599
+ <?php
600
+ $url = BackWPup_Job::get_jobrun_url( 'runext', BackWPup_Option::get( $jobid, 'jobid' ) );
601
+ ?>
602
+ <label for="idactivetype-link"><input class="radio"
603
+ type="radio"<?php checked( 'link', BackWPup_Option::get( $jobid, 'activetype' ), TRUE ); ?>
604
+ name="activetype" id="idactivetype-link"
605
+ value="link" /> <?php _e( 'with a link', 'backwpup' ); ?> <code><?php echo $url[ 'url' ];?></code></label>
606
+ <?php
607
+ BackWPup_Help::tip( __( 'Copy the link for an external start. This option has to be activated to make the link work.', 'backwpup' ) );
608
+ ?>
609
+ <br />
610
+ </fieldset>
611
+ </td>
612
+ </tr>
613
+ <tr valign="top">
614
+ <th scope="row"><?php _e( 'Start job with CLI', 'backwpup' ); ?></th>
615
+ <td>
616
+ <?php
617
+ echo sprintf ( __( 'Use <a href="http://wp-cli.org/">WP-CLI</a> to run jobs from commandline or <a href="%s">get the start script</a>.', 'backwpup' ), wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupjobs&action=start_cli&jobid=' . $jobid, 'start_cli' ) );
618
+ BackWPup_Help::tip( __( 'Generate a server script file to let the job start with the server’s cron on command line interface. Or use WP-CLI commands.', 'backwpup' ) );
619
+ ?>
620
+ </td>
621
+ </tr>
622
+ </table>
623
+ <h3 class="title wpcron"><?php _e( 'Schedule execution time', 'backwpup' ) ?></h3>
624
+ <?php BackWPup_Page_Editjob::ajax_cron_text( array( 'cronstamp' => BackWPup_Option::get( $jobid, 'cron' ), 'crontype' => BackWPup_Option::get( $jobid, 'cronselect' ) ) ); ?>
625
+ <table class="form-table wpcron">
626
+ <tr valign="top">
627
+ <th scope="row"><?php _e( 'Scheduler type', 'backwpup' ); ?></th>
628
+ <td>
629
+ <fieldset>
630
+ <legend class="screen-reader-text"><span><?php _e( 'Scheduler type', 'backwpup' ) ?></span>
631
+ </legend>
632
+ <label for="idcronselect-basic"><input class="radio"
633
+ type="radio"<?php checked( 'basic', BackWPup_Option::get( $jobid, 'cronselect' ), TRUE ); ?>
634
+ name="cronselect" id="idcronselect-basic"
635
+ value="basic" /> <?php _e( 'basic', 'backwpup' ); ?></label><br/>
636
+ <label for="idcronselect-advanced"><input class="radio"
637
+ type="radio"<?php checked( 'advanced', BackWPup_Option::get( $jobid, 'cronselect' ), TRUE ); ?>
638
+ name="cronselect" id="idcronselect-advanced"
639
+ value="advanced" /> <?php _e( 'advanced', 'backwpup' ); ?></label><br/>
640
+ </fieldset>
641
+ </td>
642
+ </tr>
643
+ <?php
644
+
645
+ list( $cronstr[ 'minutes' ], $cronstr[ 'hours' ], $cronstr[ 'mday' ], $cronstr[ 'mon' ], $cronstr[ 'wday' ] ) = explode( ' ', BackWPup_Option::get( $jobid, 'cron' ), 5 );
646
+ if ( strstr( $cronstr[ 'minutes' ], '*/' ) )
647
+ $minutes = explode( '/', $cronstr[ 'minutes' ] );
648
+ else
649
+ $minutes = explode( ',', $cronstr[ 'minutes' ] );
650
+ if ( strstr( $cronstr[ 'hours' ], '*/' ) )
651
+ $hours = explode( '/', $cronstr[ 'hours' ] );
652
+ else
653
+ $hours = explode( ',', $cronstr[ 'hours' ] );
654
+ if ( strstr( $cronstr[ 'mday' ], '*/' ) )
655
+ $mday = explode( '/', $cronstr[ 'mday' ] );
656
+ else
657
+ $mday = explode( ',', $cronstr[ 'mday' ] );
658
+ if ( strstr( $cronstr[ 'mon' ], '*/' ) )
659
+ $mon = explode( '/', $cronstr[ 'mon' ] );
660
+ else
661
+ $mon = explode( ',', $cronstr[ 'mon' ] );
662
+ if ( strstr( $cronstr[ 'wday' ], '*/' ) )
663
+ $wday = explode( '/', $cronstr[ 'wday' ] );
664
+ else
665
+ $wday = explode( ',', $cronstr[ 'wday' ] );
666
+ ?>
667
+ <tr valign="top" class="wpcronbasic"<?php if ( BackWPup_Option::get( $jobid, 'cronselect' ) != 'basic' ) echo ' style="display:none;"';?>>
668
+ <th scope="row"><?php _e( 'Scheduler', 'backwpup' ); ?></th>
669
+ <td>
670
+ <table id="wpcronbasic">
671
+ <tr>
672
+ <th>
673
+ <?php _e( 'Type', 'backwpup' ); ?>
674
+ </th>
675
+ <th>
676
+ </th>
677
+ <th>
678
+ <?php _e( 'Hour', 'backwpup' ); ?>
679
+ </th>
680
+ <th>
681
+ <?php _e( 'Minute', 'backwpup' ); ?>
682
+ </th>
683
+ </tr>
684
+ <tr>
685
+ <td><label for="idcronbtype-mon"><?php echo '<input class="radio" type="radio"' . checked( TRUE, is_numeric( $mday[ 0 ] ), FALSE ) . ' name="cronbtype" id="idcronbtype-mon" value="mon" /> ' . __( 'monthly', 'backwpup' ); ?></label></td>
686
+ <td><select name="moncronmday"><?php for ( $i = 1; $i <= 31; $i ++ ) {
687
+ echo '<option ' . selected( in_array( "$i", $mday, TRUE ), TRUE, FALSE ) . ' value="' . $i . '" />' . __( 'on', 'backwpup' ) . ' ' . $i . '.</option>';
688
+ } ?></select></td>
689
+ <td><select name="moncronhours"><?php for ( $i = 0; $i < 24; $i ++ ) {
690
+ echo '<option ' . selected( in_array( "$i", $hours, TRUE ), TRUE, FALSE ) . ' value="' . $i . '" />' . $i . '</option>';
691
+ } ?></select></td>
692
+ <td><select name="moncronminutes"><?php for ( $i = 0; $i < 60; $i = $i + 10 ) {
693
+ echo '<option ' . selected( in_array( "$i", $minutes, TRUE ), TRUE, FALSE ) . ' value="' . $i . '" />' . $i . '</option>';
694
+ } ?></select></td>
695
+ </tr>
696
+ <tr>
697
+ <td><label for="idcronbtype-week"><?php echo '<input class="radio" type="radio"' . checked( TRUE, is_numeric( $wday[ 0 ] ), FALSE ) . ' name="cronbtype" id="idcronbtype-week" value="week" /> ' . __( 'weekly', 'backwpup' ); ?></label></td>
698
+ <td><select name="weekcronwday">
699
+ <?php echo '<option ' . selected( in_array( "0", $wday, TRUE ), TRUE, FALSE ) . ' value="0" />' . __( 'Sunday', 'backwpup' ) . '</option>';
700
+ echo '<option ' . selected( in_array( "1", $wday, TRUE ), TRUE, FALSE ) . ' value="1" />' . __( 'Monday', 'backwpup' ) . '</option>';
701
+ echo '<option ' . selected( in_array( "2", $wday, TRUE ), TRUE, FALSE ) . ' value="2" />' . __( 'Tuesday', 'backwpup' ) . '</option>';
702
+ echo '<option ' . selected( in_array( "3", $wday, TRUE ), TRUE, FALSE ) . ' value="3" />' . __( 'Wednesday', 'backwpup' ) . '</option>';
703
+ echo '<option ' . selected( in_array( "4", $wday, TRUE ), TRUE, FALSE ) . ' value="4" />' . __( 'Thursday', 'backwpup' ) . '</option>';
704
+ echo '<option ' . selected( in_array( "5", $wday, TRUE ), TRUE, FALSE ) . ' value="5" />' . __( 'Friday', 'backwpup' ) . '</option>';
705
+ echo '<option ' . selected( in_array( "6", $wday, TRUE ), TRUE, FALSE ) . ' value="6" />' . __( 'Saturday', 'backwpup' ) . '</option>'; ?>
706
+ </select></td>
707
+ <td><select name="weekcronhours"><?php for ( $i = 0; $i < 24; $i ++ ) {
708
+ echo '<option ' . selected( in_array( "$i", $hours, TRUE ), TRUE, FALSE ) . ' value="' . $i . '" />' . $i . '</option>';
709
+ } ?></select></td>
710
+ <td><select name="weekcronminutes"><?php for ( $i = 0; $i < 60; $i = $i + 10 ) {
711
+ echo '<option ' . selected( in_array( "$i", $minutes, TRUE ), TRUE, FALSE ) . ' value="' . $i . '" />' . $i . '</option>';
712
+ } ?></select></td>
713
+ </tr>
714
+ <tr>
715
+ <td><label for="idcronbtype-day"><?php echo '<input class="radio" type="radio"' . checked( "**", $mday[ 0 ] . $wday[ 0 ], FALSE ) . ' name="cronbtype" id="idcronbtype-day" value="day" /> ' . __( 'daily', 'backwpup' ); ?></label></td>
716
+ <td></td>
717
+ <td><select name="daycronhours"><?php for ( $i = 0; $i < 24; $i ++ ) {
718
+ echo '<option ' . selected( in_array( "$i", $hours, TRUE ), TRUE, FALSE ) . ' value="' . $i . '" />' . $i . '</option>';
719
+ } ?></select></td>
720
+ <td><select name="daycronminutes"><?php for ( $i = 0; $i < 60; $i = $i + 10 ) {
721
+ echo '<option ' . selected( in_array( "$i", $minutes, TRUE ), TRUE, FALSE ) . ' value="' . $i . '" />' . $i . '</option>';
722
+ } ?></select></td>
723
+ </tr>
724
+ <tr>
725
+ <td><label for="idcronbtype-hour"><?php echo '<input class="radio" type="radio"' . checked( "*", $hours[ 0 ], FALSE, FALSE ) . ' name="cronbtype" id="idcronbtype-hour" value="hour" /> ' . __( 'hourly', 'backwpup' ); ?></label></td>
726
+ <td></td>
727
+ <td></td>
728
+ <td><select name="hourcronminutes"><?php for ( $i = 0; $i < 60; $i = $i + 10 ) {
729
+ echo '<option ' . selected( in_array( "$i", $minutes, TRUE ), TRUE, FALSE ) . ' value="' . $i . '" />' . $i . '</option>';
730
+ } ?></select></td>
731
+ </tr>
732
+ </table>
733
+ </td>
734
+ </tr>
735
+ <tr valign="top" class="wpcronadvanced"<?php if ( BackWPup_Option::get( $jobid, 'cronselect' ) != 'advanced' ) echo ' style="display:none;"';?>>
736
+ <th scope="row"><?php _e( 'Scheduler', 'backwpup' ); ?></th>
737
+ <td>
738
+ <div id="cron-min-box">
739
+ <b><?php _e( 'Minutes:', 'backwpup' ); ?></b><br/>
740
+ <?php
741
+ echo '<label for="idcronminutes"><input class="checkbox" type="checkbox"' . checked( in_array( "*", $minutes, TRUE ), TRUE, FALSE ) . ' name="cronminutes[]" id="idcronminutes" value="*" /> ' . __( 'Any (*)', 'backwpup' ) . '</label><br />';
742
+ ?>
743
+ <div id="cron-min"><?php
744
+ for ( $i = 0; $i < 60; $i = $i + 10 ) {
745
+ echo '<label for="idcronminutes-' . $i . '"><input class="checkbox" type="checkbox"' . checked( in_array( "$i", $minutes, TRUE ), TRUE, FALSE ) . ' name="idcronminutes[]" id="idcronminutes-' . $i . '" value="' . $i . '" /> ' . $i . '</label><br />';
746
+ }
747
+ ?>
748
+ </div>
749
+ </div>
750
+ <div id="cron-hour-box">
751
+ <b><?php _e( 'Hours:', 'backwpup' ); ?></b><br/>
752
+ <?php
753
+
754
+ echo '<label for="idcronhours"><input class="checkbox" type="checkbox"' . checked( in_array( "*", $hours, TRUE ), TRUE, FALSE ) . ' name="cronhours[]" for="idcronhours" value="*" /> ' . __( 'Any (*)', 'backwpup' ) . '</label><br />';
755
+ ?>
756
+ <div id="cron-hour"><?php
757
+ for ( $i = 0; $i < 24; $i ++ ) {
758
+ echo '<label for="idcronhours-' . $i . '"><input class="checkbox" type="checkbox"' . checked( in_array( "$i", $hours, TRUE ), TRUE, FALSE ) . ' name="cronhours[]" id="idcronhours-' . $i . '" value="' . $i . '" /> ' . $i . '</label><br />';
759
+ }
760
+ ?>
761
+ </div>
762
+ </div>
763
+ <div id="cron-day-box">
764
+ <b><?php _e( 'Day of Month:', 'backwpup' ); ?></b><br/>
765
+ <label for="idcronmday"><input class="checkbox" type="checkbox"<?php checked( in_array( "*", $mday, TRUE ), TRUE, TRUE ); ?>
766
+ name="cronmday[]" id="idcronmday" value="*"/> <?php _e( 'Any (*)', 'backwpup' ); ?></label>
767
+ <br/>
768
+
769
+ <div id="cron-day">
770
+ <?php
771
+ for ( $i = 1; $i <= 31; $i ++ ) {
772
+ echo '<label for="idcronmday-' . $i . '"><input class="checkbox" type="checkbox"' . checked( in_array( "$i", $mday, TRUE ), TRUE, FALSE ) . ' name="cronmday[]" id="idcronmday-' . $i . '" value="' . $i . '" /> ' . $i . '</label><br />';
773
+ }
774
+ ?>
775
+ </div>
776
+ </div>
777
+ <div id="cron-month-box">
778
+ <b><?php _e( 'Month:', 'backwpup' ); ?></b><br/>
779
+ <?php
780
+ echo '<label for="idcronmon"><input class="checkbox" type="checkbox"' . checked( in_array( "*", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon" value="*" /> ' . __( 'Any (*)', 'backwpup' ) . '</label><br />';
781
+ ?>
782
+ <div id="cron-month">
783
+ <?php
784
+ echo '<label for="idcronmon-1"><input class="checkbox" type="checkbox"' . checked( in_array( "1", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-1" value="1" /> ' . __( 'January', 'backwpup' ) . '</label><br />';
785
+ echo '<label for="idcronmon-2"><input class="checkbox" type="checkbox"' . checked( in_array( "2", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-2" value="2" /> ' . __( 'February', 'backwpup' ) . '</label><br />';
786
+ echo '<label for="idcronmon-3"><input class="checkbox" type="checkbox"' . checked( in_array( "3", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-3" value="3" /> ' . __( 'March', 'backwpup' ) . '</label><br />';
787
+ echo '<label for="idcronmon-4"><input class="checkbox" type="checkbox"' . checked( in_array( "4", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-4" value="4" /> ' . __( 'April', 'backwpup' ) . '</label><br />';
788
+ echo '<label for="idcronmon-5"><input class="checkbox" type="checkbox"' . checked( in_array( "5", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-5" value="5" /> ' . __( 'May', 'backwpup' ) . '</label><br />';
789
+ echo '<label for="idcronmon-6"><input class="checkbox" type="checkbox"' . checked( in_array( "6", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-6" value="6" /> ' . __( 'June', 'backwpup' ) . '</label><br />';
790
+ echo '<label for="idcronmon-7"><input class="checkbox" type="checkbox"' . checked( in_array( "7", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-7" value="7" /> ' . __( 'July', 'backwpup' ) . '</label><br />';
791
+ echo '<label for="idcronmon-8"><input class="checkbox" type="checkbox"' . checked( in_array( "8", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-8" value="8" /> ' . __( 'August', 'backwpup' ) . '</label><br />';
792
+ echo '<label for="idcronmon-9"><input class="checkbox" type="checkbox"' . checked( in_array( "9", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-9" value="9" /> ' . __( 'September', 'backwpup' ) . '</label><br />';
793
+ echo '<label for="idcronmon-10"><input class="checkbox" type="checkbox"' . checked( in_array( "10", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-10" value="10" /> ' . __( 'October', 'backwpup' ) . '</label><br />';
794
+ echo '<label for="idcronmon-11"><input class="checkbox" type="checkbox"' . checked( in_array( "11", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-11" value="11" /> ' . __( 'November', 'backwpup' ) . '</label><br />';
795
+ echo '<label for="idcronmon-12"><input class="checkbox" type="checkbox"' . checked( in_array( "12", $mon, TRUE ), TRUE, FALSE ) . ' name="cronmon[]" id="idcronmon-12" value="12" /> ' . __( 'December', 'backwpup' ) . '</label><br />';
796
+ ?>
797
+ </div>
798
+ </div>
799
+ <div id="cron-weekday-box">
800
+ <b><?php _e( 'Day of Week:', 'backwpup' ); ?></b><br/>
801
+ <?php
802
+ echo '<label for="idcronwday"><input class="checkbox" type="checkbox"' . checked( in_array( "*", $wday, TRUE ), TRUE, FALSE ) . ' name="cronwday[]" id="idcronwday" value="*" /> ' . __( 'Any (*)', 'backwpup' ) . '</label><br />';
803
+ ?>
804
+ <div id="cron-weekday">
805
+ <?php
806
+ echo '<label for="idcronwday-0"><input class="checkbox" type="checkbox"' . checked( in_array( "0", $wday, TRUE ), TRUE, FALSE ) . ' name="cronwday[]" id="idcronwday-0" value="0" /> ' . __( 'Sunday', 'backwpup' ) . '</label><br />';
807
+ echo '<label for="idcronwday-1"><input class="checkbox" type="checkbox"' . checked( in_array( "1", $wday, TRUE ), TRUE, FALSE ) . ' name="cronwday[]" id="idcronwday-1" value="1" /> ' . __( 'Monday', 'backwpup' ) . '</label><br />';
808
+ echo '<label for="idcronwday-2"><input class="checkbox" type="checkbox"' . checked( in_array( "2", $wday, TRUE ), TRUE, FALSE ) . ' name="cronwday[]" id="idcronwday-2" value="2" /> ' . __( 'Tuesday', 'backwpup' ) . '</label><br />';
809
+ echo '<label for="idcronwday-3"><input class="checkbox" type="checkbox"' . checked( in_array( "3", $wday, TRUE ), TRUE, FALSE ) . ' name="cronwday[]" id="idcronwday-3" value="3" /> ' . __( 'Wednesday', 'backwpup' ) . '</label><br />';
810
+ echo '<label for="idcronwday-4"><input class="checkbox" type="checkbox"' . checked( in_array( "4", $wday, TRUE ), TRUE, FALSE ) . ' name="cronwday[]" id="idcronwday-4" value="4" /> ' . __( 'Thursday', 'backwpup' ) . '</label><br />';
811
+ echo '<label for="idcronwday-5"><input class="checkbox" type="checkbox"' . checked( in_array( "5", $wday, TRUE ), TRUE, FALSE ) . ' name="cronwday[]" id="idcronwday-5" value="5" /> ' . __( 'Friday', 'backwpup' ) . '</label><br />';
812
+ echo '<label for="idcronwday-6"><input class="checkbox" type="checkbox"' . checked( in_array( "6", $wday, TRUE ), TRUE, FALSE ) . ' name="cronwday[]" id="idcronwday-6" value="6" /> ' . __( 'Saturday', 'backwpup' ) . '</label><br />';
813
+ ?>
814
+ </div>
815
+ </div>
816
+ <br class="clear"/>
817
+ </td>
818
+ </tr>
819
+ </table>
820
+ <?php
821
+ echo '</div>';
822
+ break;
823
+ default:
824
+ echo '<div class="table" id="info-tab-' . $_GET[ 'tab' ] . '">';
825
+ if ( isset($_GET[ 'tab' ]) && strstr( $_GET[ 'tab' ], 'dest-' ) ) {
826
+ $id = strtoupper( str_replace( 'dest-', '', $_GET[ 'tab' ] ) );
827
+ call_user_func( array( $destinations[ $id ], 'edit_tab' ), $jobid );
828
+ }
829
+ if ( isset($_GET[ 'tab' ]) && strstr( $_GET[ 'tab' ], 'jobtype-' ) ) {
830
+ $id = strtoupper( str_replace( 'jobtype-', '', $_GET[ 'tab' ] ) );
831
+ call_user_func( array( $job_types[ $id ], 'edit_tab' ), $jobid );
832
+ }
833
+ echo '</div>';
834
+ }
835
+ echo '<br />';
836
+ submit_button( __( 'Save changes', 'backwpup' ), 'primary', 'save', FALSE, array( 'tabindex' => '2', 'accesskey' => 'p' ) );
837
+ echo '</form>';
838
+ ?>
839
+ </div>
840
+
841
+ <script type="text/javascript">
842
+ //<![CDATA[
843
+ jQuery(document).ready(function ($) {
844
+ // auto post if things changed
845
+ var changed = false;
846
+ $('input, textarea, select').change(function () {
847
+ changed = true;
848
+ });
849
+ $( '.nav-tab' ).click( function () {
850
+ if ( changed ) {
851
+ $( 'input[name="nexttab"]' ).val( $(this).data( "nexttab" ) );
852
+ $( '#editjob' ).submit();
853
+ return false;
854
+ }
855
+ });
856
+ <?php
857
+ //add inline js
858
+ if ( isset($_GET[ 'tab' ]) && strstr( $_GET[ 'tab' ], 'dest-' ) ) {
859
+ $id = strtoupper( str_replace( 'dest-', '', $_GET[ 'tab' ] ) );
860
+ call_user_func( array( $destinations[ $id ], 'edit_inline_js' ) );
861
+ }
862
+ if ( isset($_GET[ 'tab' ]) && strstr( $_GET[ 'tab' ], 'jobtype-' ) ) {
863
+ $id = strtoupper( str_replace( 'jobtype-', '', $_GET[ 'tab' ] ) );
864
+ call_user_func( array( $job_types[ $id ], 'edit_inline_js' ) );
865
+ }
866
+ ?>
867
+ });
868
+ //]]>
869
+ </script>
870
+ <?php
871
+ }
872
+ }
873
+
inc/class-page-jobs.php ADDED
@@ -0,0 +1,612 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
1
+ <?php
2
+ /**
3
+ * Class For BackWPup Jobs page
4
+ */
5
+ class BackWPup_Page_Jobs extends WP_List_Table {
6
+
7
+ private static $listtable = NULL;
8
+ static $logfile = NULL;
9
+
10
+
11
+ /**
12
+ *
13
+ */
14
+ function __construct() {
15
+ parent::__construct( array(
16
+ 'plural' => 'jobs',
17
+ 'singular' => 'job',
18
+ 'ajax' => TRUE
19
+ ) );
20
+ }
21
+
22
+
23
+ /**
24
+ * @return bool|void
25
+ */
26
+ function ajax_user_can() {
27
+
28
+ return current_user_can( 'backwpup' );
29
+ }
30
+
31
+ /**
32
+ *
33
+ */
34
+ function prepare_items() {
35
+
36
+ $this->items = BackWPup_Option::get_job_ids();
37
+ }
38
+
39
+ /**
40
+ *
41
+ */
42
+ function no_items() {
43
+
44
+ _e( 'No Jobs.', 'backwpup' );
45
+ }
46
+
47
+ /**
48
+ * @return array
49
+ */
50
+ function get_bulk_actions() {
51
+
52
+ if ( ! $this->has_items() )
53
+ return array ();
54
+
55
+ $actions = array();
56
+ $actions[ 'delete' ] = __( 'Delete', 'backwpup' );
57
+
58
+ return apply_filters( 'backwpup_page_jobs_get_bulk_actions', $actions );
59
+ }
60
+
61
+ /**
62
+ * @return array
63
+ */
64
+ function get_columns() {
65
+
66
+ $jobs_columns = array();
67
+ $jobs_columns[ 'cb' ] = '<input type="checkbox" />';
68
+ $jobs_columns[ 'id' ] = __( 'ID', 'backwpup' );
69
+ $jobs_columns[ 'jobname' ] = __( 'Job Name', 'backwpup' );
70
+ $jobs_columns[ 'type' ] = __( 'Type', 'backwpup' );
71
+ $jobs_columns[ 'dest' ] = __( 'Destinations', 'backwpup' );
72
+ $jobs_columns[ 'next' ] = __( 'Next Run', 'backwpup' );
73
+ $jobs_columns[ 'last' ] = __( 'Last Run', 'backwpup' );
74
+
75
+ return $jobs_columns;
76
+ }
77
+
78
+ /**
79
+ *
80
+ */
81
+ function display_rows() {
82
+
83
+ //check for running job
84
+ $job_object = BackWPup_Job::get_working_data();
85
+ $style = '';
86
+ foreach ( $this->items as $jobid ) {
87
+ $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
88
+ echo PHP_EOL . "\t", $this->single_row( $jobid, $job_object, $style );
89
+ }
90
+ }
91
+
92
+ /**
93
+ * @param int $jobid
94
+ * @param $job_object BackWPup_Job
95
+ * @param string $style
96
+ * @return string
97
+ */
98
+ function single_row( $jobid, $job_object, $style = '' ) {
99
+
100
+ $job_types = BackWPup::get_job_types();
101
+ $destinations = BackWPup::get_destinations();
102
+ list( $columns, $hidden, $sortable ) = $this->get_column_info();
103
+ $r = "<tr id=\"jodid-" . $jobid . "\"" . $style . ">";
104
+ foreach ( $columns as $column_name => $column_display_name ) {
105
+ $class = "class=\"$column_name column-$column_name\"";
106
+
107
+ $style = '';
108
+ if ( in_array( $column_name, $hidden ) )
109
+ $style = ' style="display:none;"';
110
+
111
+ $attributes = "$class$style";
112
+
113
+ $job_normal_hide ='';
114
+ if ( is_object( $job_object ) )
115
+ $job_normal_hide = ' style="display:none;"';
116
+
117
+ switch ( $column_name ) {
118
+ case 'cb':
119
+ $r .= '<th scope="row" class="check-column"><input type="checkbox" name="jobs[]" value="' . esc_attr( $jobid ) . '" /></th>';
120
+ break;
121
+ case 'id':
122
+ $r .= "<td $attributes>" . $jobid . "</td>";
123
+ break;
124
+ case 'jobname':
125
+ $r .= "<td $attributes><strong>" . esc_html( BackWPup_Option::get( $jobid, 'name' ) ) . "</strong>";
126
+ $actions = array();
127
+ if ( current_user_can( 'backwpup_jobs_edit' ) ) {
128
+ $actions[ 'edit' ] = "<a href=\"" . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupeditjob&jobid=' . $jobid, 'edit-job' ) . "\">" . __( 'Edit', 'backwpup' ) . "</a>";
129
+ $actions[ 'copy' ] = "<a href=\"" . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupjobs&action=copy&jobid=' . $jobid, 'copy-job_' . $jobid ) . "\">" . __( 'Copy', 'backwpup' ) . "</a>";
130
+ $actions[ 'delete' ] = "<a class=\"submitdelete\" href=\"" . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupjobs&action=delete&jobs[]=' . $jobid, 'bulk-jobs' ) . "\" onclick=\"return showNotice.warn();\">" . __( 'Delete', 'backwpup' ) . "</a>";
131
+ }
132
+ if ( current_user_can( 'backwpup_jobs_start' ) ) {
133
+ $url = BackWPup_Job::get_jobrun_url( 'runnowlink', $jobid );
134
+ $actions[ 'runnow' ] = "<a href=\"" . $url[ 'url' ] . "\">" . __( 'Run now', 'backwpup' ) . "</a>";
135
+ }
136
+ $actions = apply_filters( 'backwpup_page_jobs_actions', $actions, $jobid, FALSE );
137
+ $r .= '<div class="job-normal"' . $job_normal_hide . '>' . $this->row_actions( $actions ) . '</div>';
138
+ if ( is_object( $job_object ) ) {
139
+ $actionsrun = array();
140
+ $actionsrun = apply_filters( 'backwpup_page_jobs_actions', $actionsrun, $jobid, TRUE );
141
+ $r .= '<div class="job-run">' . $this->row_actions( $actionsrun ) . '</div>';
142
+ }
143
+
144
+ $r .= '</td>';
145
+ break;
146
+ case 'type':
147
+ $r .= "<td $attributes>";
148
+ if ( $types = BackWPup_Option::get( $jobid, 'type' ) ) {
149
+ foreach ( $types as $type ) {
150
+ if ( isset( $job_types[ $type ] ) ) {
151
+ $r .= $job_types[ $type ]->info[ 'name' ] . '<br />';
152
+ }
153
+ else {
154
+ $r .= $type . '<br />';
155
+ }
156
+ }
157
+ }
158
+ $r .= "</td>";
159
+ break;
160
+ case 'dest':
161
+ $r .= "<td $attributes>";
162
+ $backup_to = FALSE;
163
+ foreach ( BackWPup_Option::get( $jobid, 'type' ) as $typeid ) {
164
+ if ( isset( $job_types[ $typeid ] ) && $job_types[ $typeid ]->creates_file() ) {
165
+ $backup_to = TRUE;
166
+ break;
167
+ }
168
+ }
169
+ if ( $backup_to ) {
170
+ $job_object_can_run = new stdClass;
171
+ $job_object_can_run->job = BackWPup_Option::get_job( $jobid );
172
+ foreach ( BackWPup_Option::get( $jobid, 'destinations' ) as $destid ) {
173
+ if ( isset( $destinations[ $destid ] ) && $destinations[ $destid ]->can_run( $job_object_can_run ) ) {
174
+ $r .= $destinations[ $destid ]->info[ 'name' ] . '<br />';
175
+ } else {
176
+ $r .= $destid . '<br />';
177
+ }
178
+ }
179
+ }
180
+ else {
181
+ $r .= '<i>' . __( 'Not needed or set', 'backwpup' ) . '</i><br />';
182
+ }
183
+ $r .= "</td>";
184
+ break;
185
+ case 'next':
186
+ $r .= "<td $attributes>";
187
+ if ( is_object( $job_object ) && $job_object->job[ 'jobid' ] == $jobid ) {
188
+ $runtime = current_time( 'timestamp' ) - $job_object->start_time;
189
+ $r .= '<div class="job-run">' . sprintf( __( 'Running for: %s seconds', 'backwpup' ), '<span id="runtime">' . $runtime . '</span>' ) .'</div>';
190
+ }
191
+ if ( is_object( $job_object ) && $job_object->job[ 'jobid' ] == $jobid )
192
+ $r .='<div class="job-normal"' . $job_normal_hide . '>';
193
+ if ( BackWPup_Option::get( $jobid, 'activetype' ) == 'wpcron' ) {
194
+ if ( $nextrun = wp_next_scheduled( 'backwpup_cron', array( 'id' => $jobid ) ) ) {
195
+ $nextrun = $nextrun + get_option( 'gmt_offset' ) * 3600;
196
+ $r .= '<span title="' . sprintf( __( 'Cron: %s','backwpup'),BackWPup_Option::get( $jobid, 'cron' ) ). '">' . sprintf( __( '%1$s at %2$s by WP-Cron', 'backwpup' ) , date_i18n( get_option( 'date_format' ), $nextrun, TRUE ) , date_i18n( get_option( 'time_format' ), $nextrun, TRUE ) ) . '</span>';
197
+ }
198
+ else {
199
+ $r .= __( 'Not scheduled!', 'backwpup' );
200
+ }
201
+ }
202
+ else {
203
+ $r .= __( 'Inactive', 'backwpup' );
204
+ }
205
+ if ( is_object( $job_object ) && $job_object->job[ 'jobid' ] == $jobid )
206
+ $r .= '</div>';
207
+ $r .= "</td>";
208
+ break;
209
+ case 'last':
210
+ $r .= "<td $attributes>";
211
+ if ( BackWPup_Option::get( $jobid, 'lastrun' ) ) {
212
+ $lastrun = BackWPup_Option::get( $jobid, 'lastrun' );
213
+ $r .= sprintf( __( '%1$s at %2$s', 'backwpup' ), date_i18n( get_option( 'date_format' ), $lastrun, TRUE ), date_i18n( get_option( 'time_format' ), $lastrun, TRUE ) );
214
+ if ( BackWPup_Option::get( $jobid, 'lastruntime' ) )
215
+ $r .= '<br />' . sprintf( __( 'Runtime: %d seconds', 'backwpup' ), BackWPup_Option::get( $jobid, 'lastruntime' ) );
216
+ }
217
+ else {
218
+ $r .= __( 'not yet', 'backwpup' );
219
+ }
220
+ $r .= "<br />";
221
+ if ( current_user_can( 'backwpup_backups_download' ) && BackWPup_Option::get( $jobid, 'lastbackupdownloadurl' ) )
222
+ $r .= "<a href=\"" . wp_nonce_url( BackWPup_Option::get( $jobid, 'lastbackupdownloadurl' ), 'download-backup' ) . "\" title=\"" . esc_attr( __( 'Download last backup', 'backwpup' ) ) . "\">" . __( 'Download', 'backwpup' ) . "</a> | ";
223
+ if ( current_user_can( 'backwpup_logs' ) && BackWPup_Option::get( $jobid, 'logfile' ) ) {
224
+ $logfile = basename( BackWPup_Option::get( $jobid, 'logfile' ) );
225
+ if ( is_object( $job_object ) && $job_object->job[ 'jobid'] == $jobid )
226
+ $logfile = basename( $job_object->logfile );
227
+ $r .= '<a class="backwpup-fancybox" data-fancybox-type="iframe" href="' . admin_url( 'admin-ajax.php' ) . '?&action=backwpup_view_log&logfile=' . $logfile .'&_ajax_nonce=' . wp_create_nonce( 'view-logs' ) . '" title="' . esc_attr( $logfile ) . '">' . __( 'Log', 'backwpup' ) . '</a>';
228
+
229
+ }
230
+ $r .= "</td>";
231
+ break;
232
+ }
233
+ }
234
+ $r .= '</tr>';
235
+
236
+ return $r;
237
+ }
238
+
239
+
240
+ /**
241
+ *
242
+ */
243
+ public static function load() {
244
+
245
+ //Create Table
246
+ self::$listtable = new self;
247
+
248
+ switch ( self::$listtable->current_action() ) {
249
+ case 'delete': //Delete Job
250
+ if ( ! current_user_can( 'backwpup_jobs_edit' ) )
251
+ break;
252
+ if ( is_array( $_GET[ 'jobs' ] ) ) {
253
+ check_admin_referer( 'bulk-jobs' );
254
+ foreach ( $_GET[ 'jobs' ] as $jobid ) {
255
+ wp_clear_scheduled_hook( 'backwpup_cron', array( 'id' => $jobid ) );
256
+ BackWPup_Option::delete_job( $jobid );
257
+ }
258
+ }
259
+ break;
260
+ case 'copy': //Copy Job
261
+ if ( ! current_user_can( 'backwpup_jobs_edit' ) )
262
+ break;
263
+ $old_job_id = (int)$_GET[ 'jobid' ];
264
+ check_admin_referer( 'copy-job_' . $_GET[ 'jobid' ] );
265
+ //create new
266
+ $newjobid = BackWPup_Option::get_job_ids();
267
+ sort( $newjobid );
268
+ $newjobid = end( $newjobid ) + 1;
269
+ $old_options = BackWPup_Option::get_job( $old_job_id );
270
+ foreach ( $old_options as $key => $option ) {
271
+ if ( $key == "jobid" )
272
+ $option = $newjobid;
273
+ if ( $key == "name" )
274
+ $option = __( 'Copy of', 'backwpup' ) . ' ' . $option;
275
+ if ( $key == "activetype" )
276
+ $option = '';
277
+ if ( $key == "archivename" )
278
+ $option = str_replace( $_GET[ 'jobid' ], $newjobid, $option );
279
+ if ( $key == "logfile" || $key == "lastbackupdownloadurl" || $key == "lastruntime" ||
280
+ $key == "lastrun" || $key == "cronnextrun" )
281
+ continue;
282
+ BackWPup_Option::update( $newjobid, $key, $option );
283
+ }
284
+ break;
285
+ case 'start_cli': //Get cmd start file
286
+ if ( ! current_user_can( 'backwpup_jobs_start' ) )
287
+ break;
288
+ check_admin_referer( 'start_cli' );
289
+ if ( empty( $_GET[ 'jobid' ] ) )
290
+ break;
291
+ if ( FALSE === strpos( PHP_OS, "WIN" ) ) {
292
+ header( "Pragma: public" );
293
+ header( "Expires: 0" );
294
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
295
+ header( "Content-Type: application/octet-stream" );
296
+ header( "Content-Disposition: attachment; filename=BackWPup_cmd_start_job_" . $_GET[ 'jobid' ] . ".sh;" );
297
+ if ( defined( 'PHP_BINDIR' ) )
298
+ echo "#!/bin/sh" . PHP_EOL;
299
+ echo "@\$1php -c \"" . php_ini_loaded_file() . "\" -r \"define( 'DOING_CRON', TRUE ); require '" . ABSPATH . "wp-load.php'; if( class_exists( 'BackWPup_Job' ) ) BackWPup_Job::start_cli( " . $_GET[ 'jobid' ] . " );\"";
300
+ die();
301
+ }
302
+ else {
303
+ header( "Pragma: public" );
304
+ header( "Expires: 0" );
305
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
306
+ header( "Content-Type: application/octet-stream" );
307
+ header( "Content-Disposition: attachment; filename=BackWPup_cmd_start_job_" . $_GET[ 'jobid' ] . ".cmd;" );
308
+ echo "@%1php.exe -c \"" . php_ini_loaded_file() . "\" -r \"define( 'DOING_CRON', TRUE ); require '" . ABSPATH . "wp-load.php'; if( class_exists( 'BackWPup_Job' ) ) BackWPup_Job::start_cli( " . $_GET[ 'jobid' ] . " );\"";
309
+ die();
310
+ }
311
+ break;
312
+ case 'runnow':
313
+ if ( ! empty( $_GET[ 'jobid' ] ) ) {
314
+ if ( ! current_user_can( 'backwpup_jobs_start' ) )
315
+ wp_die( __( 'Not allowed!', 'backwpup') );
316
+ check_admin_referer( 'backwup_job_run-runnowlink' );
317
+ $last_log = BackWPup_Option::get( $_GET[ 'jobid' ], 'logfile', NULL, FALSE );
318
+ BackWPup_Job::get_jobrun_url( 'runnow', $_GET[ 'jobid' ] );
319
+ BackWPup_Admin::message( sprintf( __( 'Job "%s" started.', 'backwpup' ), esc_attr( BackWPup_Option::get( $_GET[ 'jobid' ], 'name' ) ) ) );
320
+ //sleep as long as jon not started
321
+ $i=0;
322
+ while ( $last_log == BackWPup_Option::get( $_GET[ 'jobid' ], 'logfile', NULL, FALSE ) ) {
323
+ usleep( 250000 ); //wait a half second for net try
324
+ clearstatcache();
325
+ //wait maximal 5 sec.
326
+ if ( $i >= 20 )
327
+ break;
328
+ $i++;
329
+ }
330
+ self::$logfile = BackWPup_Option::get( $_GET[ 'jobid' ], 'logfile', NULL, FALSE );
331
+ }
332
+ break;
333
+ case 'abort': //Abort Job
334
+ if ( ! current_user_can( 'backwpup_jobs_start' ) )
335
+ break;
336
+ check_admin_referer( 'abort-job' );
337
+ $job_object = BackWPup_Job::get_working_data();
338
+ if ( ! $job_object )
339
+ break;
340
+ unlink( BackWPup::get_plugin_data( 'running_file' ) );
341
+ //remove restart cron
342
+ wp_clear_scheduled_hook( 'backwpup_cron', array( 'id' => 'restart' ) );
343
+ //add log entry
344
+ $timestamp = "<span title=\"[Type: " . E_USER_ERROR . "|Line: " . __LINE__ . "|File: " . basename( __FILE__ ) . "|PID: " . $job_object->pid . "]\">[" . date_i18n( 'd-M-Y H:i:s' ) . "]</span> ";
345
+ file_put_contents( $job_object->logfile, $timestamp . "<samp style=\"background-color:red;color:#fff\">" . __( 'ERROR:', 'backwpup' ) . " " . __( 'Aborted by user!', 'backwpup' ) . "</samp>" . PHP_EOL, FILE_APPEND );
346
+ //write new log header
347
+ $job_object->errors ++;
348
+ $fd = fopen( $job_object->logfile, 'r+' );
349
+ $filepos = ftell( $fd );
350
+ while ( ! feof( $fd ) ) {
351
+ $line = fgets( $fd );
352
+ if ( stripos( $line, "<meta name=\"backwpup_errors\"" ) !== FALSE ) {
353
+ fseek( $fd, $filepos );
354
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_errors\" content=\"" . esc_attr( $job_object->errors ) . "\" />", 100 ) . PHP_EOL );
355
+ break;
356
+ }
357
+ $filepos = ftell( $fd );
358
+ }
359
+ fclose( $fd );
360
+ //update job settings
361
+ if ( ! empty( $job_object->job[ 'jobid' ] ) )
362
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastruntime', ( current_time( 'timestamp' ) - $job_object->start_time ) );
363
+ //clean up temp
364
+ if ( ! empty( $job_object->backup_file ) && is_file( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->backup_file ) )
365
+ unlink( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->backup_file );
366
+ if ( ! empty( $job_object->folder_list_file ) && is_file( $job_object->folder_list_file ) )
367
+ unlink( $job_object->folder_list_file );
368
+ if ( ! empty( $job_object->additional_files_to_backup ) ) {
369
+ foreach ( $job_object->additional_files_to_backup as $additional_file ) {
370
+ if ( $additional_file == BackWPup::get_plugin_data( 'TEMP' ) . basename( $additional_file ) && is_file( $additional_file ) )
371
+ unlink( $additional_file );
372
+ }
373
+ }
374
+ BackWPup_Admin::message( __( 'Job will be terminated.', 'backwpup' ) ) ;
375
+ break;
376
+ default:
377
+ do_action( 'backwpup_page_jobs_load', self::$listtable->current_action() );
378
+ break;
379
+ }
380
+
381
+ self::$listtable->prepare_items();
382
+ }
383
+
384
+ /**
385
+ *
386
+ */
387
+ public static function admin_print_styles() {
388
+
389
+ wp_enqueue_style('backwpupgeneral');
390
+
391
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
392
+ wp_enqueue_style( 'backwpuppageworking', BackWPup::get_plugin_data( 'URL' ) . '/css/page_jobs.dev.css', '', time(), 'screen' );
393
+ } else {
394
+ wp_enqueue_style( 'backwpuppageworking', BackWPup::get_plugin_data( 'URL' ) . '/css/page_jobs.css', '', BackWPup::get_plugin_data( 'Version' ), 'screen' );
395
+ }
396
+
397
+ }
398
+
399
+ /**
400
+ *
401
+ */
402
+ public static function admin_print_scripts() {
403
+
404
+ wp_enqueue_script( 'backwpupgeneral' );
405
+ }
406
+
407
+ /**
408
+ *
409
+ */
410
+ public static function page() {
411
+
412
+ echo '<div class="wrap">';
413
+ screen_icon();
414
+ echo '<h2>' . esc_html( sprintf( __( '%s Jobs', 'backwpup' ), BackWPup::get_plugin_data( 'name' ) ) ) . '&nbsp;<a href="' . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupeditjob', 'edit-job' ) . '" class="button add-new-h2">' . esc_html__( 'Add New', 'backwpup' ) . '</a></h2>';
415
+ BackWPup_Admin::display_messages();
416
+ $job_object = BackWPup_Job::get_working_data();
417
+ if ( current_user_can( 'backwpup_jobs_start' ) && is_object( $job_object ) ) {
418
+ echo '<div id="runningjob">';
419
+ //read existing logfile
420
+ $logfiledata = file_get_contents( $job_object->logfile, FALSE, NULL, 0 );
421
+ preg_match( '/<body[^>]*>/si', $logfiledata, $match );
422
+ if ( ! empty( $match[ 0 ] ) )
423
+ $startpos = strpos( $logfiledata, $match[ 0 ] ) + strlen( $match[ 0 ] );
424
+ else
425
+ $startpos = 0;
426
+ $endpos = stripos( $logfiledata, '</body>' );
427
+ if ( empty( $endpos ) )
428
+ $endpos = strlen( $logfiledata );
429
+ $length = strlen( $logfiledata ) - ( strlen( $logfiledata ) - $endpos ) - $startpos;
430
+
431
+ echo '<div id="runniginfos">';
432
+ echo '<h2 id="runningtitle">' . sprintf( __('Job currently working: %s','backwpup'), $job_object->job[ 'name' ] ) . '</h2>';
433
+ echo '<span id="warningsid">' . __( 'Warnings:', 'backwpup' ) . ' <span id="warnings">' . $job_object->warnings . '</span></span>';
434
+ echo '<span id="errorid">' . __( 'Errors:', 'backwpup' ) . ' <span id="errors">' . $job_object->errors . '</span></span>';
435
+ echo '<div class="infobuttons"><a href="#showworking" id="showworkingbutton" class="backwpup-fancybox">' . __( 'Display working log', 'backwpup' ) . '</a>';
436
+ echo '<a href="' . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpupjobs&action=abort', 'abort-job' ) . '" id="abortbutton" class="backwpup-fancybox">' . __( 'Abort', 'backwpup' ) . '</a>';
437
+ echo '<a href="#" id="showworkingclose" title="' . __( 'Close working screen', 'backwpup') .'" style="display:none" >' . __( 'close', 'backwpup' ) . '</a></div>';
438
+ echo '</div>';
439
+ echo '<input type="hidden" name="logpos" id="logpos" value="' . strlen( $logfiledata ) . '">';
440
+
441
+ echo '<div class="progressbar"><div id="progressstep" style="width:' . $job_object->step_percent . '%;">' . $job_object->step_percent . '%</div></div>';
442
+ echo '<div id="onstep"><samp>' . $job_object->steps_data[ $job_object->step_working ][ 'NAME' ] . '</samp></div>';
443
+ echo '<div class="progressbar"><div id="progresssteps" style="width:' . $job_object->substep_percent . '%;">' . $job_object->substep_percent . '%</div></div>';
444
+ echo '<div id="lastmsg">' . $job_object->lastmsg . '</div>';
445
+ echo '<div id="showworking" style="display:none;">';
446
+ echo substr( $logfiledata, $startpos, $length );
447
+ echo '</div>';
448
+ echo '</div>';
449
+ }
450
+ //display jos Table
451
+ echo '<form id="posts-filter" action="" method="get">';
452
+ echo '<input type="hidden" name="page" value="backwpupjobs" />';
453
+ wp_nonce_field( 'backwpup_ajax_nonce', 'backwpupajaxnonce', FALSE );
454
+ self::$listtable->display();
455
+ echo '<div id="ajax-response"></div>';
456
+ echo '</form>';
457
+ echo '</div>';
458
+
459
+ if ( is_object( $job_object ) ) { ?>
460
+ <script type="text/javascript">
461
+ //<![CDATA[
462
+ jQuery(document).ready(function ($) {
463
+ backwpup_show_working = function () {
464
+ $.ajax({
465
+ type: 'GET',
466
+ url: ajaxurl,
467
+ cache: false,
468
+ data:{
469
+ action: 'backwpup_working',
470
+ logfile: '<?php echo basename( $job_object->logfile );?>',
471
+ logpos: $('#logpos').val(),
472
+ _ajax_nonce: '<?php echo wp_create_nonce( 'backwpupworking_ajax_nonce' );?>'
473
+ },
474
+ dataType: 'json',
475
+ success:function (rundata) {
476
+ $('#logpos').val(rundata.logpos);
477
+ if ('' != rundata.logtext) {
478
+ $('#showworking').append(rundata.logtext).scrollTop(rundata.logpos * 14);
479
+ }
480
+ if (0 < rundata.errors) {
481
+ $('#errors').replaceWith('<span id="errors">' + rundata.errors + '</span>');
482
+ }
483
+ if (0 < rundata.warnings) {
484
+ $('#warnings').replaceWith('<span id="warnings">' + rundata.warnings + '</span>');
485
+ }
486
+ if (0 < rundata.step_percent) {
487
+ $('#progressstep').replaceWith('<div id="progressstep">' + rundata.step_percent + '%</div>');
488
+ $('#progressstep').css('width', parseFloat(rundata.step_percent) + '%');
489
+ }
490
+ if (0 < rundata.substep_percent) {
491
+ $('#progresssteps').replaceWith('<div id="progresssteps">' + rundata.substep_percent + '%</div>');
492
+ $('#progresssteps').css('width', parseFloat(rundata.substep_percent) + '%');
493
+ }
494
+ if (0 < rundata.runtime) {
495
+ $('#runtime').replaceWith('<span id="runtime">' + rundata.runtime + '</span>');
496
+ }
497
+ if ( rundata.onstep ) {
498
+ $('#onstep').replaceWith('<div id="onstep"><samp>' + rundata.onstep + '</samp></div>');
499
+ }
500
+ if ( rundata.onstep ) {
501
+ $('#lastmsg').replaceWith('<div id="lastmsg">' + rundata.lastmsg + '</div>');
502
+ }
503
+ if ( rundata.jobdone == 1 ) {
504
+ $("#abortbutton").remove();
505
+ $("#wp-admin-bar-backwpup .blink").removeClass('blink');
506
+ $("#backwpup-adminbar-running").remove();
507
+ $(".job-run").hide();
508
+ $("#message").hide();
509
+ $(".job-normal").show();
510
+ $('#showworkingclose').show();
511
+ } else {
512
+ setTimeout('backwpup_show_working()', 750);
513
+ }
514
+ }
515
+ });
516
+ };
517
+ backwpup_show_working();
518
+ $('#showworkingclose').click( function() {
519
+ $("#runningjob").hide( 'slow' );
520
+ return false;
521
+ });
522
+ });
523
+ //]]>
524
+ </script>
525
+ <?php }
526
+ }
527
+
528
+
529
+ /**
530
+ *
531
+ * Function to generate json data
532
+ *
533
+ */
534
+ public static function ajax_working() {
535
+
536
+ check_ajax_referer( 'backwpupworking_ajax_nonce' );
537
+
538
+ $logfile = BackWPup_Option::get( 'cfg', 'logfolder') . $_GET[ 'logfile' ];
539
+ $logpos = isset( $_GET[ 'logpos' ] ) ? (int)$_GET[ 'logpos' ] : 0;
540
+
541
+ //check if logfile renamed
542
+ if ( is_file( $logfile . '.gz' ) )
543
+ $logfile .= '.gz';
544
+ if ( is_file( $logfile . '.bz2' ) )
545
+ $logfile .= '.bz2';
546
+
547
+ if ( is_file( $logfile ) ) {
548
+ $job_object = BackWPup_Job::get_working_data();
549
+ $done = 0;
550
+ if ( is_object( $job_object ) ) {
551
+ $warnings = $job_object->warnings;
552
+ $errors = $job_object->errors;
553
+ $step_percent = $job_object->step_percent;
554
+ $substep_percent = $job_object->substep_percent;
555
+ $runtime = current_time( 'timestamp' ) - $job_object->start_time;
556
+ $onstep = $job_object->steps_data[ $job_object->step_working ][ 'NAME' ];
557
+ $lastmsg = $job_object->lastmsg;
558
+ }
559
+ else {
560
+ $logheader = BackWPup_Job::read_logheader( $logfile );
561
+ $warnings = $logheader[ 'warnings' ];
562
+ $runtime = $logheader[ 'runtime' ];
563
+ $errors = $logheader[ 'errors' ];
564
+ $step_percent = 100;
565
+ $substep_percent = 100;
566
+ $onstep = __( 'Job end' , 'backwpup' );
567
+ $lastmsg = '<samp>' . sprintf( __( 'Job done in %s seconds.', 'backwpup' ), $logheader[ 'runtime' ] ) . '</samp>';
568
+ }
569
+
570
+ if ( '.gz' == substr( $logfile, -3 ) )
571
+ $logfiledata = file_get_contents( 'compress.zlib://' . $logfile, FALSE, NULL, $logpos );
572
+ elseif ( '.bz2' == substr( $logfile, -4 ) )
573
+ $logfiledata = file_get_contents( 'compress.bzip2://' . $logfile, FALSE, NULL, $logpos );
574
+ else
575
+ $logfiledata = file_get_contents( $logfile, FALSE, NULL, $logpos );
576
+
577
+ preg_match( '/<body[^>]*>/si', $logfiledata, $match );
578
+ if ( ! empty( $match[ 0 ] ) )
579
+ $startpos = strpos( $logfiledata, $match[ 0 ] ) + strlen( $match[ 0 ] );
580
+ else
581
+ $startpos = 0;
582
+
583
+ $endpos = stripos( $logfiledata, '</body>' );
584
+ $stop = '';
585
+ if ( $endpos !== FALSE ) {
586
+ $done = 1;
587
+ $step_percent = 100;
588
+ $substep_percent = 100;
589
+ }
590
+ if ( FALSE === $endpos )
591
+ $endpos = strlen( $logfiledata );
592
+ $length = strlen( $logfiledata ) - ( strlen( $logfiledata ) - $endpos ) - $startpos;
593
+
594
+ @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), TRUE );
595
+ echo json_encode( array(
596
+ 'logpos' => strlen( $logfiledata ) + $logpos,
597
+ 'logtext' => substr( $logfiledata, $startpos, $length ) . $stop,
598
+ 'warnings' => $warnings,
599
+ 'errors' => $errors,
600
+ 'runtime' => $runtime,
601
+ 'step_percent' => $step_percent,
602
+ 'onstep' => $onstep,
603
+ 'lastmsg' => $lastmsg,
604
+ 'substep_percent' => $substep_percent,
605
+ 'jobdone' => $done
606
+ ) );
607
+ }
608
+ die();
609
+ }
610
+
611
+ }
612
+
inc/class-page-logs.php ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for BackWPup logs display page
4
+ */
5
+ class BackWPup_Page_Logs extends WP_List_Table {
6
+
7
+ private static $listtable = NULL;
8
+
9
+ /**
10
+ *
11
+ */
12
+ function __construct() {
13
+
14
+ parent::__construct( array(
15
+ 'plural' => 'logs',
16
+ 'singular' => 'log',
17
+ 'ajax' => TRUE
18
+ ) );
19
+ }
20
+
21
+ /**
22
+ * @return bool
23
+ */
24
+ function ajax_user_can() {
25
+
26
+ return current_user_can( 'backwpup_logs' );
27
+ }
28
+
29
+ /**
30
+ *
31
+ */
32
+ function prepare_items() {
33
+
34
+ $per_page = $this->get_items_per_page( 'backwpuplogs_per_page' );
35
+ if ( empty( $per_page ) || $per_page < 1 )
36
+ $per_page = 20;
37
+
38
+ //load logs
39
+ $logfiles = array();
40
+ if ( $dir = @opendir( BackWPup_Option::get( 'cfg', 'logfolder' ) ) ) {
41
+ while ( ( $file = readdir( $dir ) ) !== FALSE ) {
42
+ if ( is_file( BackWPup_Option::get( 'cfg', 'logfolder' ) . '/' . $file ) && strstr( $file, 'backwpup_log_' ) && ( strstr( $file, '.html' ) || strstr( $file, '.html.gz' ) ) )
43
+ $logfiles[ ] = $file;
44
+ }
45
+ closedir( $dir );
46
+ }
47
+ //ordering
48
+ $order = isset( $_GET[ 'order' ] ) ? $_GET[ 'order' ] : 'desc';
49
+ $orderby = isset( $_GET[ 'orderby' ] ) ? $_GET[ 'orderby' ] : 'log';
50
+ if ( $orderby == 'log' ) {
51
+ if ( $order == 'asc' )
52
+ sort( $logfiles );
53
+ else
54
+ rsort( $logfiles );
55
+ }
56
+ //by page
57
+ $start = intval( ( $this->get_pagenum() - 1 ) * $per_page );
58
+ $end = $start + $per_page;
59
+ if ( $end > count( $logfiles ) )
60
+ $end = count( $logfiles );
61
+
62
+ $this->items = array();
63
+ for ( $i = $start; $i < $end; $i ++ ) {
64
+ $this->items[ ] = $logfiles[ $i ];
65
+ }
66
+
67
+ $this->set_pagination_args( array(
68
+ 'total_items' => count( $logfiles ),
69
+ 'per_page' => $per_page,
70
+ 'orderby' => $orderby,
71
+ 'order' => $order
72
+ ) );
73
+
74
+ }
75
+
76
+ /**
77
+ * @return array
78
+ */
79
+ function get_sortable_columns() {
80
+
81
+ return array(
82
+ 'log' => array( 'log', FALSE ),
83
+ );
84
+ }
85
+
86
+ /**
87
+ *
88
+ */
89
+ function no_items() {
90
+
91
+ _e( 'No Logs.', 'backwpup' );
92
+ }
93
+
94
+ /**
95
+ * @return array
96
+ */
97
+ function get_bulk_actions() {
98
+
99
+ if ( ! $this->has_items() )
100
+ return array ();
101
+
102
+ $actions = array();
103
+ $actions[ 'delete' ] = __( 'Delete', 'backwpup' );
104
+
105
+ return $actions;
106
+ }
107
+
108
+ /**
109
+ * @return array
110
+ */
111
+ function get_columns() {
112
+ $posts_columns = array();
113
+ $posts_columns[ 'cb' ] = '<input type="checkbox" />';
114
+ $posts_columns[ 'id' ] = __( 'Job', 'backwpup' );
115
+ $posts_columns[ 'type' ] = __( 'Type', 'backwpup' );
116
+ $posts_columns[ 'log' ] = __( 'Backup/Log Date/Time', 'backwpup' );
117
+ $posts_columns[ 'status' ] = __( 'Status', 'backwpup' );
118
+ $posts_columns[ 'size' ] = __( 'Size', 'backwpup' );
119
+ $posts_columns[ 'runtime' ] = __( 'Runtime', 'backwpup' );
120
+
121
+ return $posts_columns;
122
+ }
123
+
124
+ /**
125
+ *
126
+ */
127
+ function display_rows() {
128
+
129
+ $style = '';
130
+
131
+ foreach ( $this->items as $logfile ) {
132
+ $style = ( ' class="alternate"' === $style ) ? '' : ' class="alternate"';
133
+ $logdata = BackWPup_Job::read_logheader( BackWPup_Option::get( 'cfg', 'logfolder' ) . $logfile );
134
+ echo PHP_EOL . "\t", $this->single_row( BackWPup_Option::get( 'cfg', 'logfolder' ) . $logfile, $logdata, $style );
135
+ }
136
+ }
137
+
138
+ /**
139
+ * @param $logfile
140
+ * @param $logdata
141
+ * @param string $style
142
+ *
143
+ * @return string
144
+ */
145
+ function single_row( $logfile, $logdata, $style = '' ) {
146
+
147
+ list( $columns, $hidden, $sortable ) = $this->get_column_info();
148
+ $r = "<tr id='" . basename( $logfile ) . "'$style>";
149
+ $job_types = BackWPup::get_job_types();
150
+ foreach ( $columns as $column_name => $column_display_name ) {
151
+ $class = "class=\"$column_name column-$column_name\"";
152
+
153
+ $style = '';
154
+ if ( in_array( $column_name, $hidden ) )
155
+ $style = ' style="display:none;"';
156
+
157
+ $attributes = "$class$style";
158
+
159
+ switch ( $column_name ) {
160
+ case 'cb':
161
+ $r .= '<th scope="row" class="check-column"><input type="checkbox" name="logfiles[]" value="' . esc_attr( basename( $logfile ) ) . '" /></th>';
162
+ break;
163
+ case 'id':
164
+ $r .= "<td $attributes>" . $logdata[ 'jobid' ] . "</td>";
165
+ break;
166
+ case 'type':
167
+ $r .= "<td $attributes>";
168
+ if ( $types = explode( '+', $logdata[ 'type' ] ) ) {
169
+ foreach ( $types as $type ) {
170
+ if ( isset( $job_types[ $type ] ) ) {
171
+ $r .= $job_types[ $type ]->info[ 'name' ] . '<br />';
172
+ }
173
+ else {
174
+ $r .= $type . '<br />';
175
+ }
176
+ }
177
+ }
178
+ $r .= "</td>";
179
+ break;
180
+ case 'log':
181
+ $r .= "<td $attributes><strong><a class=\"backwpup-fancybox\" data-fancybox-type=\"iframe\" href=\"" . admin_url( 'admin-ajax.php' ) . '?&action=backwpup_view_log&logfile=' . basename( $logfile ) .'&_ajax_nonce=' . wp_create_nonce( 'view-logs' ) . "\" title=\"" . basename( $logfile ) . "\">" . sprintf( __( '%1$s at %2$s', 'backwpup' ), date_i18n( get_option( 'date_format' ) , $logdata[ 'logtime' ], TRUE ), date_i18n( get_option( 'time_format' ), $logdata[ 'logtime' ], TRUE ) ) . ": <i>" . $logdata[ 'name' ] . "</i></a></strong>";
182
+ $actions = array();
183
+ $actions[ 'view' ] = '<a class="backwpup-fancybox" data-fancybox-type="iframe" href="' . admin_url( 'admin-ajax.php' ) . '?&action=backwpup_view_log&logfile=' . basename( $logfile ) .'&_ajax_nonce=' . wp_create_nonce( 'view-logs' ) . '" title="' . basename( $logfile ) . '">' . __( 'View', 'backwpup' ) . '</a>';
184
+ if ( current_user_can( 'backwpup_logs_delete' ) )
185
+ $actions[ 'delete' ] = "<a class=\"submitdelete\" href=\"" . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpuplogs&action=delete&paged=' . $this->get_pagenum() . '&logfiles[]=' . basename( $logfile ), 'bulk-logs' ) . "\" onclick=\"return showNotice.warn();\">" . __( 'Delete', 'backwpup' ) . "</a>";
186
+ $actions[ 'download' ] = "<a href=\"" . wp_nonce_url( network_admin_url( 'admin.php' ) . '?page=backwpuplogs&action=download&file=' . $logfile, 'download-backup_' . basename( $logfile ) ) . "\">" . __( 'Download', 'backwpup' ) . "</a>";
187
+ $r .= $this->row_actions( $actions );
188
+ $r .= "</td>";
189
+ break;
190
+ case 'status':
191
+ $r .= "<td $attributes>";
192
+ if ( $logdata[ 'errors' ] > 0 )
193
+ $r .= str_replace( '%d', $logdata[ 'errors' ], '<span style="color:red;font-weight:bold;">' . _n( "1 ERROR", "%d ERRORS", $logdata[ 'errors' ], 'backwpup' ) . '</span><br />' );
194
+ if ( $logdata[ 'warnings' ] > 0 )
195
+ $r .= str_replace( '%d', $logdata[ 'warnings' ], '<span style="color:#e66f00;font-weight:bold;">' . _n( "1 WARNING", "%d WARNINGS", $logdata[ 'warnings' ], 'backwpup' ) . '</span><br />' );
196
+ if ( $logdata[ 'errors' ] == 0 && $logdata[ 'warnings' ] == 0 )
197
+ $r .= '<span style="color:green;font-weight:bold;">' . __( 'O.K.', 'backwpup' ) . '</span>';
198
+ $r .= "</td>";
199
+ break;
200
+ case 'size':
201
+ $r .= "<td $attributes>";
202
+ if ( ! empty( $logdata[ 'backupfilesize' ] ) ) {
203
+ $r .= size_format( $logdata[ 'backupfilesize' ], 2 );
204
+ }
205
+ else {
206
+ $r .= __( 'Log only', 'backwpup' );
207
+ }
208
+ $r .= "</td>";
209
+ break;
210
+ case 'runtime':
211
+ $r .= "<td $attributes>";
212
+ $r .= $logdata[ 'runtime' ] . ' ' . __( 'seconds', 'backwpup' );
213
+ $r .= "</td>";
214
+ break;
215
+ }
216
+ }
217
+ $r .= '</tr>';
218
+
219
+ return $r;
220
+ }
221
+
222
+ /**
223
+ *
224
+ */
225
+ public static function load() {
226
+
227
+ //Create Table
228
+ self::$listtable = new BackWPup_Page_Logs;
229
+
230
+ switch ( self::$listtable->current_action() ) {
231
+ case 'delete':
232
+ if ( ! current_user_can( 'backwpup_logs_delete' ) )
233
+ break;
234
+ if ( is_array( $_GET[ 'logfiles' ] ) ) {
235
+ check_admin_referer( 'bulk-logs' );
236
+ $num = 0;
237
+ foreach ( $_GET[ 'logfiles' ] as $logfile ) {
238
+ if ( is_file( BackWPup_Option::get( 'cfg', 'logfolder' ) . $logfile ) )
239
+ unlink( BackWPup_Option::get( 'cfg', 'logfolder' ) . $logfile );
240
+ $num ++;
241
+ }
242
+ }
243
+ break;
244
+ case 'download': //Download Log
245
+ if ( ! current_user_can( 'backwpup_logs' ) )
246
+ break;
247
+ check_admin_referer( 'download-backup_' . basename( trim( $_GET[ 'file' ] ) ) );
248
+ if ( is_file( trim( $_GET[ 'file' ] ) ) ) {
249
+ header( "Pragma: public" );
250
+ header( "Expires: 0" );
251
+ header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
252
+ header( "Content-Type: application/force-download" );
253
+ header( "Content-Type: application/octet-stream" );
254
+ header( "Content-Type: application/download" );
255
+ header( "Content-Disposition: attachment; filename=" . basename( trim( $_GET[ 'file' ] ) ) . ";" );
256
+ header( "Content-Transfer-Encoding: binary" );
257
+ header( "Content-Length: " . filesize( trim( $_GET[ 'file' ] ) ) );
258
+ @readfile( trim( $_GET[ 'file' ] ) );
259
+ die();
260
+ }
261
+ else {
262
+ header( 'HTTP/1.0 404 Not Found' );
263
+ die();
264
+ }
265
+ break;
266
+ }
267
+
268
+
269
+ //Save per page
270
+ if ( isset( $_POST[ 'screen-options-apply' ] ) && isset( $_POST[ 'wp_screen_options' ][ 'option' ] ) && isset( $_POST[ 'wp_screen_options' ][ 'value' ] ) && $_POST[ 'wp_screen_options' ][ 'option' ] == 'backwpuplogs_per_page' ) {
271
+ check_admin_referer( 'screen-options-nonce', 'screenoptionnonce' );
272
+ global $current_user;
273
+ if ( $_POST[ 'wp_screen_options' ][ 'value' ] > 0 && $_POST[ 'wp_screen_options' ][ 'value' ] < 1000 ) {
274
+ update_user_option( $current_user->ID, 'backwpuplogs_per_page', (int)$_POST[ 'wp_screen_options' ][ 'value' ] );
275
+ wp_redirect( remove_query_arg( array( 'pagenum', 'apage', 'paged' ), wp_get_referer() ) );
276
+ exit;
277
+ }
278
+ }
279
+
280
+ add_screen_option( 'per_page', array(
281
+ 'label' => __( 'Logs', 'backwpup' ),
282
+ 'default' => 20,
283
+ 'option' => 'backwpuplogs_per_page'
284
+ ) );
285
+
286
+ self::$listtable->prepare_items();
287
+ }
288
+
289
+ /**
290
+ *
291
+ * Output css
292
+ *
293
+ * @return void
294
+ */
295
+ public static function admin_print_styles() {
296
+
297
+ wp_enqueue_style('backwpupgeneral');
298
+
299
+ ?>
300
+ <style type="text/css" media="screen">
301
+ .column-id {
302
+ width: 5%;
303
+ text-align: center;
304
+ }
305
+
306
+ .column-runtime, .column-status, .column-size {
307
+ width: 8%;
308
+ }
309
+
310
+ .column-type {
311
+ width: 15%;
312
+ }
313
+ </style>
314
+ <?php
315
+ }
316
+
317
+ /**
318
+ *
319
+ * Output js
320
+ *
321
+ * @return void
322
+ */
323
+ public static function admin_print_scripts() {
324
+
325
+ wp_enqueue_script( 'backwpupgeneral' );
326
+ }
327
+
328
+ /**
329
+ * Display the page content
330
+ */
331
+ public static function page() {
332
+
333
+ ?>
334
+ <div class="wrap">
335
+ <?php screen_icon(); ?>
336
+ <h2><?php echo esc_html( sprintf( __( '%s Logs', 'backwpup' ), BackWPup::get_plugin_data( 'name' ) ) ); ?></h2>
337
+ <?php BackWPup_Admin::display_messages(); ?>
338
+ <form id="posts-filter" action="" method="get">
339
+ <input type="hidden" name="page" value="backwpuplogs" />
340
+ <?php self::$listtable->display(); ?>
341
+ <div id="ajax-response"></div>
342
+ </form>
343
+ </div>
344
+ <?php
345
+ }
346
+
347
+ /**
348
+ * For displaying log files with ajax
349
+ */
350
+ public static function ajax_view_log() {
351
+
352
+ if ( ! current_user_can( 'backwpup_logs' ) )
353
+ die( -1 );
354
+ check_ajax_referer( 'view-logs' );
355
+ $log_file = BackWPup_Option::get( 'cfg', 'logfolder' ) . $_GET[ 'logfile' ];
356
+ if ( ! is_file( $log_file ) && ! is_file( $log_file . '.gz' ) && ! is_file( $log_file . '.bz2' ) )
357
+ die( -1 );
358
+ //change file end if not html helps if log file compression is on
359
+ if ( ! is_file( $log_file ) && is_file( $log_file . '.gz' ) )
360
+ $log_file = $log_file . '.gz';
361
+ if ( ! is_file( $log_file ) && is_file( $log_file . '.bz2' ) )
362
+ $log_file = $log_file . '.bz2';
363
+ //output file
364
+ if ( '.gz' == substr( $log_file, -3 ) )
365
+ echo file_get_contents( 'compress.zlib://' .$log_file, FALSE );
366
+ elseif ( '.bz2' == substr( $log_file, -4 ) )
367
+ echo file_get_contents( 'compress.bzip2://' . $log_file, FALSE );
368
+ else
369
+ echo file_get_contents( $log_file, FALSE );
370
+ die();
371
+ }
372
+
373
+ }
374
+
inc/class-page-settings.php ADDED
@@ -0,0 +1,420 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for BackWPup settings page
4
+ */
5
+ class BackWPup_Page_Settings {
6
+
7
+
8
+ /**
9
+ *
10
+ * Output css
11
+ *
12
+ * @return void
13
+ */
14
+ public static function admin_print_styles() {
15
+
16
+ wp_enqueue_style('backwpupgeneral');
17
+
18
+ }
19
+
20
+ /**
21
+ *
22
+ * Output js
23
+ *
24
+ * @return void
25
+ */
26
+ public static function admin_print_scripts() {
27
+
28
+ wp_enqueue_script( 'backwpupgeneral' );
29
+
30
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
31
+ wp_enqueue_script( 'backwpuppagesettings', BackWPup::get_plugin_data( 'URL' ) . '/js/page_settings.dev.js', array( 'jquery' ), time(), TRUE );
32
+ } else {
33
+ wp_enqueue_script( 'backwpuppagesettings', BackWPup::get_plugin_data( 'URL' ) . '/js/page_settings.js', array( 'jquery' ), BackWPup::get_plugin_data( 'Version' ), TRUE );
34
+ }
35
+ }
36
+
37
+
38
+ /**
39
+ * Save settings form data
40
+ */
41
+ public static function save_post_form( $tab, $jobid ) {
42
+
43
+ if ( ! current_user_can( 'backwpup_settings' ) )
44
+ return;
45
+
46
+ //set default options if button clicked
47
+ if ( isset( $_POST[ 'default_settings' ] ) && $_POST[ 'default_settings' ] ) {
48
+ $default_cfg = BackWPup_Option::defaults( 'cfg', null );
49
+ foreach( $default_cfg as $optionkey => $option ) {
50
+ if ( $option == FALSE && isset( $_POST[ $optionkey ] ) )
51
+ unset( $_POST[ $optionkey ] );
52
+ else
53
+ $_POST[ $optionkey ] = $option;
54
+ }
55
+ BackWPup_Admin::message( __( 'Settings reset to default', 'backwpup' ) );
56
+ }
57
+
58
+ BackWPup_Option::update( 'cfg', 'showadminbar', isset( $_POST[ 'showadminbar' ] ) ? TRUE : FALSE );
59
+ BackWPup_Option::update( 'cfg', 'jobsteprestart', isset( $_POST[ 'jobsteprestart' ] ) ? TRUE : FALSE );
60
+ if ( 100 > $_POST[ 'jobstepretry' ] && 0 < $_POST[ 'jobstepretry' ] )
61
+ $_POST[ 'jobstepretry' ] = (int)$_POST[ 'jobstepretry' ];
62
+ if ( empty( $_POST[ 'jobstepretry' ] ) or ! is_int( $_POST[ 'jobstepretry' ] ) )
63
+ $_POST[ 'jobstepretry' ] = 3;
64
+ BackWPup_Option::update( 'cfg', 'jobstepretry', $_POST[ 'jobstepretry' ] );
65
+ BackWPup_Option::update( 'cfg', 'jobnotranslate', isset( $_POST[ 'jobnotranslate' ] ) ? TRUE : FALSE );
66
+ BackWPup_Option::update( 'cfg', 'jobwaittimems', $_POST[ 'jobwaittimems' ] );
67
+ BackWPup_Option::update( 'cfg', 'maxlogs', abs( (int)$_POST[ 'maxlogs' ] ) );
68
+ BackWPup_Option::update( 'cfg', 'gzlogs', isset( $_POST[ 'gzlogs' ] ) ? TRUE : FALSE );
69
+ BackWPup_Option::update( 'cfg', 'protectfolders', isset( $_POST[ 'protectfolders' ] ) ? TRUE : FALSE );
70
+ BackWPup_Option::update( 'cfg', 'httpauthuser', $_POST[ 'httpauthuser' ] );
71
+ BackWPup_Option::update( 'cfg', 'httpauthpassword', BackWPup_Encryption::encrypt( $_POST[ 'httpauthpassword' ] ) );
72
+ $_POST[ 'jobrunauthkey' ] = preg_replace( '/[^a-zA-Z0-9]/', '', trim( $_POST[ 'jobrunauthkey' ] ) );
73
+ BackWPup_Option::update( 'cfg', 'jobrunauthkey', $_POST[ 'jobrunauthkey' ] );
74
+ $_POST[ 'logfolder' ] = trailingslashit( str_replace( '\\', '/', trim( stripslashes( $_POST[ 'logfolder' ] ) ) ) );
75
+ if ( $_POST[ 'logfolder' ][ 0 ] == '.' || ( $_POST[ 'logfolder' ][ 0 ] != '/' && ! preg_match( '#^[a-zA-Z]:/#', $_POST[ 'logfolder' ] ) ) )
76
+ $_POST[ 'logfolder' ] = trailingslashit( str_replace( '\\', '/', ABSPATH ) ) . $_POST[ 'logfolder' ];
77
+ //set def. folders
78
+ if ( ! isset( $_POST[ 'logfolder' ] ) or $_POST[ 'logfolder' ] == '/' or empty( $_POST[ 'logfolder' ] ) ) {
79
+ $rand = substr( md5( md5( SECURE_AUTH_KEY ) ), - 5 );
80
+ $_POST[ 'logfolder' ] = str_replace( '\\', '/', trailingslashit( WP_CONTENT_DIR ) ) . 'backwpup-' . $rand . '/logs/';
81
+ }
82
+ BackWPup_Option::update( 'cfg', 'logfolder', $_POST[ 'logfolder' ] );
83
+
84
+ do_action( 'backwpup_page_settings_save' );
85
+
86
+ BackWPup_Admin::message( __( 'Settings saved', 'backwpup' ) );
87
+ }
88
+
89
+ /**
90
+ * Page Output
91
+ */
92
+ public static function page() {
93
+ global $wpdb;
94
+
95
+ ?>
96
+ <div class="wrap">
97
+ <?php
98
+ screen_icon(); ?><h2><?php echo sprintf( __( '%s Settings', 'backwpup' ), BackWPup::get_plugin_data( 'name' ) ); ?></h2>
99
+ <?php
100
+ $tabs = array( 'general' => __( 'General', 'backwpup' ), 'job' => __( 'Jobs', 'backwpup' ), 'log' => __( 'Logs', 'backwpup' ), 'net' => __( 'Network', 'backwpup' ), 'apikey' => __( 'API Keys', 'backwpup' ), 'information' => __( 'Informations', 'backwpup' ) );
101
+ $tabs = apply_filters( 'backwpup_page_settings_tab', $tabs );
102
+ echo '<h2 class="nav-tab-wrapper">';
103
+ foreach ( $tabs as $id => $name ) {
104
+ echo '<a href="#backwpup-tab-' . $id . '" class="nav-tab">' . $name . '</a>';
105
+ }
106
+ echo '</h2>';
107
+ BackWPup_Admin::display_messages();
108
+ ?>
109
+
110
+ <form id="settingsform" action="<?php echo admin_url( 'admin-post.php?action=backwpup' ); ?>" method="post">
111
+ <?php wp_nonce_field( 'backwpupsettings_page' ); ?>
112
+ <input type="hidden" name="page" value="backwpupsettings" />
113
+ <input type="hidden" name="anchor" value="#backwpup-tab-general" />
114
+
115
+ <div class="table ui-tabs-hide" id="backwpup-tab-general">
116
+
117
+ <h3 class="title"><?php _e( 'Admin bar', 'backwpup' ); ?></h3>
118
+ <p><?php _e( 'Do you want to see BackWPup in the WordPress admin bar?', 'backwpup' ); ?></p>
119
+ <table class="form-table">
120
+ <tr valign="top">
121
+ <th scope="row"><?php _e( 'Admin bar', 'backwpup' ); ?></th>
122
+ <td>
123
+ <fieldset>
124
+ <legend class="screen-reader-text"><span><?php _e( 'Admin Bar', 'backwpup' ); ?></span>
125
+ </legend>
126
+ <label for="showadminbar">
127
+ <input name="showadminbar" type="checkbox" id="showadminbar"
128
+ value="1" <?php checked( BackWPup_Option::get( 'cfg', 'showadminbar' ), TRUE ); ?> />
129
+ <?php _e( 'Show BackWPup links in admin bar.', 'backwpup' ); ?></label>
130
+ </fieldset>
131
+ </td>
132
+ </tr>
133
+ </table>
134
+ <h3 class="title"><?php _e( 'Security', 'backwpup' ); ?></h3>
135
+ <p><?php _e( 'Security option for BackWPup', 'backwpup' ); ?></p>
136
+ <table class="form-table">
137
+ <tr valign="top">
138
+ <th scope="row"><?php _e( 'Protect folders', 'backwpup' ); ?></th>
139
+ <td>
140
+ <fieldset>
141
+ <legend class="screen-reader-text"><span><?php _e( 'Protect folders', 'backwpup' ); ?></span>
142
+ </legend>
143
+ <label for="protectfolders">
144
+ <input name="protectfolders" type="checkbox" id="protectfolders"
145
+ value="1" <?php checked( BackWPup_Option::get( 'cfg', 'protectfolders' ), TRUE ); ?> />
146
+ <?php _e( 'Protect BackWPup folders ( Temp, Log and Backups ) with <code>.htaccess</code> and <code>index.php</code>', 'backwpup' ); ?>
147
+ </label>
148
+ </fieldset>
149
+ </td>
150
+ </tr>
151
+ </table>
152
+
153
+ <?php do_action('backwpup_page_settings_tab_generel'); ?>
154
+
155
+ </div>
156
+
157
+ <div class="table ui-tabs-hide" id="backwpup-tab-log">
158
+
159
+ <p><?php _e( 'Here you can set log file options.', 'backwpup' ); ?></p>
160
+ <table class="form-table">
161
+ <tr valign="top">
162
+ <th scope="row"><label for="logfolder"><?php _e( 'Log file folder', 'backwpup' ); ?></label></th>
163
+ <td>
164
+ <input name="logfolder" type="text" id="logfolder"
165
+ value="<?php echo BackWPup_Option::get( 'cfg', 'logfolder' );?>"
166
+ class="regular-text code"/>
167
+ </td>
168
+ </tr>
169
+ <tr valign="top">
170
+ <th scope="row"><label for="maxlogs"><?php _e( 'Maximum number of log files in folder', 'backwpup' ); ?></label>
171
+ </th>
172
+ <td>
173
+ <input name="maxlogs" type="text" id="maxlogs"
174
+ value="<?php echo BackWPup_Option::get( 'cfg', 'maxlogs' );?>" class="small-text code"/>
175
+ <?php BackWPup_Help::tip( __( 'Oldest files will be deleted first.', 'backwpup' ) ); ?>
176
+ </td>
177
+ </tr>
178
+ <tr valign="top">
179
+ <th scope="row"><?php _e( 'Compression', 'backwpup' ); ?></th>
180
+ <td>
181
+ <fieldset>
182
+ <legend class="screen-reader-text"><span><?php _e( 'Compression', 'backwpup' ); ?></span>
183
+ </legend>
184
+ <label for="gzlogs">
185
+ <input name="gzlogs" type="checkbox" id="gzlogs"
186
+ value="1" <?php checked( BackWPup_Option::get( 'cfg', 'gzlogs' ), TRUE ); ?><?php if ( ! function_exists( 'gzopen' ) ) echo " disabled=\"disabled\""; ?> />
187
+ <?php _e( 'Compress log files with GZip.', 'backwpup' ); ?></label>
188
+ </fieldset>
189
+ </td>
190
+ </tr>
191
+ </table>
192
+
193
+ </div>
194
+ <div class="table ui-tabs-hide" id="backwpup-tab-job">
195
+
196
+ <p><?php _e( 'Here you can set job options.', 'backwpup' ); ?></p>
197
+ <table class="form-table">
198
+ <tr valign="top">
199
+ <th scope="row">
200
+ <label for="jobstepretry"><?php _e( "Maximum number of retries for job steps", 'backwpup' ); ?></label></th>
201
+ <td>
202
+ <input name="jobstepretry" type="text" id="jobstepretry"
203
+ value="<?php echo BackWPup_Option::get( 'cfg', 'jobstepretry' );?>"
204
+ class="small-text code" />
205
+ </td>
206
+ </tr>
207
+ <tr valign="top">
208
+ <th scope="row"><?php _e( 'Restart on every main step', 'backwpup' ); ?></th>
209
+ <td>
210
+ <fieldset>
211
+ <legend class="screen-reader-text"><span><?php _e( 'Restart on every main step', 'backwpup' ); ?></span>
212
+ </legend>
213
+ <label for="jobsteprestart">
214
+ <input name="jobsteprestart" type="checkbox" id="jobsteprestart"
215
+ value="1" <?php checked( BackWPup_Option::get( 'cfg', 'jobsteprestart' ), TRUE ); ?><?php if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) echo " disabled=\"disabled\""; ?> />
216
+ <?php _e( 'Restart the job on every main step on a working job', 'backwpup' ); ?>
217
+ <?php BackWPup_Help::tip( __( 'The job will be restated on every main step to prevent running in an execution time out. This will not work on cmd run or if <code>ALTERNATE_WP_CRON</code> has been defined.', 'backwpup' ) ); ?>
218
+ </label>
219
+ </fieldset>
220
+ </td>
221
+ </tr>
222
+ <tr valign="top">
223
+ <th scope="row">
224
+ <label for="jobrunauthkey"><?php _e( 'Key to start jobs externally with an URL', 'backwpup' ); ?></label>
225
+ </th>
226
+ <td>
227
+ <input name="jobrunauthkey" type="text" id="jobrunauthkey"
228
+ value="<?php echo BackWPup_Option::get( 'cfg', 'jobrunauthkey' );?>" class="text code"/>
229
+ <?php BackWPup_Help::tip( __( 'empty = deactivated. Will be used to protect job starts from unauthorized persons.', 'backwpup' ) ); ?>
230
+ </td>
231
+ </tr>
232
+ <tr valign="top">
233
+ <th scope="row"><?php _e( 'No Translation', 'backwpup' ); ?></th>
234
+ <td>
235
+ <fieldset>
236
+ <legend class="screen-reader-text"><span><?php _e( 'No Translation', 'backwpup' ); ?></span>
237
+ </legend>
238
+ <label for="jobnotranslate">
239
+ <input name="jobnotranslate" type="checkbox" id="jobnotranslate"
240
+ value="1" <?php checked( BackWPup_Option::get( 'cfg', 'jobnotranslate' ), TRUE ); ?> />
241
+ <?php _e( 'No translation for the job, the log will be written in English', 'backwpup' ); ?>
242
+ </label>
243
+ </fieldset>
244
+ </td>
245
+ </tr>
246
+ <tr valign="top">
247
+ <th scope="row"><?php _e( 'Reduce server load', 'backwpup' ); ?></th>
248
+ <td>
249
+ <fieldset>
250
+ <legend class="screen-reader-text"><span><?php _e( 'Reduce server load', 'backwpup' ); ?></span>
251
+ </legend>
252
+ <label for="jobwaittimems">
253
+ <select name="jobwaittimems" size="1">
254
+ <option value="0" <?php selected( BackWPup_Option::get( 'cfg', 'jobwaittimems' ), 0 ); ?>><?php _e( 'disabled', 'backwpup' ); ?></option>
255
+ <option value="10000" <?php selected( BackWPup_Option::get( 'cfg', 'jobwaittimems' ), 10000 ); ?>><?php _e( 'minimum', 'backwpup' ); ?></option>
256
+ <option value="30000" <?php selected( BackWPup_Option::get( 'cfg', 'jobwaittimems' ), 30000 ); ?>><?php _e( 'medium', 'backwpup' ); ?></option>
257
+ <option value="90000" <?php selected( BackWPup_Option::get( 'cfg', 'jobwaittimems' ), 90000 ); ?>><?php _e( 'maximum', 'backwpup' ); ?></option>
258
+ </select>
259
+ </label>
260
+ <?php BackWPup_Help::tip( __( 'This adds short pauses to the process. Should be used to reduce the CPU load. Disabled = off, minimum = shortest sleep, maximum = longest sleep', 'backwpup' ) ); ?>
261
+ </fieldset>
262
+ </td>
263
+ </tr>
264
+ </table>
265
+
266
+ </div>
267
+
268
+ <div class="table ui-tabs-hide" id="backwpup-tab-net">
269
+
270
+ <h3 class="title"><?php _e( 'Authentication', 'backwpup' ); ?></h3>
271
+ <p><?php _e( 'Is your blog protected with HTTP basic authentication (.htaccess)? Then you must set the username and password for authentication to get jobs working.', 'backwpup' ); ?></p>
272
+ <table class="form-table">
273
+ <tr valign="top">
274
+ <th scope="row"><label for="httpauthuser"><?php _e( 'Username:', 'backwpup' ); ?></label></th>
275
+ <td>
276
+ <input name="httpauthuser" type="text" id="httpauthuser"
277
+ value="<?php echo BackWPup_Option::get( 'cfg', 'httpauthuser' );?>"
278
+ class="regular-text" autocomplete="off" />
279
+ </td>
280
+ </tr>
281
+ <tr valign="top">
282
+ <th scope="row"><label for="httpauthpassword"><?php _e( 'Password:', 'backwpup' ); ?></label></th>
283
+ <td>
284
+ <input name="httpauthpassword" type="password" id="httpauthpassword"
285
+ value="<?php echo BackWPup_Encryption::decrypt( BackWPup_Option::get( 'cfg', 'httpauthpassword' ) );?>"
286
+ class="regular-text" autocomplete="off" />
287
+ </tr>
288
+ </table>
289
+
290
+ </div>
291
+
292
+ <div class="table ui-tabs-hide" id="backwpup-tab-apikey">
293
+
294
+ <?php do_action( 'backwpup_page_settings_tab_apikey' ); ?>
295
+
296
+ </div>
297
+
298
+ <div class="table ui-tabs-hide" id="backwpup-tab-information">
299
+ <br />
300
+ <?php
301
+ echo '<table class="wp-list-table widefat fixed" cellspacing="0" style="width: 85%;margin-left:auto;;margin-right:auto;">';
302
+ echo '<thead><tr><th width="35%">' . __( 'Setting', 'backwpup' ) . '</th><th>' . __( 'Value', 'backwpup' ) . '</th></tr></thead>';
303
+ echo '<tfoot><tr><th>' . __( 'Setting', 'backwpup' ) . '</th><th>' . __( 'Value', 'backwpup' ) . '</th></tr></tfoot>';
304
+ echo '<tr title="&gt;=3.2"><td>' . __( 'WordPress version', 'backwpup' ) . '</td><td>' . BackWPup::get_plugin_data( 'wp_version' ) . '</td></tr>';
305
+ if ( ! class_exists( 'BackWPup_Features', FALSE ) )
306
+ echo '<tr title=""><td>' . __( 'BackWPup version', 'backwpup' ) . '</td><td>' . BackWPup::get_plugin_data( 'Version' ) . ' <a href="' . translate( BackWPup::get_plugin_data( 'pluginuri' ), 'backwpup' ) . '">' . __( 'Get pro.', 'backwpup' ) . '</a></td></tr>';
307
+ else
308
+ echo '<tr title=""><td>' . __( 'BackWPup Pro version', 'backwpup' ) . '</td><td>' . BackWPup::get_plugin_data( 'Version' ) . '</td></tr>';
309
+ echo '<tr title="&gt;=5.3.3"><td>' . __( 'PHP version', 'backwpup' ) . '</td><td>' . phpversion() . '</td></tr>';
310
+ echo '<tr title="&gt;=5.0.7"><td>' . __( 'MySQL version', 'backwpup' ) . '</td><td>' . $wpdb->get_var( "SELECT VERSION() AS version" ) . '</td></tr>';
311
+ if ( function_exists( 'curl_version' ) ) {
312
+ $curlversion = curl_version();
313
+ echo '<tr title=""><td>' . __( 'cURL version', 'backwpup' ) . '</td><td>' . $curlversion[ 'version' ] . '</td></tr>';
314
+ echo '<tr title=""><td>' . __( 'cURL SSL version', 'backwpup' ) . '</td><td>' . $curlversion[ 'ssl_version' ] . '</td></tr>';
315
+ }
316
+ else {
317
+ echo '<tr title=""><td>' . __( 'cURL version', 'backwpup' ) . '</td><td>' . __( 'unavailable', 'backwpup' ) . '</td></tr>';
318
+ }
319
+ //response test
320
+ $raw_response = wp_remote_get( add_query_arg( array( 'backwpup_run' => 'test', '_nonce' => substr( wp_hash( wp_nonce_tick() . 'backwup_job_run-test', 'nonce' ), - 12, 10 ) ), home_url( '/' ) ), array(
321
+ 'blocking' => TRUE,
322
+ 'sslverify' => apply_filters( 'https_local_ssl_verify', TRUE ),
323
+ 'headers' => array( 'Authorization' => 'Basic ' . base64_encode( BackWPup_Option::get( 'cfg', 'httpauthuser' ) . ':' . BackWPup_Encryption::decrypt( BackWPup_Option::get( 'cfg', 'httpauthpassword' ) ) ) ),
324
+ 'user-agent' => 'BackWPup/' . BackWPup::get_plugin_data( 'Version' ) ) );
325
+ echo '<tr><td>' . __( 'Server self connect:', 'backwpup' ) . '</td><td>';
326
+ $test_result = '';
327
+ if ( is_wp_error( $raw_response ) )
328
+ $test_result .= sprintf( __( 'The HTTP response test get a error "%s"','backwpup' ), $raw_response->get_error_message() );
329
+ if ( 200 != wp_remote_retrieve_response_code( $raw_response ) )
330
+ $test_result .= sprintf( __( 'The HTTP response test get a false http status (%s)','backwpup' ), wp_remote_retrieve_response_code( $raw_response ) );
331
+ if ( trim( wp_remote_retrieve_body( $raw_response ) ) != 'Response Test O.K.' )
332
+ $test_result .= sprintf( __( 'The HTTP response gives back the false body "%s"','backwpup' ), strip_tags( wp_remote_retrieve_body( $raw_response ) ) );
333
+
334
+ if ( empty( $test_result ) )
335
+ _e( 'Response Test O.K.', 'backwpup' );
336
+ else
337
+ echo $test_result;
338
+ echo '</td></tr>';
339
+ //folder test
340
+ BackWPup_Job::check_folder( BackWPup::get_plugin_data( 'TEMP' ) );
341
+ echo '<tr><td>' . __( 'Temp folder:', 'backwpup' ) . '</td><td>';
342
+ if ( ! is_dir( BackWPup::get_plugin_data( 'TEMP' ) ) )
343
+ echo sprintf( __( 'Temp folder %s not exist and can\'t created.','backwpup' ), BackWPup::get_plugin_data( 'TEMP' ) );
344
+ elseif ( ! is_writable( BackWPup::get_plugin_data( 'TEMP' ) ) )
345
+ echo sprintf( __( 'Temp folder %s not writable.','backwpup' ), BackWPup::get_plugin_data( 'TEMP' ) );
346
+ else
347
+ echo BackWPup::get_plugin_data( 'TEMP' );
348
+ echo '</td></tr>';
349
+
350
+ BackWPup_Job::check_folder( BackWPup_Option::get( 'cfg', 'logfolder' ) );
351
+ echo '<tr><td>' . __( 'Logs folder:', 'backwpup' ) . '</td><td>';
352
+ if ( ! is_dir( BackWPup_Option::get( 'cfg', 'logfolder' ) ) )
353
+ echo sprintf( __( 'Logs folder %s not exist and can\'t created.','backwpup' ), BackWPup_Option::get( 'cfg', 'logfolder' ) );
354
+ elseif ( ! is_writable( BackWPup_Option::get( 'cfg', 'logfolder' ) ) )
355
+ echo sprintf( __( 'Logs folder %s not writable.','backwpup' ), BackWPup_Option::get( 'cfg', 'logfolder' ) );
356
+ else
357
+ echo BackWPup_Option::get( 'cfg', 'logfolder' );
358
+ echo '</td></tr>';
359
+ echo '<tr title=""><td>' . __( 'Server', 'backwpup' ) . '</td><td>' . $_SERVER[ 'SERVER_SOFTWARE' ] . '</td></tr>';
360
+ echo '<tr title=""><td>' . __( 'Operating System', 'backwpup' ) . '</td><td>' . PHP_OS . '</td></tr>';
361
+ echo '<tr title=""><td>' . __( 'PHP SAPI', 'backwpup' ) . '</td><td>' . PHP_SAPI . '</td></tr>';
362
+ echo '<tr title=""><td>' . __( 'Current PHP user', 'backwpup' ) . '</td><td>' . get_current_user() . '</td></tr>';
363
+ $text = (bool)ini_get( 'safe_mode' ) ? __( 'On', 'backwpup' ) : __( 'Off', 'backwpup' );
364
+ echo '<tr title=""><td>' . __( 'Safe Mode', 'backwpup' ) . '</td><td>' . $text . '</td></tr>';
365
+ echo '<tr title="&gt;=30"><td>' . __( 'Maximum execution time', 'backwpup' ) . '</td><td>' . ini_get( 'max_execution_time' ) . ' ' . __( 'seconds', 'backwpup' ) . '</td></tr>';
366
+ if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON )
367
+ echo '<tr title="ALTERNATE_WP_CRON"><td>' . __( 'Alternative WP Cron', 'backwpup' ) . '</td><td>' . __( 'On', 'backwpup' ) . '</td></tr>';
368
+ else
369
+ echo '<tr title="ALTERNATE_WP_CRON"><td>' . __( 'Alternative WP Cron', 'backwpup' ) . '</td><td>' . __( 'Off', 'backwpup' ) . '</td></tr>';
370
+ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON )
371
+ echo '<tr title="DISABLE_WP_CRON"><td>' . __( 'Disabled WP Cron', 'backwpup' ) . '</td><td>' . __( 'On', 'backwpup' ) . '</td></tr>';
372
+ else
373
+ echo '<tr title="DISABLE_WP_CRON"><td>' . __( 'Disabled WP Cron', 'backwpup' ) . '</td><td>' . __( 'Off', 'backwpup' ) . '</td></tr>';
374
+ if ( defined( 'FS_CHMOD_DIR' ) )
375
+ echo '<tr title="FS_CHMOD_DIR"><td>' . __( 'CHMOD Dir', 'backwpup' ) . '</td><td>' . FS_CHMOD_DIR . '</td></tr>';
376
+ else
377
+ echo '<tr title="FS_CHMOD_DIR"><td>' . __( 'CHMOD Dir', 'backwpup' ) . '</td><td>0755</td></tr>';
378
+ $now = localtime( time(), TRUE );
379
+ echo '<tr title=""><td>' . __( 'Server Time', 'backwpup' ) . '</td><td>' . $now[ 'tm_hour' ] . ':' . $now[ 'tm_min' ] . '</td></tr>';
380
+ echo '<tr title=""><td>' . __( 'Blog Time', 'backwpup' ) . '</td><td>' . date_i18n( 'H:i' ) . '</td></tr>';
381
+ echo '<tr title=""><td>' . __( 'Blog Timezone', 'backwpup' ) . '</td><td>' . get_option( 'timezone_string' ) . '</td></tr>';
382
+ echo '<tr title=""><td>' . __( 'Blog Time offset', 'backwpup' ) . '</td><td>' . sprintf( __( '%s hours', 'backwpup' ), get_option( 'gmt_offset' ) ) . '</td></tr>';
383
+ echo '<tr title="WPLANG"><td>' . __( 'Blog language', 'backwpup' ) . '</td><td>' . get_bloginfo( 'language' ) . '</td></tr>';
384
+ echo '<tr title="utf8"><td>' . __( 'MySQL Client encoding', 'backwpup' ) . '</td><td>' . $wpdb->charset . '</td></tr>';
385
+ echo '<tr title="URF-8"><td>' . __( 'Blog charset', 'backwpup' ) . '</td><td>' . get_bloginfo( 'charset' ) . '</td></tr>';
386
+ echo '<tr title="&gt;=128M"><td>' . __( 'PHP Memory limit', 'backwpup' ) . '</td><td>' . ini_get( 'memory_limit' ) . '</td></tr>';
387
+ echo '<tr title="WP_MEMORY_LIMIT"><td>' . __( 'WP memory limit', 'backwpup' ) . '</td><td>' . WP_MEMORY_LIMIT . '</td></tr>';
388
+ echo '<tr title="WP_MAX_MEMORY_LIMIT"><td>' . __( 'WP Maximum memory limit', 'backwpup' ) . '</td><td>' . WP_MAX_MEMORY_LIMIT . '</td></tr>';
389
+ echo '<tr title=""><td>' . __( 'Memory in use', 'backwpup' ) . '</td><td>' . size_format( @memory_get_usage( TRUE ), 2 ) . '</td></tr>';
390
+ //disabled PHP functions
391
+ $disabled = ini_get( 'disable_functions' );
392
+ if ( ! empty( $disabled ) ) {
393
+ $disabledarry = explode( ',', $disabled );
394
+ echo '<tr title=""><td>' . __( 'Disabled PHP Functions:', 'backwpup' ) . '</td><td>';
395
+ echo implode( ', ', $disabledarry );
396
+ echo '</td></tr>';
397
+ }
398
+ //Loaded PHP Extensions
399
+ echo '<tr title=""><td>' . __( 'Loaded PHP Extensions:', 'backwpup' ) . '</td><td>';
400
+ $extensions = get_loaded_extensions();
401
+ sort( $extensions );
402
+ echo implode( ', ', $extensions);
403
+ echo '</td></tr>';
404
+ echo '</table>'
405
+ ?>
406
+ </div>
407
+
408
+ <?php do_action( 'backwpup_page_settings_tab_content' ); ?>
409
+
410
+ <p class="submit">
411
+ <input type="submit" name="submit" id="submit" class="button-primary" value="<?php _e( 'Save Changes', 'backwpup' ); ?>" />
412
+ &nbsp;
413
+ <input type="submit" name="default_settings" id="default_settings" class="button-secondary" value="<?php _e( 'Reset all settings to default', 'backwpup' ); ?>" />
414
+ </p>
415
+ </form>
416
+ </div>
417
+ <?php
418
+ }
419
+
420
+ }
inc/class-wp-cli.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class for WP-CLI commands
4
+ */
5
+ class BackWPup_WP_CLI extends WP_CLI_Command {
6
+
7
+ /**
8
+ * Start a BackWPup job
9
+ *
10
+ * @param $args
11
+ * @param $assoc_args
12
+ * @synopsis start --jobid=<ID of job to start>
13
+ */
14
+ public function start( $args, $assoc_args ) {
15
+
16
+ $job_object = BackWPup_Job::get_working_data( FALSE );
17
+ if ( $job_object )
18
+ WP_CLI::error( __( 'A job is already running.', 'backwpup' ) );
19
+
20
+ if ( empty( $assoc_args['jobid'] ) )
21
+ WP_CLI::error( __( 'No job id specified!', 'backwpup' ) );
22
+
23
+ $jobids = BackWPup_Option::get_job_ids();
24
+ if ( ! in_array( $assoc_args['jobid'], $jobids ) )
25
+ WP_CLI::error( __( 'Jobid does not exist!', 'backwpup' ) );
26
+
27
+ BackWPup_Job::start_cli( $assoc_args['jobid'] );
28
+
29
+ }
30
+
31
+ /**
32
+ * Abort a working BackWPup Job
33
+ *
34
+ * @synopsis abort
35
+ */
36
+ public function abort( $args, $assoc_args ) {
37
+
38
+ $job_object = BackWPup_Job::get_working_data();
39
+ if ( ! $job_object )
40
+ WP_CLI::error( __( 'Nothing to abort!', 'backwpup' ) );
41
+
42
+ unlink( BackWPup::get_plugin_data( 'running_file' ) );
43
+ //remove restart cron
44
+ wp_clear_scheduled_hook( 'backwpup_cron', array( 'id' => 'restart' ) );
45
+ //add log entry
46
+ $timestamp = "<span title=\"[Type: " . E_USER_ERROR . "|Line: " . __LINE__ . "|File: " . basename( __FILE__ ) . "|PID: " . $job_object->pid . "]\">[" . date_i18n( 'd-M-Y H:i:s' ) . "]</span> ";
47
+ file_put_contents( $job_object->logfile, $timestamp . "<samp style=\"background-color:red;color:#fff\">" . __( 'ERROR:', 'backwpup' ) . " " . __( 'Aborted by user!', 'backwpup' ) . "</samp>" . PHP_EOL, FILE_APPEND );
48
+ //write new log header
49
+ $job_object->errors ++;
50
+ $fd = fopen( $job_object->logfile, 'r+' );
51
+ $filepos = ftell( $fd );
52
+ while ( ! feof( $fd ) ) {
53
+ $line = fgets( $fd );
54
+ if ( stripos( $line, "<meta name=\"backwpup_errors\"" ) !== FALSE ) {
55
+ fseek( $fd, $filepos );
56
+ fwrite( $fd, str_pad( "<meta name=\"backwpup_errors\" content=\"" . esc_attr( $job_object->errors ) . "\" />", 100 ) . PHP_EOL );
57
+ break;
58
+ }
59
+ $filepos = ftell( $fd );
60
+ }
61
+ fclose( $fd );
62
+ //update job settings
63
+ if ( ! empty( $job_object->job[ 'jobid' ] ) )
64
+ BackWPup_Option::update( $job_object->job[ 'jobid' ], 'lastruntime', ( current_time( 'timestamp' ) - $job_object->start_time ) );
65
+ //clean up temp
66
+ if ( ! empty( $job_object->backup_file ) && is_file( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->backup_file ) )
67
+ unlink( BackWPup::get_plugin_data( 'TEMP' ) . $job_object->backup_file );
68
+ if ( ! empty( $job_object->folder_list_file ) && is_file( $job_object->folder_list_file ) )
69
+ unlink( $job_object->folder_list_file );
70
+ if ( ! empty( $job_object->additional_files_to_backup ) ) {
71
+ foreach ( $job_object->additional_files_to_backup as $additional_file ) {
72
+ if ( $additional_file == BackWPup::get_plugin_data( 'TEMP' ) . basename( $additional_file ) && is_file( $additional_file ) )
73
+ unlink( $additional_file );
74
+ }
75
+ }
76
+
77
+ WP_CLI::success( __( 'Job will be terminated.', 'backwpup' ) ) ;
78
+ }
79
+
80
+ /**
81
+ * Display a List of Jobs
82
+ *
83
+ * @synopsis jobs
84
+ */
85
+ public function jobs( $args, $assoc_args ) {
86
+
87
+ $jobids = BackWPup_Option::get_job_ids();
88
+
89
+ WP_CLI::line( __('List of jobs', 'backwpup' ) );
90
+ WP_CLI::line( '----------------------------------------------------------------------' );
91
+ foreach ($jobids as $jobid ) {
92
+ WP_CLI::line( sprintf( __('ID: %1$d Name: %2$s', 'backwpup' ),$jobid, BackWPup_Option::get( $jobid, 'name' ) ) );
93
+ }
94
+
95
+ }
96
+
97
+ /**
98
+ * See Status of a working job
99
+ *
100
+ * @param $args
101
+ * @param $assoc_args
102
+ * @synopsis working
103
+ */
104
+ public function working( $args, $assoc_args ) {
105
+
106
+ $job_object = BackWPup_Job::get_working_data();
107
+ if ( ! $job_object )
108
+ WP_CLI::error( __( 'No job working', 'backwpup' ) );
109
+ WP_CLI::line( __('Working job', 'backwpup' ) );
110
+ WP_CLI::line( '----------------------------------------------------------------------' );
111
+ WP_CLI::line( sprintf( __( 'ID: %1$d Name: %2$s', 'backwpup' ), $job_object->job[ 'jobid' ], $job_object->job[ 'name' ] ) );
112
+ WP_CLI::line( sprintf( __( 'Warnings: %1$d Errors: %2$d', 'backwpup' ), $job_object->warnings , $job_object->errors ) );
113
+ WP_CLI::line( sprintf( __( 'Steps in percent: %1$d percent of step: %2$d', 'backwpup' ), $job_object->step_percent, $job_object->substep_percent) );
114
+ WP_CLI::line( sprintf( __( 'On step: %s', 'backwpup' ), $job_object->steps_data[ $job_object->step_working ][ 'NAME' ] ) );
115
+ WP_CLI::line( sprintf( __( 'Last message: %s', 'backwpup' ), str_replace( '&hellip;', '...', strip_tags( $job_object->lastmsg ) ) ) );
116
+
117
+ }
118
+
119
+ }
job/backup_create.php DELETED
@@ -1,188 +0,0 @@
1
- <?PHP
2
- function backup_create() {
3
- global $WORKING,$STATIC;
4
- if ($WORKING['ALLFILESIZE']==0)
5
- return;
6
- $filelist=get_filelist(); //get file list
7
- $WORKING['STEPTODO']=count($filelist);
8
- if (empty($WORKING['STEPDONE']))
9
- $WORKING['STEPDONE']=0;
10
-
11
- if (strtolower($STATIC['JOB']['fileformart'])==".zip") { //Zip files
12
- if ($STATIC['CFG']['phpzip']) { //use php zip lib
13
- trigger_error(sprintf(__('%d. try to create backup zip archive...','backwpup'),$WORKING['BACKUP_CREATE']['STEP_TRY']),E_USER_NOTICE);
14
- $zip = new ZipArchive();
15
- if ($res=$zip->open($STATIC['JOB']['backupdir'].$STATIC['backupfile'],ZIPARCHIVE::CREATE) === TRUE) {
16
- for ($i=$WORKING['STEPDONE'];$i<$WORKING['STEPTODO'];$i++) {
17
- if (!$zip->addFile($filelist[$i]['FILE'], $filelist[$i]['OUTFILE']))
18
- trigger_error(sprintf(__('Can not add "%s" to zip archive!','backwpup'),$filelist[$i]['OUTFILE']),E_USER_ERROR);
19
- $WORKING['STEPDONE']++;
20
- update_working_file();
21
- }
22
- if ($zip->status>0) {
23
- $ziperror=$zip->status;
24
- if ($zip->status==4)
25
- $ziperror=__('(4) ER_SEEK','backwpup');
26
- if ($zip->status==5)
27
- $ziperror=__('(5) ER_READ','backwpup');
28
- if ($zip->status==9)
29
- $ziperror=__('(9) ER_NOENT','backwpup');
30
- if ($zip->status==10)
31
- $ziperror=__('(10) ER_EXISTS','backwpup');
32
- if ($zip->status==11)
33
- $ziperror=__('(11) ER_OPEN','backwpup');
34
- if ($zip->status==14)
35
- $ziperror=__('(14) ER_MEMORY','backwpup');
36
- if ($zip->status==18)
37
- $ziperror=__('(18) ER_INVAL','backwpup');
38
- if ($zip->status==19)
39
- $ziperror=__('(19) ER_NOZIP','backwpup');
40
- if ($zip->status==21)
41
- $ziperror=__('(21) ER_INCONS','backwpup');
42
- trigger_error(sprintf(__('Zip returns status: %s','backwpup'),$zip->status),E_USER_ERROR);
43
- }
44
- $res2=$zip->close();
45
- trigger_error(__('Backup zip archive create done!','backwpup'),E_USER_NOTICE);
46
- $WORKING['STEPSDONE'][]='BACKUP_CREATE'; //set done
47
- } else {
48
- trigger_error(sprintf(__('Can not create backup zip archive $s!','backwpup'),$res),E_USER_ERROR);
49
- }
50
- } else { //use PclZip
51
- define('PCLZIP_TEMPORARY_DIR', $STATIC['TEMPDIR']);
52
- require_once($STATIC['WP']['ABSPATH'].'wp-admin/includes/class-pclzip.php');
53
- if ( ini_get( 'mbstring.func_overload' ) && function_exists( 'mb_internal_encoding' ) ) {
54
- $previous_encoding = mb_internal_encoding();
55
- mb_internal_encoding( 'ISO-8859-1' );
56
- }
57
- //Create Zip File
58
- if (is_array($filelist[0])) {
59
- trigger_error(sprintf(__('%d. try to create backup zip (PclZip) archive...','backwpup'),$WORKING['BACKUP_CREATE']['STEP_TRY']),E_USER_NOTICE);
60
- for ($i=0;$i<$WORKING['STEPTODO'];$i++) { //must begin at 0 for PCLzip
61
- $files[$i][79001]=$filelist[$i]['FILE'];
62
- $files[$i][79003]=$filelist[$i]['OUTFILE'];
63
- $files[$i][79004]=$filelist[$i]['MTIME'];
64
- }
65
- need_free_memory('20M'); //20MB free memory for zip
66
- $zipbackupfile = new PclZip($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
67
- if (0==$zipbackupfile->create($files,PCLZIP_CB_POST_ADD,'_pclzipPostAddCallBack',PCLZIP_OPT_TEMP_FILE_THRESHOLD, 5)) {
68
- trigger_error(sprintf(__('Zip archive create error: %s','backwpup'),$zipbackupfile->errorInfo(true)),E_USER_ERROR);
69
- } else {
70
- $WORKING['STEPDONE']=count($filelist);
71
- unset($files);
72
- trigger_error(__('Backup zip archive create done','backwpup'),E_USER_NOTICE);
73
- }
74
- }
75
- if ( isset($previous_encoding) )
76
- mb_internal_encoding( $previous_encoding );
77
- }
78
- } elseif (strtolower($STATIC['JOB']['fileformart'])==".tar.gz" or strtolower($STATIC['JOB']['fileformart'])==".tar.bz2" or strtolower($STATIC['JOB']['fileformart'])==".tar") { //tar files
79
-
80
- if (strtolower($STATIC['JOB']['fileformart'])=='.tar.gz') {
81
- $tarbackup=fopen('compress.zlib://'.$STATIC['JOB']['backupdir'].$STATIC['backupfile'],'wb');
82
- } elseif (strtolower($STATIC['JOB']['fileformart'])=='.tar.bz2') {
83
- $tarbackup=fopen('compress.bzip2://'.$STATIC['JOB']['backupdir'].$STATIC['backupfile'],'wb');
84
- } else {
85
- $tarbackup=fopen($STATIC['JOB']['backupdir'].$STATIC['backupfile'],'wb');
86
- }
87
-
88
- if (!$tarbackup) {
89
- trigger_error(__('Can not create tar archive file!','backwpup'),E_USER_ERROR);
90
- return;
91
- } else {
92
- trigger_error(sprintf(__('%1$d. try to create %2$s archive file...','backwpup'),$WORKING['BACKUP_CREATE']['STEP_TRY'],substr($STATIC['JOB']['fileformart'],1)),E_USER_NOTICE);
93
- }
94
-
95
- for ($index=$WORKING['STEPDONE'];$index<$WORKING['STEPTODO'];$index++) {
96
- need_free_memory(2097152); //2MB free memory for tar
97
- $files=$filelist[$index];
98
- //check file readable
99
- if ( empty($files['FILE']) or !file_exists($files['FILE']) or !is_readable($files['FILE'])) {
100
- trigger_error(sprintf(__('File "%s" not readable!','backwpup'),$files['FILE']),E_USER_WARNING);
101
- $WORKING['STEPDONE']++;
102
- continue;
103
- }
104
-
105
- //split filename larger than 100 chars
106
- if (strlen($files['OUTFILE'])<=100) {
107
- $filename=$files['OUTFILE'];
108
- $filenameprefix="";
109
- } else {
110
- $filenameofset=strlen($files['OUTFILE'])-100;
111
- $dividor=strpos($files['OUTFILE'],'/',$filenameofset);
112
- $filename=substr($files['OUTFILE'],$dividor+1);
113
- $filenameprefix=substr($files['OUTFILE'],0,$dividor);
114
- if (strlen($filename)>100)
115
- trigger_error(sprintf(__('File name "%1$s" to long to save corectly in %2$s archive!','backwpup'),$files['OUTFILE'],substr($STATIC['JOB']['fileformart'],1)),E_USER_WARNING);
116
- if (strlen($filenameprefix)>155)
117
- trigger_error(sprintf(__('File path "%1$s" to long to save corectly in %2$s archive!','backwpup'),$files['OUTFILE'],substr($STATIC['JOB']['fileformart'],1)),E_USER_WARNING);
118
- }
119
- //Set file user/group name if linux
120
- $fileowner="Unknown";
121
- $filegroup="Unknown";
122
- if (function_exists('posix_getpwuid')) {
123
- $info=posix_getpwuid($files['UID']);
124
- $fileowner=$info['name'];
125
- $info=posix_getgrgid($files['GID']);
126
- $filegroup=$info['name'];
127
- }
128
-
129
- // Generate the TAR header for this file
130
- $header = pack("a100a8a8a8a12a12a8a1a100a6a2a32a32a8a8a155a12",
131
- $filename, //name of file 100
132
- sprintf("%07o", $files['MODE']), //file mode 8
133
- sprintf("%07o", $files['UID']), //owner user ID 8
134
- sprintf("%07o", $files['GID']), //owner group ID 8
135
- sprintf("%011o", $files['SIZE']), //length of file in bytes 12
136
- sprintf("%011o", $files['MTIME']), //modify time of file 12
137
- " ", //checksum for header 8
138
- 0, //type of file 0 or null = File, 5=Dir
139
- "", //name of linked file 100
140
- "ustar", //USTAR indicator 6
141
- "00", //USTAR version 2
142
- $fileowner, //owner user name 32
143
- $filegroup, //owner group name 32
144
- "", //device major number 8
145
- "", //device minor number 8
146
- $filenameprefix, //prefix for file name 155
147
- ""); //fill block 512K
148
-
149
- // Computes the unsigned Checksum of a file's header
150
- $checksum = 0;
151
- for ($i = 0; $i < 512; $i++)
152
- $checksum += ord(substr($header, $i, 1));
153
- $checksum = pack("a8", sprintf("%07o", $checksum));
154
-
155
- $header = substr_replace($header, $checksum, 148, 8);
156
-
157
- fwrite($tarbackup, $header);
158
-
159
- // read/write files in 512K Blocks
160
- if ($fd=fopen($files['FILE'],'rb')) {
161
- while(!feof($fd)) {
162
- $filedata=fread($fd,512);
163
- if (strlen($filedata)>0)
164
- fwrite($tarbackup,pack("a512", $filedata));
165
- }
166
- fclose($fd);
167
- }
168
- $WORKING['STEPDONE']++;
169
- update_working_file();
170
- }
171
- fwrite($tarbackup, pack("a1024", "")); // Add 1024 bytes of NULLs to designate EOF
172
- fclose($tarbackup);
173
-
174
- trigger_error(sprintf(__('%s archive creation done','backwpup'),substr($STATIC['JOB']['fileformart'],1)),E_USER_NOTICE);
175
- }
176
- $WORKING['STEPSDONE'][]='BACKUP_CREATE'; //set done
177
- if ($filesize=filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']))
178
- trigger_error(sprintf(__('Archive size is %s','backwpup'),formatBytes($filesize)),E_USER_NOTICE);
179
- }
180
-
181
-
182
- function _pclzipPostAddCallBack($p_event, &$p_header) {
183
- global $WORKING,$STATIC;
184
- if ($p_header['status'] != 'ok')
185
- trigger_error(sprintf(__('PCL ZIP Error "%1$s" on file %2$s!','backwpup'),$p_header['status'],$p_header['filename']),E_USER_ERROR);
186
- $WORKING['STEPDONE']++;
187
- update_working_file();
188
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/db_check.php DELETED
@@ -1,64 +0,0 @@
1
- <?PHP
2
- function db_check() {
3
- global $WORKING,$STATIC;
4
- trigger_error(sprintf(__('%d. try for database check...','backwpup'),$WORKING['DB_CHECK']['STEP_TRY']),E_USER_NOTICE);
5
- if (!isset($WORKING['DB_CHECK']['DONETABLE']) or !is_array($WORKING['DB_CHECK']['DONETABLE']))
6
- $WORKING['DB_CHECK']['DONETABLE']=array();
7
-
8
- mysql_update();
9
- //to backup
10
- $tabelstobackup=array();
11
- $result=mysql_query("SHOW TABLES FROM `".$STATIC['WP']['DB_NAME']."`"); //get table status
12
- if (!$result)
13
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "SHOW TABLE STATUS FROM `".$STATIC['WP']['DB_NAME']."`;"),E_USER_ERROR);
14
- while ($data = mysql_fetch_row($result)) {
15
- if (!in_array($data[0],$STATIC['JOB']['dbexclude']))
16
- $tabelstobackup[]=$data[0];
17
- }
18
- //Set num of todos
19
- $WORKING['STEPTODO']=sizeof($tabelstobackup);
20
-
21
- //check tables
22
- if (count($tabelstobackup)>0) {
23
- maintenance_mode(true);
24
- foreach ($tabelstobackup as $table) {
25
- if (in_array($table, $WORKING['DB_CHECK']['DONETABLE']))
26
- continue;
27
- $result=mysql_query('CHECK TABLE `'.$table.'` MEDIUM');
28
- if (!$result) {
29
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "CHECK TABLE `".$table."` MEDIUM"),E_USER_ERROR);
30
- continue;
31
- }
32
- $check=mysql_fetch_assoc($result);
33
- if ($check['Msg_type']=='error')
34
- trigger_error(sprintf(__('Result of table check for %1$s is: %2$s','backwpup'), $table, $check['Msg_text']),E_USER_ERROR);
35
- elseif ($check['Msg_type']=='warning')
36
- trigger_error(sprintf(__('Result of table check for %1$s is: %2$s','backwpup'), $table, $check['Msg_text']),E_USER_WARNING);
37
- else
38
- trigger_error(sprintf(__('Result of table check for %1$s is: %2$s','backwpup'), $table, $check['Msg_text']),E_USER_NOTICE);
39
-
40
- //Try to Repair tabele
41
- if ($check['Msg_type']=='error' or $check['Msg_type']=='warning') {
42
- $result=mysql_query('REPAIR TABLE `'.$table.'`');
43
- if (!$result) {
44
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "REPAIR TABLE `'.$table.'`"),E_USER_ERROR);
45
- continue;
46
- }
47
- $repair=mysql_fetch_assoc($result);
48
- if ($repair['Msg_type']=='error')
49
- trigger_error(sprintf(__('Result of table repair for %1$s is: %2$s','backwpup'), $table, $repair['Msg_text']),E_USER_ERROR);
50
- elseif ($repair['Msg_type']=='warning')
51
- trigger_error(sprintf(__('Result of table repair for %1$s is: %2$s','backwpup'), $table, $repair['Msg_text']),E_USER_WARNING);
52
- else
53
- trigger_error(sprintf(__('Result of table repair for %1$s is: %2$s','backwpup'), $table, $repair['Msg_text']),E_USER_NOTICE);
54
- }
55
- $WORKING['DB_CHECK']['DONETABLE'][]=$table;
56
- $WORKING['STEPDONE']=sizeof($WORKING['DB_CHECK']['DONETABLE']);
57
- }
58
- maintenance_mode(false);
59
- trigger_error(__('Database check done!','backwpup'),E_USER_NOTICE);
60
- } else {
61
- trigger_error(__('No tables to check','backwpup'),E_USER_WARNING);
62
- }
63
- $WORKING['STEPSDONE'][]='DB_CHECK'; //set done
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/db_dump.php DELETED
@@ -1,158 +0,0 @@
1
- <?PHP
2
- function db_dump() {
3
- global $WORKING,$STATIC;
4
- trigger_error(sprintf(__('%d. try for database dump...','backwpup'),$WORKING['DB_DUMP']['STEP_TRY']),E_USER_NOTICE);
5
- if (!isset($WORKING['DB_DUMP']['DONETABLE']) or !is_array($WORKING['DB_DUMP']['DONETABLE']))
6
- $WORKING['DB_DUMP']['DONETABLE']=array();
7
-
8
- mysql_update();
9
- //to backup
10
- $tabelstobackup=array();
11
- $result=mysql_query("SHOW TABLES FROM `".$STATIC['WP']['DB_NAME']."`"); //get table status
12
- if (!$result)
13
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "SHOW TABLE STATUS FROM `".$STATIC['WP']['DB_NAME']."`;"),E_USER_ERROR);
14
- while ($data = mysql_fetch_row($result)) {
15
- if (!in_array($data[0],$STATIC['JOB']['dbexclude']))
16
- $tabelstobackup[]=$data[0];
17
- }
18
- $WORKING['STEPTODO']=count($tabelstobackup);
19
- //Set maintenance
20
- maintenance_mode(true);
21
-
22
- if (count($tabelstobackup)>0) {
23
- $result=mysql_query("SHOW TABLE STATUS FROM `".$STATIC['WP']['DB_NAME']."`"); //get table status
24
- if (!$result)
25
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "SHOW TABLE STATUS FROM `".$STATIC['WP']['DB_NAME']."`;"),E_USER_ERROR);
26
- while ($data = mysql_fetch_assoc($result)) {
27
- $status[$data['Name']]=$data;
28
- }
29
-
30
- if ($file = fopen($STATIC['TEMPDIR'].$STATIC['WP']['DB_NAME'].'.sql', 'wb')) {
31
- fwrite($file, "-- ---------------------------------------------------------\n");
32
- fwrite($file, "-- Dump with BackWPup ver.: ".$STATIC['BACKWPUP']['VERSION']."\n");
33
- fwrite($file, "-- Plugin for WordPress ".$STATIC['WP']['VERSION']." by Daniel Huesken\n");
34
- fwrite($file, "-- http://backwpup.com/\n");
35
- fwrite($file, "-- Blog Name: ".$STATIC['WP']['BLOGNAME']."\n");
36
- fwrite($file, "-- Blog URL: ".$STATIC['WP']['SITEURL']."\n");
37
- fwrite($file, "-- Blog ABSPATH: ".$STATIC['WP']['ABSPATH']."\n");
38
- fwrite($file, "-- Table Prefix: ".$STATIC['WP']['TABLE_PREFIX']."\n");
39
- fwrite($file, "-- Database Name: ".$STATIC['WP']['DB_NAME']."\n");
40
- fwrite($file, "-- Dump on: ".date('Y-m-d H:i.s',time()+$STATIC['WP']['TIMEDIFF'])."\n");
41
- fwrite($file, "-- ---------------------------------------------------------\n\n");
42
- //for better import with mysql client
43
- fwrite($file, "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n");
44
- fwrite($file, "/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n");
45
- fwrite($file, "/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n");
46
- fwrite($file, "/*!40101 SET NAMES '".mysql_client_encoding()."' */;\n");
47
- fwrite($file, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n");
48
- fwrite($file, "/*!40103 SET TIME_ZONE='".mysql_result(mysql_query("SELECT @@time_zone"),0)."' */;\n");
49
- fwrite($file, "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n");
50
- fwrite($file, "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n");
51
- fwrite($file, "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n");
52
- fwrite($file, "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n");
53
- //make table dumps
54
- foreach($tabelstobackup as $table) {
55
- if (in_array($table, $WORKING['DB_DUMP']['DONETABLE']))
56
- continue;
57
- _db_dump_table($table,$status[$table],$file);
58
- $WORKING['DB_DUMP']['DONETABLE'][]=$table;
59
- $WORKING['STEPDONE']=count($WORKING['DB_DUMP']['DONETABLE']);
60
- }
61
- //for better import with mysql client
62
- fwrite($file, "\n");
63
- fwrite($file, "/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n");
64
- fwrite($file, "/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n");
65
- fwrite($file, "/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n");
66
- fwrite($file, "/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n");
67
- fwrite($file, "/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n");
68
- fwrite($file, "/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n");
69
- fwrite($file, "/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n");
70
- fwrite($file, "/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n");
71
- fclose($file);
72
- trigger_error(__('Database dump done!','backwpup'),E_USER_NOTICE);
73
- } else {
74
- trigger_error(__('Can not create database dump!','backwpup'),E_USER_ERROR);
75
- }
76
- } else {
77
- trigger_error(__('No tables to dump','backwpup'),E_USER_WARNING);
78
- }
79
-
80
- //add database file to backupfiles
81
- if (is_readable($STATIC['TEMPDIR'].$STATIC['WP']['DB_NAME'].'.sql')) {
82
- $filestat=stat($STATIC['TEMPDIR'].$STATIC['WP']['DB_NAME'].'.sql');
83
- trigger_error(sprintf(__('Add database dump "%1$s" with %2$s to backup file list','backwpup'),$STATIC['WP']['DB_NAME'].'.sql',formatbytes($filestat['size'])),E_USER_NOTICE);
84
- $WORKING['ALLFILESIZE']+=$filestat['size'];
85
- add_file(array(array('FILE'=>$STATIC['TEMPDIR'].$STATIC['WP']['DB_NAME'].'.sql','OUTFILE'=>$STATIC['WP']['DB_NAME'].'.sql','SIZE'=>$filestat['size'],'ATIME'=>$filestat['atime'],'MTIME'=>$filestat['mtime'],'CTIME'=>$filestat['ctime'],'UID'=>$filestat['uid'],'GID'=>$filestat['gid'],'MODE'=>$filestat['mode'])));
86
- }
87
- //Back from maintenance
88
- maintenance_mode(false);
89
- $WORKING['STEPSDONE'][]='DB_DUMP'; //set done
90
- }
91
-
92
-
93
- function _db_dump_table($table,$status,$file) {
94
- global $WORKING,$STATIC;
95
- need_free_memory(($status['Data_length']+$status['Index_length'])*4); //get more memory if needed
96
- // create dump
97
- trigger_error( sprintf( __( 'Dump database table "%s"', 'backwpup' ), $table ), E_USER_NOTICE );
98
- fwrite($file, "\n");
99
- fwrite($file, "--\n");
100
- fwrite($file, "-- Table structure for table $table\n");
101
- fwrite($file, "--\n\n");
102
- fwrite($file, "DROP TABLE IF EXISTS `" . $table . "`;\n");
103
- fwrite($file, "/*!40101 SET @saved_cs_client = @@character_set_client */;\n");
104
- fwrite($file, "/*!40101 SET character_set_client = '".mysql_client_encoding()."' */;\n");
105
- //Dump the table structure
106
- $result=mysql_query("SHOW CREATE TABLE `".$table."`");
107
- if (!$result) {
108
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "SHOW CREATE TABLE `".$table."`"),E_USER_ERROR);
109
- return false;
110
- }
111
- $tablestruc=mysql_fetch_assoc($result);
112
- fwrite($file, $tablestruc['Create Table'].";\n");
113
- fwrite($file, "/*!40101 SET character_set_client = @saved_cs_client */;\n");
114
-
115
- //take data of table
116
- $result=mysql_query("SELECT * FROM `".$table."`");
117
- if (!$result) {
118
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "SELECT * FROM `".$table."`"),E_USER_ERROR);
119
- return false;
120
- }
121
- //get field information
122
- $fieldsarray = array();
123
- $fieldinfo = array();
124
- $fields = mysql_num_fields( $result );
125
- for ( $i = 0; $i < $fields; $i ++ ) {
126
- $fieldsarray[$i] = mysql_field_name( $result, $i );
127
- $fieldinfo[$fieldsarray[$i]] = mysql_fetch_field( $result, $i );
128
- }
129
-
130
- fwrite($file, "--\n");
131
- fwrite($file, "-- Dumping data for table $table\n");
132
- fwrite($file, "--\n\n");
133
- if ($status['Engine']=='MyISAM')
134
- fwrite($file, "/*!40000 ALTER TABLE `".$table."` DISABLE KEYS */;\n");
135
-
136
- while ($data = mysql_fetch_assoc($result)) {
137
- $keys = array();
138
- $values = array();
139
- foreach ( $data as $key => $value ) {
140
- if (!$STATIC['JOB']['dbshortinsert'])
141
- $keys[] = "`".str_replace("�", "��", $key)."`"; // Add key to key list
142
- if ( is_null( $value ) || ! isset($value) ) // Make Value NULL to string NULL
143
- $value = "NULL";
144
- elseif ( $fieldinfo[$key]->numeric == 1 && $fieldinfo[$key]->type != 'timestamp' && $fieldinfo[$key]->blob != 1 ) //is value numeric no esc
145
- $value = empty($value) ? 0 : $value;
146
- else
147
- $value = "'" . mysql_real_escape_string( $value ) . "'";
148
- $values[] = $value;
149
- }
150
- // make data dump
151
- if ($STATIC['JOB']['dbshortinsert'])
152
- fwrite($file, "INSERT INTO `".$table."` VALUES ( ".implode(", ",$values)." );\n");
153
- else
154
- fwrite($file, "INSERT INTO `".$table."` ( ".implode(", ",$keys)." )\n\tVALUES ( ".implode(", ",$values)." );\n");
155
- }
156
- if ($status['Engine']=='MyISAM')
157
- fwrite($file, "/*!40000 ALTER TABLE ".$table." ENABLE KEYS */;\n");
158
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/db_optimize.php DELETED
@@ -1,47 +0,0 @@
1
- <?PHP
2
- function db_optimize() {
3
- global $WORKING,$STATIC;
4
- trigger_error(sprintf(__('%d. try for database optimize...','backwpup'),$WORKING['DB_OPTIMIZE']['STEP_TRY']),E_USER_NOTICE);
5
- if (!isset($WORKING['DB_OPTIMIZE']['DONETABLE']) or !is_array($WORKING['DB_OPTIMIZE']['DONETABLE']))
6
- $WORKING['DB_OPTIMIZE']['DONETABLE']=array();
7
-
8
- mysql_update();
9
- //to backup
10
- $tabelstobackup=array();
11
- $result=mysql_query("SHOW TABLES FROM `".$STATIC['WP']['DB_NAME']."`"); //get table status
12
- if (!$result)
13
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "SHOW TABLE STATUS FROM `".$STATIC['WP']['DB_NAME']."`;"),E_USER_ERROR);
14
- while ($data = mysql_fetch_row($result)) {
15
- if (!in_array($data[0],$STATIC['JOB']['dbexclude']))
16
- $tabelstobackup[]=$data[0];
17
- }
18
- //Set num of todos
19
- $WORKING['STEPTODO']=count($tabelstobackup);
20
-
21
- if (count($tabelstobackup)>0) {
22
- maintenance_mode(true);
23
- foreach ($tabelstobackup as $table) {
24
- if (in_array($table, $WORKING['DB_OPTIMIZE']['DONETABLE']))
25
- continue;
26
- $result=mysql_query('OPTIMIZE TABLE `'.$table.'`');
27
- if (!$result) {
28
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), "OPTIMIZE TABLE `".$table."`"),E_USER_ERROR);
29
- continue;
30
- }
31
- $optimize=mysql_fetch_assoc($result);
32
- $WORKING['DB_OPTIMIZE']['DONETABLE'][]=$table;
33
- $WORKING['STEPDONE']=count($WORKING['DB_OPTIMIZE']['DONETABLE']);
34
- if ($optimize['Msg_type']=='error')
35
- trigger_error(sprintf(__('Result of table optimize for %1$s is: %2$s','backwpup'), $table, $optimize['Msg_text']),E_USER_ERROR);
36
- elseif ($optimize['Msg_type']=='warning')
37
- trigger_error(sprintf(__('Result of table optimize for %1$s is: %2$s','backwpup'), $table, $optimize['Msg_text']),E_USER_WARNING);
38
- else
39
- trigger_error(sprintf(__('Result of table optimize for %1$s is: %2$s','backwpup'), $table, $optimize['Msg_text']),E_USER_NOTICE);
40
- }
41
- trigger_error(__('Database optimize done!','backwpup'),E_USER_NOTICE);
42
- maintenance_mode(false);
43
- } else {
44
- trigger_error(__('No tables to optimize','backwpup'),E_USER_WARNING);
45
- }
46
- $WORKING['STEPSDONE'][]='DB_OPTIMIZE'; //set done
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_dropbox.php DELETED
@@ -1,72 +0,0 @@
1
- <?PHP
2
- function dest_dropbox() {
3
- global $WORKING,$STATIC;
4
- $WORKING['STEPTODO']=2+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
5
- $WORKING['STEPDONE']=0;
6
- trigger_error(sprintf(__('%d. Try to sending backup file to DropBox...','backwpup'),$WORKING['DEST_DROPBOX']['STEP_TRY']),E_USER_NOTICE);
7
-
8
- require_once(realpath(dirname(__FILE__).'/../libs/dropbox.php'));
9
- try {
10
- need_free_memory(10000000);
11
- //set boxtype
12
- $dropbox = new backwpup_Dropbox('dropbox');
13
-
14
- // set the tokens
15
- $dropbox->setOAuthTokens($STATIC['JOB']['dropetoken'],$STATIC['JOB']['dropesecret']);
16
- $info=$dropbox->accountInfo();
17
- if (!empty($info['uid'])) {
18
- trigger_error(sprintf(__('Authed with DropBox from %s','backwpup'),$info['display_name']),E_USER_NOTICE);
19
- }
20
- //Check Quota
21
- $dropboxfreespase=(float)$info['quota_info']['quota']-(float)$info['quota_info']['shared']-(float)$info['quota_info']['normal'];
22
- if (filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile'])>$dropboxfreespase) {
23
- trigger_error(__('No free space left on DropBox!!!','backwpup'),E_USER_ERROR);
24
- $WORKING['STEPSDONE'][]='DEST_DROPBOX'; //set done
25
- return;
26
- } else {
27
- trigger_error(sprintf(__('%s free on DropBox','backwpup'),formatBytes($dropboxfreespase)),E_USER_NOTICE);
28
- }
29
- //set callback function
30
- $dropbox->setProgressFunction('curl_progresscallback');
31
- // put the file
32
- trigger_error(__('Upload to DropBox now started... ','backwpup'),E_USER_NOTICE);
33
- $response = $dropbox->upload($STATIC['JOB']['backupdir'].$STATIC['backupfile'],$STATIC['JOB']['dropedir'].$STATIC['backupfile']);
34
- if ($response['bytes']==filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile'])) {
35
- $STATIC['JOB']['lastbackupdownloadurl']=$STATIC['WP']['ADMINURL'].'?page=backwpupbackups&action=downloaddropbox&file='.$STATIC['JOB']['dropedir'].$STATIC['backupfile'].'&jobid='.$STATIC['JOB']['jobid'];
36
- $WORKING['STEPDONE']++;
37
- $WORKING['STEPSDONE'][]='DEST_DROPBOX'; //set done
38
- trigger_error(sprintf(__('Backup transferred to %s','backwpup'),'https://api-content.dropbox.com/1/files/'.$STATIC['JOB']['droperoot'].'/'.$STATIC['JOB']['dropedir'].$STATIC['backupfile']),E_USER_NOTICE);
39
- }
40
- //unset calback function
41
- $dropbox->setProgressFunction();
42
- } catch (Exception $e) {
43
- trigger_error(sprintf(__('DropBox API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
44
- }
45
- try {
46
- if ($STATIC['JOB']['dropemaxbackups']>0 and is_object($dropbox)) { //Delete old backups
47
- $backupfilelist=array();
48
- $metadata = $dropbox->metadata($STATIC['JOB']['dropedir']);
49
- if (is_array($metadata)) {
50
- foreach ($metadata['contents'] as $data) {
51
- $file=basename($data['path']);
52
- if ($data['is_dir']!=true and $STATIC['JOB']['fileprefix'] == substr($file,0,strlen($STATIC['JOB']['fileprefix'])) and $STATIC['JOB']['fileformart'] == substr($file,-strlen($STATIC['JOB']['fileformart'])))
53
- $backupfilelist[]=$file;
54
- }
55
- }
56
- if (sizeof($backupfilelist)>0) {
57
- rsort($backupfilelist);
58
- $numdeltefiles=0;
59
- for ($i=$STATIC['JOB']['dropemaxbackups'];$i<count($backupfilelist);$i++) {
60
- $dropbox->fileopsDelete($STATIC['JOB']['dropedir'].$backupfilelist[$i]); //delete files on Cloud
61
- $numdeltefiles++;
62
- }
63
- if ($numdeltefiles>0)
64
- trigger_error(sprintf(_n('One file deleted on DropBox','%d files deleted on DropBox',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
65
- }
66
- }
67
- } catch (Exception $e) {
68
- trigger_error(sprintf(__('DropBox API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
69
- }
70
-
71
- $WORKING['STEPDONE']++;
72
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_folder.php DELETED
@@ -1,30 +0,0 @@
1
- <?PHP
2
- function dest_folder() {
3
- global $WORKING,$STATIC;
4
- $WORKING['STEPTODO']=1;
5
- $WORKING['STEPDONE']=0;
6
- $STATIC['JOB']['lastbackupdownloadurl']=$STATIC['WP']['ADMINURL'].'?page=backwpupbackups&action=download&file='.$STATIC['JOB']['backupdir'].$STATIC['backupfile'];
7
- //Delete old Backupfiles
8
- $backupfilelist=array();
9
- if ($STATIC['JOB']['maxbackups']>0) {
10
- if ( $dir = @opendir($STATIC['JOB']['backupdir']) ) { //make file list
11
- while (($file = readdir($dir)) !== false ) {
12
- if ($STATIC['JOB']['fileprefix'] == substr($file,0,strlen($STATIC['JOB']['fileprefix'])) and $STATIC['JOB']['fileformart'] == substr($file,-strlen($STATIC['JOB']['fileformart'])))
13
- $backupfilelist[]=$file;
14
- }
15
- @closedir($dir);
16
- }
17
- if (sizeof($backupfilelist)>0) {
18
- rsort($backupfilelist);
19
- $numdeltefiles=0;
20
- for ($i=$STATIC['JOB']['maxbackups'];$i<sizeof($backupfilelist);$i++) {
21
- unlink($STATIC['JOB']['backupdir'].$backupfilelist[$i]);
22
- $numdeltefiles++;
23
- }
24
- if ($numdeltefiles>0)
25
- trigger_error(sprintf(_n('One backup file deleted','%d backup files deleted',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
26
- }
27
- }
28
- $WORKING['STEPDONE']++;
29
- $WORKING['STEPSDONE'][]='DEST_FOLDER'; //set done
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_ftp.php DELETED
@@ -1,149 +0,0 @@
1
- <?PHP
2
- function dest_ftp() {
3
- global $WORKING,$STATIC;
4
- if (empty($STATIC['JOB']['ftphost']) or empty($STATIC['JOB']['ftpuser']) or empty($STATIC['JOB']['ftppass'])) {
5
- $WORKING['STEPSDONE'][]='DEST_FTP'; //set done
6
- return;
7
- }
8
- $WORKING['STEPTODO']=filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
9
- trigger_error(sprintf(__('%d. try to sending backup file to a FTP Server...','backwpup'),$WORKING['DEST_FTP']['STEP_TRY']),E_USER_NOTICE);
10
-
11
- if ($STATIC['JOB']['ftpssl']) { //make SSL FTP connection
12
- if (function_exists('ftp_ssl_connect')) {
13
- $ftp_conn_id = ftp_ssl_connect($STATIC['JOB']['ftphost'],$STATIC['JOB']['ftphostport'],10);
14
- if ($ftp_conn_id)
15
- trigger_error(sprintf(__('Connected by SSL-FTP to Server: %s','backwpup'),$STATIC['JOB']['ftphost'].':'.$STATIC['JOB']['ftphostport']),E_USER_NOTICE);
16
- else {
17
- trigger_error(sprintf(__('Can not connect by SSL-FTP to Server: %s','backwpup'),$STATIC['JOB']['ftphost'].':'.$STATIC['JOB']['ftphostport']),E_USER_ERROR);
18
- return false;
19
- }
20
- } else {
21
- trigger_error(__('PHP function to connect with SSL-FTP to server not exists!','backwpup'),E_USER_ERROR);
22
- return false;
23
- }
24
- } else { //make normal FTP connection if SSL not work
25
- $ftp_conn_id = ftp_connect($STATIC['JOB']['ftphost'],$STATIC['JOB']['ftphostport'],10);
26
- if ($ftp_conn_id)
27
- trigger_error(sprintf(__('Connected to FTP server: %s','backwpup'),$STATIC['JOB']['ftphost'].':'.$STATIC['JOB']['ftphostport']),E_USER_NOTICE);
28
- else {
29
- trigger_error(sprintf(__('Can not connect to FTP server: %s','backwpup'),$STATIC['JOB']['ftphost'].':'.$STATIC['JOB']['ftphostport']),E_USER_ERROR);
30
- return false;
31
- }
32
- }
33
-
34
- //FTP Login
35
- $loginok=false;
36
- trigger_error(sprintf(__('FTP Client command: %s','backwpup'),' USER '.$STATIC['JOB']['ftpuser']),E_USER_NOTICE);
37
- if ($loginok=ftp_login($ftp_conn_id, $STATIC['JOB']['ftpuser'], backwpup_base64($STATIC['JOB']['ftppass']))) {
38
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),' User '.$STATIC['JOB']['ftpuser'].' logged in.'),E_USER_NOTICE);
39
- } else { //if PHP ftp login don't work use raw login
40
- $return=ftp_raw($ftp_conn_id,'USER '.$STATIC['JOB']['ftpuser']);
41
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),$return[0]),E_USER_NOTICE);
42
- if (substr(trim($return[0]),0,3)<=400) {
43
- trigger_error(sprintf(__('FTP Client command: %s','backwpup'),' PASS *******'),E_USER_NOTICE);
44
- $return=ftp_raw($ftp_conn_id,'PASS '.backwpup_base64($STATIC['JOB']['ftppass']));
45
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),$return[0]),E_USER_NOTICE);
46
- if (substr(trim($return[0]),0,3)<=400)
47
- $loginok=true;
48
- }
49
- }
50
-
51
- if (!$loginok)
52
- return false;
53
-
54
- //SYSTYPE
55
- trigger_error(sprintf(__('FTP Client command: %s','backwpup'),' SYST'),E_USER_NOTICE);
56
- $systype=ftp_systype($ftp_conn_id);
57
- if ($systype)
58
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),$systype),E_USER_NOTICE);
59
- else
60
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),__('Error getting SYSTYPE','backwpup')),E_USER_ERROR);
61
-
62
-
63
- //test ftp dir and create it f not exists
64
- if ($STATIC['JOB']['ftpdir']!='/' && $STATIC['JOB']['ftpdir']!='') {
65
- $ftpdirs=explode("/", trim($STATIC['JOB']['ftpdir'],'/'));
66
- foreach ($ftpdirs as $ftpdir) {
67
- if (empty($ftpdir))
68
- continue;
69
- if (!@ftp_chdir($ftp_conn_id, $ftpdir)) {
70
- if (@ftp_mkdir($ftp_conn_id, $ftpdir)) {
71
- trigger_error(sprintf(__('FTP folder "%s" created!','backwpup'),$ftpdir),E_USER_NOTICE);
72
- ftp_chdir($ftp_conn_id, $ftpdir);
73
- } else {
74
- trigger_error(sprintf(__('FTP folder "%s" can not created!','backwpup'),$ftpdir),E_USER_ERROR);
75
- return false;
76
- }
77
- }
78
- }
79
- }
80
-
81
- // Get the current working directory
82
- $currentftpdir = rtrim(ftp_pwd($ftp_conn_id),'/').'/';
83
- trigger_error(sprintf(__('FTP current folder is: %s','backwpup'),$currentftpdir),E_USER_NOTICE);
84
-
85
- //delete file on ftp if new try
86
- if ($WORKING['STEPDONE']==0)
87
- @ftp_delete($ftp_conn_id, $currentftpdir.$STATIC['backupfile']);
88
-
89
- //PASV
90
- trigger_error(sprintf(__('FTP Client command: %s','backwpup'),' PASV'),E_USER_NOTICE);
91
- if ($STATIC['JOB']['ftppasv']) {
92
- if (ftp_pasv($ftp_conn_id, true))
93
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),__('Entering Passive Mode','backwpup')),E_USER_NOTICE);
94
- else
95
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),__('Can not Entering Passive Mode','backwpup')),E_USER_WARNING);
96
- } else {
97
- if (ftp_pasv($ftp_conn_id, false))
98
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),__('Entering Normal Mode','backwpup')),E_USER_NOTICE);
99
- else
100
- trigger_error(sprintf(__('FTP Server reply: %s','backwpup'),__('Can not Entering Normal Mode','backwpup')),E_USER_WARNING);
101
- }
102
-
103
- if ($WORKING['STEPDONE']<$WORKING['STEPTODO']) {
104
- trigger_error(__('Upload to FTP now started ... ','backwpup'),E_USER_NOTICE);
105
- $fp = fopen($STATIC['JOB']['backupdir'].$STATIC['backupfile'], 'r');
106
- $ret = ftp_nb_fput($ftp_conn_id, $currentftpdir.$STATIC['backupfile'], $fp, FTP_BINARY,$WORKING['STEPDONE']);
107
- while ($ret == FTP_MOREDATA) {
108
- $WORKING['STEPDONE']=ftell($fp);
109
- update_working_file();
110
- $ret = ftp_nb_continue($ftp_conn_id);
111
- }
112
- if ($ret != FTP_FINISHED) {
113
- trigger_error(__('Can not transfer backup to FTP server!','backwpup'),E_USER_ERROR);
114
- return false;
115
- } else {
116
- $WORKING['STEPDONE']=filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
117
- trigger_error(sprintf(__('Backup transferred to FTP server: %s','backwpup'),$currentftpdir.$STATIC['backupfile']),E_USER_NOTICE);
118
- $STATIC['JOB']['lastbackupdownloadurl']="ftp://".$STATIC['JOB']['ftpuser'].":".backwpup_base64($STATIC['JOB']['ftppass'])."@".$STATIC['JOB']['ftphost'].':'.$STATIC['JOB']['ftphostport'].$currentftpdir.$STATIC['backupfile'];
119
- $WORKING['STEPSDONE'][]='DEST_FTP'; //set done
120
- }
121
- fclose($fp);
122
- }
123
-
124
- if ($STATIC['JOB']['ftpmaxbackups']>0) { //Delete old backups
125
- $backupfilelist=array();
126
- if ($filelist=ftp_nlist($ftp_conn_id, $currentftpdir)) {
127
- foreach($filelist as $files) {
128
- if ($STATIC['JOB']['fileprefix'] == substr(basename($files),0,strlen($STATIC['JOB']['fileprefix'])) and $STATIC['JOB']['fileformart'] == substr(basename($files),-strlen($STATIC['JOB']['fileformart'])))
129
- $backupfilelist[]=basename($files);
130
- }
131
- if (sizeof($backupfilelist)>0) {
132
- rsort($backupfilelist);
133
- $numdeltefiles=0;
134
- for ($i=$STATIC['JOB']['ftpmaxbackups'];$i<sizeof($backupfilelist);$i++) {
135
- if (ftp_delete($ftp_conn_id, $currentftpdir.$backupfilelist[$i])) //delte files on ftp
136
- $numdeltefiles++;
137
- else
138
- trigger_error(sprintf(__('Can not delete "%s" on FTP server!','backwpup'),$currentftpdir.$backupfilelist[$i]),E_USER_ERROR);
139
- }
140
- if ($numdeltefiles>0)
141
- trigger_error(sprintf(_n('One file deleted on FTP Server','%d files deleted on FTP Server',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
142
- }
143
- }
144
- }
145
-
146
- ftp_close($ftp_conn_id);
147
- $WORKING['STEPDONE']++;
148
-
149
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_gstorage.php DELETED
@@ -1,71 +0,0 @@
1
- <?PHP
2
- function dest_gstorage() {
3
- global $WORKING,$STATIC;
4
- trigger_error(sprintf(__('%d. try sending backup to Google Storage...','backwpup'),$WORKING['DEST_GSTORAGE']['STEP_TRY']),E_USER_NOTICE);
5
- $WORKING['STEPTODO']=2+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
6
- $WORKING['STEPDONE']=0;
7
-
8
- require_once(dirname(__FILE__).'/../libs/aws/sdk.class.php');
9
- need_free_memory(26214400*1.1);
10
- try {
11
- $gstorage = new AmazonS3(array('key'=>$STATIC['JOB']['GStorageAccessKey'],'secret'=>$STATIC['JOB']['GStorageSecret'],'certificate_authority'=>true));
12
- //set up s3 for google
13
- $gstorage->set_hostname('storage.googleapis.com');
14
- $gstorage->allow_hostname_override(false);
15
- if ($gstorage->if_bucket_exists($STATIC['JOB']['GStorageBucket'])) {
16
- trigger_error(sprintf(__('Connected to GStorage Bucket: %s','backwpup'),$STATIC['JOB']['GStorageBucket']),E_USER_NOTICE);
17
- //set curl Prozess bar
18
- $curlops=array();
19
- if (defined('CURLOPT_PROGRESSFUNCTION'))
20
- $curlops=array(CURLOPT_NOPROGRESS=>false,CURLOPT_PROGRESSFUNCTION=>'curl_progresscallback',CURLOPT_BUFFERSIZE=>1048576);
21
- trigger_error(__('Upload to GStorage now started... ','backwpup'),E_USER_NOTICE);
22
- //transferee file to GStorage
23
- $result=$gstorage->create_object($STATIC['JOB']['GStorageBucket'], $STATIC['JOB']['GStoragedir'].$STATIC['backupfile'], array('fileUpload' => $STATIC['JOB']['backupdir'].$STATIC['backupfile'],'acl' => 'private','curlopts'=>$curlops));
24
- $result=(array)$result;
25
- if ($result["status"]>=200 and $result["status"]<300) {
26
- $WORKING['STEPTODO']=1+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
27
- trigger_error(sprintf(__('Backup transferred to %s','backwpup'),"https://storage.cloud.google.com/".$STATIC['JOB']['GStorageBucket']."/".$STATIC['JOB']['GStoragedir'].$STATIC['backupfile']),E_USER_NOTICE);
28
- $STATIC['JOB']['lastbackupdownloadurl']="https://storage.cloud.google.com/" . $STATIC['JOB']['GStorageBucket'] . "/" . $STATIC['JOB']['GStoragedir'] . $STATIC['backupfile'];
29
- $WORKING['STEPSDONE'][]='DEST_GSTORAGE'; //set done
30
- } else {
31
- trigger_error(sprintf(__('Can not transfer backup to GStorage! (%1$d) %2$s','backwpup'),$result["status"],$result["Message"]),E_USER_ERROR);
32
- }
33
- } else {
34
- trigger_error(sprintf(__('GStorage Bucket "%s" not exists!','backwpup'),$STATIC['JOB']['GStorageBucket']),E_USER_ERROR);
35
- }
36
- } catch (Exception $e) {
37
- trigger_error(sprintf(__('GStorage API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
38
- return;
39
- }
40
- try {
41
- if ($gstorage->if_bucket_exists($STATIC['JOB']['GStorageBucket'])) {
42
- if ($STATIC['JOB']['GStoragemaxbackups']>0) { //Delete old backups
43
- $backupfilelist=array();
44
- if (($contents = $gstorage->list_objects($STATIC['JOB']['GStorageBucket'],array('prefix'=>$STATIC['JOB']['GStoragedir']))) !== false) {
45
- foreach ($contents->body->Contents as $object) {
46
- $file=basename($object->Key);
47
- if ($STATIC['JOB']['fileprefix'] == substr($file,0,strlen($STATIC['JOB']['fileprefix'])) and $STATIC['JOB']['fileformart'] == substr($file,-strlen($STATIC['JOB']['fileformart'])))
48
- $backupfilelist[]=$file;
49
- }
50
- }
51
- if (sizeof($backupfilelist)>0) {
52
- rsort($backupfilelist);
53
- $numdeltefiles=0;
54
- for ($i=$STATIC['JOB']['GStoragemaxbackups'];$i<sizeof($backupfilelist);$i++) {
55
- if ($gstorage->delete_object($STATIC['JOB']['GStorageBucket'], $STATIC['JOB']['GStoragedir'].$backupfilelist[$i])) //delte files on S3
56
- $numdeltefiles++;
57
- else
58
- trigger_error(sprintf(__('Can not delete backup on GStorage://%s','backwpup'),$STATIC['JOB']['awsBucket'].'/'.$STATIC['JOB']['GStoragedir'].$backupfilelist[$i]),E_USER_ERROR);
59
- }
60
- if ($numdeltefiles>0)
61
- trigger_error(sprintf(_n('One file deleted on GStorage Bucket','%d files deleted on GStorage Bucket',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
62
- }
63
- }
64
- }
65
- } catch (Exception $e) {
66
- trigger_error(sprintf(__('GStorage API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
67
- return;
68
- }
69
-
70
- $WORKING['STEPDONE']++;
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_mail.php DELETED
@@ -1,63 +0,0 @@
1
- <?PHP
2
- function dest_mail() {
3
- global $WORKING,$STATIC;
4
- $WORKING['STEPTODO']=filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
5
- $WORKING['STEPDONE']=0;
6
- trigger_error(sprintf(__('%d. try to sending backup with mail...','backwpup'),$WORKING['DEST_MAIL']['STEP_TRY']),E_USER_NOTICE);
7
-
8
- //Create PHP Mailer
9
- require_once(realpath($STATIC['WP']['ABSPATH'].$STATIC['WP']['WPINC']).'/class-phpmailer.php');
10
- $phpmailer = new PHPMailer();
11
- $phpmailer->CharSet=$STATIC['WP']['CHARSET'];
12
- //Setting den methode
13
- if ($STATIC['CFG']['mailmethod']=="SMTP") {
14
- require_once(realpath($STATIC['WP']['ABSPATH'].$STATIC['WP']['WPINC']).'/class-smtp.php');
15
- $phpmailer->Host=$STATIC['CFG']['mailhost'];
16
- $phpmailer->Port=$STATIC['CFG']['mailhostport'];
17
- $phpmailer->SMTPSecure=$STATIC['CFG']['mailsecure'];
18
- $phpmailer->Username=$STATIC['CFG']['mailuser'];
19
- $phpmailer->Password=backwpup_base64($STATIC['CFG']['mailpass']);
20
- if (!empty($STATIC['CFG']['mailuser']) and !empty($STATIC['CFG']['mailpass']))
21
- $phpmailer->SMTPAuth=true;
22
- $phpmailer->IsSMTP();
23
- trigger_error(__('Send mail with SMTP','backwpup'),E_USER_NOTICE);
24
- } elseif ($STATIC['CFG']['mailmethod']=="Sendmail") {
25
- $phpmailer->Sendmail=$STATIC['CFG']['mailsendmail'];
26
- $phpmailer->IsSendmail();
27
- trigger_error(__('Send mail with Sendmail','backwpup'),E_USER_NOTICE);
28
- } else {
29
- $phpmailer->IsMail();
30
- trigger_error(__('Send mail with PHP mail','backwpup'),E_USER_NOTICE);
31
- }
32
-
33
- trigger_error(__('Creating mail','backwpup'),E_USER_NOTICE);
34
- $phpmailer->From = $STATIC['CFG']['mailsndemail'];
35
- $phpmailer->FromName = $STATIC['CFG']['mailsndname'];
36
- $phpmailer->AddAddress($STATIC['JOB']['mailaddress']);
37
- $phpmailer->Subject = sprintf(__('BackWPup archive from %1$s: %2$s','backwpup'),date('Y/m/d @ H:i',$STATIC['JOB']['starttime']+$STATIC['WP']['TIMEDIFF']),$STATIC['JOB']['name']);
38
- $phpmailer->IsHTML(false);
39
- $phpmailer->Body = sprintf(__('Backup archive: %s','backwpup'),$STATIC['backupfile']);
40
-
41
- //check file Size
42
- if (!empty($STATIC['JOB']['mailefilesize'])) {
43
- if (filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile'])>abs($STATIC['JOB']['mailefilesize']*1024*1024)) {
44
- trigger_error(__('Backup archive too big for sending by mail!','backwpup'),E_USER_ERROR);
45
- $WORKING['STEPDONE']=1;
46
- $WORKING['STEPSDONE'][]='DEST_MAIL'; //set done
47
- return;
48
- }
49
- }
50
-
51
- trigger_error(__('Adding backup archive to mail','backwpup'),E_USER_NOTICE);
52
- need_free_memory(filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile'])*6);
53
- $phpmailer->AddAttachment($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
54
-
55
- trigger_error(__('Send mail....','backwpup'),E_USER_NOTICE);
56
- if (false == $phpmailer->Send()) {
57
- trigger_error(sprintf(__('Error "%s" on sending mail!','backwpup'),$phpmailer->ErrorInfo),E_USER_ERROR);
58
- } else {
59
- $WORKING['STEPTODO']=filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
60
- trigger_error(__('Mail send!!!','backwpup'),E_USER_NOTICE);
61
- }
62
- $WORKING['STEPSDONE'][]='DEST_MAIL'; //set done
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_msazure.php DELETED
@@ -1,59 +0,0 @@
1
- <?PHP
2
- function dest_msazure() {
3
- global $WORKING,$STATIC;
4
- $WORKING['STEPTODO']=2+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
5
- trigger_error(sprintf(__('%d. try sending backup to a Microsoft Azure (Blob)...','backwpup'),$WORKING['DEST_MSAZURE']['STEP_TRY']),E_USER_NOTICE);
6
-
7
- require_once(dirname(__FILE__).'/../libs/Microsoft/WindowsAzure/Storage/Blob.php');
8
- need_free_memory(4194304*1.5);
9
-
10
- try {
11
- $storageClient = new Microsoft_WindowsAzure_Storage_Blob($STATIC['JOB']['msazureHost'],$STATIC['JOB']['msazureAccName'],$STATIC['JOB']['msazureKey']);
12
-
13
- if(!$storageClient->containerExists($STATIC['JOB']['msazureContainer'])) {
14
- trigger_error(sprintf(__('Microsoft Azure container "%s" not exists!','backwpup'),$STATIC['JOB']['msazureContainer']),E_USER_ERROR);
15
- return;
16
- } else {
17
- trigger_error(sprintf(__('Connected to Microsoft Azure container "%s"','backwpup'),$STATIC['JOB']['msazureContainer']),E_USER_NOTICE);
18
- }
19
-
20
- trigger_error(__('Upload to MS Azure now started... ','backwpup'),E_USER_NOTICE);
21
- $result = $storageClient->putBlob($STATIC['JOB']['msazureContainer'], $STATIC['JOB']['msazuredir'].$STATIC['backupfile'], $STATIC['JOB']['backupdir'].$STATIC['backupfile']);
22
-
23
- if ($result->Name==$STATIC['JOB']['msazuredir'].$STATIC['backupfile']) {
24
- $WORKING['STEPTODO']=1+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
25
- trigger_error(sprintf(__('Backup transferred to %s','backwpup'),'https://'.$STATIC['JOB']['msazureAccName'].'.'.$STATIC['JOB']['msazureHost'].'/'.$STATIC['JOB']['msazuredir'].$STATIC['backupfile']),E_USER_NOTICE);
26
- $STATIC['JOB']['lastbackupdownloadurl']=$STATIC['WP']['ADMINURL'].'?page=backwpupbackups&action=downloadmsazure&file='.$STATIC['JOB']['msazuredir'].$STATIC['backupfile'].'&jobid='.$STATIC['JOB']['jobid'];
27
- $WORKING['STEPSDONE'][]='DEST_MSAZURE'; //set done
28
- } else {
29
- trigger_error(__('Can not transfer backup to Microsoft Azure!','backwpup'),E_USER_ERROR);
30
- }
31
-
32
- if ($STATIC['JOB']['msazuremaxbackups']>0) { //Delete old backups
33
- $backupfilelist=array();
34
- $blobs = $storageClient->listBlobs($STATIC['JOB']['msazureContainer'],$STATIC['JOB']['msazuredir']);
35
- if (is_array($blobs)) {
36
- foreach ($blobs as $blob) {
37
- $file=basename($blob->Name);
38
- if ($STATIC['JOB']['fileprefix'] == substr($file,0,strlen($STATIC['JOB']['fileprefix'])) and $STATIC['JOB']['fileformart'] == substr($file,-strlen($STATIC['JOB']['fileformart'])))
39
- $backupfilelist[]=$file;
40
- }
41
- }
42
- if (sizeof($backupfilelist)>0) {
43
- rsort($backupfilelist);
44
- $numdeltefiles=0;
45
- for ($i=$STATIC['JOB']['msazuremaxbackups'];$i<sizeof($backupfilelist);$i++) {
46
- $storageClient->deleteBlob($STATIC['JOB']['msazureContainer'],$STATIC['JOB']['msazuredir'].$backupfilelist[$i]); //delte files on Cloud
47
- $numdeltefiles++;
48
- }
49
- if ($numdeltefiles>0)
50
- trigger_error(sprintf(_n('One file deleted on Microsoft Azure container','%d files deleted on Microsoft Azure container',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
51
- }
52
- }
53
-
54
- } catch (Exception $e) {
55
- trigger_error(sprintf(__('Microsoft Azure API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
56
- }
57
-
58
- $WORKING['STEPDONE']++;
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_rsc.php DELETED
@@ -1,96 +0,0 @@
1
- <?PHP
2
- function dest_rsc() {
3
- global $WORKING,$STATIC;
4
- trigger_error($WORKING['DEST_RSC']['STEP_TRY'].'. '.__('Try to sending backup file to Rackspace Cloud...','backwpup'),E_USER_NOTICE);
5
- $WORKING['STEPTODO']=2+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
6
- $WORKING['STEPDONE']=0;
7
- require_once(dirname(__FILE__).'/../libs/rackspace/cloudfiles.php');
8
-
9
- $auth = new CF_Authentication($STATIC['JOB']['rscUsername'], $STATIC['JOB']['rscAPIKey']);
10
- $auth->ssl_use_cabundle();
11
- try {
12
- if ($auth->authenticate())
13
- trigger_error(__('Connected to Rackspase ...','backwpup'),E_USER_NOTICE);
14
- $conn = new CF_Connection($auth);
15
- $conn->ssl_use_cabundle();
16
- $is_container=false;
17
- $containers=$conn->get_containers();
18
- foreach ($containers as $container) {
19
- if ($container->name == $STATIC['JOB']['rscContainer'] )
20
- $is_container=true;
21
- }
22
- if (!$is_container) {
23
- $public_container = $conn->create_container($STATIC['JOB']['rscContainer']);
24
- $public_container->make_private();
25
- if (empty($public_container))
26
- $is_container=false;
27
- }
28
- } catch (Exception $e) {
29
- trigger_error(__('Rackspase Cloud API:','backwpup').' '.$e->getMessage(),E_USER_ERROR);
30
- return;
31
- }
32
-
33
- if (!$is_container) {
34
- trigger_error(__('Rackspase Cloud Container not exists:','backwpup').' '.$STATIC['JOB']['rscContainer'],E_USER_ERROR);
35
- return;
36
- }
37
-
38
- try {
39
- //Transfer Backup to Rackspace Cloud
40
- $backwpupcontainer = $conn->get_container($STATIC['JOB']['rscContainer']);
41
- //if (!empty($STATIC['JOB']['rscdir'])) //make the foldder
42
- // $backwpupcontainer->create_paths($STATIC['JOB']['rscdir']);
43
- $backwpupbackup = $backwpupcontainer->create_object($STATIC['JOB']['rscdir'].$STATIC['backupfile']);
44
- //set content Type
45
- if ($STATIC['JOB']['fileformart']=='.zip')
46
- $backwpupbackup->content_type='application/zip';
47
- if ($STATIC['JOB']['fileformart']=='.tar')
48
- $backwpupbackup->content_type='application/x-ustar';
49
- if ($STATIC['JOB']['fileformart']=='.tar.gz')
50
- $backwpupbackup->content_type='application/x-compressed';
51
- if ($STATIC['JOB']['fileformart']=='.tar.bz2')
52
- $backwpupbackup->content_type='application/x-compressed';
53
- trigger_error(__('Upload to RSC now started ... ','backwpup'),E_USER_NOTICE);
54
- if ($backwpupbackup->load_from_filename($STATIC['JOB']['backupdir'].$STATIC['backupfile'])) {
55
- $WORKING['STEPTODO']=1+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
56
- trigger_error(__('Backup File transferred to RSC://','backwpup').$STATIC['JOB']['rscContainer'].'/'.$STATIC['JOB']['rscdir'].$STATIC['backupfile'],E_USER_NOTICE);
57
- $STATIC['JOB']['lastbackupdownloadurl']=$STATIC['WP']['ADMINURL'].'?page=backwpupbackups&action=downloadrsc&file='.$STATIC['JOB']['rscdir'].$STATIC['backupfile'].'&jobid='.$STATIC['JOB']['jobid'];
58
- $WORKING['STEPSDONE'][]='DEST_RSC'; //set done
59
- } else {
60
- trigger_error(__('Can not transfer backup to RSC.','backwpup'),E_USER_ERROR);
61
- }
62
- } catch (Exception $e) {
63
- trigger_error(__('Rackspase Cloud API:','backwpup').' '.$e->getMessage(),E_USER_ERROR);
64
- }
65
- try {
66
- if ($STATIC['JOB']['rscmaxbackups']>0) { //Delete old backups
67
- $backupfilelist=array();
68
- $contents = $backwpupcontainer->list_objects(0,NULL,NULL,$STATIC['JOB']['rscdir']);
69
- if (is_array($contents)) {
70
- foreach ($contents as $object) {
71
- $file=basename($object);
72
- if ($STATIC['JOB']['rscdir'].$file == $object) {//only in the folder and not in complete bucket
73
- if ($STATIC['JOB']['fileprefix'] == substr($file,0,strlen($STATIC['JOB']['fileprefix'])) and $STATIC['JOB']['fileformart'] == substr($file,-strlen($STATIC['JOB']['fileformart'])))
74
- $backupfilelist[]=$file;
75
- }
76
- }
77
- }
78
- if (sizeof($backupfilelist)>0) {
79
- rsort($backupfilelist);
80
- $numdeltefiles=0;
81
- for ($i=$STATIC['JOB']['rscmaxbackups'];$i<sizeof($backupfilelist);$i++) {
82
- if ($backwpupcontainer->delete_object($STATIC['JOB']['rscdir'].$backupfilelist[$i])) //delte files on Cloud
83
- $numdeltefiles++;
84
- else
85
- trigger_error(__('Can not delete file on RSC://','backwpup').$STATIC['JOB']['rscContainer'].$STATIC['JOB']['rscdir'].$backupfilelist[$i],E_USER_ERROR);
86
- }
87
- if ($numdeltefiles>0)
88
- trigger_error(sprintf(_n('One file deleted on RSC container','%d files deleted on RSC container',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
89
- }
90
- }
91
- } catch (Exception $e) {
92
- trigger_error(__('Rackspase Cloud API:','backwpup').' '.$e->getMessage(),E_USER_ERROR);
93
- }
94
-
95
- $WORKING['STEPDONE']++;
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_s3.php DELETED
@@ -1,74 +0,0 @@
1
- <?PHP
2
- function dest_s3() {
3
- global $WORKING,$STATIC;
4
- trigger_error(sprintf(__('%d. try sending backup file to Amazon S3...','backwpup'),$WORKING['DEST_S3']['STEP_TRY']),E_USER_NOTICE);
5
- $WORKING['STEPTODO']=2+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
6
- $WORKING['STEPDONE']=0;
7
-
8
- require_once(dirname(__FILE__).'/../libs/aws/sdk.class.php');
9
- need_free_memory(26214400*1.1);
10
-
11
- try {
12
- $s3 = new AmazonS3(array('key'=>$STATIC['JOB']['awsAccessKey'],'secret'=>$STATIC['JOB']['awsSecretKey'],'certificate_authority'=>true));
13
- if ($s3->if_bucket_exists($STATIC['JOB']['awsBucket'])) {
14
- trigger_error(sprintf(__('Connected to S3 Bucket: %s','backwpup'),$STATIC['JOB']['awsBucket']),E_USER_NOTICE);
15
- //Transfer Backup to S3
16
- if ($STATIC['JOB']['awsrrs']) //set reduced redundancy or not
17
- $storage=AmazonS3::STORAGE_REDUCED;
18
- else
19
- $storage=AmazonS3::STORAGE_STANDARD;
20
- //set curl Progress bar
21
- $curlops=array();
22
- if (defined('CURLOPT_PROGRESSFUNCTION'))
23
- $curlops=array(CURLOPT_NOPROGRESS=>false,CURLOPT_PROGRESSFUNCTION=>'curl_progresscallback',CURLOPT_BUFFERSIZE=>1048576);
24
- trigger_error(__('Upload to Amazon S3 now started... ','backwpup'),E_USER_NOTICE);
25
- //transferee file to S3
26
- $result=$s3->create_object($STATIC['JOB']['awsBucket'], $STATIC['JOB']['awsdir'].$STATIC['backupfile'], array('fileUpload' => $STATIC['JOB']['backupdir'].$STATIC['backupfile'],'acl' => AmazonS3::ACL_PRIVATE,'storage' => $storage,'curlopts'=>$curlops));
27
- $result=(array)$result;
28
- if ($result["status"]>=200 and $result["status"]<300) {
29
- $WORKING['STEPTODO']=1+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
30
- trigger_error(sprintf(__('Backup transferred to %s','backwpup'),$result["header"]["_info"]["url"]),E_USER_NOTICE);
31
- $STATIC['JOB']['lastbackupdownloadurl']=$STATIC['WP']['ADMINURL'].'?page=backwpupbackups&action=downloads3&file='.$STATIC['JOB']['awsdir'].$STATIC['backupfile'].'&jobid='.$STATIC['JOB']['jobid'];
32
- $WORKING['STEPSDONE'][]='DEST_S3'; //set done
33
- } else {
34
- trigger_error(sprintf(__('Can not transfer backup to S3! (%1$d) %2$s','backwpup'),$result["status"],$result["Message"]),E_USER_ERROR);
35
- }
36
- } else {
37
- trigger_error(sprintf(__('S3 Bucket "%s" not exists!','backwpup'),$STATIC['JOB']['awsBucket']),E_USER_ERROR);
38
- }
39
- } catch (Exception $e) {
40
- trigger_error(sprintf(__('Amazon API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
41
- return;
42
- }
43
- try {
44
- if ($s3->if_bucket_exists($STATIC['JOB']['awsBucket'])) {
45
- if ($STATIC['JOB']['awsmaxbackups']>0) { //Delete old backups
46
- $backupfilelist=array();
47
- if (($contents = $s3->list_objects($STATIC['JOB']['awsBucket'],array('prefix'=>$STATIC['JOB']['awsdir']))) !== false) {
48
- foreach ($contents->body->Contents as $object) {
49
- $file=basename($object->Key);
50
- if ($STATIC['JOB']['fileprefix'] == substr($file,0,strlen($STATIC['JOB']['fileprefix'])) and $STATIC['JOB']['fileformart'] == substr($file,-strlen($STATIC['JOB']['fileformart'])))
51
- $backupfilelist[]=$file;
52
- }
53
- }
54
- if (sizeof($backupfilelist)>0) {
55
- rsort($backupfilelist);
56
- $numdeltefiles=0;
57
- for ($i=$STATIC['JOB']['awsmaxbackups'];$i<sizeof($backupfilelist);$i++) {
58
- if ($s3->delete_object($STATIC['JOB']['awsBucket'], $STATIC['JOB']['awsdir'].$backupfilelist[$i])) //delte files on S3
59
- $numdeltefiles++;
60
- else
61
- trigger_error(sprintf(__('Can not delete backup on S3://%s','backwpup'),$STATIC['JOB']['awsBucket'].'/'.$STATIC['JOB']['awsdir'].$backupfilelist[$i]),E_USER_ERROR);
62
- }
63
- if ($numdeltefiles>0)
64
- trigger_error(sprintf(_n('One file deleted on S3 Bucket','%d files deleted on S3 Bucket',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
65
- }
66
- }
67
- }
68
- } catch (Exception $e) {
69
- trigger_error(sprintf(__('Amazon API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
70
- return;
71
- }
72
-
73
- $WORKING['STEPDONE']++;
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/dest_sugarsync.php DELETED
@@ -1,70 +0,0 @@
1
- <?PHP
2
- function dest_sugarsync() {
3
- global $WORKING,$STATIC;
4
- $WORKING['STEPTODO']=2+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
5
- $WORKING['STEPDONE']=0;
6
- trigger_error(sprintf(__('%d. try sending backup to SugarSync...','backwpup'),$WORKING['DEST_SUGARSYNC']['STEP_TRY']),E_USER_NOTICE);
7
-
8
- require_once(realpath(dirname(__FILE__).'/../libs/sugarsync.php'));
9
-
10
- try {
11
- $sugarsync = new SugarSync($STATIC['JOB']['sugarrefreshtoken']);
12
- //Check Quota
13
- $user=$sugarsync->user();
14
- if (!empty($user->nickname)) {
15
- trigger_error(sprintf(__('Authed to SugarSync with Nick %s','backwpup'),$user->nickname),E_USER_NOTICE);
16
- }
17
- $sugarsyncfreespase=(float)$user->quota->limit-(float)$user->quota->usage; //float fixes bug for display of no free space
18
- if (filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile'])>$sugarsyncfreespase) {
19
- trigger_error(__('No free space left on SugarSync!!!','backwpup'),E_USER_ERROR);
20
- $WORKING['STEPTODO']=1+filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
21
- $WORKING['STEPSDONE'][]='DEST_SUGARSYNC'; //set done
22
- return;
23
- } else {
24
- trigger_error(sprintf(__('%s free on SugarSync','backwpup'),formatBytes($sugarsyncfreespase)),E_USER_NOTICE);
25
- }
26
- //Create and change folder
27
- $sugarsync->mkdir($STATIC['JOB']['sugardir'],$STATIC['JOB']['sugarroot']);
28
- $dirid=$sugarsync->chdir($STATIC['JOB']['sugardir'],$STATIC['JOB']['sugarroot']);
29
- //Upload to Sugarsync
30
- $sugarsync->setProgressFunction('curl_progresscallback');
31
- trigger_error(__('Upload to SugarSync now started... ','backwpup'),E_USER_NOTICE);
32
- $reponse=$sugarsync->upload($STATIC['JOB']['backupdir'].$STATIC['backupfile']);
33
- if (is_object($reponse)) {
34
- $STATIC['JOB']['lastbackupdownloadurl']=$STATIC['WP']['ADMINURL'].'?page=backwpupbackups&action=downloadsugarsync&file='.(string)$reponse.'&jobid='.$STATIC['JOB']['jobid'];
35
- $WORKING['STEPDONE']++;
36
- $WORKING['STEPSDONE'][]='DEST_SUGARSYNC'; //set done
37
- trigger_error(sprintf(__('Backup transferred to %s','backwpup'),'https://'.$user->nickname.'.sugarsync.com/'.$sugarsync->showdir($dirid).$STATIC['backupfile']),E_USER_NOTICE);
38
- } else {
39
- trigger_error(__('Can not transfer backup to SugarSync!','backwpup'),E_USER_ERROR);
40
- return;
41
- }
42
- $sugarsync->setProgressFunction('');
43
-
44
- if ($STATIC['JOB']['sugarmaxbackups']>0) { //Delete old backups
45
- $backupfilelist=array();
46
- $getfiles=$sugarsync->getcontents('file');
47
- if (is_object($getfiles)) {
48
- foreach ($getfiles->file as $getfile) {
49
- if ($STATIC['JOB']['fileprefix'] == substr($getfile->displayName,0,strlen($STATIC['JOB']['fileprefix'])) and $STATIC['JOB']['fileformart'] == substr($getfile->displayName,-strlen($STATIC['JOB']['fileformart'])))
50
- $backupfilelist[]=$getfile->displayName;
51
- $backupfileref[utf8_encode($getfile->displayName)]=$getfile->ref;
52
- }
53
- }
54
- if (sizeof($backupfilelist)>0) {
55
- rsort($backupfilelist);
56
- $numdeltefiles=0;
57
- for ($i=$STATIC['JOB']['sugarmaxbackups'];$i<count($backupfilelist);$i++) {
58
- $sugarsync->delete($backupfileref[utf8_encode($backupfilelist[$i])]); //delete files on Cloud
59
- $numdeltefiles++;
60
- }
61
- if ($numdeltefiles>0)
62
- trigger_error(sprintf(_n('One file deleted on SugarSync folder','%d files deleted on SugarSync folder',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
63
- }
64
- }
65
- } catch (Exception $e) {
66
- trigger_error(sprintf(__('SugarSync API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
67
- }
68
-
69
- $WORKING['STEPDONE']++;
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/file_list.php DELETED
@@ -1,133 +0,0 @@
1
- <?PHP
2
- function file_list() {
3
- global $WORKING,$STATIC,$tempfilelist;
4
- //Make filelist
5
- trigger_error(sprintf(__('%d. try for make list of files to backup....','backwpup'),$WORKING['FILE_LIST']['STEP_TRY']),E_USER_NOTICE);
6
- $WORKING['STEPTODO']=2;
7
-
8
- //Check free memory for file list
9
- need_free_memory('20MB'); //10MB free memory for filelist
10
- //empty filelist
11
- $tempfilelist=array();
12
- //exlude of job
13
- $WORKING['FILEEXCLUDES']=explode(',',trim($STATIC['JOB']['fileexclude']));
14
- $WORKING['FILEEXCLUDES'][]='.tmp'; //do not backup .tmp files
15
- $WORKING['FILEEXCLUDES']=array_unique($WORKING['FILEEXCLUDES']);
16
-
17
- //File list for blog folders
18
- if ($STATIC['JOB']['backuproot'])
19
- _file_list($STATIC['WP']['ABSPATH'],100,array_merge($STATIC['JOB']['backuprootexcludedirs'],_get_exclude_dirs($STATIC['WP']['ABSPATH'])));
20
- if ($STATIC['JOB']['backupcontent'])
21
- _file_list($STATIC['WP']['WP_CONTENT_DIR'],100,array_merge($STATIC['JOB']['backupcontentexcludedirs'],_get_exclude_dirs($STATIC['WP']['WP_CONTENT_DIR'])));
22
- if ($STATIC['JOB']['backupplugins'])
23
- _file_list($STATIC['WP']['WP_PLUGIN_DIR'],100,array_merge($STATIC['JOB']['backuppluginsexcludedirs'],_get_exclude_dirs($STATIC['WP']['WP_PLUGIN_DIR'])));
24
- if ($STATIC['JOB']['backupthemes'])
25
- _file_list($STATIC['WP']['WP_THEMES_DIR'],100,array_merge($STATIC['JOB']['backupthemesexcludedirs'],_get_exclude_dirs($STATIC['WP']['WP_THEMES_DIR'])));
26
- if ($STATIC['JOB']['backupuploads'])
27
- _file_list($STATIC['WP']['WP_UPLOAD_DIR'],100,array_merge($STATIC['JOB']['backupuploadsexcludedirs'],_get_exclude_dirs($STATIC['WP']['WP_UPLOAD_DIR'])));
28
-
29
- //include dirs
30
- if (!empty($STATIC['JOB']['dirinclude'])) {
31
- $dirinclude=explode(',',$STATIC['JOB']['dirinclude']);
32
- $dirinclude=array_unique($dirinclude);
33
- //Crate file list for includes
34
- foreach($dirinclude as $dirincludevalue) {
35
- if (is_dir($dirincludevalue))
36
- _file_list($dirincludevalue,100);
37
- }
38
- }
39
- $tempfilelist=array_unique($tempfilelist); //all files only one time in list
40
- sort($tempfilelist);
41
- $WORKING['STEPDONE']=1; //Step done
42
- update_working_file();
43
-
44
- //Check abs path
45
- if ($STATIC['WP']['ABSPATH']=='/' or $STATIC['WP']['ABSPATH']=='')
46
- $removepath='';
47
- else
48
- $removepath=$STATIC['WP']['ABSPATH'];
49
- //make file list
50
- $filelist=array();
51
- for ($i=0; $i<count($tempfilelist); $i++) {
52
- $filestat=stat($tempfilelist[$i]);
53
- $WORKING['ALLFILESIZE']+=$filestat['size'];
54
- $outfile=str_replace($removepath,'',$tempfilelist[$i]);
55
- if (substr($outfile,0,1)=='/') //remove first /
56
- $outfile=substr($outfile,1);
57
- $filelist[]=array('FILE'=>$tempfilelist[$i],'OUTFILE'=>$outfile,'SIZE'=>$filestat['size'],'ATIME'=>$filestat['atime'],'MTIME'=>$filestat['mtime'],'CTIME'=>$filestat['ctime'],'UID'=>$filestat['uid'],'GID'=>$filestat['gid'],'MODE'=>$filestat['mode']);
58
- }
59
- add_file($filelist); //add files to list
60
- $WORKING['STEPDONE']=2;
61
- $WORKING['STEPSDONE'][]='FILE_LIST'; //set done
62
- unset($tempfilelist);
63
-
64
- $filelist=get_filelist(); //get files from list
65
- if (!is_array($filelist[0])) {
66
- trigger_error(__('No files to backup','backwpup'),E_USER_ERROR);
67
- } else {
68
- trigger_error(sprintf(__('%1$d files with %2$s to backup','backwpup'),count($filelist),formatBytes($WORKING['ALLFILESIZE'])),E_USER_NOTICE);
69
- }
70
- }
71
-
72
- function _file_list( $folder = '', $levels = 100, $excludedirs=array()) {
73
- global $WORKING,$tempfilelist;
74
- if( empty($folder) )
75
- return false;
76
- if( ! $levels )
77
- return false;
78
- if ($levels == 100 or $levels == 95)
79
- update_working_file();
80
- $folder=rtrim($folder,'/').'/';
81
- if ( $dir = @opendir( $folder ) ) {
82
- while (($file = readdir( $dir ) ) !== false ) {
83
- if ( in_array($file, array('.', '..','.svn') ) )
84
- continue;
85
- foreach ($WORKING['FILEEXCLUDES'] as $exclusion) { //exclude dirs and files
86
- $exclusion=trim($exclusion);
87
- if (false !== stripos($folder.$file,$exclusion) and !empty($exclusion) and $exclusion!='/')
88
- continue 2;
89
- }
90
- if (in_array(rtrim($folder.$file,'/').'/',$excludedirs) and is_dir( $folder.$file ))
91
- continue;
92
- if ( !is_readable($folder.$file)) {
93
- trigger_error(sprintf(__('File or folder "%s" is not readable!','backwpup'),$folder.$file),E_USER_WARNING);
94
- } elseif ( is_link($folder.$file) ) {
95
- trigger_error(sprintf(__('Link "%s" not followed','backwpup'),$folder.$file),E_USER_WARNING);
96
- } elseif ( is_dir( $folder.$file )) {
97
- _file_list( rtrim($folder.$file,'/'), $levels - 1,$excludedirs);
98
- } elseif ( is_file( $folder.$file ) or is_executable($folder.$file)) { //add file to filelist
99
- $tempfilelist[]=$folder.$file;
100
- } else {
101
- trigger_error(sprintf(__('"%s" is not a file or directory','backwpup'),$folder.$file),E_USER_WARNING);
102
- }
103
-
104
- }
105
- @closedir( $dir );
106
- }
107
- }
108
-
109
- function _get_exclude_dirs($folder) {
110
- global $WORKING,$STATIC;
111
- $excludedir=array();
112
- $excludedir[]=$STATIC['TEMPDIR']; //exclude temp dir
113
- $excludedir[]=$STATIC['CFG']['dirlogs'];
114
- if (false !== strpos($STATIC['WP']['ABSPATH'],$folder) and $STATIC['WP']['ABSPATH']!=$folder)
115
- $excludedir[]=$STATIC['WP']['ABSPATH'];
116
- if (false !== strpos($STATIC['WP']['WP_CONTENT_DIR'],$folder) and $STATIC['WP']['WP_CONTENT_DIR']!=$folder)
117
- $excludedir[]=$STATIC['WP']['WP_CONTENT_DIR'];
118
- if (false !== strpos($STATIC['WP']['WP_PLUGIN_DIR'],$folder) and $STATIC['WP']['WP_PLUGIN_DIR']!=$folder)
119
- $excludedir[]=$STATIC['WP']['WP_PLUGIN_DIR'];
120
- if (false !== strpos($STATIC['WP']['WP_THEMES_DIR'],$folder) and $STATIC['WP']['WP_THEMES_DIR']!=$folder)
121
- $excludedir[]=$STATIC['WP']['WP_THEMES_DIR'];
122
- if (false !== strpos($STATIC['WP']['WP_UPLOAD_DIR'],$folder) and $STATIC['WP']['WP_UPLOAD_DIR']!=$folder)
123
- $excludedir[]=$STATIC['WP']['WP_UPLOAD_DIR'];
124
- //Exclude Backup dirs
125
- $jobs=get_option('backwpup_jobs');
126
- if (!empty($jobs)) {
127
- foreach($jobs as $jobsvalue) {
128
- if (!empty($jobsvalue['backupdir']) and $jobsvalue['backupdir']!='/')
129
- $excludedir[]=$jobsvalue['backupdir'];
130
- }
131
- }
132
- return $excludedir;
133
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
job/job_functions.php DELETED
@@ -1,582 +0,0 @@
1
- <?PHP
2
- function __($message,$domain='backwpup') {
3
- global $TRANSLATE;
4
- return $TRANSLATE->translate($message);
5
- }
6
-
7
- function _e($message,$domain='backwpup') {
8
- global $TRANSLATE;
9
- echo $TRANSLATE->translate($message);
10
- }
11
-
12
- function _n($single, $plural, $number,$domain='backwpup') {
13
- global $TRANSLATE;
14
- return $TRANSLATE->translate_plural($single,$plural,$number);
15
- }
16
-
17
- function exists_option($option='backwpup_jobs') {
18
- global $WORKING,$STATIC;
19
- mysql_update();
20
- $query="SELECT option_value as value FROM ".$STATIC['WP']['OPTIONS_TABLE']." WHERE option_name='".trim($option)."' LIMIT 1";
21
- $res=mysql_query($query);
22
- if (!$res or mysql_num_rows($res)<1) {
23
- return false;
24
- }
25
- return true;
26
- }
27
-
28
- function get_option($option='backwpup_jobs') {
29
- global $WORKING,$STATIC;
30
- mysql_update();
31
- $query="SELECT option_value FROM ".$STATIC['WP']['OPTIONS_TABLE']." WHERE option_name='".trim($option)."' LIMIT 1";
32
- $res=mysql_query($query);
33
- if (!$res) {
34
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), $query),E_USER_ERROR);
35
- return false;
36
- }
37
- return unserialize(mysql_result($res,0));
38
- }
39
-
40
- function update_option($option='backwpup_jobs',$data) {
41
- global $WORKING,$STATIC;
42
- mysql_update();
43
- $serdata=mysql_real_escape_string(serialize($data));
44
- $query="UPDATE ".$STATIC['WP']['OPTIONS_TABLE']." SET option_value= '".$serdata."' WHERE option_name='".trim($option)."' LIMIT 1";
45
- $res=mysql_query($query);
46
- if (!$res) {
47
- trigger_error(sprintf(__('Database error %1$s for query %2$s','backwpup'), mysql_error(), $query),E_USER_ERROR);
48
- return false;
49
- }
50
- return true;
51
- }
52
- //base64 replacement
53
- function backwpup_base64($data) {
54
- if (preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $data))
55
- $data=base64_decode($data);
56
- return $data;
57
- }
58
-
59
- // add to file list
60
- function add_file($files) {
61
- global $STATIC;
62
- if (empty($files))
63
- return;
64
- $filelist=get_filelist();
65
- foreach($files as $file)
66
- $filelist[]=$file;
67
- file_put_contents($STATIC['TEMPDIR'].'.filelist',serialize($filelist));
68
- }
69
-
70
- // get file list
71
- function get_filelist() {
72
- global $STATIC;
73
- if (is_file($STATIC['TEMPDIR'].'.filelist') and $filelistfile=file_get_contents($STATIC['TEMPDIR'].'.filelist'))
74
- return unserialize(trim($filelistfile));
75
- else
76
- return array();
77
- }
78
-
79
- //file size
80
- function formatbytes($bytes, $precision = 2) {
81
- $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
82
- $bytes = max($bytes, 0);
83
- $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
84
- $pow = min($pow, count($units) - 1);
85
- $bytes /= pow(1024, $pow);
86
- return round($bytes, $precision) . ' ' . $units[$pow];
87
- }
88
-
89
-
90
- function inbytes($value) {
91
- $multi=strtoupper(substr(trim($value),-1));
92
- $bytes=abs(intval(trim($value)));
93
- if ($multi=='G')
94
- $bytes=$bytes*1024*1024*1024;
95
- if ($multi=='M')
96
- $bytes=$bytes*1024*1024;
97
- if ($multi=='K')
98
- $bytes=$bytes*1024;
99
- return $bytes;
100
- }
101
-
102
- function need_free_memory($memneed) {
103
- if (!function_exists('memory_get_usage'))
104
- return;
105
- //need memory
106
- $needmemory=@memory_get_usage(true)+inbytes($memneed);
107
- // increase Memory
108
- if ($needmemory>inbytes(ini_get('memory_limit'))) {
109
- $newmemory=round($needmemory/1024/1024)+1 .'M';
110
- if ($needmemory>=1073741824)
111
- $newmemory=round($needmemory/1024/1024/1024) .'G';
112
- if ($oldmem=@ini_set('memory_limit', $newmemory))
113
- trigger_error(sprintf(__('Memory increased from %1$s to %2$s','backwpup'),$oldmem,@ini_get('memory_limit')),E_USER_NOTICE);
114
- else
115
- trigger_error(sprintf(__('Can not increase memory limit is %1$s','backwpup'),@ini_get('memory_limit')),E_USER_WARNING);
116
- }
117
- }
118
-
119
- function maintenance_mode($enable = false) {
120
- global $WORKING,$STATIC;
121
- if (!$STATIC['JOB']['maintenance'])
122
- return;
123
- if ( $enable ) {
124
- trigger_error(__('Set Blog to maintenance mode','backwpup'),E_USER_NOTICE);
125
- if ( exists_option('wp-maintenance-mode-msqld') ) { //Support for WP Maintenance Mode Plugin
126
- update_option('wp-maintenance-mode-msqld','1');
127
- } elseif ( exists_option('plugin_maintenance-mode') ) { //Support for Maintenance Mode Plugin
128
- $mamo=get_option('plugin_maintenance-mode');
129
- $mamo['mamo_activate']='on_'.time();
130
- $mamo['mamo_backtime_days']='0';
131
- $mamo['mamo_backtime_hours']='0';
132
- $mamo['mamo_backtime_mins']='5';
133
- update_option('plugin_maintenance-mode',$mamo);
134
- } else { //WP Support
135
- if (is_writable(rtrim($STATIC['WP']['ABSPATH'],'/')))
136
- file_put_contents(rtrim($STATIC['WP']['ABSPATH'],'/').'/.maintenance','<?php $upgrading = '.time().'; ?>');
137
- else
138
- trigger_error(__('Cannot set Blog to maintenance mode! Root folder is not writeable!','backwpup'),E_USER_NOTICE);
139
- }
140
- } else {
141
- trigger_error(__('Set Blog to normal mode','backwpup'),E_USER_NOTICE);
142
- if ( exists_option('wp-maintenance-mode-msqld') ) { //Support for WP Maintenance Mode Plugin
143
- update_option('wp-maintenance-mode-msqld','0');
144
- } elseif ( exists_option('plugin_maintenance-mode') ) { //Support for Maintenance Mode Plugin
145
- $mamo=get_option('plugin_maintenance-mode');
146
- $mamo['mamo_activate']='off';
147
- update_option('plugin_maintenance-mode',$mamo);
148
- } else { //WP Support
149
- @unlink(rtrim($STATIC['WP']['ABSPATH'],'/').'/.maintenance');
150
- }
151
- }
152
- }
153
-
154
- function curl_progresscallback($download_size, $downloaded, $upload_size, $uploaded) {
155
- global $WORKING;
156
- if ($WORKING['STEPTODO']>10)
157
- $WORKING['STEPDONE']=$uploaded;
158
- update_working_file();
159
- return(0);
160
- }
161
-
162
- function get_working_file() {
163
- global $STATIC;
164
- if (is_writable($STATIC['TEMPDIR'].'.running')) {
165
- if ($runningfile=file_get_contents($STATIC['TEMPDIR'].'.running'))
166
- return unserialize(trim($runningfile));
167
- else
168
- return false;
169
- } else {
170
- return false;
171
- }
172
- }
173
-
174
- function delete_working_file() {
175
- global $STATIC;
176
- if (is_writable($STATIC['TEMPDIR'].'.running')) {
177
- unlink($STATIC['TEMPDIR'].'.running');
178
- unlink($STATIC['TEMPDIR'].'.static');
179
- return true;
180
- } else {
181
- return false;
182
- }
183
- }
184
-
185
- function update_working_file($mustwrite=false) {
186
- global $WORKING,$STATIC,$savedmicrotime;
187
- if (!is_file($STATIC['TEMPDIR'].'.running')) {
188
- job_end();
189
- return false;
190
- }
191
- //only update all 1 sec.
192
- $timetoupdate = microtime( true ) - $savedmicrotime;
193
- if ( ! $mustwrite && $timetoupdate < 1 )
194
- return true;
195
- if ($WORKING['STEPTODO']>0 and $WORKING['STEPDONE']>0)
196
- $steppersent=round($WORKING['STEPDONE']/$WORKING['STEPTODO']*100);
197
- else
198
- $steppersent=1;
199
- if (count($WORKING['STEPSDONE'])>0)
200
- $stepspersent=round(count($WORKING['STEPSDONE'])/count($WORKING['STEPS'])*100);
201
- else
202
- $stepspersent=1;
203
- @set_time_limit(0);
204
- if (is_writable($STATIC['TEMPDIR'].'.running')) {
205
- file_put_contents($STATIC['TEMPDIR'].'.running',serialize(array('timestamp'=>time(),'JOBID'=>$STATIC['JOB']['jobid'],'LOGFILE'=>$STATIC['LOGFILE'],'STEPSPERSENT'=>$stepspersent,'STEPPERSENT'=>$steppersent,'ABSPATH'=>$STATIC['WP']['ABSPATH'],'WORKING'=>$WORKING)));
206
- $savedmicrotime = microtime( true );
207
- }
208
- return true;
209
- }
210
-
211
- function mysql_update() {
212
- global $WORKING,$STATIC,$mysqlconlink;
213
- if (!$mysqlconlink or !@mysql_ping($mysqlconlink)) {
214
- // make a mysql connection
215
- $mysqlconlink=mysql_connect($STATIC['WP']['DB_HOST'], $STATIC['WP']['DB_USER'], $STATIC['WP']['DB_PASSWORD'], true);
216
- if (!$mysqlconlink)
217
- trigger_error(sprintf(__('No MySQL connection: %s','backwpup'),mysql_error()),E_USER_ERROR);
218
- //set connecten charset
219
- if (!empty($STATIC['WP']['DB_CHARSET'])) {
220
- if ( function_exists( 'mysql_set_charset' )) {
221
- mysql_set_charset( $STATIC['WP']['DB_CHARSET'], $mysqlconlink );
222
- } else {
223
- $query = "SET NAMES '".$STATIC['WP']['DB_CHARSET']."'";
224
- if (!empty($collate))
225
- $query .= " COLLATE '".$STATIC['WP']['DB_COLLATE']."'";
226
- mysql_query($query,$mysqlconlink);
227
- }
228
- }
229
- //connect to database
230
- $mysqldblink = mysql_select_db($STATIC['WP']['DB_NAME'], $mysqlconlink);
231
- if (!$mysqldblink)
232
- trigger_error(sprintf(__('No MySQL connection to database: %s','backwpup'),mysql_error()),E_USER_ERROR);
233
- }
234
- }
235
-
236
- //function for PHP error handling
237
- function joberrorhandler() {
238
- global $WORKING,$STATIC;
239
- $args = func_get_args(); // 0:errno, 1:errstr, 2:errfile, 3:errline
240
-
241
- // if error has been supressed with an @
242
- if (error_reporting()==0)
243
- return;
244
-
245
- $adderrorwarning=false;
246
-
247
- switch ($args[0]) {
248
- case E_NOTICE:
249
- case E_USER_NOTICE:
250
- $message="<span>".$args[1]."</span>";
251
- break;
252
- case E_WARNING:
253
- case E_USER_WARNING:
254
- $WORKING['WARNING']++;
255
- $adderrorwarning=true;
256
- $message="<span class=\"warning\">".__('[WARNING]','backwpup')." ".$args[1]."</span>";
257
- break;
258
- case E_ERROR:
259
- case E_USER_ERROR:
260
- $WORKING['ERROR']++;
261
- $adderrorwarning=true;
262
- $message="<span class=\"error\">".__('[ERROR]','backwpup')." ".$args[1]."</span>";
263
- break;
264
- case E_DEPRECATED:
265
- case E_USER_DEPRECATED:
266
- $message="<span>".__('[DEPRECATED]','backwpup')." ".$args[1]."</span>";
267
- break;
268
- case E_STRICT:
269
- $message="<span>".__('[STRICT NOTICE]','backwpup')." ".$args[1]."</span>";
270
- break;
271
- case E_RECOVERABLE_ERROR:
272
- $message="<span>".__('[RECOVERABLE ERROR]','backwpup')." ".$args[1]."</span>";
273
- break;
274
- default:
275
- $message="<span>[".$args[0]."] ".$args[1]."</span>";
276
- break;
277
- }
278
-
279
- //log line
280
- $timestamp="<span class=\"timestamp\" title=\"[Line: ".$args[3]."|File: ".basename($args[2])."|Mem: ".formatbytes(@memory_get_usage(true))."|Mem Max: ".formatbytes(@memory_get_peak_usage(true))."|Mem Limit: ".ini_get('memory_limit')."|PID: ".getmypid()."]\">".date('Y/m/d H:i.s',time()+$STATIC['WP']['TIMEDIFF']).":</span> ";
281
- //wirte log file
282
- if (is_writable($STATIC['LOGFILE'])) {
283
- file_put_contents($STATIC['LOGFILE'], $timestamp.$message."<br />\n", FILE_APPEND);
284
-
285
- //write new log header
286
- if ($adderrorwarning) {
287
- $found=0;
288
- $fd=fopen($STATIC['LOGFILE'],'r+');
289
- while (!feof($fd)) {
290
- $line=fgets($fd);
291
- if (stripos($line,"<meta name=\"backwpup_errors\"") !== false) {
292
- fseek($fd,$filepos);
293
- fwrite($fd,str_pad("<meta name=\"backwpup_errors\" content=\"".$WORKING['ERROR']."\" />",100)."\n");
294
- $found++;
295
- }
296
- if (stripos($line,"<meta name=\"backwpup_warnings\"") !== false) {
297
- fseek($fd,$filepos);
298
- fwrite($fd,str_pad("<meta name=\"backwpup_warnings\" content=\"".$WORKING['WARNING']."\" />",100)."\n");
299
- $found++;
300
- }
301
- if ($found>=2)
302
- break;
303
- $filepos=ftell($fd);
304
- }
305
- fclose($fd);
306
- }
307
- }
308
- //write working file
309
- if (is_file($STATIC['TEMPDIR'].'.running'))
310
- update_working_file();
311
-
312
- if ($args[0]==E_ERROR or $args[0]==E_CORE_ERROR or $args[0]==E_COMPILE_ERROR) {//Die on fatal php errors.
313
- die();
314
- }
315
-
316
- //true for no more php error hadling.
317
- return true;
318
- }
319
-
320
- //job end function
321
- function job_end() {
322
- global $WORKING,$STATIC,$mysqlconlink;
323
- //check if job_end allredy runs
324
- if (empty($WORKING['JOBENDINPROGRESS']) or !$WORKING['JOBENDINPROGRESS'])
325
- $WORKING['JOBENDINPROGRESS']=true;
326
- else
327
- return;
328
-
329
- $WORKING['STEPTODO']=1;
330
- $WORKING['STEPDONE']=0;
331
- //delete old logs
332
- if (!empty($STATIC['CFG']['maxlogs'])) {
333
- if ( $dir = opendir($STATIC['CFG']['dirlogs']) ) { //make file list
334
- while (($file = readdir($dir)) !== false ) {
335
- if ('backwpup_log_' == substr($file,0,strlen('backwpup_log_')) and (".html" == substr($file,-5) or ".html.gz" == substr($file,-8)))
336
- $logfilelist[]=$file;
337
- }
338
- closedir( $dir );
339
- }
340
- if (sizeof($logfilelist)>0) {
341
- rsort($logfilelist);
342
- $numdeltefiles=0;
343
- for ($i=$STATIC['CFG']['maxlogs'];$i<sizeof($logfilelist);$i++) {
344
- unlink($STATIC['CFG']['dirlogs'].$logfilelist[$i]);
345
- $numdeltefiles++;
346
- }
347
- if ($numdeltefiles>0)
348
- trigger_error(sprintf(_n('One old log deleted','%d old logs deleted',$numdeltefiles,'backwpup'),$numdeltefiles),E_USER_NOTICE);
349
- }
350
- }
351
- //Display job working time
352
- trigger_error(sprintf(__('Job done in %s sec.','backwpup'),time()-$STATIC['JOB']['starttime']),E_USER_NOTICE);
353
-
354
- if (empty($STATIC['backupfile']) or !is_file($STATIC['JOB']['backupdir'].$STATIC['backupfile']) or !($filesize=filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile']))) //Set the filezie corectly
355
- $filesize=0;
356
-
357
- //clean up temp
358
- if ($dir = opendir($STATIC['TEMPDIR'])) {
359
- while (($file = readdir($dir)) !== false) {
360
- if (is_readable($STATIC['TEMPDIR'].$file) and is_file($STATIC['TEMPDIR'].$file)) {
361
- if ($file!='.' and $file!='..' and $file!='.running') {
362
- unlink($STATIC['TEMPDIR'].$file);
363
- }
364
- }
365
- }
366
- closedir($dir);
367
- }
368
-
369
- $jobs=get_option('backwpup_jobs');
370
- $jobs[$STATIC['JOB']['jobid']]['lastrun']=$jobs[$STATIC['JOB']['jobid']]['starttime'];
371
- $STATIC['JOB']['lastrun']=$jobs[$STATIC['JOB']['jobid']]['lastrun'];
372
- $jobs[$STATIC['JOB']['jobid']]['lastruntime']=time()-$STATIC['JOB']['starttime'];
373
- $STATIC['JOB']['lastruntime']=$jobs[$STATIC['JOB']['jobid']]['lastruntime'];
374
- $jobs[$STATIC['JOB']['jobid']]['starttime']='';
375
- if (!empty($STATIC['JOB']['lastbackupdownloadurl']))
376
- $jobs[$STATIC['JOB']['jobid']]['lastbackupdownloadurl']=$STATIC['JOB']['lastbackupdownloadurl'];
377
- else
378
- $jobs[$STATIC['JOB']['jobid']]['lastbackupdownloadurl']='';
379
- update_option('backwpup_jobs',$jobs); //Save Settings
380
-
381
- //write header info
382
- if (is_writable($STATIC['LOGFILE'])) {
383
- $fd=fopen($STATIC['LOGFILE'],'r+');
384
- $found=0;
385
- while (!feof($fd)) {
386
- $line=fgets($fd);
387
- if (stripos($line,"<meta name=\"backwpup_jobruntime\"") !== false) {
388
- fseek($fd,$filepos);
389
- fwrite($fd,str_pad("<meta name=\"backwpup_jobruntime\" content=\"".$STATIC['JOB']['lastruntime']."\" />",100)."\n");
390
- $found++;
391
- }
392
- if (stripos($line,"<meta name=\"backwpup_backupfilesize\"") !== false) {
393
- fseek($fd,$filepos);
394
- fwrite($fd,str_pad("<meta name=\"backwpup_backupfilesize\" content=\"".$filesize."\" />",100)."\n");
395
- $found++;
396
- }
397
- if ($found>=2)
398
- break;
399
- $filepos=ftell($fd);
400
- }
401
- fclose($fd);
402
- }
403
- //Restore error handler
404
- restore_error_handler();
405
- //logfile end
406
- file_put_contents($STATIC['LOGFILE'], "</body>\n</html>\n", FILE_APPEND);
407
- //gzip logfile
408
- if ($STATIC['CFG']['gzlogs'] and is_writable($STATIC['LOGFILE'])) {
409
- $fd=fopen($STATIC['LOGFILE'],'r');
410
- $zd=gzopen($STATIC['LOGFILE'].'.gz','w9');
411
- while (!feof($fd)) {
412
- gzwrite($zd,fread($fd,4096));
413
- }
414
- gzclose($zd);
415
- fclose($fd);