Version Description
- Fixed issue with tree view, added missing functions
- Compatibility released for WordPress v4.4
- Enabled category page
- Activated all features for Premium Package ( Guest Order, Guest Download, Order Notes, Save & Email Cart )
Download this release
Release Info
Developer | codename065 |
Plugin | ![]() |
Version | 2.8.3 |
Comparing to | |
See all releases |
Code changes from version 2.6.96 to 2.8.3
- admin/server-file-browser.php +105 -0
- admin/settings/basic.php +194 -0
- admin/settings/buddypress.php +2 -0
- admin/settings/cloud-storage.php +2 -0
- admin/wpdm-m2cpt.php +179 -0
- admin/wpdm-settings.php +325 -0
- bootstrap/css/bootstrap-theme.css +3171 -0
- bootstrap/css/bootstrap-theme.min.css +415 -0
- bootstrap/css/bootstrap.css +6709 -0
- bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- bootstrap/fonts/glyphicons-halflings-regular.svg +228 -0
- bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- bootstrap/img/glyphicons-halflings-white.png +0 -0
- bootstrap/img/glyphicons-halflings.png +0 -0
- bootstrap/js/bootstrap.min.js +7 -0
- class.db.php +0 -41
- css/admin-styles.css +167 -0
- css/aristo.css +733 -0
- css/bootstrap-select.min.css +6 -0
- css/button-styles.css +485 -0
- css/colorbox.css +0 -41
- css/demo_table.css +10 -289
- css/front-tabs.css +110 -0
- css/front.css +1220 -269
- css/gh-buttons.css +424 -0
- css/icons.css +60 -38
- css/images/border.png +0 -0
- css/images/gh-icons.png +0 -0
- css/images/ie6/borderBottomCenter.png +0 -0
- css/images/ie6/borderBottomLeft.png +0 -0
- css/images/ie6/borderBottomRight.png +0 -0
- css/images/ie6/borderMiddleLeft.png +0 -0
- css/images/ie6/borderMiddleRight.png +0 -0
- css/images/ie6/borderTopCenter.png +0 -0
- css/images/ie6/borderTopLeft.png +0 -0
- css/images/ie6/borderTopRight.png +0 -0
- css/images/loading_background.png +0 -0
- css/images/overlay.png +0 -0
- css/jquery.dataTables.css +399 -279
- css/jquery.dataTables.min.css +1 -0
- css/jqueryFileTree.css +90 -93
- css/osx.css +39 -0
- css/sitemap-style.xml +151 -0
- css/style-paginate.css +18 -0
- css/tabs.css +86 -0
- d16.png +0 -0
- d24.png +0 -0
- download-manager.php +192 -1073
- download.php +0 -94
- ext/player/player_mp3_maxi.swf +0 -0
- ext/tooltips/css/vtip.css +3 -0
- ext/tooltips/example.html +31 -0
- ext/tooltips/images/Thumbs.db +0 -0
- ext/tooltips/images/vtip_arrow.png +0 -0
- ext/tooltips/import.php +0 -0
- ext/tooltips/vtip-min.js +5 -0
- ext/tooltips/vtip.js +38 -0
- file-type-icons/17_download_program.png +0 -0
- file-type-icons/32x32/_blank.png +0 -0
- file-type-icons/32x32/accdb.png +0 -0
- file-type-icons/32x32/avi.png +0 -0
- file-type-icons/32x32/bmp.png +0 -0
- file-type-icons/32x32/css.png +0 -0
- file-type-icons/32x32/docx.png +0 -0
- file-type-icons/32x32/docx_mac.png +0 -0
- file-type-icons/32x32/eml.png +0 -0
- file-type-icons/32x32/eps.png +0 -0
- file-type-icons/32x32/fla.png +0 -0
- file-type-icons/32x32/gif.png +0 -0
- file-type-icons/32x32/html.png +0 -0
- file-type-icons/32x32/ind.png +0 -0
- file-type-icons/32x32/ini.png +0 -0
- file-type-icons/32x32/jpg.png +0 -0
- file-type-icons/32x32/jsf.png +0 -0
- file-type-icons/32x32/midi.png +0 -0
- file-type-icons/32x32/mov.png +0 -0
- file-type-icons/32x32/mp3.png +0 -0
- file-type-icons/32x32/mpeg.png +0 -0
- file-type-icons/32x32/pdf.png +0 -0
- file-type-icons/32x32/php.png +0 -0
- file-type-icons/32x32/png.png +0 -0
- file-type-icons/32x32/pptx.png +0 -0
- file-type-icons/32x32/pptx_win.png +0 -0
- file-type-icons/32x32/proj.png +0 -0
- file-type-icons/32x32/psd.png +0 -0
- file-type-icons/32x32/pst.png +0 -0
- file-type-icons/32x32/pub.png +0 -0
- file-type-icons/32x32/rar.png +0 -0
- file-type-icons/32x32/readme.png +0 -0
- file-type-icons/32x32/settings.png +0 -0
- file-type-icons/32x32/tiff.png +0 -0
- file-type-icons/32x32/txt.png +0 -0
- file-type-icons/32x32/url.png +0 -0
- file-type-icons/32x32/vsd.png +0 -0
- file-type-icons/32x32/wav.png +0 -0
- file-type-icons/32x32/wma.png +0 -0
- file-type-icons/32x32/wmv.png +0 -0
- file-type-icons/32x32/xlsx_mac.png +0 -0
- file-type-icons/32x32/xlsx_win.png +0 -0
- file-type-icons/32x32/zip.png +0 -0
- file-type-icons/_blank.png +0 -0
- file-type-icons/accdb.png +0 -0
- file-type-icons/arrow_down.png +0 -0
- file-type-icons/avi.png +0 -0
- file-type-icons/blank.png +0 -0
- file-type-icons/bmp.png +0 -0
- file-type-icons/box_download.png +0 -0
- file-type-icons/css.png +0 -0
- file-type-icons/csv.png +0 -0
- file-type-icons/doc.png +0 -0
- file-type-icons/docx.png +0 -0
- file-type-icons/down.png +0 -0
- icon/Download file.png → file-type-icons/down2.png +0 -0
- file-type-icons/down3.png +0 -0
- file-type-icons/download.png +0 -0
- file-type-icons/download1.png +0 -0
- file-type-icons/download2.png +0 -0
- icon/Download_Crate.png → file-type-icons/download4.png +0 -0
- file-type-icons/download_blue.png +0 -0
- file-type-icons/download_box.png +0 -0
- file-type-icons/download_drive.png +0 -0
- file-type-icons/download_folder.png +0 -0
- file-type-icons/eml.png +0 -0
- file-type-icons/eps.png +0 -0
- file-type-icons/file.png +0 -0
- file-type-icons/fla.png +0 -0
- file-type-icons/folder_download.png +0 -0
- file-type-icons/gif.png +0 -0
- file-type-icons/html.png +0 -0
- file-type-icons/img.png +0 -0
- file-type-icons/ind.png +0 -0
- file-type-icons/ini.png +0 -0
- file-type-icons/jpeg.png +0 -0
- file-type-icons/jpg.png +0 -0
- file-type-icons/jsf.png +0 -0
- file-type-icons/midi.png +0 -0
- file-type-icons/mov.png +0 -0
- file-type-icons/mp3.png +0 -0
- file-type-icons/mp4.png +0 -0
- file-type-icons/mpeg.png +0 -0
- file-type-icons/pdf.png +0 -0
- file-type-icons/php.png +0 -0
- file-type-icons/png.png +0 -0
- file-type-icons/pps.png +0 -0
- file-type-icons/ppt.png +0 -0
- file-type-icons/pptx.png +0 -0
- file-type-icons/pptx_win.png +0 -0
- file-type-icons/proj.png +0 -0
- file-type-icons/psd.png +0 -0
- file-type-icons/pst.png +0 -0
- file-type-icons/pub.png +0 -0
- file-type-icons/rar.png +0 -0
- file-type-icons/readme.png +0 -0
- file-type-icons/settings.png +0 -0
- file-type-icons/speed_download.png +0 -0
- file-type-icons/summer_download.png +0 -0
- file-type-icons/tiff.png +0 -0
- file-type-icons/txt.png +0 -0
- file-type-icons/url.png +0 -0
- file-type-icons/vsd.png +0 -0
- file-type-icons/wav.png +0 -0
- file-type-icons/wma.png +0 -0
- file-type-icons/wmv.png +0 -0
- file-type-icons/xls.png +0 -0
- file-type-icons/xlsx.png +0 -0
- file-type-icons/zip.png +0 -0
- fm-settings.php +0 -77
- font-awesome/css/font-awesome.css +2026 -0
- font-awesome/css/font-awesome.min.css +4 -0
- font-awesome/fonts/FontAwesome.otf +0 -0
- font-awesome/fonts/fontawesome-webfont.eot +0 -0
- font-awesome/fonts/fontawesome-webfont.svg +640 -0
- font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- font-awesome/fonts/fontawesome-webfont.woff +0 -0
- font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- functions.php +0 -187
- icon/35.png +0 -0
- icon/Box Download.png +0 -0
- icon/Cloud Download Off.png +0 -0
- icon/Cloud Download On.png +0 -0
- icon/Download-01.png +0 -0
- icon/Download_Blue.png +0 -0
- icon/Download_Green.png +0 -0
- icon/Globe-Download.png +0 -0
- icon/Gnome-Document-Save-32.png +0 -0
- icon/Gnome-Emblem-Downloads-32.png +0 -0
- icon/Package-Download.png +0 -0
- icon/Torrents.png +0 -0
- icon/agt_add-to-desktop.png +0 -0
- icon/agt_update_drivers.png +0 -0
- icon/agt_update_misc.png +0 -0
- icon/agt_update_recommended.png +0 -0
- icon/agt_update_recommended1.png +0 -0
- icon/application-x-kgetlist.png +0 -0
- icon/archive.png +0 -0
- icon/ark.png +0 -0
- icon/ark2.png +0 -0
- icon/arrow down.png +0 -0
- icon/arrow_down.png +0 -0
- icon/arrow_down_alt1.png +0 -0
- icon/basket_download.png +0 -0
- icon/bottom.png +0 -0
- icon/cloud-download.png +0 -0
- icon/down2.png +0 -0
- icon/down_arrow.png +0 -0
- icon/download off.png +0 -0
- icon/download on.png +0 -0
- icon/download-box-open.png +0 -0
- icon/download-database.png +0 -0
- icon/download.png +0 -0
- icon/download_32.png +0 -0
- icon/download_accept_32.png +0 -0
- icon/download_cancel_32.png +0 -0
- icon/download_cloud.png +0 -0
- icon/download_down_arrow.png +0 -0
- icon/download_for_linux.png +0 -0
- icon/download_for_mac.png +0 -0
- icon/download_for_windows.png +0 -0
- icon/download_information_32.png +0 -0
- icon/download_manager.png +0 -0
- icon/download_pause_32.png +0 -0
- icon/download_run_32.png +0 -0
- icon/download_security_32.png +0 -0
- icon/download_settings_32.png +0 -0
- icon/download_stop_32.png +0 -0
- icon/downloads.png +0 -0
- icon/downloads_folder.png +0 -0
- icon/email_download.png +0 -0
- icon/emblem-downloads.png +0 -0
- icon/file_download.png +0 -0
- icon/file_extension_.png +0 -0
- icon/file_extension_bmp.png +0 -0
- icon/file_extension_doc.png +0 -0
- icon/file_extension_flv.png +0 -0
- icon/file_extension_gif.png +0 -0
- icon/file_extension_html.png +0 -0
- icon/file_extension_jpeg.png +0 -0
- icon/file_extension_jpg.png +0 -0
- icon/file_extension_log.png +0 -0
- icon/file_extension_pdf.png +0 -0
- icon/file_extension_png.png +0 -0
- icon/file_extension_psd.png +0 -0
- icon/file_extension_rar.png +0 -0
- icon/file_extension_txt.png +0 -0
- icon/file_extension_xls.png +0 -0
- icon/file_extension_zip.png +0 -0
- icon/find-next.png +0 -0
- icon/folder-download.png +0 -0
- icon/folder-downloads.png +0 -0
- icon/folder_apollon.png +0 -0
- icon/folder_download.png +0 -0
- icon/folder_downloads_32.png +0 -0
- icon/go-bottom.png +0 -0
- icon/human-folder-downloads.png +0 -0
- icon/icontexto-aurora-folders-downloads.png +0 -0
- icon/inbox_download.png +0 -0
- icon/kde-folder-downloads.png +0 -0
- icon/kget_list.png +0 -0
- icon/kthememgr.png +0 -0
- icon/load_download.png +0 -0
- icon/manilla-folder-downloads.png +0 -0
- icon/misc_23.png +0 -0
- icon/note_download.png +0 -0
- icon/old-go-bottom.png +0 -0
- icon/orange-folder-downloads.png +0 -0
- icon/photo_download.png +0 -0
- icon/save_download.png +0 -0
- icon/share.png +0 -0
- icon/system-config-kickstart.png +0 -0
- icon/system-log-out.png +0 -0
- icon/weather_03.png +0 -0
- images/1help1.png +0 -0
- images/CheckBox.png +0 -0
- images/add-image.gif +0 -0
- images/back_disabled.png +0 -0
- images/back_enabled.png +0 -0
- images/back_enabled_hover.png +0 -0
- images/content-shadow.png +0 -0
- images/download-now.png +0 -0
- images/download.png +0 -0
- images/email.png +0 -0
- images/fbconn.png +0 -0
- images/forward_disabled.png +0 -0
- images/forward_enabled.png +0 -0
- images/forward_enabled_hover.png +0 -0
- images/generate-pass.png +0 -0
- images/google-1.png +0 -0
- images/help.png +0 -0
- images/help1.png +0 -0
- images/icon_sprite.png +0 -0
- images/liveform-logo.png +0 -0
- images/loading-new.gif +0 -0
- images/lock.png +0 -0
- images/minus.png +0 -0
- download.png → images/next.png +0 -0
- images/password.png +0 -0
- images/plus.png +0 -0
- images/previous.png +0 -0
- images/progress_bar.gif +0 -0
- images/reload.png +0 -0
- images/sales.png +0 -0
- images/save.png +0 -0
- images/snext.png +0 -0
- images/sort_asc.png +0 -0
- images/sort_asc_disabled.png +0 -0
- images/sort_both.png +0 -0
- images/sort_desc.png +0 -0
- images/sort_desc_disabled.png +0 -0
- images/sprevious.png +0 -0
- images/switch.gif +0 -0
- images/ui-icons_454545_256x240.png +0 -0
- images/wpdm-settings-active.png +0 -0
- images/wpdm-settings.png +0 -0
- images/wpdm-welcome.png +0 -0
- images/wpeden.png +0 -0
- img/donwloadmanager-16.png +0 -0
- jqui/css/custom.css +68 -0
- jqui/css/normalise.css +121 -0
- jqui/img/dark_wall.png +0 -0
- jqui/js/custom.js +123 -0
- jqui/js/jquery-ui.toggleSwitch.js +68 -0
- jqui/js/jquery.imgpreload.min.js +3 -0
- jqui/js/modernizr-2.0.6.min.js +4 -0
- jqui/theme/images/icons_16.png +0 -0
- jqui/theme/images/jGrowl-close.png +0 -0
- jqui/theme/images/modalClose.png +0 -0
- jqui/theme/images/modalClose@2x.png +0 -0
- jqui/theme/images/slider_handles.png +0 -0
- jqui/theme/images/slider_handles@2x.png +0 -0
- jqui/theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- jqui/theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- jqui/theme/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- jqui/theme/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- jqui/theme/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- jqui/theme/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- jqui/theme/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- jqui/theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- jqui/theme/images/ui-icons_222222_256x240.png +0 -0
- jqui/theme/images/ui-icons_2e83ff_256x240.png +0 -0
- jqui/theme/images/ui-icons_454545_256x240.png +0 -0
- jqui/theme/images/ui-icons_888888_256x240.png +0 -0
- jqui/theme/images/ui-icons_FFFFFF_256x240.png +0 -0
- jqui/theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- jqui/theme/jquery-ui.css +849 -0
- js/analytics.js +135 -0
- js/audio.js +703 -0
- js/bootstrap-select.min.js +1231 -0
- editor_plugin.js → js/editor_plugin.js +44 -41
- js/front.js +32 -0
- js/img/delete.png +0 -0
- {img → js/img}/donwloadmanager.png +0 -0
- js/img/edit.png +0 -0
- js/img/player-graphics.gif +0 -0
- js/jquery.colorbox-min.js +3 -3
- js/jquery.dataTables.js +14448 -11597
- js/jquery.dataTables.min.js +159 -153
- js/jquery.dump.js +165 -0
- js/jquery.facebook.js +29 -0
- js/jquery.fbjlike.js +104 -0
- js/jquery.form.js +813 -0
- js/jquery.gplusone.js +73 -0
- js/jquery.twitterbutton.js +140 -0
- js/jquery.ui.nestedSortable.js +356 -0
- js/jquery.validate.min.js +51 -0
- js/jqueryFileTree.js +4 -4
- js/popup.js +121 -0
- js/raphael.js +7 -0
- js/tinymce.js +74 -0
- l24.png +0 -0
- languages/wpdmpro.mo +0 -0
- languages/wpdmpro.po +670 -0
- libs/class.ApplySettings.php +79 -0
- libs/class.UserDashboard.php +72 -0
- libs/class.logs.php +33 -0
- libs/class.pack.php +366 -0
- class.wpdmpagination.php → libs/class.pagination.php +414 -409
- libs/wpdm-widgets.php +408 -0
- process.php +0 -113
- readme.txt +653 -437
- screenshot-1.png +0 -0
- screenshot-10.png +0 -0
- screenshot-11.png +0 -0
- screenshot-12.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- screenshot-7.png +0 -0
- screenshot-8.png +0 -0
- screenshot-9.png +0 -0
- templates/link-template-button.php +2 -0
- templates/link-template-default-ext.php +17 -0
- templates/link-template-default-wdc.php +12 -0
- templates/link-template-default.php +12 -0
- templates/page-template-default.php +28 -0
- tpls/metaboxes/attach-file.php +212 -0
- tpls/metaboxes/icons.php +177 -0
- tpls/metaboxes/items.php +3 -0
- tpls/metaboxes/package-settings.php +683 -0
- tpls/user-dashboard/download-history.php +55 -0
- tpls/user-dashboard/edit-profile.php +51 -0
- tpls/user-dashboard/profile.php +87 -0
- tpls/wpdm-addons-list.php +295 -0
- tpls/wpdm-all-downloads.php +153 -0
- tpls/wpdm-be-member.php +201 -0
- tpls/wpdm-dashboard.php +190 -0
- tpls/wpdm-login-form.php +89 -0
- tpls/wpdm-reg-form.php +109 -0
- tpls/wpdm-welcome.php +440 -0
- wpdm-add-new-file.php +0 -449
- wpdm-all-downloads.php +0 -146
- wpdm-categories.php +0 -141
- wpdm-core.php +617 -0
- wpdm-file-icon.php +0 -50
- wpdm-free-mce-button.php +0 -518
- wpdm-functions.php +2072 -0
- wpdm-hooks.php +91 -0
- wpdm-list-files.php +0 -197
- wpdm-server-file-browser.php +0 -67
- wpdm-settings.php +0 -133
- wpdm-start-download.php +87 -0
- wpdm-widgets.php +0 -122
admin/server-file-browser.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function wpdm_dir_tree(){
|
4 |
+
$root = '';
|
5 |
+
if(!isset($_GET['task'])||$_GET['task']!='wpdm_dir_tree') return;
|
6 |
+
|
7 |
+
if(!current_user_can('access_server_browser')) die("<ul><li>".__('Not Allowed!','wpdmpro')."</li></ul>");
|
8 |
+
|
9 |
+
$_POST['dir'] = urldecode($_POST['dir']);
|
10 |
+
echo "<pre>";
|
11 |
+
|
12 |
+
if( file_exists( $_POST['dir'])) {
|
13 |
+
$files = scandir( $_POST['dir']);
|
14 |
+
natcasesort($files);
|
15 |
+
if( count($files) > 2 ) { /* The 2 accounts for . and .. */
|
16 |
+
echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
|
17 |
+
// All dirs
|
18 |
+
foreach( $files as $file ) {
|
19 |
+
if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && is_dir($root . $_POST['dir'] . $file) ) {
|
20 |
+
echo "<li class=\"directory collapsed\"><a id=\"".uniqid()."\" href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>";
|
21 |
+
}
|
22 |
+
}
|
23 |
+
// All files
|
24 |
+
foreach( $files as $file ) {
|
25 |
+
if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && !is_dir($root . $_POST['dir'] . $file) ) {
|
26 |
+
$ext = preg_replace('/^.*\./', '', $file);
|
27 |
+
echo "<li class=\"file ext_$ext\"><a id=\"".uniqid()."\" href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "\">" . htmlentities($file) . "</a></li>";
|
28 |
+
}
|
29 |
+
}
|
30 |
+
echo "</ul>";
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
function wpdm_file_browser(){
|
36 |
+
if(!current_user_can('access_server_browser')) return 0;
|
37 |
+
?>
|
38 |
+
<script type="text/javascript" src="<?php echo plugins_url().'/download-manager/js/jqueryFileTree.js';?>"></script>
|
39 |
+
<link rel="stylesheet" href="<?php echo plugins_url().'/download-manager/css/jqueryFileTree.css';?>" />
|
40 |
+
<style type="text/css">.jqueryFileTree li{line-height: 20px;}</style>
|
41 |
+
<!--<div class="wrap">
|
42 |
+
<div class="icon32" id="icon-categories"><br></div>
|
43 |
+
<h2>Browse Files</h2>-->
|
44 |
+
<div id="tree" style="height: 200px;overflow:auto"></div>
|
45 |
+
<script language="JavaScript">
|
46 |
+
<!--
|
47 |
+
jQuery( function() {
|
48 |
+
jQuery('#tree').fileTree({
|
49 |
+
root: '<?php echo get_option('_wpdm_file_browser_root',ABSPATH); ?>/',
|
50 |
+
script: 'admin.php?task=wpdm_dir_tree',
|
51 |
+
expandSpeed: 1000,
|
52 |
+
collapseSpeed: 1000,
|
53 |
+
multiFolder: false
|
54 |
+
}, function(file, id) {
|
55 |
+
var sfilename = file.split('/');
|
56 |
+
var filename = sfilename[sfilename.length-1];
|
57 |
+
if(confirm('Add this file?')){
|
58 |
+
|
59 |
+
jQuery('#wpdmfile').val(file);
|
60 |
+
jQuery('#cfl').html('<div><strong>'+file+'</strong>').slideDown();
|
61 |
+
|
62 |
+
|
63 |
+
}
|
64 |
+
//jQuery('#serverfiles').append('<li><label><input checked=checked type="checkbox" value="'+file+'" name="imports[]" class="role"> '+filename+'</label></li>');
|
65 |
+
});
|
66 |
+
|
67 |
+
});
|
68 |
+
//-->
|
69 |
+
</script>
|
70 |
+
<!--</div> -->
|
71 |
+
<?php
|
72 |
+
// die();
|
73 |
+
}
|
74 |
+
|
75 |
+
function wpmp_file_browser_metabox(){
|
76 |
+
?>
|
77 |
+
|
78 |
+
<div class="postbox " id="action">
|
79 |
+
<div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><span><?php echo __('Add file(s) from server','wpdmpro'); ?></span></h3>
|
80 |
+
<div class="inside" style="height: 200px;overflow: auto;">
|
81 |
+
|
82 |
+
<?php wpdm_file_browser(); ?>
|
83 |
+
|
84 |
+
<ul id="serverfiles">
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
+
|
90 |
+
|
91 |
+
</ul>
|
92 |
+
<div class="clear"></div>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<?php
|
97 |
+
}
|
98 |
+
|
99 |
+
if(is_admin()){
|
100 |
+
add_action("init","wpdm_dir_tree");
|
101 |
+
add_action("add_new_file_sidebar","wpmp_file_browser_metabox");
|
102 |
+
}
|
103 |
+
|
104 |
+
|
105 |
+
?>
|
admin/settings/basic.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<style>
|
3 |
+
.frm td{
|
4 |
+
padding:5px;
|
5 |
+
border-bottom: 1px solid #eeeeee;
|
6 |
+
|
7 |
+
font-size:10pt;
|
8 |
+
|
9 |
+
}
|
10 |
+
h4{
|
11 |
+
color: #336699;
|
12 |
+
margin-bottom: 0px;
|
13 |
+
}
|
14 |
+
em{
|
15 |
+
color: #888;
|
16 |
+
}
|
17 |
+
.input-group .form-control:first-child{
|
18 |
+
border-top-right-radius: 0 !important;
|
19 |
+
border-bottom-right-radius: 0 !important;
|
20 |
+
}
|
21 |
+
.input-group *:last-child{
|
22 |
+
border-top-left-radius: 0 !important;
|
23 |
+
border-bottom-left-radius: 0 !important;
|
24 |
+
}
|
25 |
+
</style>
|
26 |
+
|
27 |
+
<div class="container-fluid">
|
28 |
+
<div class="row">
|
29 |
+
<div class="col-md-12">
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
<div class="panel panel-default">
|
34 |
+
<div class="panel-heading"><?php echo __('Messages','wpdmpro'); ?></div>
|
35 |
+
<div class="panel-body">
|
36 |
+
|
37 |
+
|
38 |
+
<div class="form-group">
|
39 |
+
<label><?php echo __('Permission Denied Message for Packages:','wpdmpro'); ?></label>
|
40 |
+
<input type=text class="form-control" name="wpdm_permission_msg" value="<?php echo htmlspecialchars(stripslashes(get_option('wpdm_permission_msg','Access Denied'))); ?>" />
|
41 |
+
</div>
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
<div class="form-group">
|
48 |
+
<label><?php echo __('Login Required Message:','wpdmpro'); ?></label>
|
49 |
+
<textarea class="form-control" cols="70" rows="6" name="wpdm_login_msg"><?php echo get_option('wpdm_login_msg')?stripslashes(get_option('wpdm_login_msg')):"<a href='".wp_login_url()."' >Please login to download</a>"; ?></textarea><br>
|
50 |
+
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
|
55 |
+
<div class="panel panel-default">
|
56 |
+
<div class="panel-heading"><?php echo __('Server File Browser','wpdmpro'); ?></div>
|
57 |
+
<div class="panel-body">
|
58 |
+
|
59 |
+
<div class="form-group">
|
60 |
+
<label><?php echo __('Server File Browser Base Dir:','wpdmpro'); ?></label>
|
61 |
+
<div class="input-group">
|
62 |
+
<input type=text class="form-control" id="_wpdm_file_browser_root" name="_wpdm_file_browser_root" value="<?php echo htmlspecialchars(stripslashes(get_option('_wpdm_file_browser_root',ABSPATH))); ?>" />
|
63 |
+
<span class="input-group-btn">
|
64 |
+
<button class="btn btn-default ttip" title="<?php _e('Reset Base Dir'); ?>" type="button" onclick="jQuery('#_wpdm_file_browser_root').val('<?php echo rtrim(ABSPATH,'/'); ?>');"><i class="fa fa-repeat"></i></button>
|
65 |
+
</span>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
|
69 |
+
<div class="form-group">
|
70 |
+
<label><?php echo __('File Browser Access:','wpdmpro'); ?></label><br/>
|
71 |
+
<select style="width: 100%" name="_wpdm_file_browser_access[]" multiple="multiple" data-placeholder="<?php _e('Who will have access to server file browser','wpdmpro'); ?>">
|
72 |
+
<?php
|
73 |
+
|
74 |
+
$currentAccess = maybe_unserialize(get_option( '_wpdm_file_browser_access', array('administrator')));
|
75 |
+
$selz = '';
|
76 |
+
|
77 |
+
?>
|
78 |
+
|
79 |
+
<?php
|
80 |
+
global $wp_roles;
|
81 |
+
$roles = array_reverse($wp_roles->role_names);
|
82 |
+
foreach( $roles as $role => $name ) {
|
83 |
+
|
84 |
+
$ro = get_role($role);
|
85 |
+
|
86 |
+
if(isset($ro->capabilities['edit_posts']) && $ro->capabilities['edit_posts']==1){
|
87 |
+
|
88 |
+
if( $currentAccess ) $sel = (in_array($role,$currentAccess))?'selected=selected':'';
|
89 |
+
else $sel = '';
|
90 |
+
|
91 |
+
|
92 |
+
|
93 |
+
?>
|
94 |
+
<option value="<?php echo $role; ?>" <?php echo $sel ?>> <?php echo $name; ?></option>
|
95 |
+
<?php }} ?>
|
96 |
+
</select>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
</div>
|
100 |
+
</div>
|
101 |
+
|
102 |
+
<div class="panel panel-default">
|
103 |
+
<div class="panel-heading"><?php echo __('Upload Settings','wpdmpro'); ?></div>
|
104 |
+
<div class="panel-body">
|
105 |
+
<div class="form-group">
|
106 |
+
<input type="hidden" value="0" name="__wpdm_sanitize_filename" />
|
107 |
+
<label><input style="margin: 0 10px 0 0" <?php checked(1, get_option('__wpdm_sanitize_filename',0)); ?> type="checkbox" value="1" name="__wpdm_sanitize_filename"><?php _e('Sanitize Filename','wpdmpro'); ?></label><br/>
|
108 |
+
<em><?php _e('Check the option if you want to sanitize uploaded file names to remove illegal chars','wpdmpro'); ?></em>
|
109 |
+
<br/>
|
110 |
+
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<div class="panel panel-default">
|
116 |
+
<div class="panel-heading"><?php echo __('File Download','wpdmpro'); ?></div>
|
117 |
+
<div class="panel-body">
|
118 |
+
|
119 |
+
<div class="form-group">
|
120 |
+
<label><?php echo __('Download Speed:','wpdmpro'); ?></label>
|
121 |
+
<div class="input-group">
|
122 |
+
<input type=text class="form-control" name="__wpdm_download_speed" value="<?php echo intval(get_option('__wpdm_download_speed',4096)); ?>" />
|
123 |
+
<span class="input-group-addon">KB</span>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
<hr/>
|
127 |
+
<em class="note"><?php _e('If you get broken download, then try enabling/disabling following options, as sometimes server may not support output buffering or partial downloads','wpdmpro'); ?>:</em>
|
128 |
+
<hr/>
|
129 |
+
<div class="form-group">
|
130 |
+
<label><?php _e('Resumable Downloads','wpdmpro'); ?></label><br/>
|
131 |
+
<select name="__wpdm_download_resume">
|
132 |
+
<option value="1"><?php _e("Enabled","wpdmpro"); ?></option>
|
133 |
+
<option value="2" <?php selected(get_option('__wpdm_download_resume'), 2); ?>><?php _e("Disabled","wpdmpro"); ?></option>
|
134 |
+
</select>
|
135 |
+
</div>
|
136 |
+
<div class="form-group">
|
137 |
+
<label><?php _e('Output Buffering','wpdmpro'); ?></label><br/>
|
138 |
+
<select name="__wpdm_support_output_buffer">
|
139 |
+
<option value="1"><?php _e("Enabled","wpdmpro"); ?></option>
|
140 |
+
<option value="0" <?php selected(get_option('__wpdm_support_output_buffer'), 0); ?>><?php _e("Disabled","wpdmpro"); ?></option>
|
141 |
+
</select>
|
142 |
+
</div>
|
143 |
+
|
144 |
+
<div class="form-group"><hr/>
|
145 |
+
<input type="hidden" value="0" name="__wpdm_open_in_browser" />
|
146 |
+
<label><input style="margin: 0 10px 0 0" <?php checked(1, get_option('__wpdm_open_in_browser',0)); ?> type="checkbox" value="1" name="__wpdm_open_in_browser"><?php _e('Open in Browser','wpdmpro'); ?></label><br/>
|
147 |
+
<em><?php _e('Try to Open in Browser instead of download when someone clicks on download link','wpdmpro'); ?></em>
|
148 |
+
<br/>
|
149 |
+
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
|
154 |
+
|
155 |
+
<div class="panel panel-default">
|
156 |
+
<div class="panel-heading"><?php _e("Misc Settings","wpdmpro"); ?></div>
|
157 |
+
<div class="panel-body">
|
158 |
+
|
159 |
+
<?php $wpdmss = maybe_unserialize(get_option('__wpdm_disable_scripts', array())); ?>
|
160 |
+
<input type="hidden" name="__wpdm_disable_scripts[]" value="" >
|
161 |
+
<fieldset>
|
162 |
+
<legend><?php _e("Disable Style & Script","wpdmpro"); ?></legend>
|
163 |
+
<ul>
|
164 |
+
<li><label><input <?php if(in_array('wpdm-bootstrap-js', $wpdmss)) echo 'checked=checked'; ?> type="checkbox" value="wpdm-bootstrap-js" name="__wpdm_disable_scripts[]"> <?php _e("Bootstrap JS","wpdmpro"); ?></label></li>
|
165 |
+
<li><label><input <?php if(in_array('wpdm-bootstrap-css', $wpdmss)) echo 'checked=checked'; ?> type="checkbox" value="wpdm-bootstrap-css" name="__wpdm_disable_scripts[]"> <?php _e("Bootstrap CSS","wpdmpro"); ?></label></li>
|
166 |
+
<li><label><input <?php if(in_array('wpdm-font-awesome', $wpdmss)) echo 'checked=checked'; ?> type="checkbox" value="wpdm-font-awesome" name="__wpdm_disable_scripts[]"> <?php _e("Font Awesome","wpdmpro"); ?></label></li>
|
167 |
+
</ul>
|
168 |
+
<em><?php _e('Because, sometimes your theme may have those scripts/styles enqueued already','wpdmpro'); ?></em>
|
169 |
+
</fieldset>
|
170 |
+
|
171 |
+
<table cellpadding="5" cellspacing="0" class="frm" width="100%">
|
172 |
+
|
173 |
+
|
174 |
+
|
175 |
+
|
176 |
+
|
177 |
+
<?php do_action('basic_settings'); ?>
|
178 |
+
|
179 |
+
</table>
|
180 |
+
|
181 |
+
</div>
|
182 |
+
<div class="panel-footer">
|
183 |
+
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
|
187 |
+
|
188 |
+
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
</div>
|
192 |
+
|
193 |
+
|
194 |
+
|
admin/settings/buddypress.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
do_action("wpdm_buddypres_settings");
|
admin/settings/cloud-storage.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
do_action("wpdm_cloud_storage_settings");
|
admin/wpdm-m2cpt.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
function wpdm_m24x(){
|
5 |
+
global $wpdb;
|
6 |
+
$ccn = get_option('__wpdm_category_converted',0);
|
7 |
+
if($ccn==0){
|
8 |
+
$allcs = maybe_unserialize(get_option('_fm_categories'));
|
9 |
+
|
10 |
+
$term_templates = array();
|
11 |
+
foreach($allcs as $id=>$wpdmc){
|
12 |
+
if($wpdmc['parent']!=''){
|
13 |
+
$parent = term_exists($wpdmc['parent'], 'wpdmcategory');
|
14 |
+
$parent_id = $parent['term_id'];
|
15 |
+
}
|
16 |
+
else $parent_id = 0;
|
17 |
+
$term = wp_insert_term(
|
18 |
+
$wpdmc['title'], // the term
|
19 |
+
'wpdmcategory', // the taxonomy
|
20 |
+
array(
|
21 |
+
'description'=> $wpdmc['content'],
|
22 |
+
'slug' => $id,
|
23 |
+
'parent'=> $parent_id
|
24 |
+
)
|
25 |
+
);
|
26 |
+
if(!is_wp_error($term))
|
27 |
+
$term_templates[$term['term_id']] = isset($wpdmc['link_template'])?$wpdmc['link_template']:'link-template-default.php';
|
28 |
+
}
|
29 |
+
update_option("__wpdm_category_link_templates",$term_templates);
|
30 |
+
update_option("__wpdm_category_converted",1);
|
31 |
+
}
|
32 |
+
$ids = get_option('_wpdm_m24x_ids',true);
|
33 |
+
if(isset($_POST['task'])&&$_POST['task']=='wdm_save_settings'){
|
34 |
+
if(!is_array($ids)) $ids = array();
|
35 |
+
if(!is_array($_POST['id'])) $_POST['id'] = array();
|
36 |
+
foreach($_POST['id'] as $fid){
|
37 |
+
//if(!in_array($fid, $ids)){
|
38 |
+
$file = $wpdb->get_row("select * from ahm_files where id='$fid'", ARRAY_A);
|
39 |
+
$file['files'] = array();
|
40 |
+
$file['files'] = array($file['file']);
|
41 |
+
unset($file['file']);
|
42 |
+
|
43 |
+
$file['access'] = $file['access']=='guest'?array('guest'):array('subscriber','administrator');
|
44 |
+
if(isset($file['sourceurl']) && $file['sourceurl']!='')
|
45 |
+
$file['files'][] = $file['sourceurl'];
|
46 |
+
|
47 |
+
foreach($file['files'] as $filepath){
|
48 |
+
$fileinfo[$filepath] = array('title'=>basename($filepath), 'password'=>'');
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
$cats = maybe_unserialize($file['category']);
|
54 |
+
$id = wp_insert_post(array(
|
55 |
+
'post_type' => 'wpdmpro',
|
56 |
+
'post_title'=>$file['title'],
|
57 |
+
'post_content' => $file['description'],
|
58 |
+
'post_status' => 'publish',
|
59 |
+
'tax_input' => array('wpdmcategory'=>$cats),
|
60 |
+
'post_date' => date("Y-m-d H:i:s", time()),
|
61 |
+
'comment_status' => 'open'
|
62 |
+
));
|
63 |
+
|
64 |
+
/** media */
|
65 |
+
/*
|
66 |
+
$filename = $file['preview'];
|
67 |
+
$filename = str_replace(site_url('/'), ABSPATH.'/', $filename);
|
68 |
+
$wp_filetype = wp_check_filetype(basename($filename), null );
|
69 |
+
//$wp_upload_dir = wp_upload_dir();
|
70 |
+
$attachment = array(
|
71 |
+
'guid' => $file['preview'],
|
72 |
+
'post_mime_type' => $wp_filetype['type'],
|
73 |
+
'post_title' => preg_replace( '/\.[^.]+#x2F;', '', basename( $filename ) ),
|
74 |
+
'post_content' => '',
|
75 |
+
'post_status' => 'inherit'
|
76 |
+
);
|
77 |
+
$attach_id = wp_insert_attachment( $attachment, $filename, $id );
|
78 |
+
require_once( ABSPATH . 'wp-admin/includes/image.php' );
|
79 |
+
$attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
|
80 |
+
wp_update_attachment_metadata( $attach_id, $attach_data );
|
81 |
+
set_post_thumbnail( $id, $attach_id );
|
82 |
+
*/
|
83 |
+
$file['legacy_id'] = $file['id'];
|
84 |
+
unset($file['title']);
|
85 |
+
unset($file['description']);
|
86 |
+
unset($file['id']);
|
87 |
+
unset($file['uid']);
|
88 |
+
unset($file['create_date']);
|
89 |
+
unset($file['preview']);
|
90 |
+
unset($file['sourceurl']);
|
91 |
+
|
92 |
+
foreach($file as $meta_key => $meta_value ){
|
93 |
+
$meta_value = maybe_unserialize($meta_value);
|
94 |
+
update_post_meta($id, '__wpdm_'.$meta_key, $meta_value);
|
95 |
+
}
|
96 |
+
// $allmeta = $wpdb->get_results("select * from {$wpdb->prefix}ahm_filemeta where pid='{$file['id']}'", ARRAY_A);
|
97 |
+
// foreach($allmeta as $wmeta){
|
98 |
+
// $wmeta['value'] = maybe_unserialize($wmeta['value']);
|
99 |
+
// update_post_meta($id, '__wpdm_'.$wmeta['name'], $wmeta['value']);
|
100 |
+
// }
|
101 |
+
// update_post_meta($id, '__wpdm_fileinfo', $fileinfo);
|
102 |
+
|
103 |
+
|
104 |
+
}
|
105 |
+
if(is_array($ids))
|
106 |
+
$ids = array_unique(array_merge($ids, $_POST['id']));
|
107 |
+
else
|
108 |
+
$ids = $_POST['id'];
|
109 |
+
/*foreach($_POST as $optn=>$optv){
|
110 |
+
update_option($optn, $optv);
|
111 |
+
} */
|
112 |
+
|
113 |
+
update_option('_wpdm_m24x_ids',$ids);
|
114 |
+
die('Copied successfully');
|
115 |
+
}
|
116 |
+
|
117 |
+
$res = $wpdb->get_results("select * from ahm_files", ARRAY_A);
|
118 |
+
|
119 |
+
?>
|
120 |
+
<div class="clear"></div>
|
121 |
+
|
122 |
+
<div class="update-nag" style="margin: 10px 0">Please don't select more then 100 packages at a time</div><Br/>
|
123 |
+
<div class="clear"></div>
|
124 |
+
|
125 |
+
<table cellspacing="0" class="widefat fixed">
|
126 |
+
<thead>
|
127 |
+
<tr>
|
128 |
+
<th style="" class="manage-column column-cb check-column" id="cb" scope="col"><input class="call m" type="checkbox"></th>
|
129 |
+
<th style="" class="manage-column column-media" id="media" scope="col">WPDM 3 Package</th>
|
130 |
+
<th style="" class="manage-column column-parent" id="parent" scope="col">Migrated</th>
|
131 |
+
</tr>
|
132 |
+
</thead>
|
133 |
+
|
134 |
+
<tfoot>
|
135 |
+
<tr>
|
136 |
+
<th style="" class="manage-column column-cb check-column" id="cb" scope="col"><input class="call m" type="checkbox"></th>
|
137 |
+
<th style="" class="manage-column column-media" id="media" scope="col">WPDM 3 Package</th>
|
138 |
+
<th style="" class="manage-column column-parent" id="parent" scope="col">Migrated</th>
|
139 |
+
</tr>
|
140 |
+
</tfoot>
|
141 |
+
|
142 |
+
<tbody class="list:post" id="the-list">
|
143 |
+
<?php $altr = 'alternate'; foreach($res as $media) { $copied = @in_array($media['id'],$ids)?'<span style="color: #008800">Yes</span>':'No'; $altr = $altr == ''?'alternate':''; ?>
|
144 |
+
<tr valign="top" class="<?php echo $altr; ?> author-self status-inherit" id="post-8">
|
145 |
+
|
146 |
+
<th class="check-column" scope="row"><input type="checkbox" value="<?php echo $media['id'];?>" class="m" name="id[]"></th>
|
147 |
+
|
148 |
+
<td class="media column-media">
|
149 |
+
<strong><?php echo $media['title']?></strong>
|
150 |
+
</td>
|
151 |
+
<td class="parent column-parent"><b><?php echo $copied; ?></b></td>
|
152 |
+
|
153 |
+
</tr>
|
154 |
+
<?php } ?>
|
155 |
+
</tbody>
|
156 |
+
</table>
|
157 |
+
|
158 |
+
<script language="JavaScript">
|
159 |
+
<!--
|
160 |
+
jQuery('.call').click(function(){
|
161 |
+
if(this.checked)
|
162 |
+
jQuery('.m').attr('checked','checked');
|
163 |
+
else
|
164 |
+
jQuery('.m').removeAttr('checked');
|
165 |
+
});
|
166 |
+
//-->
|
167 |
+
</script>
|
168 |
+
|
169 |
+
<?php
|
170 |
+
}
|
171 |
+
|
172 |
+
|
173 |
+
global $wpdb;
|
174 |
+
if($wpdb->get_var("SHOW TABLES LIKE 'ahm_files'") == 'ahm_files') {
|
175 |
+
$tf = $wpdb->get_var("select count(*) from `ahm_files`");
|
176 |
+
if (function_exists('add_wdm_settings_tab') && $tf > 0)
|
177 |
+
add_wdm_settings_tab("m24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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<link rel="stylesheet" type="text/css" href="<?php echo plugins_url('/download-manager/bootstrap/css/bootstrap.css');?>" />
|
2 |
+
<link href='https://fonts.googleapis.com/css?family=Varela' rel='stylesheet' type='text/css'>
|
3 |
+
|
4 |
+
<style>
|
5 |
+
|
6 |
+
input{
|
7 |
+
padding: 7px;
|
8 |
+
}
|
9 |
+
#wphead{
|
10 |
+
border-bottom:0px;
|
11 |
+
}
|
12 |
+
#screen-meta-links{
|
13 |
+
display: none;
|
14 |
+
}
|
15 |
+
.wrap{
|
16 |
+
margin: 0px;
|
17 |
+
padding: 0px;
|
18 |
+
}
|
19 |
+
#wpbody{
|
20 |
+
margin-left: -19px;
|
21 |
+
}
|
22 |
+
select{
|
23 |
+
min-width: 150px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.wpdm-loading {
|
27 |
+
background: url('<?php echo plugins_url('download-manager/images/wpdm-settings.png'); ?>') center center no-repeat;
|
28 |
+
width: 16px;
|
29 |
+
height: 16px;
|
30 |
+
/*border-bottom: 2px solid #2a2dcb;*/
|
31 |
+
/*border-left: 2px solid #ffffff;*/
|
32 |
+
/*border-right: 2px solid #c30;*/
|
33 |
+
/*border-top: 2px solid #3dd269;*/
|
34 |
+
/*border-radius: 100%;*/
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
.w3eden .nav-pills a{
|
41 |
+
background: #f5f5f5;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
.wpdm-spin{
|
47 |
+
-webkit-animation: spin 2s infinite linear;
|
48 |
+
-moz-animation: spin 2s infinite linear;
|
49 |
+
-ms-animation: spin 2s infinite linear;
|
50 |
+
-o-animation: spin 2s infinite linear;
|
51 |
+
animation: spin 2s infinite linear;
|
52 |
+
}
|
53 |
+
|
54 |
+
@keyframes "spin" {
|
55 |
+
from {
|
56 |
+
-webkit-transform: rotate(0deg);
|
57 |
+
-moz-transform: rotate(0deg);
|
58 |
+
-o-transform: rotate(0deg);
|
59 |
+
-ms-transform: rotate(0deg);
|
60 |
+
transform: rotate(0deg);
|
61 |
+
}
|
62 |
+
to {
|
63 |
+
-webkit-transform: rotate(359deg);
|
64 |
+
-moz-transform: rotate(359deg);
|
65 |
+
-o-transform: rotate(359deg);
|
66 |
+
-ms-transform: rotate(359deg);
|
67 |
+
transform: rotate(359deg);
|
68 |
+
}
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
@-moz-keyframes spin {
|
73 |
+
from {
|
74 |
+
-moz-transform: rotate(0deg);
|
75 |
+
transform: rotate(0deg);
|
76 |
+
}
|
77 |
+
to {
|
78 |
+
-moz-transform: rotate(359deg);
|
79 |
+
transform: rotate(359deg);
|
80 |
+
}
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
@-webkit-keyframes "spin" {
|
85 |
+
from {
|
86 |
+
-webkit-transform: rotate(0deg);
|
87 |
+
transform: rotate(0deg);
|
88 |
+
}
|
89 |
+
to {
|
90 |
+
-webkit-transform: rotate(359deg);
|
91 |
+
transform: rotate(359deg);
|
92 |
+
}
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
@-ms-keyframes "spin" {
|
97 |
+
from {
|
98 |
+
-ms-transform: rotate(0deg);
|
99 |
+
transform: rotate(0deg);
|
100 |
+
}
|
101 |
+
to {
|
102 |
+
-ms-transform: rotate(359deg);
|
103 |
+
transform: rotate(359deg);
|
104 |
+
}
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
@-o-keyframes "spin" {
|
109 |
+
from {
|
110 |
+
-o-transform: rotate(0deg);
|
111 |
+
transform: rotate(0deg);
|
112 |
+
}
|
113 |
+
to {
|
114 |
+
-o-transform: rotate(359deg);
|
115 |
+
transform: rotate(359deg);
|
116 |
+
}
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
.panel-heading h3.h{
|
121 |
+
font-size: 11pt;
|
122 |
+
font-weight: 700;
|
123 |
+
margin: 0;
|
124 |
+
padding: 5px 10px;
|
125 |
+
font-family: 'Open Sans';
|
126 |
+
}
|
127 |
+
|
128 |
+
.panel-heading .btn.btn-primary{
|
129 |
+
margin-top: -4px;
|
130 |
+
margin-right: -6px;
|
131 |
+
border-radius: 3px;
|
132 |
+
border:1px solid #18578E;
|
133 |
+
}
|
134 |
+
|
135 |
+
.panel-heading .btn.btn-primary:hover{
|
136 |
+
margin-top: -4px;
|
137 |
+
margin-right: -6px;
|
138 |
+
border-radius: 3px;
|
139 |
+
border:1px solid #18578E;
|
140 |
+
background-image: linear-gradient(to bottom, #F5F5F5 0px, #E1E1E1 100%);
|
141 |
+
|
142 |
+
}
|
143 |
+
|
144 |
+
.alert-info {
|
145 |
+
background-color: #DFECF7 !important;
|
146 |
+
border-color: #B0D1EC !important;
|
147 |
+
}
|
148 |
+
|
149 |
+
ul.nav li a:active,
|
150 |
+
ul.nav li a:focus,
|
151 |
+
ul.nav li a{
|
152 |
+
outline: none !important;
|
153 |
+
}
|
154 |
+
|
155 |
+
.w3eden .panel-primary {
|
156 |
+
border-color: #2080D3;
|
157 |
+
}
|
158 |
+
|
159 |
+
.w3eden .nav-pills li.active a,
|
160 |
+
.btn-primary,
|
161 |
+
.w3eden .panel-primary > .panel-heading{
|
162 |
+
background-image: linear-gradient(to bottom, #2081D5 0px, #1B6CB2 100%) !important;
|
163 |
+
}
|
164 |
+
.w3eden .panel-default > .panel-heading {
|
165 |
+
background-image: linear-gradient(to bottom, #F5F5F5 0px, #E1E1E1 100%);
|
166 |
+
background-repeat: repeat-x;
|
167 |
+
border-bottom-color: #cccccc !important;
|
168 |
+
}
|
169 |
+
|
170 |
+
ul#navigation {
|
171 |
+
border-bottom: 1px solid #999999;
|
172 |
+
}
|
173 |
+
|
174 |
+
#tabs a{
|
175 |
+
border-radius: 3px !important;
|
176 |
+
}
|
177 |
+
|
178 |
+
.form-control:focus{
|
179 |
+
-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 3px rgba(102,175,233,0.6) !important;
|
180 |
+
box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 3px rgba(102,175,233,0.6) !important;
|
181 |
+
}
|
182 |
+
.chzn-drop{
|
183 |
+
width: 100% !important;
|
184 |
+
}
|
185 |
+
|
186 |
+
ul#navigation {
|
187 |
+
border-bottom: 1px solid #999999;
|
188 |
+
}
|
189 |
+
.w3eden .alert{
|
190 |
+
font-family: Varela, serif;
|
191 |
+
font-size: 11pt;
|
192 |
+
}
|
193 |
+
</style>
|
194 |
+
|
195 |
+
<script type="text/javascript" src="<?php echo plugins_url();?>/download-manager/js/jquery.form.js"></script>
|
196 |
+
<link rel="stylesheet" href="<?php echo plugins_url('/download-manager/css/chosen.css'); ?>" />
|
197 |
+
|
198 |
+
|
199 |
+
<div class="wrap w3eden">
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
+
<div style="clear: both;"></div>
|
204 |
+
<div style="max-width: 800px;margin:10px 30px 0 30px;">
|
205 |
+
<div class="row">
|
206 |
+
<div class="col-md-12">
|
207 |
+
<div class="alert alert-success" style="background: #ffffff !important;border: 2px solid #63B76C !important;border-radius:6px !important">
|
208 |
+
<a class="text-success" href='https://wordpress.org/support/view/plugin-reviews/download-manager?rate=5#postform' title="Please consider it when you get some free moments" target="_blank">A <span class="ttip" title="5 Stars"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span> rating will inspire me a lot. Thanks for your time 😊</a>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
</div>
|
213 |
+
<form method="post" id="wdm_settings_form">
|
214 |
+
<?php wp_nonce_field('wpdm-'.NONCE_KEY,'wpdmsettingsnonce'); ?>
|
215 |
+
|
216 |
+
<div style="max-width: 800px;margin:0 30px" class="panel panel-primary">
|
217 |
+
<div class="panel-heading"><button type="submit" class="btn btn-primary pull-right"><span class="pull-left wpdm-loading wpdm-ssb" style="margin: 0.1em 5px 0 0"></span> Save Settings</button><h3 class="h"> Download Manager Settings <div class="pull-left wpdm-loading" id="wdms_loading"></div></h3>
|
218 |
+
|
219 |
+
</div>
|
220 |
+
<div class="panel-body">
|
221 |
+
<div class="container-fluid">
|
222 |
+
|
223 |
+
<div class="row"><div class="col-md-3">
|
224 |
+
<ul id="tabs" class="nav nav-pills nav-stacked">
|
225 |
+
<?php render_settings_tabs($tab=isset($_GET['tab'])?esc_attr($_GET['tab']):'basic'); ?>
|
226 |
+
</ul>
|
227 |
+
|
228 |
+
|
229 |
+
</div><div class="col-md-9">
|
230 |
+
<div class="tab-content">
|
231 |
+
<div onclick="jQuery(this).slideUp();" class="alert alert-info" style="display: none" id="message"></div>
|
232 |
+
|
233 |
+
<input type="hidden" name="task" id="task" value="wdm_save_settings" />
|
234 |
+
<input type="hidden" name="action" id="action" value="wdm_settings" />
|
235 |
+
<input type="hidden" name="section" id="section" value="basic" />
|
236 |
+
<div id="fm_settings">
|
237 |
+
<?php include('settings/basic.php'); ?>
|
238 |
+
</div> <br>
|
239 |
+
<br>
|
240 |
+
|
241 |
+
<button type="submit" class="btn btn-primary"><span class="pull-left wpdm-loading wpdm-ssb" style="margin: 0.1em 5px 0 0"></span> Save Settings</button>
|
242 |
+
|
243 |
+
<br>
|
244 |
+
|
245 |
+
</div>
|
246 |
+
</div>
|
247 |
+
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
+
|
252 |
+
</div>
|
253 |
+
|
254 |
+
</form>
|
255 |
+
|
256 |
+
<script type="text/javascript">
|
257 |
+
jQuery(document).ready(function(){
|
258 |
+
jQuery('select').chosen();
|
259 |
+
jQuery("ul#tabs li").click(function() {
|
260 |
+
|
261 |
+
});
|
262 |
+
jQuery('#message').removeClass('hide').hide();
|
263 |
+
jQuery("ul#tabs li a").click(function() {
|
264 |
+
///jQuert("ul#tabs li").removeClass('active')
|
265 |
+
jQuery("ul#tabs li").removeClass("active");
|
266 |
+
jQuery(this).parent('li').addClass('active');
|
267 |
+
jQuery('#wdms_loading').addClass('wpdm-spin');
|
268 |
+
jQuery(this).append('<span class="wpdm-loading wpdm-spin pull-right" id="wpdm-lsp"></span>')
|
269 |
+
var section = this.id;
|
270 |
+
jQuery.post(ajaxurl,{action:'wdm_settings',section:this.id},function(res){
|
271 |
+
jQuery('#fm_settings').html(res);
|
272 |
+
jQuery('#section').val(section)
|
273 |
+
jQuery('#wdms_loading').removeClass('wpdm-spin');
|
274 |
+
jQuery('select').chosen();
|
275 |
+
window.history.pushState({"html":res,"pageTitle":"response.pageTitle"},"", "edit.php?post_type=wpdmpro&page=settings&tab="+section);
|
276 |
+
jQuery('#wpdm-lsp').fadeOut(function(){
|
277 |
+
jQuery(this).remove();
|
278 |
+
});
|
279 |
+
});
|
280 |
+
return false;
|
281 |
+
});
|
282 |
+
|
283 |
+
window.onpopstate = function(e){
|
284 |
+
if(e.state){
|
285 |
+
jQuery("#fm_settings").html(e.state.html);
|
286 |
+
//document.title = e.state.pageTitle;
|
287 |
+
}
|
288 |
+
};
|
289 |
+
|
290 |
+
<?php if(isset($_GET['tab'])&&$_GET['tab']!=''){ ?>
|
291 |
+
jQuery("ul#tabs li").removeClass("active");
|
292 |
+
jQuery('#wdms_loading').addClass('wpdm-spin');
|
293 |
+
jQuery('#<?php echo esc_attr($_GET['tab']); ?>').parents().addClass("active");
|
294 |
+
var section = '<?php echo esc_attr($_GET['tab']);?>';
|
295 |
+
jQuery.post(ajaxurl,{action:'wdm_settings',section:section},function(res){
|
296 |
+
jQuery('#fm_settings').html(res);
|
297 |
+
jQuery('#section').val(section)
|
298 |
+
jQuery('#wdms_loading').removeClass('wpdm-spin');
|
299 |
+
});
|
300 |
+
<?php } ?>
|
301 |
+
|
302 |
+
jQuery('#wdm_settings_form').submit(function(){
|
303 |
+
|
304 |
+
jQuery(this).ajaxSubmit({
|
305 |
+
url:ajaxurl,
|
306 |
+
beforeSubmit: function(formData, jqForm, options){
|
307 |
+
jQuery('.wpdm-ssb').addClass('wpdm-spin');
|
308 |
+
jQuery('#wdms_loading').addClass('wpdm-spin');
|
309 |
+
},
|
310 |
+
success: function(responseText, statusText, xhr, $form){
|
311 |
+
jQuery('#message').html("<p>"+responseText+"</p>").slideDown();
|
312 |
+
//setTimeout("jQuery('#message').slideUp()",4000);
|
313 |
+
jQuery('.wpdm-ssb').removeClass('wpdm-spin');
|
314 |
+
jQuery('#wdms_loading').removeClass('wpdm-spin');
|
315 |
+
}
|
316 |
+
});
|
317 |
+
|
318 |
+
return false;
|
319 |
+
});
|
320 |
+
|
321 |
+
|
322 |
+
});
|
323 |
+
|
324 |
+
</script>
|
325 |
+
|
bootstrap/css/bootstrap-theme.css
ADDED
@@ -0,0 +1,3171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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