21
21
if (isset ($ _POST ['submit ' ])) {
22
22
include 'upload.php ' ;
23
23
} else {
24
- $ config ['default_language ' ] = $ config ['default_language ' ];
25
24
$ available_languages = include 'lang/languages.php ' ;
26
25
27
26
list ($ preferred_language ) = array_values (array_filter (array (
252
251
}
253
252
if ($ extensions ) {
254
253
$ ext = $ ext_tmp ;
254
+ $ config ['ext ' ] = $ ext_tmp ;
255
255
$ config ['show_filter_buttons ' ] = false ;
256
256
}
257
257
}
287
287
}
288
288
289
289
$ get_params = array (
290
- 'editor ' => $ editor ,
291
- 'type ' => $ type_param ,
292
- 'lang ' => $ lang ,
293
- 'popup ' => $ popup ,
294
- 'crossdomain ' => $ crossdomain ,
295
- 'extensions ' => ($ extensions ) ? urlencode (json_encode ($ extensions )) : null ,
296
- 'field_id ' => $ field_id ,
297
- 'multiple ' => $ multiple ,
298
- 'relative_url ' => $ return_relative_url ,
299
- 'akey ' => (isset ($ _GET ['akey ' ]) && $ _GET ['akey ' ] != '' ? $ _GET ['akey ' ] : 'key ' )
290
+ 'editor ' => $ editor ,
291
+ 'type ' => $ type_param ,
292
+ 'lang ' => $ lang ,
293
+ 'popup ' => $ popup ,
294
+ 'crossdomain ' => $ crossdomain ,
295
+ 'extensions ' => ($ extensions ) ? urlencode (json_encode ($ extensions )) : null ,
296
+ 'field_id ' => $ field_id ,
297
+ 'multiple ' => $ multiple ,
298
+ 'relative_url ' => $ return_relative_url ,
299
+ 'akey ' => (isset ($ _GET ['akey ' ]) && $ _GET ['akey ' ] != '' ? $ _GET ['akey ' ] : 'key ' )
300
300
);
301
301
if (isset ($ _GET ['CKEditorFuncNum ' ])) {
302
302
$ get_params ['CKEditorFuncNum ' ] = $ _GET ['CKEditorFuncNum ' ];
323
323
<noscript><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"></noscript>
324
324
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jplayer/2.2.0/skin/blue.monday/jplayer.blue.monday.min.css" />
325
325
<link href="css/style.css?v=<?php echo $ version ; ?> " rel="stylesheet" type="text/css" />
326
- <!--[if lt IE 8]><style>
327
- .img-container span, .img-container-mini span {
328
- display: inline-block;
329
- height: 100%;
330
- }
331
- </style><![endif]-->
332
-
333
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
334
- <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js" type="text/javascript"></script>
335
- <script src="js/plugins.js?v=<?php echo $ version ; ?> "></script>
336
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jplayer/2.9.2/jplayer/jquery.jplayer.min.js"></script>
337
- <script src="js/modernizr.custom.js"></script>
338
-
339
- <?php
340
- if ($ config ['aviary_active ' ]) {
341
- if (!empty ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] !== 'off ' || $ _SERVER ['SERVER_PORT ' ] == 443 ) { ?>
342
- <script src="https://dme0ih8comzn4.cloudfront.net/imaging/v3/editor.js"></script>
343
- <?php } else { ?>
344
- <script src="http://feather.aviary.com/imaging/v3/editor.js"></script>
345
- <?php }
346
- }
347
- ?>
326
+ <!--[if lt IE 8]>
327
+ <style>
328
+ .img-container span, .img-container-mini span {
329
+ display: inline-block;
330
+ height: 100%;
331
+ }
332
+ </style>
333
+ <![endif]-->
348
334
349
- <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
350
- <!--[if lt IE 9]>
351
- <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
352
- <![endif]-->
335
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
336
+ <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
337
+ <script src="js/plugins.js?v=<?php echo $ version ; ?> "></script>
338
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jplayer/2.9.2/jplayer/jquery.jplayer.min.js"></script>
339
+ <script src="js/modernizr.custom.js"></script>
353
340
354
- <script>
355
- var ext_img=new Array('<?php echo implode ("',' " , $ config ['ext_img ' ])?> ');
356
- var image_editor=<?php echo $ config ['aviary_active ' ]?"true " :"false " ;?> ;
357
- if (image_editor) {
358
- var featherEditor = new Aviary.Feather({
359
341
<?php
360
- foreach ($ config ['aviary_defaults_config ' ] as $ aopt_key => $ aopt_val ) {
361
- echo $ aopt_key .": " .json_encode ($ aopt_val ).", " ;
362
- } ?>
363
- onReady: function() {
364
- hide_animation();
365
- },
366
- onSave: function(imageID, newURL) {
367
- show_animation();
368
- var img = document.getElementById(imageID);
369
- img.src = newURL;
370
- $.ajax({
371
- type: "POST",
372
- url: "ajax_calls.php?action=save_img",
373
- data: { url: newURL, path:$('#sub_folder').val()+$('#fldr_value').val(), name:$('#aviary_img').attr('data-name') }
374
- }).done(function( msg ) {
375
- featherEditor.close();
376
- d = new Date();
377
- $("figure[data-name='"+$('#aviary_img').attr('data-name')+"']").find('img').each(function(){
378
- $(this).attr('src',$(this).attr('src')+"?"+d.getTime());
379
- });
380
- $("figure[data-name='"+$('#aviary_img').attr('data-name')+"']").find('figcaption a.preview').each(function(){
381
- $(this).attr('data-url',$(this).data('url')+"?"+d.getTime());
382
- });
383
- hide_animation();
342
+ if ($ config ['aviary_active ' ]) {
343
+ if (!empty ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] !== 'off ' || $ _SERVER ['SERVER_PORT ' ] == 443 ) { ?>
344
+ <script src="https://dme0ih8comzn4.cloudfront.net/imaging/v3/editor.js"></script>
345
+ <?php } else { ?>
346
+ <script src="http://feather.aviary.com/imaging/v3/editor.js"></script>
347
+ <?php }
348
+ }
349
+ ?>
350
+
351
+ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
352
+ <!--[if lt IE 9]>
353
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
354
+ <![endif]-->
355
+
356
+ <script>
357
+ var ext_img = new Array('<?php echo implode ("',' " , $ config ['ext_img ' ])?> ');
358
+ var image_editor =<?php echo $ config ['aviary_active ' ] ? "true " : "false " ;?> ;
359
+ if (image_editor) {
360
+ var featherEditor = new Aviary.Feather({
361
+ <?php
362
+ foreach ($ config ['aviary_defaults_config ' ] as $ aopt_key => $ aopt_val ) {
363
+ echo $ aopt_key . ": " . json_encode ($ aopt_val ) . ", " ;
364
+ } ?>
365
+ onReady: function () {
366
+ hide_animation();
367
+ },
368
+ onSave: function (imageID, newURL) {
369
+ show_animation();
370
+ var img = document.getElementById(imageID);
371
+ img.src = newURL;
372
+ $.ajax({
373
+ type: "POST",
374
+ url: "ajax_calls.php?action=save_img",
375
+ data: {
376
+ url: newURL,
377
+ path: $('#sub_folder').val() + $('#fldr_value').val(),
378
+ name: $('#aviary_img').attr('data-name')
379
+ }
380
+ }).done(function (msg) {
381
+ featherEditor.close();
382
+ d = new Date();
383
+ $("figure[data-name='" + $('#aviary_img').attr('data-name') + "']").find('img').each(function () {
384
+ $(this).attr('src', $(this).attr('src') + "?" + d.getTime());
385
+ });
386
+ $("figure[data-name='" + $('#aviary_img').attr('data-name') + "']").find('figcaption a.preview').each(function () {
387
+ $(this).attr('data-url', $(this).data('url') + "?" + d.getTime());
388
+ });
389
+ hide_animation();
390
+ });
391
+ return false;
392
+ },
393
+ onError: function (errorObj) {
394
+ bootbox.alert(errorObj.message);
395
+ hide_animation();
396
+ }
384
397
});
385
- return false;
386
- },
387
- onError: function(errorObj) {
388
- bootbox.alert(errorObj.message);
389
- hide_animation();
390
398
}
391
-
392
- });
393
- }
394
- </script>
395
- <script src="js/include.js?v=<?php echo $ version ; ?> "></script>
399
+ </script>
400
+ <script src="js/include.js?v=<?php echo $ version ; ?> "></script>
396
401
</head>
397
402
<body>
398
- <!-- The Templates plugin is included to render the upload/download listings -->
399
- <script src="//blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
400
- <!-- The Load Image plugin is included for the preview images and image resizing functionality -->
401
- <script src="//blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
402
- <!-- The Canvas to Blob plugin is included for image resizing functionality -->
403
- <script src="//blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
404
- <!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
405
- <script src="js/jquery.iframe-transport.js"></script>
406
- <!-- The basic File Upload plugin -->
407
- <script src="js/jquery.fileupload.js"></script>
408
- <!-- The File Upload processing plugin -->
409
- <script src="js/jquery.fileupload-process.js"></script>
410
- <!-- The File Upload image preview & resize plugin -->
411
- <script src="js/jquery.fileupload-image.js"></script>
412
- <!-- The File Upload audio preview plugin -->
413
- <script src="js/jquery.fileupload-audio.js"></script>
414
- <!-- The File Upload video preview plugin -->
415
- <script src="js/jquery.fileupload-video.js"></script>
416
- <!-- The File Upload validation plugin -->
417
- <script src="js/jquery.fileupload-validate.js"></script>
418
- <!-- The File Upload user interface plugin -->
419
- <script src="js/jquery.fileupload-ui.js"></script>
403
+ <!-- The Templates plugin is included to render the upload/download listings -->
404
+ <script src="//blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
405
+ <!-- The Load Image plugin is included for the preview images and image resizing functionality -->
406
+ <script src="//blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
407
+ <!-- The Canvas to Blob plugin is included for image resizing functionality -->
408
+ <script src="//blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
409
+ <!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
410
+ <script src="js/jquery.iframe-transport.js"></script>
411
+ <!-- The basic File Upload plugin -->
412
+ <script src="js/jquery.fileupload.js"></script>
413
+ <!-- The File Upload processing plugin -->
414
+ <script src="js/jquery.fileupload-process.js"></script>
415
+ <!-- The File Upload image preview & resize plugin -->
416
+ <script src="js/jquery.fileupload-image.js"></script>
417
+ <!-- The File Upload audio preview plugin -->
418
+ <script src="js/jquery.fileupload-audio.js"></script>
419
+ <!-- The File Upload video preview plugin -->
420
+ <script src="js/jquery.fileupload-video.js"></script>
421
+ <!-- The File Upload validation plugin -->
422
+ <script src="js/jquery.fileupload-validate.js"></script>
423
+ <!-- The File Upload user interface plugin -->
424
+ <script src="js/jquery.fileupload-ui.js"></script>
420
425
421
426
<input type="hidden" id="ftp" value="<?php echo !!$ ftp ; ?> " />
422
427
<input type="hidden" id="popup" value="<?php echo $ popup ;?> " />
@@ -1278,7 +1283,7 @@ function extensionSort($x, $y)
1278
1283
<!-- lightbox div start -->
1279
1284
<div id="previewLightbox" class="lightbox hide fade" tabindex="-1" role="dialog" aria-hidden="true">
1280
1285
<div class="lightbox-content">
1281
- <img id="full-img" src="">
1286
+ <img id="full-img" src="" alt="" >
1282
1287
</div>
1283
1288
</div>
1284
1289
<!-- lightbox div end -->
@@ -1303,7 +1308,7 @@ function extensionSort($x, $y)
1303
1308
</div>
1304
1309
1305
1310
<!-- player div end -->
1306
- <img id=' aviary_img' src='' class="hide"/ >
1311
+ <img class="hide" id=" aviary_img" src="" alt="" >
1307
1312
<script>
1308
1313
var ua = navigator.userAgent.toLowerCase();
1309
1314
var isAndroid = ua.indexOf("android") > -1; //&& ua.indexOf("mobile");
0 commit comments