WordPress Download Manager - Version 2.5.96

Version Description

  • Fixed issues with category short-code
  • Fixed issue with tinymce button for category short-code
Download this release

Release Info

Developer codename065
Plugin Icon 128x128 WordPress Download Manager
Version 2.5.96
Comparing to
See all releases

Code changes from version 2.3.0 to 2.5.96

Files changed (136) hide show
  1. css/chosen-sprite.png +0 -0
  2. css/chosen.css +339 -0
  3. css/demo_table.css +576 -0
  4. css/demo_table_jui.css +380 -0
  5. css/front.css +3 -0
  6. css/jquery.dataTables.css +335 -0
  7. download-manager.php +308 -118
  8. download.php +8 -6
  9. editor_plugin.js +1 -1
  10. functions.php +6 -0
  11. icon/35.png +0 -0
  12. icon/Box Download.png +0 -0
  13. icon/Cloud Download Off.png +0 -0
  14. icon/Cloud Download On.png +0 -0
  15. icon/Download file.png +0 -0
  16. icon/Download-01.png +0 -0
  17. icon/Download_Blue.png +0 -0
  18. icon/Download_Crate.png +0 -0
  19. icon/Download_Green.png +0 -0
  20. icon/Globe-Download.png +0 -0
  21. icon/Gnome-Document-Save-32.png +0 -0
  22. icon/Gnome-Emblem-Downloads-32.png +0 -0
  23. icon/Package-Download.png +0 -0
  24. icon/Torrents.png +0 -0
  25. icon/agt_add-to-desktop.png +0 -0
  26. icon/agt_update_drivers.png +0 -0
  27. icon/agt_update_misc.png +0 -0
  28. icon/agt_update_recommended.png +0 -0
  29. icon/agt_update_recommended1.png +0 -0
  30. icon/application-x-kgetlist.png +0 -0
  31. icon/archive.png +0 -0
  32. icon/ark.png +0 -0
  33. icon/ark2.png +0 -0
  34. icon/arrow down.png +0 -0
  35. icon/arrow_down.png +0 -0
  36. icon/arrow_down_alt1.png +0 -0
  37. icon/basket_download.png +0 -0
  38. icon/bottom.png +0 -0
  39. icon/cloud-download.png +0 -0
  40. icon/down2.png +0 -0
  41. icon/down_arrow.png +0 -0
  42. icon/download off.png +0 -0
  43. icon/download on.png +0 -0
  44. icon/download-box-open.png +0 -0
  45. icon/download-database.png +0 -0
  46. icon/download_32.png +0 -0
  47. icon/download_accept_32.png +0 -0
  48. icon/download_cancel_32.png +0 -0
  49. icon/download_cloud.png +0 -0
  50. icon/download_down_arrow.png +0 -0
  51. icon/download_for_linux.png +0 -0
  52. icon/download_for_mac.png +0 -0
  53. icon/download_for_windows.png +0 -0
  54. icon/download_information_32.png +0 -0
  55. icon/download_manager.png +0 -0
  56. icon/download_pause_32.png +0 -0
  57. icon/download_run_32.png +0 -0
  58. icon/download_security_32.png +0 -0
  59. icon/download_settings_32.png +0 -0
  60. icon/download_stop_32.png +0 -0
  61. icon/downloads.png +0 -0
  62. icon/downloads_folder.png +0 -0
  63. icon/email_download.png +0 -0
  64. icon/emblem-downloads.png +0 -0
  65. icon/file_download.png +0 -0
  66. icon/file_extension_.png +0 -0
  67. icon/file_extension_bmp.png +0 -0
  68. icon/file_extension_doc.png +0 -0
  69. icon/file_extension_flv.png +0 -0
  70. icon/file_extension_gif.png +0 -0
  71. icon/file_extension_html.png +0 -0
  72. icon/file_extension_jpeg.png +0 -0
  73. icon/file_extension_jpg.png +0 -0
  74. icon/file_extension_log.png +0 -0
  75. icon/file_extension_pdf.png +0 -0
  76. icon/file_extension_png.png +0 -0
  77. icon/file_extension_psd.png +0 -0
  78. icon/file_extension_rar.png +0 -0
  79. icon/file_extension_txt.png +0 -0
  80. icon/file_extension_xls.png +0 -0
  81. icon/file_extension_zip.png +0 -0
  82. icon/find-next.png +0 -0
  83. icon/folder-download.png +0 -0
  84. icon/folder-downloads.png +0 -0
  85. icon/folder_apollon.png +0 -0
  86. icon/folder_download.png +0 -0
  87. icon/folder_downloads_32.png +0 -0
  88. icon/go-bottom.png +0 -0
  89. icon/human-folder-downloads.png +0 -0
  90. icon/icontexto-aurora-folders-downloads.png +0 -0
  91. icon/inbox_download.png +0 -0
  92. icon/kde-folder-downloads.png +0 -0
  93. icon/kget_list.png +0 -0
  94. icon/kthememgr.png +0 -0
  95. icon/load_download.png +0 -0
  96. icon/manilla-folder-downloads.png +0 -0
  97. icon/misc_23.png +0 -0
  98. icon/note_download.png +0 -0
  99. icon/old-go-bottom.png +0 -0
  100. icon/orange-folder-downloads.png +0 -0
  101. icon/photo_download.png +0 -0
  102. icon/save_download.png +0 -0
  103. icon/share.png +0 -0
  104. icon/system-config-kickstart.png +0 -0
  105. icon/system-log-out.png +0 -0
  106. icon/weather_03.png +0 -0
  107. images/back_disabled.png +0 -0
  108. images/back_enabled.png +0 -0
  109. images/back_enabled_hover.png +0 -0
  110. images/forward_disabled.png +0 -0
  111. images/forward_enabled.png +0 -0
  112. images/forward_enabled_hover.png +0 -0
  113. images/theme.png +0 -0
  114. images/wpdm.png +0 -0
  115. images/wpeden.png +0 -0
  116. images/wpmp.png +0 -0
  117. js/chosen.jquery.min.js +10 -0
  118. js/jquery.dataTables.js +12099 -0
  119. js/jquery.dataTables.min.js +154 -0
  120. process.php +39 -12
  121. readme.txt +156 -30
  122. screenshot-1.png +0 -0
  123. screenshot-6.png +0 -0
  124. screenshot-7.png +0 -0
  125. screenshot-8.png +0 -0
  126. wpdc.ppj +0 -67
  127. wpdc.ppx +0 -1
  128. wpdm-add-new-file.php +213 -32
  129. wpdm-all-downloads.php +146 -0
  130. wpdm-categories.php +12 -4
  131. wpdm-file-icon.php +50 -0
  132. wpdm-free-mce-button.php +387 -34
  133. wpdm-list-files.php +46 -46
  134. wpdm-server-file-browser.php +2 -2
  135. wpdm-settings.php +20 -10
  136. wpdm-widgets.php +62 -3
