├── LICENSE
├── README.md
├── asset
├── css
│ └── fba.css
└── js
│ └── fba.js
├── fba_api.php
├── files
├── folder1
│ ├── folder2
│ │ └── awesome.html
│ └── tes1.html
└── tes.html
├── index.html
└── lib
├── .htaccess
└── fba.php
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Bachors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | jQuery-File-Browser-Awesome
2 | ===========================
3 |
Today we want to share a cool experiment with you. It is a file browser awesome, which you can upload to a folder somewhere on your site and share documents, pictures and other files with the world. The app is built with PHP, jQuery, fontawesome and uses CSS3.
44 | // Include class fba.php
45 | include_once('lib/fba.php');
46 |
47 | $dir = 'dir1/dir2'; // nama folder yang akan di scan.
48 |
49 | $fba = new fba($dir);
50 |
51 |
52 |
2. Javascript code in your HTML page.
53 |
54 | fba({
55 | host: 'http://your-domain.com/', // your host / domain
56 | api: 'fba_api.php' // file name fba api
57 | });
58 |
';
45 | if (e != "") {
46 | var d = e.split('/'),
47 | ee = [];
48 | for (i = 0; i < d.length - 1; i++) {
49 | ee.push(d[i])
50 | }
51 | var f = (d.length > 1 ? ee.join('/') : '');
52 | r += '
' + e + unescape('%3C%61%20%68%72%65%66%3D%27%68%74%74%70%73%3A%2F%2F%62%61%63%68%6F%72%73%2E%67%69%74%68%75%62%2E%69%6F%2F%6A%71%75%65%72%79%2D%66%69%6C%65%2D%62%72%6F%77%73%65%72%2D%61%77%65%73%6F%6D%65%2F%27%20%74%69%74%6C%65%3D%27%6A%51%75%65%72%79%20%46%69%6C%65%20%42%72%6F%77%73%65%72%20%41%77%65%73%6F%6D%65%27%20%73%74%79%6C%65%3D%27%66%6C%6F%61%74%3A%72%69%67%68%74%27%20%74%61%72%67%65%74%3D%27%5F%42%4C%41%4E%4B%27%3E%3C%69%20%63%6C%61%73%73%3D%27%66%61%20%66%61%2D%69%6E%66%6F%2D%63%69%72%63%6C%65%27%3E%3C%2F%69%3E%3C%2F%61%3E%3C%2F%64%69%76%3E')
53 | }
54 | $.each(c.data, function(i, a) {
55 | if (c.data[i].type == "dir") {
56 | r += '
' + c.data[i].name + '
' + c.data[i].items + ' items
' + c.data[i].modif + '
'
57 | } else {
58 | var b = fba_size(c.data[i].size);
59 | var s = c.data[i].path.substr(c.data[i].path.lastIndexOf(".") + 1);
60 | switch (s) {
61 | case "html":
62 | case "php":
63 | case "js":
64 | case "css":
65 | case "txt":
66 | case "md":
67 | case "asp":
68 | case "aspx":
69 | case "jsp":
70 | case "py":
71 | r += '