├── .gitattributes
├── .gitignore
├── README.md
├── css
├── bootstrap-rtl.min.css
├── bootstrap.min.css
└── darkly.css
├── darkly.php
├── images
├── File Manager 001.png
├── File Manager 002.png
└── File Manager 003.png
├── index.php
└── js
├── bootstrap.min.js
├── jquery-2.1.3.min.js
└── jquery.twbsPagination.min.js
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # File-Manager
2 | > متحكم في الملفات متعدد المهام :+1:
3 |
4 | Features
5 | --------
6 | * `Single file`, there are no images, or css folders.
7 | * Ajax File Manager ( browse , `Pagination` )
8 | * Ajax Milti File `uploader`
9 | * `Rename` and `Delete` and `Copy` (files & folders)
10 | * `Read` and `Write` files
11 | * `Unzip` archive
12 | * `Create` folder
13 | * Tree view
14 | * Session `login`
15 | * `Preview` files and images
16 | * Multi-Languages
17 | * `Bootstrap` framework
18 | * Free `memory` allocated
19 |
20 | config
21 | -----------
22 | ```php
23 | $charset = 'utf-8';
24 | $LoginDialog = true;
25 | $show_file_or_dir = true ;
26 | $perpage = (isset($_GET['perpage'])) ? (int)$_GET['perpage'] : 10;
27 | $login_user = 'admin';
28 | $login_pass = 'admin';
29 | $_extensions[0] = array(); //Allowed extensions (upload & browse)
30 | $_extensions[1] = array( "css","js","txt","json","xml"); //read _extensions
31 | $lang[0] = 'en';
32 | ```
33 | ScreenShot
34 | --------
35 | #### **Small devices**
36 | 
37 |
38 | #### **Medium and large devices**
39 | 
40 |
41 | #### **Darkly theme**
42 | 
43 | Download
44 | --------
45 | ##### [Click here to download latest version](https://github.com/onexite/File-Manager/archive/master.zip)
46 |
--------------------------------------------------------------------------------
/css/bootstrap-rtl.min.css:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * bootstrap-rtl (version 3.3.4)
3 | * Author: Morteza Ansarinia (http://github.com/morteza)
4 | * Created on: August 13,2015
5 | * Project: bootstrap-rtl
6 | * Copyright: Unlicensed Public Domain
7 | *******************************************************************************/
8 |
9 | html{direction:rtl}body{direction:rtl}.flip.text-left{text-align:right}.flip.text-right{text-align:left}.list-unstyled{padding-right:0;padding-left:initial}.list-inline{padding-right:0;padding-left:initial;margin-right:-5px;margin-left:0}dd{margin-right:0;margin-left:initial}@media (min-width:768px){.dl-horizontal dt{float:right;clear:right;text-align:left}.dl-horizontal dd{margin-right:180px;margin-left:0}}blockquote{border-right:5px solid #eee;border-left:0}.blockquote-reverse,blockquote.pull-left{padding-left:15px;padding-right:0;border-left:5px solid #eee;border-right:0;text-align:left}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:right}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{left:100%;right:auto}.col-xs-pull-11{left:91.66666667%;right:auto}.col-xs-pull-10{left:83.33333333%;right:auto}.col-xs-pull-9{left:75%;right:auto}.col-xs-pull-8{left:66.66666667%;right:auto}.col-xs-pull-7{left:58.33333333%;right:auto}.col-xs-pull-6{left:50%;right:auto}.col-xs-pull-5{left:41.66666667%;right:auto}.col-xs-pull-4{left:33.33333333%;right:auto}.col-xs-pull-3{left:25%;right:auto}.col-xs-pull-2{left:16.66666667%;right:auto}.col-xs-pull-1{left:8.33333333%;right:auto}.col-xs-pull-0{left:auto;right:auto}.col-xs-push-12{right:100%;left:0}.col-xs-push-11{right:91.66666667%;left:0}.col-xs-push-10{right:83.33333333%;left:0}.col-xs-push-9{right:75%;left:0}.col-xs-push-8{right:66.66666667%;left:0}.col-xs-push-7{right:58.33333333%;left:0}.col-xs-push-6{right:50%;left:0}.col-xs-push-5{right:41.66666667%;left:0}.col-xs-push-4{right:33.33333333%;left:0}.col-xs-push-3{right:25%;left:0}.col-xs-push-2{right:16.66666667%;left:0}.col-xs-push-1{right:8.33333333%;left:0}.col-xs-push-0{right:auto;left:0}.col-xs-offset-12{margin-right:100%;margin-left:0}.col-xs-offset-11{margin-right:91.66666667%;margin-left:0}.col-xs-offset-10{margin-right:83.33333333%;margin-left:0}.col-xs-offset-9{margin-right:75%;margin-left:0}.col-xs-offset-8{margin-right:66.66666667%;margin-left:0}.col-xs-offset-7{margin-right:58.33333333%;margin-left:0}.col-xs-offset-6{margin-right:50%;margin-left:0}.col-xs-offset-5{margin-right:41.66666667%;margin-left:0}.col-xs-offset-4{margin-right:33.33333333%;margin-left:0}.col-xs-offset-3{margin-right:25%;margin-left:0}.col-xs-offset-2{margin-right:16.66666667%;margin-left:0}.col-xs-offset-1{margin-right:8.33333333%;margin-left:0}.col-xs-offset-0{margin-right:0;margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:right}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{left:100%;right:auto}.col-sm-pull-11{left:91.66666667%;right:auto}.col-sm-pull-10{left:83.33333333%;right:auto}.col-sm-pull-9{left:75%;right:auto}.col-sm-pull-8{left:66.66666667%;right:auto}.col-sm-pull-7{left:58.33333333%;right:auto}.col-sm-pull-6{left:50%;right:auto}.col-sm-pull-5{left:41.66666667%;right:auto}.col-sm-pull-4{left:33.33333333%;right:auto}.col-sm-pull-3{left:25%;right:auto}.col-sm-pull-2{left:16.66666667%;right:auto}.col-sm-pull-1{left:8.33333333%;right:auto}.col-sm-pull-0{left:auto;right:auto}.col-sm-push-12{right:100%;left:0}.col-sm-push-11{right:91.66666667%;left:0}.col-sm-push-10{right:83.33333333%;left:0}.col-sm-push-9{right:75%;left:0}.col-sm-push-8{right:66.66666667%;left:0}.col-sm-push-7{right:58.33333333%;left:0}.col-sm-push-6{right:50%;left:0}.col-sm-push-5{right:41.66666667%;left:0}.col-sm-push-4{right:33.33333333%;left:0}.col-sm-push-3{right:25%;left:0}.col-sm-push-2{right:16.66666667%;left:0}.col-sm-push-1{right:8.33333333%;left:0}.col-sm-push-0{right:auto;left:0}.col-sm-offset-12{margin-right:100%;margin-left:0}.col-sm-offset-11{margin-right:91.66666667%;margin-left:0}.col-sm-offset-10{margin-right:83.33333333%;margin-left:0}.col-sm-offset-9{margin-right:75%;margin-left:0}.col-sm-offset-8{margin-right:66.66666667%;margin-left:0}.col-sm-offset-7{margin-right:58.33333333%;margin-left:0}.col-sm-offset-6{margin-right:50%;margin-left:0}.col-sm-offset-5{margin-right:41.66666667%;margin-left:0}.col-sm-offset-4{margin-right:33.33333333%;margin-left:0}.col-sm-offset-3{margin-right:25%;margin-left:0}.col-sm-offset-2{margin-right:16.66666667%;margin-left:0}.col-sm-offset-1{margin-right:8.33333333%;margin-left:0}.col-sm-offset-0{margin-right:0;margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:right}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{left:100%;right:auto}.col-md-pull-11{left:91.66666667%;right:auto}.col-md-pull-10{left:83.33333333%;right:auto}.col-md-pull-9{left:75%;right:auto}.col-md-pull-8{left:66.66666667%;right:auto}.col-md-pull-7{left:58.33333333%;right:auto}.col-md-pull-6{left:50%;right:auto}.col-md-pull-5{left:41.66666667%;right:auto}.col-md-pull-4{left:33.33333333%;right:auto}.col-md-pull-3{left:25%;right:auto}.col-md-pull-2{left:16.66666667%;right:auto}.col-md-pull-1{left:8.33333333%;right:auto}.col-md-pull-0{left:auto;right:auto}.col-md-push-12{right:100%;left:0}.col-md-push-11{right:91.66666667%;left:0}.col-md-push-10{right:83.33333333%;left:0}.col-md-push-9{right:75%;left:0}.col-md-push-8{right:66.66666667%;left:0}.col-md-push-7{right:58.33333333%;left:0}.col-md-push-6{right:50%;left:0}.col-md-push-5{right:41.66666667%;left:0}.col-md-push-4{right:33.33333333%;left:0}.col-md-push-3{right:25%;left:0}.col-md-push-2{right:16.66666667%;left:0}.col-md-push-1{right:8.33333333%;left:0}.col-md-push-0{right:auto;left:0}.col-md-offset-12{margin-right:100%;margin-left:0}.col-md-offset-11{margin-right:91.66666667%;margin-left:0}.col-md-offset-10{margin-right:83.33333333%;margin-left:0}.col-md-offset-9{margin-right:75%;margin-left:0}.col-md-offset-8{margin-right:66.66666667%;margin-left:0}.col-md-offset-7{margin-right:58.33333333%;margin-left:0}.col-md-offset-6{margin-right:50%;margin-left:0}.col-md-offset-5{margin-right:41.66666667%;margin-left:0}.col-md-offset-4{margin-right:33.33333333%;margin-left:0}.col-md-offset-3{margin-right:25%;margin-left:0}.col-md-offset-2{margin-right:16.66666667%;margin-left:0}.col-md-offset-1{margin-right:8.33333333%;margin-left:0}.col-md-offset-0{margin-right:0;margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:right}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{left:100%;right:auto}.col-lg-pull-11{left:91.66666667%;right:auto}.col-lg-pull-10{left:83.33333333%;right:auto}.col-lg-pull-9{left:75%;right:auto}.col-lg-pull-8{left:66.66666667%;right:auto}.col-lg-pull-7{left:58.33333333%;right:auto}.col-lg-pull-6{left:50%;right:auto}.col-lg-pull-5{left:41.66666667%;right:auto}.col-lg-pull-4{left:33.33333333%;right:auto}.col-lg-pull-3{left:25%;right:auto}.col-lg-pull-2{left:16.66666667%;right:auto}.col-lg-pull-1{left:8.33333333%;right:auto}.col-lg-pull-0{left:auto;right:auto}.col-lg-push-12{right:100%;left:0}.col-lg-push-11{right:91.66666667%;left:0}.col-lg-push-10{right:83.33333333%;left:0}.col-lg-push-9{right:75%;left:0}.col-lg-push-8{right:66.66666667%;left:0}.col-lg-push-7{right:58.33333333%;left:0}.col-lg-push-6{right:50%;left:0}.col-lg-push-5{right:41.66666667%;left:0}.col-lg-push-4{right:33.33333333%;left:0}.col-lg-push-3{right:25%;left:0}.col-lg-push-2{right:16.66666667%;left:0}.col-lg-push-1{right:8.33333333%;left:0}.col-lg-push-0{right:auto;left:0}.col-lg-offset-12{margin-right:100%;margin-left:0}.col-lg-offset-11{margin-right:91.66666667%;margin-left:0}.col-lg-offset-10{margin-right:83.33333333%;margin-left:0}.col-lg-offset-9{margin-right:75%;margin-left:0}.col-lg-offset-8{margin-right:66.66666667%;margin-left:0}.col-lg-offset-7{margin-right:58.33333333%;margin-left:0}.col-lg-offset-6{margin-right:50%;margin-left:0}.col-lg-offset-5{margin-right:41.66666667%;margin-left:0}.col-lg-offset-4{margin-right:33.33333333%;margin-left:0}.col-lg-offset-3{margin-right:25%;margin-left:0}.col-lg-offset-2{margin-right:16.66666667%;margin-left:0}.col-lg-offset-1{margin-right:8.33333333%;margin-left:0}.col-lg-offset-0{margin-right:0;margin-left:0}}caption{text-align:right}th{text-align:right}@media screen and (max-width:767px){.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-right:0;border-left:initial}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-left:0;border-right:initial}}.radio label,.checkbox label{padding-right:20px;padding-left:initial}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{margin-right:-20px;margin-left:auto}.radio-inline,.checkbox-inline{padding-right:20px;padding-left:0}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-right:10px;margin-left:0}.has-feedback .form-control{padding-left:42.5px;padding-right:12px}.form-control-feedback{left:0;right:auto}@media (min-width:768px){.form-inline label{padding-right:0;padding-left:initial}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{margin-right:0;margin-left:auto}}@media (min-width:768px){.form-horizontal .control-label{text-align:left}}.form-horizontal .has-feedback .form-control-feedback{left:15px;right:auto}.caret{margin-right:2px;margin-left:0}.dropdown-menu{right:0;left:auto;float:left;text-align:right}.dropdown-menu.pull-right{left:0;right:auto;float:right}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group>.btn,.btn-group-vertical>.btn{float:right}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-right:-1px;margin-left:0}.btn-toolbar{margin-right:-5px;margin-left:0}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:right}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-right:5px;margin-left:0}.btn-group>.btn:first-child{margin-right:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:4px;border-bottom-left-radius:4px;border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group{float:right}.btn-group.btn-group-justified>.btn,.btn-group.btn-group-justified>.btn-group{float:none}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;border-bottom-right-radius:0;border-top-right-radius:0}.btn .caret{margin-right:0}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-right:0}.input-group .form-control{float:right}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:4px;border-top-right-radius:4px;border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:first-child{border-left:0;border-right:1px solid}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:last-child{border-left-width:1px;border-left-style:solid;border-right:0}.input-group-btn>.btn+.btn{margin-right:-1px;margin-left:auto}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-left:-1px;margin-right:auto}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-right:-1px;margin-left:auto}.nav{padding-right:0;padding-left:initial}.nav-tabs>li{float:right}.nav-tabs>li>a{margin-left:auto;margin-right:-2px;border-radius:4px 4px 0 0}.nav-pills>li{float:right}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-right:2px;margin-left:auto}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-right:0;margin-left:auto}.nav-justified>.dropdown .dropdown-menu{right:auto}.nav-tabs-justified>li>a{margin-left:0;margin-right:auto}@media (min-width:768px){.nav-tabs-justified>li>a{border-radius:4px 4px 0 0}}@media (min-width:768px){.navbar-header{float:right}}.navbar-collapse{padding-right:15px;padding-left:15px}.navbar-brand{float:right}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-right:-15px;margin-left:auto}}.navbar-toggle{float:left;margin-left:15px;margin-right:auto}@media (max-width:767px){.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 25px 5px 15px}}@media (min-width:768px){.navbar-nav{float:right}.navbar-nav>li{float:right}}@media (min-width:768px){.navbar-left.flip{float:right!important}.navbar-right:last-child{margin-left:-15px;margin-right:auto}.navbar-right.flip{float:left!important;margin-left:-15px;margin-right:auto}.navbar-right .dropdown-menu{left:0;right:auto}}@media (min-width:768px){.navbar-text{float:right}.navbar-text.navbar-right:last-child{margin-left:0;margin-right:auto}}.pagination{padding-right:0}.pagination>li>a,.pagination>li>span{float:right;margin-right:-1px;margin-left:0}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-right-radius:4px;border-top-right-radius:4px;border-bottom-left-radius:0;border-top-left-radius:0}.pagination>li:last-child>a,.pagination>li:last-child>span{margin-right:-1px;border-bottom-left-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-top-right-radius:0}.pager{padding-right:0;padding-left:initial}.pager .next>a,.pager .next>span{float:left}.pager .previous>a,.pager .previous>span{float:right}.nav-pills>li>a>.badge{margin-left:0;margin-right:3px}.list-group-item>.badge{float:left}.list-group-item>.badge+.badge{margin-left:5px;margin-right:auto}.alert-dismissable,.alert-dismissible{padding-left:35px;padding-right:15px}.alert-dismissable .close,.alert-dismissible .close{right:auto;left:-21px}.progress-bar{float:right}.media>.pull-left{margin-right:10px}.media>.pull-left.flip{margin-right:0;margin-left:10px}.media>.pull-right{margin-left:10px}.media>.pull-right.flip{margin-left:0;margin-right:10px}.media-right,.media>.pull-right{padding-right:10px;padding-left:initial}.media-left,.media>.pull-left{padding-left:10px;padding-right:initial}.media-list{padding-right:0;padding-left:initial;list-style:none}.list-group{padding-right:0;padding-left:initial}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-right-radius:3px;border-top-left-radius:0}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-left-radius:3px;border-top-right-radius:0}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px;border-top-right-radius:0}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px;border-top-left-radius:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-right:0;border-left:none}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:none;border-left:0}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object{right:0;left:auto}.close{float:left}.modal-footer{text-align:left}.modal-footer.flip{text-align:right}.modal-footer .btn+.btn{margin-left:auto;margin-right:5px}.modal-footer .btn-group .btn+.btn{margin-right:-1px;margin-left:auto}.modal-footer .btn-block+.btn-block{margin-right:0;margin-left:auto}.popover{left:auto;text-align:right}.popover.top>.arrow{right:50%;left:auto;margin-right:-11px;margin-left:auto}.popover.top>.arrow:after{margin-right:-10px;margin-left:auto}.popover.bottom>.arrow{right:50%;left:auto;margin-right:-11px;margin-left:auto}.popover.bottom>.arrow:after{margin-right:-10px;margin-left:auto}.carousel-control{right:0;bottom:0}.carousel-control.left{right:auto;left:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;right:auto;margin-right:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;left:auto;margin-left:-10px}.carousel-indicators{right:50%;left:0;margin-right:-30%;margin-left:0;padding-left:0}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:0;margin-right:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-left:0;margin-right:-15px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}}.pull-right.flip{float:left!important}.pull-left.flip{float:right!important}
--------------------------------------------------------------------------------
/darkly.php:
--------------------------------------------------------------------------------
1 | open($file);
215 | if ($res === TRUE) {
216 | $zip->extractTo($extract_path);
217 | $zip->close();
218 | return true;
219 | } else {
220 | $alert_msg=$lang[33].' - '.$lang[41];
221 | return false;
222 | }
223 | };
224 |
225 |
226 | function unlinkRecursive($dir, $RemoveRootToo)
227 | {
228 | if (is_file($dir) === true)
229 | return @unlink($dir);
230 | if(!$dh = @opendir($dir))
231 | return;
232 | while (false !== ($obj = readdir($dh)))
233 | {
234 | if($obj == '.' || $obj == '..')
235 | continue;
236 | if (!@unlink($dir . '/' . $obj))
237 | unlinkRecursive($dir.'/'.$obj, true);
238 | }
239 | closedir($dh);
240 | if ($RemoveRootToo)
241 | @rmdir($dir);
242 | return;
243 | };
244 |
245 |
246 |
247 | function return_bytes ($size_str)
248 | {
249 | switch (substr ($size_str, -1))
250 | {
251 | case 'M': case 'm': return (int)$size_str * 1048576;
252 | case 'K': case 'k': return (int)$size_str * 1024;
253 | case 'G': case 'g': return (int)$size_str * 1073741824;
254 | default: return $size_str;
255 | }
256 | };
257 |
258 | function is_sub_dir($path = NULL, $parent_folder = SITE_PATH) {
259 | $dir = dirname($path);
260 | $folder = substr($path, strlen($dir));
261 | $dir = realpath($dir);
262 | $folder = preg_replace('/[^a-z0-9\.\-_]/i', '', $folder);
263 | if( !$dir OR !$folder OR $folder === '.') {
264 | return FALSE;
265 | }
266 | $path = $dir.'/'. $folder;/*DS*/
267 | if( strcasecmp($path, $parent_folder) > 0 ) {
268 | return $path;
269 | }
270 | return FALSE;
271 | };
272 |
273 | function text_position($position=0)
274 | {
275 | global $is_rtl;
276 | if($position==0)
277 | {if($is_rtl ) echo 'left'; else echo 'right';}
278 | else
279 | {if($is_rtl ) echo 'right'; else echo 'left';}
280 | };
281 |
282 | function css()
283 | {
284 | global $is_rtl;
285 | $css='';
286 |
287 | if(file_exists('./css/darkly.css'))
288 | $css.='';
289 | else
290 | $css.='';
291 |
292 | if(file_exists('./js/jquery-2.2.0.min.js'))
293 | $css.='';
294 | else
295 | $css.='';
296 |
297 | if(file_exists('./js/bootstrap.min.js'))
298 | $css.='';
299 | else
300 | $css.='';
301 |
302 | if(file_exists('./js/jquery.twbsPagination.min.js'))
303 | $css.='';
304 | else
305 | $css.='';
306 |
307 | if( $is_rtl )
308 | if(file_exists('./css/bootstrap-rtl.min.css'))
309 | $css.='';
310 | else
311 | $css.='';
312 |
313 | return $css;
314 |
315 | } ;
316 | function alert($str)
317 | {
318 | global $lang;
319 | return '
';
320 | };
321 |
322 | function AJAX_request()
323 | {
324 | if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
325 | return true ; else return false;
326 | };
327 |
328 |
329 | if(!Login() && $LoginDialog && ( isset($_GET['uploadfile']) || isset($_GET['listFolderFiles']) || isset($_GET['copy']) || isset($_GET['unzip']) || isset($_GET['table']) || isset($_GET['rename']) || isset($_GET['Remove']) || isset($_GET['read']) || isset($_GET['newfolder']) ) )
330 | {
331 | die(print_array(array( 'table' => ''.$lang[31].'' , 'total' => 1 , 'page' => 1, 'dir' => '' , 'dirHtml' => '' ,'alert' => alert($lang[22]) )));
332 | };
333 |
334 |
335 |
336 | if(!Login() && $LoginDialog)
337 | {
338 | if($login_user=='')
339 | $html_input_user='';
340 | else
341 | $html_input_user='
342 |
343 |
344 |
';
345 | echo ('
346 |
347 |
348 | '.$lang[22].'
349 |
350 |
351 |
352 |
353 | '.css().'
354 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
373 |
374 |
375 |
376 |
377 |
378 |
379 | ');
380 |
381 |
382 | unset($lang);
383 | unset($icon);
384 | unset($_extensions);
385 | unset($RTL_languages);
386 | unset($LoginDialog);
387 | unset($login_user);
388 | unset($login_pass);
389 | unset($is_rtl);
390 | unset($units);
391 | unset($charset);
392 | unset($_maxFileSize);
393 | unset($_SERVER); unset($_SESSION);unset($_COOKIE);unset($_GET); unset($_POST);unset($_FILES);unset($_ENV); unset($_REQUEST);
394 |
395 | exit();
396 | }
397 |
398 |
399 |
400 | $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1;
401 | if(!($page>0)) $page = 1;
402 | $directory = (isset($_GET['dir'])) ? $_GET['dir'] : '.';
403 |
404 | if(isset($_GET['copy']) && AJAX_request() ) {file_exists_str($_GET['copy']); recurse_copy( $_GET['copy'],$_GET['to'] ); }
405 | if(isset($_GET['Remove']) && AJAX_request() ) {file_exists_str($_GET['Remove']);@unlinkRecursive($_GET['Remove'],true); }
406 | if(isset($_GET['newfolder']) && AJAX_request() ) {@mkdir( $directory .'/'.$_GET['newfolder'] , 0777); }
407 | if(isset($_GET['rename']) && AJAX_request() ) {file_exists_str($_GET['rename']);@rename($_GET['rename'],$directory .'/'.$_GET['newrename']);}
408 | if(isset($_GET['unzip']) && AJAX_request() ) {file_exists_str($_GET['unzip']);@openZipArchive($_GET['unzip'],$_GET['to']);}
409 | if(isset($_GET['listFolderFiles']) && AJAX_request() ) {die(listFolderFiles($directory));}
410 | if(isset($_GET['read']) && $show_file_or_dir && AJAX_request() ) {file_exists_str($_GET['read']);if(in_array(extension($_GET['read']), $_extensions[1]) || count($_extensions[1])==0 )
411 | { header('Content-type: text/html; charset='.$charset);
412 | die( _read($_GET['read']) ) ;
413 | } else die($lang[7]);}
414 |
415 | if(isset($_GET['write']) && $show_file_or_dir && AJAX_request() ) {file_exists_str($_POST['write']);if(in_array(extension($_POST['write']), $_extensions[1]) || count($_extensions[1])==0 )
416 | { //header('Content-type: text/html; charset='.$charset);
417 | $txtData = (isset($_POST['txt'])) ? $_POST['txt'] : '';
418 | die( _write($_POST['write'],$txtData) ) ;
419 | } else die($lang[7]);}
420 |
421 | if ( isset($_GET['uploadfile']) && AJAX_request() ) {
422 |
423 | $response = array();
424 | if (isset( $_FILES["inputFileUpload"] ) && !empty( $_FILES["inputFileUpload"]["name"] ) )
425 | if (is_array($_FILES['inputFileUpload']['name']) || is_object($_FILES['inputFileUpload']['name']))
426 | foreach($_FILES['inputFileUpload']['name'] as $n => $name) {
427 |
428 | if(!empty($name)) {
429 | $tmp_name = basename($name);
430 | $tmp_size = $_FILES["inputFileUpload"]["size"][$n] ;
431 | $tmp_type = $_FILES["inputFileUpload"]["type"][$n] ;
432 | $error = $_FILES["inputFileUpload"]["error"][$n] ;
433 | $name_ = $_FILES["inputFileUpload"]["name"][$n] ;
434 | $target_file = $directory .'/'.$tmp_name;
435 |
436 | // )
437 | if( in_array(extension($tmp_name), $_extensions[0] ) || count($_extensions[0]) ==0 )
438 | {
439 |
440 | if(move_uploaded_file($_FILES["inputFileUpload"]["tmp_name"][$n], $target_file))
441 | $response[] =array( 'code' => '1','status' => $lang[34] ,'url' => $target_file , 'tmp_name' => $tmp_name , 'size' => $tmp_size , 'type' => $tmp_type , 'error' => $error , 'name' => $name_);
442 | elseif($error!=0)
443 | $response[] =array( 'code' => '0','status' => $lang[33].'_'.$error );
444 | elseif($tmp_size>$_maxFileSize)
445 | $response[] =array( 'code' => '0','status' => $lang[37] );
446 | else
447 | $response[] =array( 'code' => '0','status' => $lang[33] );
448 |
449 | } else $response[] = array( 'code' => '0','status' => $lang[7] );
450 | } else $response[] = array( 'code' => '0','status' => $lang[38] );
451 | }
452 | die(print_array($response));
453 |
454 | }; //$alert_msg=$lang[38];
455 |
456 | //exit(header('Location: ?page='.$page.'&dir='.$directory.'"'));
457 |
458 | if(!function_exists('scandir')) {
459 | function scandir($dir, $sortorder = 0) {
460 | if(is_dir($dir)) {
461 | $dirlist = opendir($dir);
462 | while( ($file = readdir($dirlist)) !== false) {
463 | if(!is_dir($file)) {
464 | $files[] = $file;
465 | }
466 | }
467 | ($sortorder == 0) ? asort($files) : rsort($files);
468 | return $files;
469 | } else {
470 | return FALSE;
471 | break;
472 | }
473 | }
474 | };
475 |
476 |
477 | function folderSize ($dir)
478 | {
479 | $size = 0;
480 | foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
481 | $size += is_file($each) ? filesize($each) : folderSize($each);
482 | }
483 | return $size;
484 | }
485 |
486 | function FilterScanDir($dir)
487 | {
488 | global $_extensions,$directory;
489 | $times = array() ;
490 | $files_tmp = array() ;
491 | $folers_tmp = array() ;
492 | $total_files = 0;
493 | $files = (is_dir($dir)) ? @scandir($dir) : array() ;
494 | if (is_array($files) || is_object($files))
495 | foreach($files as $file)
496 | if( ( in_array(extension($file), $_extensions[0] ) || count($_extensions[0]) ==0 ) && $file !=='.' )
497 | {
498 | if($file !=='..')
499 | $total_files++;
500 |
501 | if(is_dir($file))
502 | $folers_tmp[]=$file;
503 | else
504 | $files_tmp[]=$file;
505 |
506 | $times[] = date ("d/m/Y H:i:s", @filemtime($directory.'/'.$file));
507 | }
508 | //arsort($files_tmp);
509 | //$files = array_keys($files_tmp);
510 | //array_multisort(array_map('filemtime', $files_tmp ), SORT_DESC, $files_tmp);
511 | return array( 'list' => array_merge($folers_tmp,$files_tmp) ,'times' => $times , 'count' => $total_files );
512 | }
513 |
514 | function listFolderFiles($dir){
515 | global $_extensions;
516 | if (is_file($dir) === true)
517 | return ;
518 | $ffs = scandir($dir);
519 | echo ' ';
529 | }
530 |
531 | $total_files = 0;
532 |
533 | $offset = ($page-1)*$perpage;
534 | //setcookie('directory', $directory, time() + (86400 * 30), "/");
535 |
536 | //get subset of file array
537 | $FilesArray = FilterScanDir($directory);
538 | $files = $FilesArray['list'];
539 | $times = $FilesArray['times'];
540 | $total_files= $FilesArray['count'];
541 |
542 |
543 | //$files = (isset($files_tmp) && is_array($files_tmp)) ? $files_tmp : array();
544 | if(isset($_GET['search']))
545 | {
546 | unset($files);
547 | $files = array();
548 | $total_files = 1;
549 | if (in_array($_GET['search'], $FilesArray['list']))
550 | $files[0] = $_GET['search'];
551 | else
552 | $files[0] = 'Match_not_found';
553 | }
554 | if($table_fixed=='')
555 | $total_pages = ceil($total_files/$perpage);
556 | else
557 | $total_pages = 1;
558 |
559 | unset($FilesArray);
560 |
561 | if($table_fixed=='')
562 | $files = array_slice($files, $offset, $perpage);
563 |
564 |
565 | function showfile($file)
566 | {
567 | global $directory,$_extensions,$lang;
568 |
569 | if($file=='.' )
570 | return ''.$file.'';
571 |
572 | elseif($file=='Match_not_found')
573 | return ''.$lang[31].'';
574 |
575 | elseif($file=='..' )
576 | return ''.$file.'';
577 |
578 | elseif(is_dir($directory.'/'.$file) && file_exists($directory.'/'.$file) )
579 | return ''.$file.'';
580 |
581 | elseif (in_array(extension($file), $_extensions[2] ))
582 | return ''.$file.'' ;
583 |
584 | elseif (in_array(extension($file), array("zip","rar","7z","gzip","tar","wim","xz") ))
585 | return ''.$file.'' ;
586 |
587 | else
588 | return ''.$file.'';
589 | }
590 |
591 | function extension($file)
592 | {
593 | global $lang;
594 | if($file=='Match_not_found')
595 | return '--';
596 | $extension=strtolower(pathinfo($file, PATHINFO_EXTENSION )) ;
597 | if($extension=='')
598 | return 'dir';//$lang[16] ;
599 | else
600 | return $extension; //ucfirst
601 | }
602 |
603 |
604 | function file_exists_str($file)
605 | {
606 | global $alert_msg,$lang;
607 | if(!file_exists($file))
608 | $alert_msg=$lang[38];
609 | }
610 | function file_size($file)
611 | {
612 | global $directory;
613 | return @filesize_formatted($directory.'/'.$file);
614 | }
615 |
616 |
617 | function action($file)
618 | {
619 | global $directory,$page,$show_file_or_dir,$lang,$total_files,$_extensions;
620 | if($file=='Match_not_found' )
621 | return '--';
622 | if( $file =='..')
623 | return '--';
624 |
625 | $html= ' ';
626 | if($show_file_or_dir)
627 | {
628 | if(is_dir($directory.'/'.$file))
629 | {
630 | $count=FilterScanDir($directory.'/'.$file); //$count=FilterScanDir($directory.'/'.$file)['count'];
631 | $count=$count['count'];
632 | $html.=' ' ;
633 | unset($count);
634 | }
635 |
636 | elseif (in_array(extension($file), $_extensions[2] ))
637 | $html.=' ' ;
638 | elseif (in_array(extension($file), array("zip","rar","7z","gzip","tar","wim","xz") ))
639 | $html.=' ' ;
640 | else
641 | $html.=' ' ;
642 | }
643 | $html.='';
644 | $html.='';
645 | return $html;
646 | }
647 |
648 | function _read($file,$Modes="r")
649 | {
650 | global $lang;
651 |
652 | $file_size = filesize($file);
653 | if( !$file_size || !is_readable($file) ) return $lang[21];
654 |
655 | $myfile = fopen($file, $Modes) ;
656 | if(!$myfile) return $lang[21]; //w
657 | return fread($myfile, $file_size );
658 | fclose($myfile);
659 | };
660 |
661 |
662 | function _write($file,$txt='',$Modes="w")
663 | {
664 | global $lang;
665 |
666 | if(file_exists($file) && $txt=='') return $lang[43];
667 |
668 | if( file_exists($file) && ( !filesize($file) || !is_readable($file) ) ) return $lang[21];
669 |
670 | $myfile = fopen($file, $Modes) ;
671 | if(!$myfile) return $lang[21];
672 | if ( fwrite($myfile, $txt ) )
673 | {
674 | fclose($myfile);
675 | return $lang[34];
676 | } else {
677 | fclose($myfile);
678 | return $lang[33];
679 | }
680 |
681 | };
682 |
683 | function GetOldirectory()
684 | {
685 | global $directory,$page,$lang;
686 |
687 | $html=''.$lang[4].'';
688 | $newDir='.';
689 | $elements = explode('/',$directory);
690 | if (is_array($elements) || is_object($elements))
691 | foreach ( $elements as $key_value )
692 | {
693 | if($key_value!='.'){
694 | $newDir = $newDir.'/'.$key_value;
695 | $html.=''.$key_value.'';
696 | }
697 | }
698 |
699 | return $html;
700 | }
701 |
702 | function filesize_formatted($path)
703 | {
704 | global $units ;
705 | if(is_dir($path) || $path=='./Match_not_found' ) return '--';//directory
706 | $size = filesize($path);
707 | $power = $size > 0 ? floor(log($size, 1024)) : 0;
708 | return number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
709 | }
710 | function fileTime($index,$file)
711 | {
712 | global $times ;
713 | if($file=='Match_not_found') return '--';
714 | return $times[$index];
715 | };
716 |
717 | if(isset($_GET['table']) && AJAX_request() )
718 | {
719 |
720 | $html='';
721 | if($table_fixed=='')
722 | $html.=''.$lang[5].' | '.$lang[6].' | '.$lang[7].' | '.$lang[28].' | ';
723 | else
724 | $html.=''.$lang[5].' | '.$lang[6].' | '.$lang[7].' | ';
725 |
726 | $html.=''.$lang[8].' |
';
727 | //output appropriate items
728 | if (is_array($files) || is_object($files))
729 | foreach($files as $index => $file )
730 | {
731 | $html.='';
732 | if($table_fixed=='')
733 | $html.=''.showfile($file).' | '.file_size($file).' | '.extension($file).' | '.fileTime($index,$file).' | ';
734 | else
735 | $html.=''.showfile($file).' | '.file_size($file).' | '.extension($file).' | ';
736 |
737 | $html.=''.action($file).' |
';
738 | }
739 |
740 |
741 | $html.='';
742 | if($table_fixed=='')
743 | $html.='';
744 | else
745 | $html.=' | ';
746 | $html.=$lang[9].' : '.$page.' '.$lang[10].' : '.$total_files.' |
';
747 | if($alert_msg!='')
748 | $alert_msg = alert($alert_msg);
749 | $response = array( 'table' => $html , 'total' => $total_pages , 'page' => $page , 'dir' => $directory , 'dirHtml' => GetOldirectory() ,'alert' => $alert_msg);
750 | unset($html);
751 |
752 | die(print_array($response));
753 |
754 | }
755 |
756 | // free memory
757 | unset($files);
758 | unset($times);
759 | //unset($directory);
760 | unset($total_files);
761 | //unset($page);
762 | unset($offset);
763 | //unset($total_pages);
764 | unset($perpage);
765 | unset($table_fixed);
766 | unset($RTL_languages);
767 | unset($show_file_or_dir);
768 | unset($alert_msg);
769 | ?>
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
843 |
844 |
845 |
874 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
886 |
890 |
891 |
892 |
893 |
894 |
895 |
896 |
903 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 |
912 |
913 |
914 |
915 |
916 |
920 |
921 |
922 |
923 |
924 |
925 |
926 |
933 |
934 |
935 |
936 |
937 |
938 |
939 |
940 |
941 |
942 |
943 |
944 |
945 |
946 |
950 |
951 |
952 |
953 |
954 |
955 |
956 |
963 |
964 |
965 |
966 |
967 |
968 |
969 |
970 |
971 |
972 |
973 |
974 |
975 |
979 |
980 |
981 |
982 |
983 |
990 |
991 |
992 |
993 |
994 |
995 |
996 |
997 |
998 |
999 |
1000 |
1001 |
1005 |
1006 |
1007 |
1008 |
1009 |
1016 |
1017 |
1018 |
1019 |
1020 |
1021 |
1022 |
1023 |
1024 |
1025 |
1026 |
1027 |
1028 |
1029 |
1034 |
1035 |
{ '.implode(",",$_extensions[0]).' }
1036 | '.$lang[37].' : '.$_maxFileSize.''; ?>
1037 | :
1038 |
1051 |
1060 |
1061 |
1062 |
1063 |
1064 |
1065 |
1066 |
1067 |
1068 |
1069 |
1070 |
1071 |
1075 |
1076 |
1077 |
1078 |
1079 |
1080 |
1081 |
1082 |
1086 |
1087 |
1088 |
1089 |
1092 |
1093 |
1098 |
1099 |
1100 |
1101 |
1106 |
1107 |
1108 |
1109 |
1110 |
1111 |
1112 |
1113 |
1114 |
1115 |
1116 |
1117 |
1118 |
1119 |
1606 |
1607 |
1608 |
1609 | ';
1631 | print_r($arr);
1632 | echo '';*/
1633 | ?>
1634 |
1639 |
--------------------------------------------------------------------------------
/images/File Manager 001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JubaDZ/File-Manager/b796eb73aabc5f1ec0dff473d707b3580e9e2b53/images/File Manager 001.png
--------------------------------------------------------------------------------
/images/File Manager 002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JubaDZ/File-Manager/b796eb73aabc5f1ec0dff473d707b3580e9e2b53/images/File Manager 002.png
--------------------------------------------------------------------------------
/images/File Manager 003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JubaDZ/File-Manager/b796eb73aabc5f1ec0dff473d707b3580e9e2b53/images/File Manager 003.png
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | open($file);
218 | if ($res === TRUE) {
219 | $zip->extractTo($extract_path);
220 | $zip->close();
221 | return true;
222 | } else {
223 | $alert_msg=$lang[33].' - '.$lang[41];
224 | return false;
225 | }
226 | }
227 |
228 |
229 | function unlinkRecursive($dir, $RemoveRootToo)
230 | {
231 | if (is_file($dir) === true)
232 | return @unlink($dir);
233 | if(!$dh = @opendir($dir))
234 | return;
235 | while (false !== ($obj = readdir($dh)))
236 | {
237 | if($obj == '.' || $obj == '..')
238 | continue;
239 | if (!@unlink($dir . '/' . $obj))
240 | unlinkRecursive($dir.'/'.$obj, true);
241 | }
242 | closedir($dh);
243 | if ($RemoveRootToo)
244 | @rmdir($dir);
245 | return;
246 | }
247 |
248 |
249 |
250 | function return_bytes ($size_str)
251 | {
252 | switch (substr ($size_str, -1))
253 | {
254 | case 'M': case 'm': return (int)$size_str * 1048576;
255 | case 'K': case 'k': return (int)$size_str * 1024;
256 | case 'G': case 'g': return (int)$size_str * 1073741824;
257 | default: return $size_str;
258 | }
259 | }
260 |
261 | function is_sub_dir($path = NULL, $parent_folder = SITE_PATH) {
262 | $dir = dirname($path);
263 | $folder = substr($path, strlen($dir));
264 | $dir = realpath($dir);
265 | $folder = preg_replace('/[^a-z0-9\.\-_]/i', '', $folder);
266 | if( !$dir OR !$folder OR $folder === '.') {
267 | return FALSE;
268 | }
269 | $path = $dir.'/'. $folder;/*DS*/
270 | if( strcasecmp($path, $parent_folder) > 0 ) {
271 | return $path;
272 | }
273 | return FALSE;
274 | }
275 | function text_position($position=0)
276 | {
277 | global $is_rtl;
278 | if($position==0)
279 | {if($is_rtl ) echo 'left'; else echo 'right';}
280 | else
281 | {if($is_rtl ) echo 'right'; else echo 'left';}
282 | }
283 |
284 | function css()
285 | {
286 | global $is_rtl;
287 | $css='';
288 |
289 | if(file_exists('./css/bootstrap.min.css'))
290 | $css.='';
291 | else
292 | $css.='';
293 |
294 | if(file_exists('./js/jquery-2.2.0.min.js'))
295 | $css.='';
296 | else
297 | $css.='';
298 |
299 | if(file_exists('./js/bootstrap.min.js'))
300 | $css.='';
301 | else
302 | $css.='';
303 |
304 | if(file_exists('./js/jquery.twbsPagination.min.js'))
305 | $css.='';
306 | else
307 | $css.='';
308 |
309 | if( $is_rtl )
310 | if(file_exists('./css/bootstrap-rtl.min.css'))
311 | $css.='';
312 | else
313 | $css.='';
314 |
315 | return $css;
316 |
317 | }
318 | function alert($str)
319 | {
320 | global $lang;
321 | return '';
322 | }
323 |
324 | function AJAX_request()
325 | {
326 | if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
327 | return true ; else return false;
328 | }
329 |
330 |
331 | if(!Login() && $LoginDialog && ( isset($_GET['uploadfile']) || isset($_GET['listFolderFiles']) || isset($_GET['copy']) || isset($_GET['unzip']) || isset($_GET['table']) || isset($_GET['rename']) || isset($_GET['Remove']) || isset($_GET['read']) || isset($_GET['newfolder']) ) )
332 | {
333 |
334 | die(print_array(array( 'table' => ''.$lang[31].'' , 'total' => 1 , 'page' => 1, 'dir' => '' , 'dirHtml' => '' ,'alert' => alert($lang[22]) )));
335 | }
336 |
337 |
338 | if(!Login() && $LoginDialog)
339 | {
340 | if($login_user=='')
341 | $html_input_user='';
342 | else
343 | $html_input_user='
344 |
345 |
346 |
';
347 | echo ('
348 |
349 |
350 | '.$lang[22].'
351 |
352 |
353 |
354 |
355 | '.css().'
356 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
376 |
377 |
378 |
379 |
380 |
381 |
382 | ');
383 | unset($lang);
384 | unset($icon);
385 | unset($_extensions);
386 | unset($RTL_languages);
387 | unset($LoginDialog);
388 | unset($login_user);
389 | unset($login_pass);
390 | unset($is_rtl);
391 | unset($units);
392 | unset($charset);
393 | unset($_maxFileSize);
394 | unset($_SERVER); unset($_SESSION);unset($_COOKIE);unset($_GET); unset($_POST);unset($_FILES);unset($_ENV); unset($_REQUEST);
395 |
396 | exit();
397 | }
398 |
399 |
400 | $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1;
401 | if(!($page>0)) $page = 1;
402 | $directory = (isset($_GET['dir'])) ? $_GET['dir'] : '.';
403 |
404 | if(isset($_GET['copy']) /*&& AJAX_request()*/ ) {file_exists_str($_GET['copy']); recurse_copy( $_GET['copy'],$_GET['to'] ); }
405 | if(isset($_GET['Remove']) && AJAX_request() ) {file_exists_str($_GET['Remove']);@unlinkRecursive($_GET['Remove'],true); }
406 | if(isset($_GET['newfolder']) && AJAX_request() ) {@mkdir( $directory .'/'.$_GET['newfolder'] , 0777, true); }
407 | if(isset($_GET['rename']) && AJAX_request() ) {file_exists_str($_GET['rename']);@rename($_GET['rename'],$directory .'/'.$_GET['newrename']);}
408 | if(isset($_GET['unzip']) && AJAX_request() ) {file_exists_str($_GET['unzip']);@openZipArchive($_GET['unzip'],$_GET['to']);}
409 | if(isset($_GET['listFolderFiles']) && AJAX_request() ) {die(listFolderFiles($directory));}
410 |
411 | if(isset($_GET['read']) && $show_file_or_dir && AJAX_request() ) {file_exists_str($_GET['read']);if(in_array(extension($_GET['read']), $_extensions[1]) || count($_extensions[1])==0 )
412 | { header('Content-type: text/html; charset='.$charset);
413 | die( _read($_GET['read']) ) ;
414 | } else die($lang[7]);}
415 |
416 | if(isset($_GET['write']) && $show_file_or_dir && AJAX_request() ) {file_exists_str($_POST['write']);if(in_array(extension($_POST['write']), $_extensions[1]) || count($_extensions[1])==0 )
417 | { header('Content-type: text/html; charset='.$charset);
418 | $txtData = (isset($_POST['txt'])) ? $_POST['txt'] : '';
419 | die( _write($_POST['write'],$txtData) ) ;
420 | } else die($lang[7]);}
421 |
422 | if ( isset($_GET['uploadfile']) && AJAX_request() ) {
423 |
424 | $response = array();
425 | if (isset( $_FILES["inputFileUpload"] ) && !empty( $_FILES["inputFileUpload"]["name"] ) )
426 | if (is_array($_FILES['inputFileUpload']['name']) || is_object($_FILES['inputFileUpload']['name']))
427 | foreach($_FILES['inputFileUpload']['name'] as $n => $name) {
428 |
429 | if(!empty($name)) {
430 | $tmp_name = basename($name);
431 | $tmp_size = $_FILES["inputFileUpload"]["size"][$n] ;
432 | $tmp_type = $_FILES["inputFileUpload"]["type"][$n] ;
433 | $error = $_FILES["inputFileUpload"]["error"][$n] ;
434 | $name_ = $_FILES["inputFileUpload"]["name"][$n] ;
435 | $target_file = $directory .'/'.$tmp_name;
436 |
437 | // )
438 | if( in_array(extension($tmp_name), $_extensions[0] ) || count($_extensions[0]) ==0 )
439 | {
440 |
441 | if(move_uploaded_file($_FILES["inputFileUpload"]["tmp_name"][$n], $target_file))
442 | $response[] =array( 'code' => '1','status' => $lang[34] ,'url' => $target_file , 'tmp_name' => $tmp_name , 'size' => $tmp_size , 'type' => $tmp_type , 'error' => $error , 'name' => $name_);
443 | elseif($error!=0)
444 | $response[] =array( 'code' => '0','status' => $lang[33].'_'.$error );
445 | elseif($tmp_size>$_maxFileSize)
446 | $response[] =array( 'code' => '0','status' => $lang[37] );
447 | else
448 | $response[] =array( 'code' => '0','status' => $lang[33] );
449 |
450 | } else $response[] = array( 'code' => '0','status' => $lang[7] );
451 | } else $response[] = array( 'code' => '0','status' => $lang[38] );
452 | }
453 |
454 | die(print_array($response));
455 |
456 | }; //$alert_msg=$lang[38];
457 |
458 | //exit(header('Location: ?page='.$page.'&dir='.$directory.'"'));
459 |
460 | if(!function_exists('scandir')) {
461 | function scandir($dir, $sortorder = 0) {
462 | if(is_dir($dir)) {
463 | $dirlist = opendir($dir);
464 | while( ($file = readdir($dirlist)) !== false) {
465 | if(!is_dir($file)) {
466 | $files[] = $file;
467 | }
468 | }
469 | ($sortorder == 0) ? asort($files) : rsort($files);
470 | return $files;
471 | } else {
472 | return FALSE;
473 | break;
474 | }
475 | }
476 | };
477 |
478 |
479 | function folderSize ($dir)
480 | {
481 | $size = 0;
482 | foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
483 | $size += is_file($each) ? filesize($each) : folderSize($each);
484 | }
485 | return $size;
486 | }
487 |
488 | function FilterScanDir($dir)
489 | {
490 | global $_extensions,$directory;
491 | $times = array() ;
492 | $files_tmp = array() ;
493 | $folers_tmp = array() ;
494 | $total_files = 0;
495 | $files = (is_dir($dir)) ? @scandir($dir) : array() ;
496 | if (is_array($files) || is_object($files))
497 | foreach($files as $file)
498 | if( ( in_array(extension($file), $_extensions[0] ) || count($_extensions[0]) ==0 ) && $file !=='.' )
499 | {
500 | if($file !=='..')
501 | $total_files++;
502 |
503 | if(is_dir($file))
504 | $folers_tmp[]=$file;
505 | else
506 | $files_tmp[]=$file;
507 |
508 | $times[] = date ("d/m/Y H:i:s", @filemtime($directory.'/'.$file));
509 | }
510 | //arsort($files_tmp);
511 | //$files = array_keys($files_tmp);
512 | //array_multisort(array_map('filemtime', $files_tmp ), SORT_DESC, $files_tmp);
513 | return array( 'list' => array_merge($folers_tmp,$files_tmp) ,'times' => $times , 'count' => $total_files );
514 | }
515 |
516 | function listFolderFiles($dir){
517 | global $_extensions;
518 | if (is_file($dir) === true)
519 | return ;
520 | $ffs = scandir($dir);
521 | echo ' ';
531 | }
532 |
533 | $total_files = 0;
534 |
535 | $offset = ($page-1)*$perpage;
536 | //setcookie('directory', $directory, time() + (86400 * 30), "/");
537 |
538 | //get subset of file array
539 | $FilesArray = FilterScanDir($directory);
540 | $files = $FilesArray['list'];
541 | $times = $FilesArray['times'];
542 | $total_files= $FilesArray['count'];
543 |
544 |
545 | //$files = (isset($files_tmp) && is_array($files_tmp)) ? $files_tmp : array();
546 | if(isset($_GET['search']))
547 | {
548 | unset($files);
549 | $files = array();
550 | $total_files = 1;
551 | if (in_array($_GET['search'], $FilesArray['list']))
552 | $files[0] = $_GET['search'];
553 | else
554 | $files[0] = 'Match_not_found';
555 | }
556 | if($table_fixed=='')
557 | $total_pages = ceil($total_files/$perpage);
558 | else
559 | $total_pages = 1;
560 |
561 | unset($FilesArray);
562 |
563 | if($table_fixed=='')
564 | $files = array_slice($files, $offset, $perpage);
565 |
566 |
567 | function showfile($file)
568 | {
569 | global $directory,$_extensions,$lang;
570 |
571 | if($file=='.' )
572 | return ''.$file.'';
573 |
574 | elseif($file=='Match_not_found')
575 | return ''.$lang[31].'';
576 |
577 | elseif($file=='..' )
578 | return ''.$file.'';
579 |
580 | elseif(is_dir($directory.'/'.$file) && file_exists($directory.'/'.$file) )
581 | return ''.$file.'';
582 |
583 | elseif (in_array(extension($file), $_extensions[2] ))
584 | return ''.$file.'' ;
585 |
586 | elseif (in_array(extension($file), array("zip","rar","7z","gzip","tar","wim","xz") ))
587 | return ''.$file.'' ;
588 |
589 | else
590 | return ''.$file.'';
591 | }
592 |
593 | function extension($file)
594 | {
595 | global $lang;
596 | if($file=='Match_not_found')
597 | return '--';
598 | $extension=strtolower(pathinfo($file, PATHINFO_EXTENSION )) ;
599 | if($extension=='')
600 | return 'dir';//$lang[16] ;
601 | else
602 | return $extension; //ucfirst
603 | }
604 |
605 |
606 | function file_exists_str($file)
607 | {
608 | global $alert_msg,$lang;
609 | if(!file_exists($file))
610 | $alert_msg=$lang[38];
611 | }
612 | function file_size($file)
613 | {
614 | global $directory;
615 | return @filesize_formatted($directory.'/'.$file);
616 | }
617 |
618 |
619 | function action($file)
620 | {
621 | global $directory,$page,$show_file_or_dir,$lang,$total_files,$_extensions;
622 | if($file=='Match_not_found' )
623 | return '--';
624 | if( $file =='..')
625 | return '--';
626 |
627 | $html= ' ';
628 | if($show_file_or_dir)
629 | {
630 | if(is_dir($directory.'/'.$file))
631 | {
632 | $count=FilterScanDir($directory.'/'.$file); //$count=FilterScanDir($directory.'/'.$file)['count'];
633 | $count=$count['count'];
634 | $html.=' ' ;
635 | unset($count);
636 | }
637 |
638 | elseif (in_array(extension($file), $_extensions[2] ))
639 | $html.=' ' ;
640 | elseif (in_array(extension($file), array("zip","rar","7z","gzip","tar","wim","xz") ))
641 | $html.=' ' ;
642 | else
643 | $html.=' ' ;
644 | }
645 | $html.='';
646 | $html.='';
647 | return $html;
648 | }
649 |
650 | function _read($file,$Modes="r")
651 | {
652 | global $lang;
653 |
654 | $file_size = filesize($file);
655 | if( !$file_size || !is_readable($file) ) return $lang[21];
656 |
657 | $myfile = fopen($file, $Modes) ;
658 | if(!$myfile) return $lang[21]; //w
659 | return fread($myfile, $file_size );
660 | fclose($myfile);
661 | };
662 |
663 | function _write($file,$txt='',$Modes="w")
664 | {
665 | global $lang;
666 |
667 | if(file_exists($file) && $txt=='') return $lang[43];
668 |
669 | if( file_exists($file) && ( !filesize($file) || !is_readable($file) ) ) return $lang[21];
670 |
671 | $myfile = fopen($file, $Modes) ;
672 | if(!$myfile) return $lang[21]; //w
673 | if ( fwrite($myfile, $txt ) )
674 | {
675 | fclose($myfile);
676 | return $lang[34];
677 | } else {
678 | fclose($myfile);
679 | return $lang[33];
680 | }
681 |
682 | };
683 |
684 | function GetOldirectory()
685 | {
686 | global $directory,$page,$lang;
687 |
688 | $html=''.$lang[4].'';
689 | $newDir='.';
690 | $elements = explode('/',$directory);
691 | if (is_array($elements) || is_object($elements))
692 | foreach ( $elements as $key_value )
693 | {
694 | if($key_value!='.'){
695 | $newDir = $newDir.'/'.$key_value;
696 | $html.=''.$key_value.'';
697 | }
698 | }
699 |
700 | return $html;
701 | }
702 |
703 | function filesize_formatted($path)
704 | {
705 | global $units ;
706 | if(is_dir($path) || $path=='./Match_not_found' ) return '--';//directory
707 | $size = filesize($path);
708 | $power = $size > 0 ? floor(log($size, 1024)) : 0;
709 | return number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
710 | }
711 | function fileTime($index,$file)
712 | {
713 | global $times ;
714 | if($file=='Match_not_found') return '--';
715 | return $times[$index];
716 | };
717 |
718 | if(isset($_GET['table']) && AJAX_request() )
719 | {
720 |
721 | $html='';
722 | if($table_fixed=='')
723 | $html.=''.$lang[5].' | '.$lang[6].' | '.$lang[7].' | '.$lang[28].' | ';
724 | else
725 | $html.=''.$lang[5].' | '.$lang[6].' | '.$lang[7].' | ';
726 |
727 | $html.=''.$lang[8].' |
';
728 | //output appropriate items
729 | if (is_array($files) || is_object($files))
730 | foreach($files as $index => $file )
731 | {
732 | $html.='';
733 | if($table_fixed=='')
734 | $html.=''.showfile($file).' | '.file_size($file).' | '.extension($file).' | '.fileTime($index,$file).' | ';
735 | else
736 | $html.=''.showfile($file).' | '.file_size($file).' | '.extension($file).' | ';
737 |
738 | $html.=''.action($file).' |
';
739 | }
740 |
741 |
742 | $html.='';
743 | if($table_fixed=='')
744 | $html.='';
745 | else
746 | $html.=' | ';
747 | $html.=$lang[9].' : '.$page.' '.$lang[10].' : '.$total_files.' |
';
748 | if($alert_msg!='')
749 | $alert_msg = alert($alert_msg);
750 | $response = array( 'table' => $html , 'total' => $total_pages , 'page' => $page , 'dir' => $directory , 'dirHtml' => GetOldirectory() ,'alert' => $alert_msg);
751 | unset($html);
752 | die(print_array($response));
753 |
754 | }
755 |
756 | // free memory
757 | unset($files);
758 | unset($times);
759 | //unset($directory);
760 | unset($total_files);
761 | //unset($page);
762 | unset($offset);
763 | //unset($total_pages);
764 | unset($perpage);
765 | unset($table_fixed);
766 | unset($RTL_languages);
767 | unset($show_file_or_dir);
768 | unset($alert_msg);
769 | ?>
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
844 |
845 |
846 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
886 |
887 |
891 |
892 |
893 |
894 |
895 |
896 |
897 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 |
912 |
913 |
914 |
915 |
916 |
917 |
921 |
922 |
923 |
924 |
925 |
926 |
927 |
934 |
935 |
936 |
937 |
938 |
939 |
940 |
941 |
942 |
943 |
944 |
945 |
946 |
947 |
951 |
952 |
953 |
954 |
955 |
956 |
957 |
964 |
965 |
966 |
967 |
968 |
969 |
970 |
971 |
972 |
973 |
974 |
975 |
976 |
980 |
981 |
982 |
983 |
984 |
991 |
992 |
993 |
994 |
995 |
996 |
997 |
998 |
999 |
1000 |
1001 |
1002 |
1006 |
1007 |
1008 |
1009 |
1010 |
1017 |
1018 |
1019 |
1020 |
1021 |
1022 |
1023 |
1024 |
1025 |
1026 |
1027 |
1028 |
1029 |
1030 |
1035 |
1036 |
{ '.implode(",",$_extensions[0]).' }
1037 | '.$lang[37].' : '.$_maxFileSize.'
'; ?>
1038 | :
1039 |
1052 |
1061 |
1062 |
1063 |
1064 |
1065 |
1066 |
1067 |
1068 |
1069 |
1070 |
1071 |
1072 |
1076 |
1077 |
1078 |
1079 |
1080 |
1081 |
1082 |
1083 |
1087 |
1088 |
1089 |
1090 |
1093 |
1094 |
1099 |
1100 |
1101 |
1102 |
1107 |
1108 |
1109 |
1110 |
1111 |
1112 |
1113 |
1114 |
1115 |
1116 |
1117 |
1118 |
1119 |
1120 |
1607 |
1608 |
1609 |
1610 | ';
1632 | print_r($arr);
1633 | echo '';*/
1634 | ?>
1635 |
--------------------------------------------------------------------------------
/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.4 (http://getbootstrap.com)
3 | * Copyright 2011-2015 Twitter, Inc.
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | */
6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-mp.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
--------------------------------------------------------------------------------
/js/jquery.twbsPagination.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | * jQuery Bootstrap Pagination v1.3.1
3 | * https://github.com/esimakin/twbs-pagination
4 | *
5 | * Copyright 2014-2015 Eugene Simakin
6 | * Released under Apache 2.0 license
7 | * http://apache.org/licenses/LICENSE-2.0.html
8 | */
9 | !function(a,b,c,d){"use strict";var e=a.fn.twbsPagination,f=function(c,d){if(this.$element=a(c),this.options=a.extend({},a.fn.twbsPagination.defaults,d),this.options.startPage<1||this.options.startPage>this.options.totalPages)throw new Error("Start page option is incorrect");if(this.options.totalPages=parseInt(this.options.totalPages),isNaN(this.options.totalPages))throw new Error("Total pages option is not correct!");if(this.options.visiblePages=parseInt(this.options.visiblePages),isNaN(this.options.visiblePages))throw new Error("Visible pages option is not correct!");if(this.options.totalPages"),this.$listContainer.addClass(this.options.paginationClass),"UL"!==g&&this.$element.append(this.$listContainer),this.render(this.getPages(this.options.startPage)),this.setupEvents(),this.options.initiateStartPageClick&&this.$element.trigger("page",this.options.startPage),this};f.prototype={constructor:f,destroy:function(){return this.$element.empty(),this.$element.removeData("twbs-pagination"),this.$element.off("page"),this},show:function(a){if(1>a||a>this.options.totalPages)throw new Error("Page is incorrect.");return this.render(this.getPages(a)),this.setupEvents(),this.$element.trigger("page",a),this},buildListItems:function(a){var b=[];if(this.options.first&&b.push(this.buildItem("first",1)),this.options.prev){var c=a.currentPage>1?a.currentPage-1:this.options.loop?this.options.totalPages:1;b.push(this.buildItem("prev",c))}for(var d=0;d"),e=a(""),f=null;switch(b){case"page":f=c,d.addClass(this.options.pageClass);break;case"first":f=this.options.first,d.addClass(this.options.firstClass);break;case"prev":f=this.options.prev,d.addClass(this.options.prevClass);break;case"next":f=this.options.next,d.addClass(this.options.nextClass);break;case"last":f=this.options.last,d.addClass(this.options.lastClass)}return d.data("page",c),d.data("page-type",b),d.append(e.attr("href",this.makeHref(c)).html(f)),d},getPages:function(a){var b=[],c=Math.floor(this.options.visiblePages/2),d=a-c+1-this.options.visiblePages%2,e=a+c;0>=d&&(d=1,e=this.options.visiblePages),e>this.options.totalPages&&(d=this.options.totalPages-this.options.visiblePages+1,e=this.options.totalPages);for(var f=d;e>=f;)b.push(f),f++;return{currentPage:a,numeric:b}},render:function(b){var c=this;this.$listContainer.children().remove(),this.$listContainer.append(this.buildListItems(b)),this.$listContainer.children().each(function(){var d=a(this),e=d.data("page-type");switch(e){case"page":d.data("page")===b.currentPage&&d.addClass(c.options.activeClass);break;case"first":d.toggleClass(c.options.disabledClass,1===b.currentPage);break;case"last":d.toggleClass(c.options.disabledClass,b.currentPage===c.options.totalPages);break;case"prev":d.toggleClass(c.options.disabledClass,!c.options.loop&&1===b.currentPage);break;case"next":d.toggleClass(c.options.disabledClass,!c.options.loop&&b.currentPage===c.options.totalPages)}})},setupEvents:function(){var b=this;this.$listContainer.find("li").each(function(){var c=a(this);return c.off(),c.hasClass(b.options.disabledClass)||c.hasClass(b.options.activeClass)?void c.on("click",!1):void c.click(function(a){!b.options.href&&a.preventDefault(),b.show(parseInt(c.data("page")))})})},makeHref:function(a){return this.options.href?this.options.href.replace(this.options.hrefVariable,a):"#"}},a.fn.twbsPagination=function(b){var c,e=Array.prototype.slice.call(arguments,1),g=a(this),h=g.data("twbs-pagination"),i="object"==typeof b&&b;return h||g.data("twbs-pagination",h=new f(this,i)),"string"==typeof b&&(c=h[b].apply(h,e)),c===d?g:c},a.fn.twbsPagination.defaults={totalPages:0,startPage:1,visiblePages:5,initiateStartPageClick:!0,href:!1,hrefVariable:"{{number}}",first:"First",prev:"Previous",next:"Next",last:"Last",loop:!1,onPageClick:null,paginationClass:"pagination",nextClass:"next",prevClass:"prev",lastClass:"last",firstClass:"first",pageClass:"page",activeClass:"active",disabledClass:"disabled"},a.fn.twbsPagination.Constructor=f,a.fn.twbsPagination.noConflict=function(){return a.fn.twbsPagination=e,this}}(window.jQuery,window,document);
--------------------------------------------------------------------------------