css/chosen-sprite.png ADDED
Binary file
css/chosen.css ADDED
@@ -0,0 +1,339 @@
1
+ /* @group Base */
2
+ select.chzn-select {
3
+ visibility: hidden;
4
+ height: 28px !important;
5
+ min-height: 28px !important;
6
+ }
7
+ .chzn-container {
8
+ font-size: 12px;
9
+ position: relative;
10
+ display: inline-block;
11
+ zoom: 1;
12
+ *display: inline;
13
+ }
14
+ .chzn-container .chzn-drop {
15
+ background: #fff;
16
+ border: 1px solid #aaa;
17
+ border-top: 0;
18
+ position: absolute;
19
+ top: 29px;
20
+ left: 0;
21
+ -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
22
+ -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
23
+ -o-box-shadow : 0 4px 5px rgba(0,0,0,.15);
24
+ box-shadow : 0 4px 5px rgba(0,0,0,.15);
25
+ z-index: 999;
26
+ }
27
+ /* @end */
28
+
29
+ /* @group Single Chosen */
30
+ .chzn-container-single .chzn-single {
31
+ background-color: #fff;
32
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
33
+ background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
34
+ background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
35
+ background-image: -o-linear-gradient(top, #eeeeee 0%,#ffffff 50%);
36
+ background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 50%);
37
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
38
+ background-image: linear-gradient(top, #eeeeee 0%,#ffffff 50%);
39
+ -webkit-border-radius: 4px;
40
+ -moz-border-radius : 4px;
41
+ border-radius : 4px;
42
+ -moz-background-clip : padding;
43
+ -webkit-background-clip: padding-box;
44
+ background-clip : padding-box;
45
+ border: 1px solid #aaa;
46
+ display: block;
47
+ overflow: hidden;
48
+ white-space: nowrap;
49
+ position: relative;
50
+ height: 26px;
51
+ line-height: 26px;
52
+ padding: 0 0 0 8px;
53
+ color: #444;
54
+ text-decoration: none;
55
+ }
56
+ .chzn-container-single .chzn-single span {
57
+ margin-right: 26px;
58
+ display: block;
59
+ overflow: hidden;
60
+ white-space: nowrap;
61
+ -o-text-overflow: ellipsis;
62
+ -ms-text-overflow: ellipsis;
63
+ text-overflow: ellipsis;
64
+ }
65
+ .chzn-container-single .chzn-single div {
66
+ -webkit-border-radius: 0 4px 4px 0;
67
+ -moz-border-radius : 0 4px 4px 0;
68
+ border-radius : 0 4px 4px 0;
69
+ -moz-background-clip : padding;
70
+ -webkit-background-clip: padding-box;
71
+ background-clip : padding-box;
72
+ background: #ccc;
73
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
74
+ background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
75
+ background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
76
+ background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
77
+ background-image: -ms-linear-gradient(top, #cccccc 0%,#eeeeee 60%);
78
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#eeeeee',GradientType=0 );
79
+ background-image: linear-gradient(top, #cccccc 0%,#eeeeee 60%);
80
+ border-left: 1px solid #aaa;
81
+ position: absolute;
82
+ right: 0;
83
+ top: 0;
84
+ display: block;
85
+ height: 100%;
86
+ width: 18px;
87
+ }
88
+ .chzn-container-single .chzn-single div b {
89
+ background: url('chosen-sprite.png') no-repeat 0 1px;
90
+ display: block;
91
+ width: 100%;
92
+ height: 100%;
93
+ }
94
+ .chzn-container-single .chzn-search {
95
+ padding: 3px 4px;
96
+ margin: 0;
97
+ white-space: nowrap;
98
+ }
99
+ .chzn-container-single .chzn-search input {
100
+ background: #fff url('chosen-sprite.png') no-repeat 100% -20px;
101
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
102
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
103
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
104
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
105
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
106
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
107
+ background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
108
+ margin: 1px 0;
109
+ padding: 4px 20px 4px 5px;
110
+ outline: 0;
111
+ border: 1px solid #aaa;
112
+ font-family: sans-serif;
113
+ font-size: 1em;
114
+ }
115
+ .chzn-container-single .chzn-drop {
116
+ -webkit-border-radius: 0 0 4px 4px;
117
+ -moz-border-radius : 0 0 4px 4px;
118
+ border-radius : 0 0 4px 4px;
119
+ -moz-background-clip : padding;
120
+ -webkit-background-clip: padding-box;
121
+ background-clip : padding-box;
122
+ }
123
+ /* @end */
124
+
125
+ /* @group Multi Chosen */
126
+ .chzn-container-multi .chzn-choices {
127
+ background-color: #fff;
128
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
129
+ background-image: -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
130
+ background-image: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
131
+ background-image: -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
132
+ background-image: -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
133
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
134
+ background-image: linear-gradient(top, #ffffff 85%,#eeeeee 99%);
135
+ border: 1px solid #aaa;
136
+ margin: 0;
137
+ padding: 0;
138
+ cursor: text;
139
+ overflow: hidden;
140
+ height: auto !important;
141
+ height: 1%;
142
+ position: relative;
143
+ }
144
+ .chzn-container-multi .chzn-choices li {
145
+ float: left;
146
+ list-style: none;
147
+ }
148
+ .chzn-container-multi .chzn-choices .search-field {
149
+ white-space: nowrap;
150
+ margin: 0;
151
+ padding: 0;
152
+ }
153
+ .chzn-container-multi .chzn-choices .search-field input {
154
+ color: #666;
155
+ background: transparent !important;
156
+ border: 0 !important;
157
+ padding: 5px;
158
+ margin: 1px 0;
159
+ outline: 0;
160
+ -webkit-box-shadow: none;
161
+ -moz-box-shadow : none;
162
+ -o-box-shadow : none;
163
+ box-shadow : none;
164
+ }
165
+ .chzn-container-multi .chzn-choices .search-field .default {
166
+ color: #999;
167
+ }
168
+ .chzn-container-multi .chzn-choices .search-choice {
169
+ -webkit-border-radius: 3px;
170
+ -moz-border-radius : 3px;
171
+ border-radius : 3px;
172
+ -moz-background-clip : padding;
173
+ -webkit-background-clip: padding-box;
174
+ background-clip : padding-box;
175
+ background-color: #e4e4e4;
176
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #e4e4e4), color-stop(0.7, #eeeeee));
177
+ background-image: -webkit-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
178
+ background-image: -moz-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%);
179
+ background-image: -o-linear-gradient(bottom, #e4e4e4 0%, #eeeeee 70%);
180
+ background-image: -ms-linear-gradient(top, #e4e4e4 0%,#eeeeee 70%);
181
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e4e4e4', endColorstr='#eeeeee',GradientType=0 );
182
+ background-image: linear-gradient(top, #e4e4e4 0%,#eeeeee 70%);
183
+ color: #333;
184
+ border: 1px solid #b4b4b4;
185
+ line-height: 13px;
186
+ padding: 3px 19px 3px 6px;
187
+ margin: 3px 0 3px 5px;
188
+ position: relative;
189
+ }
190
+ .chzn-container-multi .chzn-choices .search-choice span {
191
+ cursor: default;
192
+ }
193
+ .chzn-container-multi .chzn-choices .search-choice-focus {
194
+ background: #d4d4d4;
195
+ }
196
+ .chzn-container-multi .chzn-choices .search-choice .search-choice-close {
197
+ display: block;
198
+ position: absolute;
199
+ right: 5px;
200
+ top: 6px;
201
+ width: 8px;
202
+ height: 9px;
203
+ font-size: 1px;
204
+ background: url(chosen-sprite.png) right top no-repeat;
205
+ }
206
+ .chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
207
+ background-position: right -9px;
208
+ }
209
+ .chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
210
+ background-position: right -9px;
211
+ }
212
+ /* @end */
213
+
214
+ /* @group Results */
215
+ .chzn-container .chzn-results {
216
+ margin: 0 4px 4px 0;
217
+ max-height: 190px;
218
+ padding: 0 0 0 4px;
219
+ position: relative;
220
+ overflow-x: hidden;
221
+ overflow-y: auto;
222
+ }
223
+ .chzn-container-multi .chzn-results {
224
+ margin: -1px 0 0;
225
+ padding: 0;
226
+ }
227
+ .chzn-container .chzn-results li {
228
+ line-height: 80%;
229
+ padding: 7px 7px 8px;
230
+ margin: 0;
231
+ list-style: none;
232
+ }
233
+ .chzn-container .chzn-results .active-result {
234
+ cursor: pointer;
235
+ }
236
+ .chzn-container .chzn-results .highlighted {
237
+ background: #3875d7;
238
+ color: #fff;
239
+ }
240
+ .chzn-container .chzn-results li em {
241
+ background: #feffde;
242
+ font-style: normal;
243
+ }
244
+ .chzn-container .chzn-results .highlighted em {
245
+ background: transparent;
246
+ }
247
+ .chzn-container .chzn-results .no-results {
248
+ background: #f4f4f4;
249
+ }
250
+ .chzn-container .chzn-results .group-result {
251
+ cursor: default;
252
+ color: #999;
253
+ font-weight: bold;
254
+ }
255
+ .chzn-container .chzn-results .group-option {
256
+ padding-left: 20px;
257
+ }
258
+ .chzn-container-multi .chzn-drop .result-selected {
259
+ display: none;
260
+ }
261
+ /* @end */
262
+
263
+ /* @group Active */
264
+ .chzn-container-active .chzn-single {
265
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
266
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
267
+ -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
268
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
269
+ border: 1px solid #5897fb;
270
+ }
271
+ .chzn-container-active .chzn-single-with-drop {
272
+ border: 1px solid #aaa;
273
+ -webkit-box-shadow: 0 1px 0 #fff inset;
274
+ -moz-box-shadow : 0 1px 0 #fff inset;
275
+ -o-box-shadow : 0 1px 0 #fff inset;
276
+ box-shadow : 0 1px 0 #fff inset;
277
+ background-color: #eee;
278
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
279
+ background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
280
+ background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
281
+ background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
282
+ background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
283
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
284
+ background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
285
+ -webkit-border-bottom-left-radius : 0;
286
+ -webkit-border-bottom-right-radius: 0;
287
+ -moz-border-radius-bottomleft : 0;
288
+ -moz-border-radius-bottomright: 0;
289
+ border-bottom-left-radius : 0;
290
+ border-bottom-right-radius: 0;
291
+ }
292
+ .chzn-container-active .chzn-single-with-drop div {
293
+ background: transparent;
294
+ border-left: none;
295
+ }
296
+ .chzn-container-active .chzn-single-with-drop div b {
297
+ background-position: -18px 1px;
298
+ }
299
+ .chzn-container-active .chzn-choices {
300
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
301
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
302
+ -o-box-shadow : 0 0 5px rgba(0,0,0,.3);
303
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
304
+ border: 1px solid #5897fb;
305
+ }
306
+ .chzn-container-active .chzn-choices .search-field input {
307
+ color: #111 !important;
308
+ }
309
+ /* @end */
310
+
311
+ /* @group Right to Left */
312
+ .chzn-rtl { direction:rtl;text-align: right; }
313
+ .chzn-rtl .chzn-single { padding-left: 0; padding-right: 8px; }
314
+ .chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; }
315
+ .chzn-rtl .chzn-single div {
316
+ left: 0; right: auto;
317
+ border-left: none; border-right: 1px solid #aaaaaa;
318
+ -webkit-border-radius: 4px 0 0 4px;
319
+ -moz-border-radius : 4px 0 0 4px;
320
+ border-radius : 4px 0 0 4px;
321
+ }
322
+ .chzn-rtl .chzn-choices li { float: right; }
323
+ .chzn-rtl .chzn-choices .search-choice { padding: 3px 6px 3px 19px; margin: 3px 5px 3px 0; }
324
+ .chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 5px; right: auto; background-position: right top;}
325
+ .chzn-rtl.chzn-container-single .chzn-results { margin-left: 4px; margin-right: 0; padding-left: 0; padding-right: 4px; }
326
+ .chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 20px; }
327
+ .chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
328
+ .chzn-rtl .chzn-search input {
329
+ background: url('chosen-sprite.png') no-repeat -38px -20px, #ffffff;
330
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
331
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
332
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
333
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
334
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
335
+ background: url('chosen-sprite.png') no-repeat -38px -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
336
+ background: url('chosen-sprite.png') no-repeat -38px -20px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
337
+ padding: 4px 5px 4px 20px;
338
+ }
339
+ /* @end */
css/demo_table.css ADDED
@@ -0,0 +1,576 @@
1
+ /*
2
+ * File: demo_table.css
3
+ * CVS: $Id$
4
+ * Description: CSS descriptions for DataTables demo pages
5
+ * Author: Allan Jardine
6
+ * Created: Tue May 12 06:47:22 BST 2009
7
+ * Modified: $Date$ by $Author$
8
+ * Language: CSS
9
+ * Project: DataTables
10
+ *
11
+ * Copyright 2009 Allan Jardine. All Rights Reserved.
12
+ *
13
+ * ***************************************************************************
14
+ * DESCRIPTION
15
+ *
16
+ * The styles given here are suitable for the demos that are used with the standard DataTables
17
+ * distribution (see www.datatables.net). You will most likely wish to modify these styles to
18
+ * meet the layout requirements of your site.
19
+ *
20
+ * Common issues:
21
+ * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
22
+ * no conflict between the two pagination types. If you want to use full_numbers pagination
23
+ * ensure that you either have "example_alt_pagination" as a body class name, or better yet,
24
+ * modify that selector.
25
+ * Note that the path used for Images is relative. All images are by default located in
26
+ * ../images/ - relative to this CSS file.
27
+ */
28
+
29
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
30
+ * DataTables features
31
+ */
32
+
33
+ .dataTables_wrapper {
34
+ position: relative;
35
+ clear: both;
36
+ zoom: 1; /* Feeling sorry for IE */
37
+ }
38
+
39
+ .dataTables_processing {
40
+ position: absolute;
41
+ top: 50%;
42
+ left: 50%;
43
+ width: 250px;
44
+ height: 30px;
45
+ margin-left: -125px;
46
+ margin-top: -15px;
47
+ padding: 14px 0 2px 0;
48
+ border: 1px solid #ddd;
49
+ text-align: center;
50
+ color: #999;
51
+ font-size: 14px;
52
+ background-color: white;
53
+ }
54
+
55
+ .dataTables_length {
56
+ width: 40%;
57
+ float: left;
58
+ }
59
+
60
+ .dataTables_filter {
61
+ width: 50%;
62
+ float: right;
63
+ text-align: right;
64
+ }
65
+
66
+ .dataTables_info {
67
+ width: 60%;
68
+ float: left;
69
+ }
70
+
71
+ .dataTables_paginate {
72
+ float: right;
73
+ text-align: right;
74
+ }
75
+
76
+ /* Pagination nested */
77
+ .paginate_disabled_previous, .paginate_enabled_previous,
78
+ .paginate_disabled_next, .paginate_enabled_next {
79
+ height: 19px;
80
+ float: left;
81
+ cursor: pointer;
82
+ *cursor: hand;
83
+ color: #111 !important;
84
+ }
85
+ .paginate_disabled_previous:hover, .paginate_enabled_previous:hover,
86
+ .paginate_disabled_next:hover, .paginate_enabled_next:hover {
87
+ text-decoration: none !important;
88
+ }
89
+ .paginate_disabled_previous:active, .paginate_enabled_previous:active,
90
+ .paginate_disabled_next:active, .paginate_enabled_next:active {
91
+ outline: none;
92
+ }
93
+
94
+ .paginate_disabled_previous,
95
+ .paginate_disabled_next {
96
+ color: #666 !important;
97
+ }
98
+ .paginate_disabled_previous, .paginate_enabled_previous {
99
+ padding-left: 23px;
100
+ }
101
+ .paginate_disabled_next, .paginate_enabled_next {
102
+ padding-right: 23px;
103
+ margin-left: 10px;
104
+ }
105
+
106
+ .paginate_disabled_previous {
107
+ background: url('../images/back_disabled.png') no-repeat top left;
108
+ }
109
+
110
+ .paginate_enabled_previous {
111
+ background: url('../images/back_enabled.png') no-repeat top left;
112
+ }
113
+ .paginate_enabled_previous:hover {
114
+ background: url('../images/back_enabled_hover.png') no-repeat top left;
115
+ }
116
+
117
+ .paginate_disabled_next {
118
+ background: url('../images/forward_disabled.png') no-repeat top right;
119
+ }
120
+
121
+ .paginate_enabled_next {
122
+ background: url('../images/forward_enabled.png') no-repeat top right;
123
+ }
124
+ .paginate_enabled_next:hover {
125
+ background: url('../images/forward_enabled_hover.png') no-repeat top right;
126
+ }
127
+
128
+
129
+
130
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
131
+ * DataTables display
132
+ */
133
+ table.display {
134
+ margin: 0 auto;
135
+ clear: both;
136
+ width: 100%;
137
+
138
+ /* Note Firefox 3.5 and before have a bug with border-collapse
139
+ * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
140
+ * border-spacing: 0; is one possible option. Conditional-css.com is
141
+ * useful for this kind of thing
142
+ *
143
+ * Further note IE 6/7 has problems when calculating widths with border width.
144
+ * It subtracts one px relative to the other browsers from the first column, and
145
+ * adds one to the end...
146
+ *
147
+ * If you want that effect I'd suggest setting a border-top/left on th/td's and
148
+ * then filling in the gaps with other borders.
149
+ */
150
+ }
151
+
152
+ table.display thead th {
153
+ padding: 3px 18px 3px 10px;
154
+ border-bottom: 1px solid black;
155
+ font-weight: bold;
156
+ cursor: pointer;
157
+ * cursor: hand;
158
+ }
159
+
160
+ table.display tfoot th {
161
+ padding: 3px 18px 3px 10px;
162
+ border-top: 1px solid black;
163
+ font-weight: bold;
164
+ }
165
+
166
+ table.display tr.heading2 td {
167
+ border-bottom: 1px solid #aaa;
168
+ }
169
+
170
+ table.display td {
171
+ padding: 3px 10px;
172
+ }
173
+
174
+ table.display td.center {
175
+ text-align: center;
176
+ }
177
+
178
+
179
+
180
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
181
+ * DataTables sorting
182
+ */
183
+
184
+ .sorting_asc {
185
+ background: url('../images/sort_asc.png') no-repeat center right;
186
+ }
187
+
188
+ .sorting_desc {
189
+ background: url('../images/sort_desc.png') no-repeat center right;
190
+ }
191
+
192
+ .sorting {
193
+ background: url('../images/sort_both.png') no-repeat center right;
194
+ }
195
+
196
+ .sorting_asc_disabled {
197
+ background: url('../images/sort_asc_disabled.png') no-repeat center right;
198
+ }
199
+
200
+ .sorting_desc_disabled {
201
+ background: url('../images/sort_desc_disabled.png') no-repeat center right;
202
+ }
203
+
204
+ th:active {
205
+ outline: none;
206
+ }
207
+
208
+
209
+
210
+
211
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
212
+ * DataTables row classes
213
+ */
214
+ table.display tr.odd.gradeA {
215
+ background-color: #ddffdd;
216
+ }
217
+
218
+ table.display tr.even.gradeA {
219
+ background-color: #eeffee;
220
+ }
221
+
222
+ table.display tr.odd.gradeC {
223
+ background-color: #ddddff;
224
+ }
225
+
226
+ table.display tr.even.gradeC {
227
+ background-color: #eeeeff;
228
+ }
229
+
230
+ table.display tr.odd.gradeX {
231
+ background-color: #ffdddd;
232
+ }
233
+
234
+ table.display tr.even.gradeX {
235
+ background-color: #ffeeee;
236
+ }
237
+
238
+ table.display tr.odd.gradeU {
239
+ background-color: #ddd;
240
+ }
241
+
242
+ table.display tr.even.gradeU {
243
+ background-color: #eee;
244
+ }
245
+
246
+
247
+ tr.odd {
248
+ background-color: #E2E4FF;
249
+ }
250
+
251
+ tr.even {
252
+ background-color: white;
253
+ }
254
+
255
+
256
+
257
+
258
+
259
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
260
+ * Misc
261
+ */
262
+ .dataTables_scroll {
263
+ clear: both;
264
+ }
265
+
266
+ .dataTables_scrollBody {
267
+ *margin-top: -1px;
268
+ -webkit-overflow-scrolling: touch;
269
+ }
270
+
271
+ .top, .bottom {
272
+ padding: 15px;
273
+ background-color: #F5F5F5;
274
+ border: 1px solid #CCCCCC;
275
+ }
276
+
277
+ .top .dataTables_info {
278
+ float: none;
279
+ }
280
+
281
+ .clear {
282
+ clear: both;
283
+ }
284
+
285
+ .dataTables_empty {
286
+ text-align: center;
287
+ }
288
+
289
+ tfoot input {
290
+ margin: 0.5em 0;
291
+ width: 100%;
292
+ color: #444;
293
+ }
294
+
295
+ tfoot input.search_init {
296
+ color: #999;
297
+ }
298
+
299
+ td.group {
300
+ background-color: #d1cfd0;
301
+ border-bottom: 2px solid #A19B9E;
302
+ border-top: 2px solid #A19B9E;
303
+ }
304
+
305
+ td.details {
306
+ background-color: #d1cfd0;
307
+ border: 2px solid #A19B9E;
308
+ }
309
+
310
+
311
+ .example_alt_pagination div.dataTables_info {
312
+ width: 40%;
313
+ }
314
+
315
+ .paging_full_numbers {
316
+ width: 400px;
317
+ height: 22px;
318
+ line-height: 22px;
319
+ }
320
+
321
+ .paging_full_numbers a:active {
322
+ outline: none
323
+ }
324
+
325
+ .paging_full_numbers a:hover {
326
+ text-decoration: none;
327
+ }
328
+
329
+ .paging_full_numbers a.paginate_button,
330
+ .paging_full_numbers a.paginate_active {
331
+ border: 1px solid #aaa;
332
+ -webkit-border-radius: 5px;
333
+ -moz-border-radius: 5px;
334
+ padding: 2px 5px;
335
+ margin: 0 3px;
336
+ cursor: pointer;
337
+ *cursor: hand;
338
+ color: #333 !important;
339
+ }
340
+
341
+ .paging_full_numbers a.paginate_button {
342
+ background-color: #ddd;
343
+ }
344
+
345
+ .paging_full_numbers a.paginate_button:hover {
346
+ background-color: #ccc;
347
+ text-decoration: none !important;
348
+ }
349
+
350
+ .paging_full_numbers a.paginate_active {
351
+ background-color: #99B3FF;
352
+ }
353
+
354
+ table.display tr.even.row_selected td {
355
+ background-color: #B0BED9;
356
+ }
357
+
358
+ table.display tr.odd.row_selected td {
359
+ background-color: #9FAFD1;
360
+ }
361
+
362
+
363
+ /*
364
+ * Sorting classes for columns
365
+ */
366
+ /* For the standard odd/even */
367
+ tr.odd td.sorting_1 {
368
+ background-color: #D3D6FF;
369
+ }
370
+
371
+ tr.odd td.sorting_2 {
372
+ background-color: #DADCFF;
373
+ }
374
+
375
+ tr.odd td.sorting_3 {
376
+ background-color: #E0E2FF;
377
+ }
378
+
379
+ tr.even td.sorting_1 {
380
+ background-color: #EAEBFF;
381
+ }
382
+
383
+ tr.even td.sorting_2 {
384
+ background-color: #F2F3FF;
385
+ }
386
+
387
+ tr.even td.sorting_3 {
388
+ background-color: #F9F9FF;
389
+ }
390
+
391
+
392
+ /* For the Conditional-CSS grading rows */
393
+ /*
394
+ Colour calculations (based off the main row colours)
395
+ Level 1:
396
+ dd > c4
397
+ ee > d5
398
+ Level 2:
399
+ dd > d1
400
+ ee > e2
401
+ */
402
+ tr.odd.gradeA td.sorting_1 {
403
+ background-color: #c4ffc4;
404
+ }
405
+
406
+ tr.odd.gradeA td.sorting_2 {
407
+ background-color: #d1ffd1;
408
+ }
409
+
410
+ tr.odd.gradeA td.sorting_3 {
411
+ background-color: #d1ffd1;
412
+ }
413
+
414
+ tr.even.gradeA td.sorting_1 {
415
+ background-color: #d5ffd5;
416
+ }
417
+
418
+ tr.even.gradeA td.sorting_2 {
419
+ background-color: #e2ffe2;
420
+ }
421
+
422
+ tr.even.gradeA td.sorting_3 {
423
+ background-color: #e2ffe2;
424
+ }
425
+
426
+ tr.odd.gradeC td.sorting_1 {
427
+ background-color: #c4c4ff;
428
+ }
429
+
430
+ tr.odd.gradeC td.sorting_2 {
431
+ background-color: #d1d1ff;
432
+ }
433
+
434
+ tr.odd.gradeC td.sorting_3 {
435
+ background-color: #d1d1ff;
436
+ }
437
+
438
+ tr.even.gradeC td.sorting_1 {
439
+ background-color: #d5d5ff;
440
+ }
441
+
442
+ tr.even.gradeC td.sorting_2 {
443
+ background-color: #e2e2ff;
444
+ }
445
+
446
+ tr.even.gradeC td.sorting_3 {
447
+ background-color: #e2e2ff;
448
+ }
449
+
450
+ tr.odd.gradeX td.sorting_1 {
451
+ background-color: #ffc4c4;
452
+ }
453
+
454
+ tr.odd.gradeX td.sorting_2 {
455
+ background-color: #ffd1d1;
456
+ }
457
+
458
+ tr.odd.gradeX td.sorting_3 {
459
+ background-color: #ffd1d1;
460
+ }
461
+
462
+ tr.even.gradeX td.sorting_1 {
463
+ background-color: #ffd5d5;
464
+ }
465
+
466
+ tr.even.gradeX td.sorting_2 {
467
+ background-color: #ffe2e2;
468
+ }
469
+
470
+ tr.even.gradeX td.sorting_3 {
471
+ background-color: #ffe2e2;
472
+ }
473
+
474
+ tr.odd.gradeU td.sorting_1 {
475
+ background-color: #c4c4c4;
476
+ }
477
+
478
+ tr.odd.gradeU td.sorting_2 {
479
+ background-color: #d1d1d1;
480
+ }
481
+
482
+ tr.odd.gradeU td.sorting_3 {
483
+ background-color: #d1d1d1;
484
+ }
485
+
486
+ tr.even.gradeU td.sorting_1 {
487
+ background-color: #d5d5d5;
488
+ }
489
+
490
+ tr.even.gradeU td.sorting_2 {
491
+ background-color: #e2e2e2;
492
+ }
493
+
494
+ tr.even.gradeU td.sorting_3 {
495
+ background-color: #e2e2e2;
496
+ }
497
+
498
+
499
+ /*
500
+ * Row highlighting example
501
+ */
502
+ .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
503
+ background-color: #ECFFB3;
504
+ }
505
+
506
+ .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
507
+ background-color: #E6FF99;
508
+ }
509
+
510
+ .ex_highlight_row #example tr.even:hover {
511
+ background-color: #ECFFB3;
512
+ }
513
+
514
+ .ex_highlight_row #example tr.even:hover td.sorting_1 {
515
+ background-color: #DDFF75;
516
+ }
517
+
518
+ .ex_highlight_row #example tr.even:hover td.sorting_2 {
519
+ background-color: #E7FF9E;
520
+ }
521
+
522
+ .ex_highlight_row #example tr.even:hover td.sorting_3 {
523
+ background-color: #E2FF89;
524
+ }
525
+
526
+ .ex_highlight_row #example tr.odd:hover {
527
+ background-color: #E6FF99;
528
+ }
529
+
530
+ .ex_highlight_row #example tr.odd:hover td.sorting_1 {
531
+ background-color: #D6FF5C;
532
+ }
533
+
534
+ .ex_highlight_row #example tr.odd:hover td.sorting_2 {
535
+ background-color: #E0FF84;
536
+ }
537
+
538
+ .ex_highlight_row #example tr.odd:hover td.sorting_3 {
539
+ background-color: #DBFF70;
540
+ }
541
+
542
+
543
+ /*
544
+ * KeyTable
545
+ */
546
+ table.KeyTable td {
547
+ border: 3px solid transparent;
548
+ }
549
+
550
+ table.KeyTable td.focus {
551
+ border: 3px solid #3366FF;
552
+ }
553
+
554
+ table.display tr.gradeA {
555
+ background-color: #eeffee;
556
+ }
557
+
558
+ table.display tr.gradeC {
559
+ background-color: #ddddff;
560
+ }
561
+
562
+ table.display tr.gradeX {
563
+ background-color: #ffdddd;
564
+ }
565
+
566
+ table.display tr.gradeU {
567
+ background-color: #ddd;
568
+ }
569
+
570
+ div.box {
571
+ height: 100px;
572
+ padding: 10px;
573
+ overflow: auto;
574
+ border: 1px solid #8080FF;
575
+ background-color: #E5E5FF;
576
+ }
css/demo_table_jui.css ADDED
@@ -0,0 +1,380 @@
1
+ /*
2
+ * File: demo_table_jui.css
3
+ * CVS: $Id$
4
+ * Description: CSS descriptions for DataTables demo pages
5
+ * Author: Allan Jardine
6
+ * Created: Tue May 12 06:47:22 BST 2009
7
+ * Modified: $Date$ by $Author$
8
+ * Language: CSS
9
+ * Project: DataTables
10
+ *
11
+ * Copyright 2009 Allan Jardine. All Rights Reserved.
12
+ *
13
+ * ***************************************************************************
14
+ * DESCRIPTION
15
+ *
16
+ * The styles given here are suitable for the demos that are used with the standard DataTables
17
+ * distribution (see www.datatables.net). You will most likely wish to modify these styles to
18
+ * meet the layout requirements of your site.
19
+ *
20
+ * Common issues:
21
+ * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
22
+ * no conflict between the two pagination types. If you want to use full_numbers pagination
23
+ * ensure that you either have "example_alt_pagination" as a body class name, or better yet,
24
+ * modify that selector.
25
+ * Note that the path used for Images is relative. All images are by default located in
26
+ * ../images/ - relative to this CSS file.
27
+ */
28
+
29
+
30
+ /*
31
+ * jQuery UI specific styling
32
+ */
33
+
34
+ .paging_two_button .ui-button {
35
+ float: left;
36
+ cursor: pointer;
37
+ * cursor: hand;
38
+ }
39
+
40
+ .paging_full_numbers .ui-button {
41
+ padding: 2px 6px;
42
+ margin: 0;
43
+ cursor: pointer;
44
+ * cursor: hand;
45
+ color: #333 !important;
46
+ }
47
+
48
+ .dataTables_paginate .ui-button {
49
+ margin-right: -0.1em !important;
50
+ }
51
+
52
+
53
+
54
+ .dataTables_wrapper .ui-toolbar {
55
+ padding: 5px;
56
+ }
57
+
58
+ .dataTables_paginate {
59
+ width: auto;
60
+ }
61
+
62
+ .dataTables_info {
63
+ padding-top: 3px;
64
+ }
65
+
66
+ table.display thead th {
67
+ padding: 3px 0px 3px 10px;
68
+ cursor: pointer;
69
+ * cursor: hand;
70
+ }
71
+
72
+ div.dataTables_wrapper .ui-widget-header {
73
+ font-weight: normal;
74
+ }
75
+
76
+
77
+ /*
78
+ * Sort arrow icon positioning
79
+ */
80
+ table.display thead th div.DataTables_sort_wrapper {
81
+ position: relative;
82
+ padding-right: 20px;
83
+ padding-right: 20px;
84
+ }
85
+
86
+ table.display thead th div.DataTables_sort_wrapper span {
87
+ position: absolute;
88
+ top: 50%;
89
+ margin-top: -8px;
90
+ right: 0;
91
+ }
92
+
93
+
94
+
95
+
96
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
97
+ *
98
+ * Everything below this line is the same as demo_table.css. This file is
99
+ * required for 'cleanliness' of the markup
100
+ *
101
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
102
+
103
+
104
+
105
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
106
+ * DataTables features
107
+ */
108
+
109
+ .dataTables_wrapper {
110
+ position: relative;
111
+ clear: both;
112
+ }
113
+
114
+ .dataTables_processing {
115
+ position: absolute;
116
+ top: 0px;
117
+ left: 50%;
118
+ width: 250px;
119
+ margin-left: -125px;
120
+ border: 1px solid #ddd;
121
+ text-align: center;
122
+ color: #999;
123
+ font-size: 11px;
124
+ padding: 2px 0;
125
+ }
126
+
127
+ .dataTables_length {
128
+ width: 40%;
129
+ float: left;
130
+ }
131
+
132
+ .dataTables_filter {
133
+ width: 50%;
134
+ float: right;
135
+ text-align: right;
136
+ }
137
+
138
+ .dataTables_info {
139
+ width: 50%;
140
+ float: left;
141
+ }
142
+
143
+ .dataTables_paginate {
144
+ float: right;
145
+ text-align: right;
146
+ }
147
+
148
+ /* Pagination nested */
149
+ .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
150
+ height: 19px;
151
+ width: 19px;
152
+ margin-left: 3px;
153
+ float: left;
154
+ }
155
+
156
+ .paginate_disabled_previous {
157
+ background-image: url('../images/back_disabled.jpg');
158
+ }
159
+
160
+ .paginate_enabled_previous {
161
+ background-image: url('../images/back_enabled.jpg');
162
+ }
163
+
164
+ .paginate_disabled_next {
165
+ background-image: url('../images/forward_disabled.jpg');
166
+ }
167
+
168
+ .paginate_enabled_next {
169
+ background-image: url('../images/forward_enabled.jpg');
170
+ }
171
+
172
+
173
+
174
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
175
+ * DataTables display
176
+ */
177
+ table.display {
178
+ margin: 0 auto;
179
+ width: 100%;
180
+ clear: both;
181
+ border-collapse: collapse;
182
+ }
183
+
184
+ table.display tfoot th {
185
+ padding: 3px 0px 3px 10px;
186
+ font-weight: bold;
187
+ font-weight: normal;
188
+ }
189
+
190
+ table.display tr.heading2 td {
191
+ border-bottom: 1px solid #aaa;
192
+ }
193
+
194
+ table.display td {
195
+ padding: 3px 10px;
196
+ }
197
+
198
+ table.display td.center {
199
+ text-align: center;
200
+ }
201
+
202
+
203
+
204
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
205
+ * DataTables sorting
206
+ */
207
+
208
+ .sorting_asc {
209
+ background: url('../images/sort_asc.png') no-repeat center right;
210
+ }
211
+
212
+ .sorting_desc {
213
+ background: url('../images/sort_desc.png') no-repeat center right;
214
+ }
215
+
216
+ .sorting {
217
+ background: url('../images/sort_both.png') no-repeat center right;
218
+ }
219
+
220
+ .sorting_asc_disabled {
221
+ background: url('../images/sort_asc_disabled.png') no-repeat center right;
222
+ }
223
+
224
+ .sorting_desc_disabled {
225
+ background: url('../images/sort_desc_disabled.png') no-repeat center right;
226
+ }
227
+
228
+
229
+
230
+
231
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
232
+ * DataTables row classes
233
+ */
234
+ table.display tr.odd.gradeA {
235
+ background-color: #ddffdd;
236
+ }
237
+
238
+ table.display tr.even.gradeA {
239
+ background-color: #eeffee;
240
+ }
241
+
242
+
243
+
244
+
245
+ table.display tr.odd.gradeA {
246
+ background-color: #ddffdd;
247
+ }
248
+
249
+ table.display tr.even.gradeA {
250
+ background-color: #eeffee;
251
+ }
252
+
253
+ table.display tr.odd.gradeC {
254
+ background-color: #ddddff;
255
+ }
256
+
257
+ table.display tr.even.gradeC {
258
+ background-color: #eeeeff;
259
+ }
260
+
261
+ table.display tr.odd.gradeX {
262
+ background-color: #ffdddd;
263
+ }
264
+
265
+ table.display tr.even.gradeX {
266
+ background-color: #ffeeee;
267
+ }
268
+
269
+ table.display tr.odd.gradeU {
270
+ background-color: #ddd;
271
+ }
272
+
273
+ table.display tr.even.gradeU {
274
+ background-color: #eee;
275
+ }
276
+
277
+
278
+ tr.odd {
279
+ background-color: #E2E4FF;
280
+ }
281
+
282
+ tr.even {
283
+ background-color: white;
284
+ }
285
+
286
+
287
+
288
+
289
+
290
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
291
+ * Misc
292
+ */
293
+ .dataTables_scroll {
294
+ clear: both;
295
+ }
296
+
297
+ .dataTables_scrollBody {
298
+ -webkit-overflow-scrolling: touch;
299
+ }
300
+
301
+ .top, .bottom {
302
+ padding: 15px;
303
+ background-color: #F5F5F5;
304
+ border: 1px solid #CCCCCC;
305
+ }
306
+
307
+ .top .dataTables_info {
308
+ float: none;
309
+ }
310
+
311
+ .clear {
312
+ clear: both;
313
+ }
314
+
315
+ .dataTables_empty {
316
+ text-align: center;
317
+ }
318
+
319
+ tfoot input {
320
+ margin: 0.5em 0;
321
+ width: 100%;
322
+ color: #444;
323
+ }
324
+
325
+ tfoot input.search_init {
326
+ color: #999;
327
+ }
328
+
329
+ td.group {
330
+ background-color: #d1cfd0;
331
+ border-bottom: 2px solid #A19B9E;
332
+ border-top: 2px solid #A19B9E;
333
+ }
334
+
335
+ td.details {
336
+ background-color: #d1cfd0;
337
+ border: 2px solid #A19B9E;
338
+ }
339
+
340
+
341
+ .example_alt_pagination div.dataTables_info {
342
+ width: 40%;
343
+ }
344
+
345
+ .paging_full_numbers a.paginate_button,
346
+ .paging_full_numbers a.paginate_active {
347
+ border: 1px solid #aaa;
348
+ -webkit-border-radius: 5px;
349
+ -moz-border-radius: 5px;
350
+ padding: 2px 5px;
351
+ margin: 0 3px;
352
+ cursor: pointer;
353
+ *cursor: hand;
354
+ color: #333 !important;
355
+ }
356
+
357
+ .paging_full_numbers a.paginate_button {
358
+ background-color: #ddd;
359
+ }
360
+
361
+ .paging_full_numbers a.paginate_button:hover {
362
+ background-color: #ccc;
363
+ text-decoration: none !important;
364
+ }
365
+
366
+ .paging_full_numbers a.paginate_active {
367
+ background-color: #99B3FF;
368
+ }
369
+
370
+ table.display tr.even.row_selected td {
371
+ background-color: #B0BED9;
372
+ }
373
+
374
+ table.display tr.odd.row_selected td {
375
+ background-color: #9FAFD1;
376
+ }
377
+
378
+ .css_right{
379
+ float: right;
380
+ }
css/front.css CHANGED
@@ -40,8 +40,11 @@ line-height: normal !important;
40
.wpdm-only-button .btn_outer_c{
41
padding-left: 40px;
42
background-image: url(../icon/download.png);
43
background-position: 2px center;
44
background-repeat: no-repeat;
45
}
46
.wpdm-only-button .has-counter,
47
.wpdm-only-button .counter{
40
.wpdm-only-button .btn_outer_c{
41
padding-left: 40px;
42
background-image: url(../icon/download.png);
43
+ min-height: 30px;
44
+ padding-top: 2px;
45
background-position: 2px center;
46
background-repeat: no-repeat;
47
+ vertical-align: middle;
48
}
49
.wpdm-only-button .has-counter,
50
.wpdm-only-button .counter{
css/jquery.dataTables.css ADDED
@@ -0,0 +1,335 @@
1
+
2
+ /*
3
+ * Table
4
+ */
5
+ table.dataTable {
6
+ margin: 0 auto;
7
+ clear: both;
8
+ width: 100%;
9
+ margin-bottom: 10px;
10
+ }
11
+
12
+ table.dataTable thead th {
13
+ padding: 3px 18px 3px 10px;
14
+ font-weight: bold;
15
+ cursor: pointer;
16
+ *cursor: hand;
17
+ }
18
+
19
+ table.dataTable tfoot th {
20
+ padding: 3px 18px 3px 10px;
21
+ border-top: 1px solid black;
22
+ font-weight: bold;
23
+ }
24
+
25
+ table.dataTable td {
26
+ padding: 3px 10px;
27
+ }
28
+
29
+ table.dataTable td.center,
30
+ table.dataTable td.dataTables_empty {
31
+ text-align: center;
32
+ }
33
+
34
+ table.dataTable tr.odd { background-color: #eeeeee; }
35
+ table.dataTable tr.even { background-color: white; }
36
+
37
+
38
+
39
+ /*
40
+ * Table wrapper
41
+ */
42
+ .dataTables_wrapper {
43
+ position: relative;
44
+ clear: both;
45
+ *zoom: 1;
46
+ }
47
+
48
+
49
+ /*
50
+ * Page length menu
51
+ */
52
+ .dataTables_length {
53
+ float: left;
54
+ }
55
+
56
+
57
+ /*
58
+ * Filter
59
+ */
60
+ .dataTables_filter {
61
+ float: right;
62
+ text-align: right;
63
+ }
64
+
65
+
66
+ /*
67
+ * Table information
68
+ */
69
+ .dataTables_info {
70
+ clear: both;
71
+ float: left;
72
+ }
73
+
74
+
75
+ /*
76
+ * Pagination
77
+ */
78
+ .dataTables_paginate {
79
+ float: right;
80
+ text-align: right;
81
+ vertical-align: middle;
82
+ line-height: normal;
83
+ }
84
+
85
+ /* Two button pagination - previous / next */
86
+ .paginate_disabled_previous,
87
+ .paginate_enabled_previous,
88
+ .paginate_disabled_next,
89
+ .paginate_enabled_next {
90
+ height: 19px;
91
+ float: left;
92
+ cursor: pointer;
93
+ *cursor: hand;
94
+ color: #111 !important;
95
+ }
96
+ .paginate_disabled_previous:hover,
97
+ .paginate_enabled_previous:hover,
98
+ .paginate_disabled_next:hover,
99
+ .paginate_enabled_next:hover {
100
+ text-decoration: none !important;
101
+ }
102
+ .paginate_disabled_previous:active,
103
+ .paginate_enabled_previous:active,
104
+ .paginate_disabled_next:active,
105
+ .paginate_enabled_next:active {
106
+ outline: none;
107
+ }
108
+
109
+ .paginate_disabled_previous,
110
+ .paginate_disabled_next {
111
+ color: #666 !important;
112
+ }
113
+ .paginate_disabled_previous,
114
+ .paginate_enabled_previous {
115
+ padding-left: 23px;
116
+ }
117
+ .paginate_disabled_next,
118
+ .paginate_enabled_next {
119
+ padding-right: 23px;
120
+ margin-left: 10px;
121
+ }
122
+
123
+ .paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat center left; }
124
+ .paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat center left; }
125
+ .paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat center left; }
126
+
127
+ .paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat center right; }
128
+ .paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat center right; }
129
+ .paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat center right; }
130
+
131
+ /* Full number pagination */
132
+ .paging_full_numbers {
133
+ height: 22px;
134
+ line-height: 22px;
135
+ }
136
+ .paging_full_numbers a:active {
137
+ outline: none
138
+ }
139
+ .paging_full_numbers a:hover {
140
+ text-decoration: none;
141
+ }
142
+
143
+ .paging_full_numbers a.paginate_button,
144
+ .paging_full_numbers a.paginate_active {
145
+ border: 1px solid #aaa;
146
+ -webkit-border-radius: 5px;
147
+ -moz-border-radius: 5px;
148
+ border-radius: 5px;
149
+ padding: 2px 5px;
150
+ margin: 0 3px;
151
+ cursor: pointer;
152
+ *cursor: hand;
153
+ color: #333 !important;
154
+ }
155
+
156
+ .paging_full_numbers a.paginate_button {
157
+ background-color: #ddd;
158
+ }
159
+
160
+ .paging_full_numbers a.paginate_button:hover {
161
+ background-color: #ccc;
162
+ text-decoration: none !important;
163
+ }
164
+
165
+ .paging_full_numbers a.paginate_active {
166
+ background-color: #99B3FF;
167
+ }
168
+
169
+
170
+ /*
171
+ * Processing indicator
172
+ */
173
+ .dataTables_processing {
174
+ position: absolute;
175
+ top: 50%;
176
+ left: 50%;
177
+ width: 250px;
178
+ height: 30px;
179
+ margin-left: -125px;
180
+ margin-top: -15px;
181
+ padding: 14px 0 2px 0;
182
+ border: 1px solid #ddd;
183
+ text-align: center;
184
+ color: #999;
185
+ font-size: 14px;
186
+ background-color: white;
187
+ }
188
+
189
+
190
+ /*
191
+ * Sorting
192
+ */
193
+ .sorting { background: url('../images/sort_both.png') no-repeat center right; }
194
+ .sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
195
+ .sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }
196
+
197
+ .sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
198
+ .sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
199
+
200
+ table.dataTable th:active {
201
+ outline: none;
202
+ }
203
+
204
+
205
+ /*
206
+ * Scrolling
207
+ */
208
+ .dataTables_scroll {
209
+ clear: both;
210
+ }
211
+
212
+ .dataTables_scrollBody {
213
+ *margin-top: -1px;
214
+ -webkit-overflow-scrolling: touch;
215
+ }
216
+
217
+
218
+
219
+ div.dataTables_length label {
220
+ width: 460px;
221
+ float: left;
222
+ text-align: left;
223
+ }
224
+
225
+ div.dataTables_length select {
226
+ width: 75px;
227
+ }
228
+
229
+ div.dataTables_filter label {
230
+ float: right;
231
+ width: 460px;
232
+ }
233
+
234
+ div.dataTables_info {
235
+ padding-top: 8px;
236
+ }
237
+
238
+ div.dataTables_paginate {
239
+ float: right;
240
+ margin: 0;
241
+ }
242
+
243
+ table {
244
+ margin: 1em 0;
245
+ clear: both;
246
+ }
247
+
248
+ table.dataTable th:active {
249
+ outline: none;
250
+ }
251
+ .pagination ul{
252
+ box-shadow:none;
253
+ }
254
+
255
+ table .header:after {
256
+ border-color: #000000 transparent;
257
+ border-style: solid;
258
+ border-width: 0 4px 4px;
259
+ content: "";
260
+ float: right;
261
+ margin-top: 7px;
262
+ visibility: hidden;
263
+ }
264
+ table th{
265
+ background: #ddd;
266
+ }
267
+ table .headerSortUp, table .headerSortDown {
268
+ /*background-color: rgba(141, 192, 219, 0.25);*/
269
+ background-color: #ccc;
270
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
271
+ }
272
+ table .header:hover:after {
273
+ visibility: visible;
274
+ }
275
+ table .headerSortDown:after, table .headerSortDown:hover:after {
276
+ opacity: 0.6;
277
+ visibility: visible;
278
+ }
279
+ table .headerSortUp:after {
280
+ border-color: #000000 transparent -moz-use-text-color;
281
+ border-style: solid solid none;
282
+ border-width: 4px 4px medium;
283
+ box-shadow: none;
284
+ opacity: 0.6;
285
+ visibility: visible;
286
+ }
287
+ table .blue {
288
+ border-bottom-color: #049CDB;
289
+ color: #049CDB;
290
+ }
291
+ table .headerSortUp.blue, table .headerSortDown.blue {
292
+ background-color: #ADE6FE;
293
+ }
294
+ table .green {
295
+ border-bottom-color: #46A546;
296
+ color: #46A546;
297
+ }
298
+ table .headerSortUp.green, table .headerSortDown.green {
299
+ background-color: #CDEACD;
300
+ }
301
+ table .red {
302
+ border-bottom-color: #9D261D;
303
+ color: #9D261D;
304
+ }
305
+ table .headerSortUp.red, table .headerSortDown.red {
306
+ background-color: #F4C8C5;
307
+ }
308
+ table .yellow {
309
+ border-bottom-color: #FFC40D;
310
+ color: #FFC40D;
311
+ }
312
+ table .headerSortUp.yellow, table .headerSortDown.yellow {
313
+ background-color: #FFF6D9;
314
+ }
315
+ table .orange {
316
+ border-bottom-color: #F89406;
317
+ color: #F89406;
318
+ }
319
+ table .headerSortUp.orange, table .headerSortDown.orange {
320
+ background-color: #FEE9CC;
321
+ }
322
+ table .purple {
323
+ border-bottom-color: #7A43B6;
324
+ color: #7A43B6;
325
+ }
326
+ table .headerSortUp.purple, table .headerSortDown.purple {
327
+ background-color: #E2D5F0;
328
+ }
329
+ .pagination ul > li{
330
+ margin: 0px;
331
+ }
332
+ #wpdmmydls_filter input[type=text]{
333
+ padding:3px !important;
334
+ margin-bottom: 5px !important;
335
+ }
download-manager.php CHANGED
@@ -2,12 +2,13 @@
2
/*
3
Plugin Name: Download Manager
4
Plugin URI: http://www.wpdownloadmanager.com/
5
- Description: Manage, track and controll file download from your wordpress site
6
Author: Shaon
7
- Version: 2.3.0
8
Author URI: http://www.wpdownloadmanager.com/
9
*/
10
11
12
$d = str_replace('\\','/',dirname(__FILE__));
13
$d = explode("/", $d);
@@ -31,7 +32,7 @@ include(dirname(__FILE__)."/wpdm-free-mce-button.php");
31
32
if(!$_POST) $_SESSION['download'] = 0;
33
34
- function wpdm_download_info(){
35
include("download.php");
36
}
37
@@ -47,37 +48,52 @@ function wpdm_free_install(){
47
`password` varchar(40) NOT NULL,
48
`download_count` int(11) NOT NULL,
49
`access` enum('guest','member') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
50
- `show_counter` tinyint(1) NOT NULL,
51
`quota` INT NOT NULL,
52
`link_label` varchar(255) NOT NULL,
53
PRIMARY KEY (`id`)
54
) ENGINE=MyISAM DEFAULT CHARSET=utf8";
55
56
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
57
58
$wpdb->query($sql);
59
- //$wpdb->query("ALTER TABLE `ahm_files` ADD `` varchar(255) NOT NULL");
60
- $wpdb->query("ALTER TABLE `ahm_files` ADD `link_label` varchar(255) NOT NULL");
61
- $wpdb->query("ALTER TABLE `ahm_files` ADD `show_counter` tinyint(1) NOT NULL");
62
- $wpdb->query("ALTER TABLE `ahm_files` ADD `download_count` INT NOT NULL");
63
- $wpdb->query("ALTER TABLE `ahm_files` ADD `quota` INT NOT NULL");
64
- $wpdb->query("ALTER TABLE `ahm_files` ADD `category` TEXT NOT NULL");
65
66
- update_option('wpdm_access_level','administrator');
67
wpdm_create_dir();
68
69
}
70
71
function wpdm_new_packages($show=5, $show_count=true){
72
global $wpdb;
73
74
$data = $wpdb->get_results("select * from ahm_files order by id desc limit 0, $show",ARRAY_A);
75
foreach($data as $d){
76
-
77
$key = $d['id'];
78
if($show_count) $sc = "<br/><i>$d[download_count] downloads</i>";
79
$url = home_url("/?download={$d[id]}");
80
- echo "<li><div class='wpdm_link'><a class='wpdm-popup' title='$d[title]' href='$url'>{$d[title]}</a> $sc</div></li>\r\n";
81
}
82
}
83
@@ -122,21 +138,32 @@ function wpdm_import_download_monitor(){
122
123
}
124
125
-
126
127
function wpdm_downloadable_nsc($params){
128
global $wpdb;
129
- extract($params);
130
-
131
-
132
$home = home_url('/');
133
134
$sap = count($_GET)>0?'&':'?';
135
136
$data = $wpdb->get_row("select * from ahm_files where id='$id'",ARRAY_A);
137
if($title=='true') $title = "<h3>".$data['title']."</h3>";
138
else $title = '';
139
- if($desc=='true') $desc = $data['description']."</br>";
140
else $desc = '';
141
$desc = stripslashes($desc);
142
if($data['show_counter']!=0) $hc= 'has-counter';
@@ -165,7 +192,9 @@ function wpdm_downloadable_nsc($params){
165
$loginform = "<div id='wpdm-login-form' class='wpdm-login-form'>".wp_login_form( $args ).'</div>';*/
166
167
//"<div class=passit>Login Required<br/><input placeholder='Username' type=text id='username_{$id}' size=15 class='inf' /> <input placeholder='Password' class='inf' type=password id='password_{$id}' size=15 /><span class='perror'></span></div>";
168
- $html = "<div id='wpdm_file_{$id}' class='wpdm_file $template'>{$title}<div class='cont'>{$desc}{$loginform}<div class='btn_outer'><div class='btn_outer_c'><a class='btn_left $classrel $hc login-please' rel='{$id}' title='{$data[title]}' href='$url' >$link_label</a>";
169
//if($data['show_counter']!=0)
170
//$html .= "<span class='btn_right counter'>$data[download_count] downloads</span>";
171
//else
@@ -173,9 +202,10 @@ function wpdm_downloadable_nsc($params){
173
$html .= "</div></div><div class='clear'></div></div></div>";
174
}
175
else {
176
if($data['password']=='') { $url = home_url('/?wpdmact=process&did='.base64_encode($id.'.hotlink')); $classrel = ""; }
177
else { $classrel='haspass'; /*$url = home_url('/?download='.$id);*/ $url = home_url('/'); $password_field = "<div class=passit>Enter password<br/><input type=password id='pass_{$id}' size=15 /><span class='perror'></span></div>"; }
178
- $html = "<div id='wpdm_file_{$id}' class='wpdm_file $template'>{$title}<div class='cont'>{$desc}{$password_field}<div class='btn_outer'><div class='btn_outer_c'><a class='btn_left $classrel $hc' rel='{$id}' title='{$data[title]}' href='$url' >$link_label</a>";
179
if($data['show_counter']!=0)
180
$html .= "<span class='btn_right counter'>$data[download_count] downloads</span>";
181
else
@@ -195,7 +225,8 @@ function wpdm_downloadable($content){
195
$sap = count($_GET)>0?'&':'?';
196
for($i=0;$i<count($matches[1]);$i++){
197
$id = $matches[1][$i];
198
- $data = $wpdb->get_row("select * from ahm_files where id='$id'",ARRAY_A);
199
$wpdm_login_msg = get_option('wpdm_login_msg')?get_option('wpdm_login_msg'):'Login Required';
200
$link_label = $data['link_label']?$data['link_label']:'Download';
201
if($data['access']=='member'&&!is_user_logged_in())
@@ -221,23 +252,27 @@ function wpdm_downloadable($content){
221
function wpdm_cblist_categories($parent="", $level = 0, $sel = array()){
222
$cats = maybe_unserialize(get_option('_fm_categories'));
223
if(is_array($cats)){
224
- if($parent!='') echo "<ul>";
225
foreach($cats as $id=>$cat){
226
- $pres = str_repeat("&mdash;", $level);
227
if($cat['parent']==$parent){
228
if(in_array($id,$sel))
229
$checked = 'checked=checked';
230
else
231
$checked = '';
232
- echo "<li><input type='checkbox' name='file[category][]' value='$id' $checked /> $cat[title]</li>\n";
233
- wpdm_cblist_categories($id,$level+1, $sel);}
234
}
235
- if($parent!='') echo "</ul>";
236
}
237
}
238
239
function wpdm_dropdown_categories($parent="", $level = 0, $sel='',$cid='',$class=array()){
240
- $cats = maybe_unserialize(get_option('_fm_categories'));
241
if(!is_array($cats)) $cats = array();
242
foreach($cats as $id=>$cat){
243
$pres = str_repeat("&mdash;", $level);
@@ -256,15 +291,18 @@ function wpdm_dropdown_categories($parent="", $level = 0, $sel='',$cid='',$class
256
}
257
258
function wpdm_tree(){
259
- ?>
260
- <script language="JavaScript" src="<?php echo plugins_url().'/download-manager/js/jqueryFileTree.js';?>"></script>
261
- <link rel="stylesheet" href="<?php echo plugins_url().'/download-manager/css/jqueryFileTree.css';?>" />
262
<div id="tree"></div>
263
<script language="JavaScript">
264
<!--
265
jQuery(document).ready( function() {
266
jQuery('#tree').fileTree({
267
- script: '<?php echo site_url(); ?>/?task=wpdm_tree',
268
expandSpeed: 1000,
269
collapseSpeed: 1000,
270
multiFolder: false
@@ -272,7 +310,7 @@ function wpdm_tree(){
272
//alert(file);
273
//var sfilename = file.split('/');
274
//var filename = sfilename[sfilename.length-1];
275
- tb_show(jQuery(this).html(),'<?php echo home_url('/?download=');?>'+file+'&modal=1&width=600&height=400');
276
277
});
278
@@ -280,11 +318,13 @@ function wpdm_tree(){
280
});
281
//-->
282
</script>
283
- <?php
284
}
285
286
function wpdm_embed_tree(){
287
- if($_GET['task']!='wpdm_tree') return;
288
global $wpdb;
289
$cats = maybe_unserialize(get_option('_fm_categories'));
290
if(!is_array($cats)) $cats = array();
@@ -297,32 +337,36 @@ if($_GET['task']!='wpdm_tree') return;
297
$_POST['dir'] = $_POST['dir']=='/'?'':$_POST['dir'];
298
foreach( $cats as $id=>$file ) {
299
if($file['parent']==$_POST['dir'])
300
- echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . $id . "\">" . htmlentities($file[title]) . "</a></li>";
301
}
302
303
// All files
304
- if($_POST[dir])
305
- $ct = "\"{$_POST[dir]}\"";
306
- else $ct = '';
307
- $ndata = $wpdb->get_results("select * from ahm_files where category like '%{$ct}%'",ARRAY_A);
308
$sap = '?'; //count($_GET)>0?'&':'?';
309
310
foreach($ndata as $data){
311
$html = '';
312
$link_label = $data['title']?$data['title']:'Download';
313
- $data['page_link'] = "<a class='wpdm-popup' href='' rel='{$data[id]}'>$link_label</a>";
314
- if($data[preview]!='')
315
- $data['thumb'] = "<img class='wpdm_icon' align='left' src='".plugins_url()."/{$data[preview]}' />";
316
else
317
$data['thumb'] = '';
318
- if($data[icon]!='')
319
- $data['icon'] = "<img class='wpdm_icon' align='left' src='".plugins_url()."/{$data[icon]}' />";
320
else
321
$data['icon'] = '';
322
323
324
if($data['show_counter']==1){
325
- $counter = "{$data[download_count]} downloads<br/>";
326
$data['counter'] = $counter;
327
}
328
$ext = end(explode(".", $data['file']));
@@ -330,7 +374,7 @@ if($_GET['task']!='wpdm_tree') return;
330
//$repeater = stripslashes( strtr( $category['template_repeater'], $reps ));
331
$template = "<li class=\"wpdm_clink file ext_$ext\">$data[page_link]</li>";
332
if($data['access']=='member'&&!is_user_logged_in())
333
- $template = "<li class=\"file ext_$ext\"><a href='".get_option('siteurl')."/wp-login.php?redirect_to=".$_SERVER['REQUEST_URI']."' >$data[title]<small> (login to download)</small></a></li>";
334
$html .= $template;
335
336
@@ -373,7 +417,7 @@ function wpdm_admin_options(){
373
if(!file_exists(UPLOAD_DIR.'.htaccess'))
374
wpdm_set_htaccess();
375
376
- if(isset($_GET['task'])&&$_GET['task']!='')
377
return call_user_func($_GET['task']);
378
else
379
include('wpdm-list-files.php');
@@ -404,7 +448,7 @@ function wpdm_create_dir(){
404
@chmod(UPLOAD_DIR,0777);
405
@chmod(dir(__FILE__).'/cache/',0777);
406
wpdm_set_htaccess();
407
- if($_GET[re]==1) {
408
if(file_exists(UPLOAD_DIR)) $s=1;
409
else $s = 0;
410
echo "<script>
@@ -415,20 +459,41 @@ function wpdm_create_dir(){
415
}
416
417
function wpdm_settings(){
418
- if($_POST){
419
- update_option('wpdm_access_level',$_POST[access]);
420
- update_option('wpdm_login_msg',$_POST[wpdm_login_msg]);
421
}
422
if(is_uploaded_file($_FILES['icon']['tmp_name'])){
423
///print_r(dirname(__FILE__).'/icon/download.png');
424
move_uploaded_file($_FILES['icon']['tmp_name'],dirname(__FILE__).'/icon/download.png');
425
}
426
$access = get_option('wpdm_access_level');
427
include('wpdm-settings.php');
428
}
429
430
function wpdm_add_new_file(){
431
global $wpdb;
432
if(!file_exists(UPLOAD_DIR)){
433
434
echo "
@@ -439,7 +504,7 @@ function wpdm_add_new_file(){
439
</p></div>";
440
}
441
442
- if($_GET[success]==1){
443
echo "
444
<div id=\"message\" class=\"updated fade\"><p>
445
Congratulation! Plugin is ready to use now.
@@ -447,61 +512,25 @@ function wpdm_add_new_file(){
447
";
448
}
449
450
- if($_POST){
451
- extract($_POST);
452
- if(is_uploaded_file($_FILES['media']['tmp_name'])){
453
- $info = pathinfo($_FILES['media']['name']);
454
- //echo dirname(__FILE__).'/files/'.$_FILES['media']['name'];
455
-
456
- $name = file_exists(dirname(__FILE__).'/files/'.$_FILES['media']['name'])?str_replace('.'.$info['extension'],'_'.uniqid().'.'.$info['extension'],$info['basename']):$_FILES['media']['name'];
457
- move_uploaded_file($_FILES['media']['tmp_name'], UPLOAD_DIR . $name);
458
- $file['file'] = $name;
459
-
460
- }
461
-
462
- $file['show_counter'] = 0;
463
- $file['quota'] = $file['quota']?$file['quota']:0;
464
- $file['category'] = serialize($file['category']);
465
- $wpdb->insert("ahm_files", $file);
466
- if(!$wpdb->insert_id){
467
- $wpdb->show_errors();
468
- $wpdb->print_error();
469
- die();
470
- }
471
- echo "<script>
472
- location.href='admin.php?page=file-manager';
473
- </script>";
474
-
475
- }
476
-
477
478
include('wpdm-add-new-file.php');
479
}
480
481
function wpdm_edit_file(){
482
global $wpdb;
483
- if($_POST){
484
extract($_POST);
485
- if(is_uploaded_file($_FILES['media']['tmp_name'])){
486
- $info = pathinfo($_FILES['media']['name']);
487
- //echo dirname(__FILE__).'/files/'.$_FILES['media']['name'];
488
-
489
- $name = file_exists(UPLOAD_DIR . $_FILES['media']['name'])?str_replace('.'.$info['extension'],'_'.uniqid().'.'.$info['extension'],$info['basename']):$_FILES['media']['name'];
490
- move_uploaded_file($_FILES['media']['tmp_name'], UPLOAD_DIR . $name);
491
- $file['file'] = $name;
492
- }
493
494
$file['category'] = serialize($file['category']);
495
-
496
- $wpdb->update("ahm_files", $file, array("id"=>$_POST[id]));
497
-
498
- echo "<script>
499
- location.href='admin.php?page=file-manager';
500
- </script>";
501
502
}
503
-
504
- $file = $wpdb->get_row("select * from ahm_files where id='$_GET[id]'",ARRAY_A);
505
506
include('wpdm-add-new-file.php');
507
}
@@ -520,7 +549,11 @@ function wpdm_categories(){
520
if($_POST['cat']){
521
$tpldata = maybe_unserialize(get_option('_fm_categories'));
522
if(!is_array($tpldata)) $tpldata =array();
523
- $tcid = $_POST['cid']?$_POST['cid']:strtolower(preg_replace("/([^a-zA-Z0-9\-]+)/","-", $_POST['cat']['title']));
524
$cid = $tcid;
525
while(array_key_exists($cid, $tpldata)&&$_POST['cid']==''){
526
$cid = $tcid."-".(++$postfx);