/ Published in: PHP
This is a plain jane very simple file manager for ckeditor, this has very limited... ^NO^ features.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $callback = $_GET['CKEditorFuncNum']; $root = "uploads/ck"; } } die('<html><body><script type="text/javascript">window.parent.CKEDITOR.tools.callFunction(' . $callback . ', "' . $root . "/" . $_FILES['upload']['name'] . '","' . $msg . '");</script></body></html>'); } ?> <!DOCTYPE html> <html lang=en-us> <head> <!-- KEEP THIS IN to avoid potential exploits. --> <meta charset="utf-8"> <!-- Make it responsive for mobile sites. --> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Filemanager</title> <!-- Key to filename: jqboot means uses jQuery and Bootstrap cdn means they're loaded from a CDN ec means error correction. I really meant error handling v0101 is the version number, 1.01. --> <!-- Obtain Bootstrap style sheet from CDN (online service) so it doesn't have to be on my machine --> <!-- Check http://www.bootstrapcdn.com/ for latest version. --> <link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <!-- Body of web page goes inside container tags --> <div class="container"> <h1>Files</h1> <hr /> <ul> <?php foreach ($files as $file) {?> <li> <a href="#" onClick="window.opener.CKEDITOR.tools.callFunction(<?php echo $callback;?>, '<?php echo $root . "/" . $file;?>');window.close();return false;"><?php echo $file;?></a> </li> <?php }?> </ul> <?php }?> </div> <!-- NOTE: Seems to be best to keep this above window.onload --> <!-- Obtain the latest version of jquery from CDN --> <script src="http://code.jquery.com/jquery.min.js"></script> <!-- NOTE: Seems to be best to keep this above window.onload --> <!-- Obtain Bootstrap javascript library from CDN (online service) so it doesn't have to be on my machine --> <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> <script> // window.onload is only way to check if jQuery is missing, // because (document).ready() depnds on jQuery. // Put this before (document).ready() window.onload = function() { if (jQueryMissing()) { alert('jQuery is missing'); } } // // App's event handling & command dispatch go here. // This is also where persistent variables would go. // $(document).ready(function() { if (bootstrapMissing()) { alert('Bootstrap is missing'); } }); // Utility functions // If Bootstrap isn't available return true, // otherwise return false. function bootstrapMissing() { return(!(typeof $().modal == 'function')); } // If jQuery isn't available, return true, // otherwise, return values // Call this only from window.onload function jQueryMissing() { return(typeof jQuery == 'undefined'); } </script> </body> </html>
URL: https://www.itsgotto.be/cv