Giter Site home page Giter Site logo

jayc13 / filemanager-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guillermomartinez/filemanager-ui

0.0 0.0 0.0 1.27 MB

It is the graphical user interface File Manager, regardless of the backend, lets you work with PHP, Python, nodejs or another.

JavaScript 73.91% CSS 25.91% HTML 0.18%

filemanager-ui's Introduction

Filemanager UI

It is the graphical user interface File Manager, https://github.com/guillermomartinez/filemanager-php It is the connector for php. ##Examples

##Installation of Filemanager UI Create a folder of name filemanager within your public_html folder Download https://github.com/guillermomartinez/filemanager-ui/archive/master.zip o

bower install --save filemanager-ui

Create file index.html

<!DOCTYPE html>
<html lang="es">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Filemanager ui</title>
	<link rel="stylesheet" type="text/css" href="/js/filemanager-ui/dist/css/filemanager-ui.min.css">
</head>
<body>
	<div id="filemanager1" class="filemanager"></div>	
	
	<script type="text/javascript" src="/js/filemanager-ui/dist/js/filemanager-ui.min.js"></script>	
	<script type="text/javascript">
		$(function() {
			$("#filemanager1").filemanager({
				// Url absolute of file conector,
				url:'http://php-filemanager.rhcloud.com/conector.php',
				languaje: "ES",
				upload_max: 5,
				views:'thumbs',
				insertButton:true,
				token:'jashd4a5sd4sa'
			});
		});
	</script>
</body>
</html>

##Installation of Filemanager for PHP

composer require guillermomartinez/filemanager-php:0.1.*

Create file conector.php

โ— Please add your method of authentication.

<?php
include("vendor/autoload.php");
use GuillermoMartinez\Filemanager\Filemanager;

// Add your own authentication method
//if(!isset($_SESSION['username']) || $_SESSION['username']!="")
//	exit();
$extra = array(
	// path after of root folder
	// if /var/www/public_html is your document root web server
	// then source= usefiles o filemanager/usefiles
	"source" => "userfiles",
	// url domain
	// so that the files and show well http://php-filemanager.rhcloud.com/userfiles/imagen.jpg
	// o http://php-filemanager.rhcloud.com/filemanager/userfiles/imagen.jpg
	"url" => "http://php-filemanager.rhcloud.com/"
	);
if(isset($_POST['typeFile']) && $_POST['typeFile']=='images'){
	$extra['type_file'] = 'images';
}
$f = new Filemanager($extra);
$f->run();
?>

##Integration with laravel

composer require guillermomartinez/filemanager-php:0.1.*

Create Controller FilemanagerController.php

<?php namespace App\Http\Controllers;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

use GuillermoMartinez\Filemanager\Filemanager;

class FilemanagerController extends Controller {
	public function __construct(){
		// $this->middleware('auth');
	}
	public function getIndex()
	{
		return view('filemanager');
	}
	public function getConnection()
	{
		$extra = array(
		    // path after of root folder
		    // if /var/www/public_html is your document root web server
		    // then source= usefiles o filemanager/usefiles
		    "source" => "github/filemanagertest/laravel/public/userfiles",
		    // url domain
		    // so that the files and show well http://php-filemanager.rhcloud.com/userfiles/imagen.jpg
		    // o http://php-filemanager.rhcloud.com/filemanager/userfiles/imagen.jpg
		    "url" => "http://localhost/",
		    );						
		$f = new Filemanager($extra);
		$f->run();
	}
	public function postConnection()
	{
		$extra = array(
		    // path after of root folder
		    // if /var/www/public_html is your document root web server
		    // then source= usefiles o filemanager/usefiles
		    "source" => "github/filemanagertest/laravel/public/userfiles",
		    // url domain
		    // so that the files and show well http://php-filemanager.rhcloud.com/userfiles/imagen.jpg
		    // o http://php-filemanager.rhcloud.com/filemanager/userfiles/imagen.jpg
		    "url" => "http://localhost/",
		    );
		if(isset($_POST['typeFile']) && $_POST['typeFile']=='images'){
		    $extra['type_file'] = 'images';
		}
		$f = new Filemanager($extra);
		$f->run();
	}
}

Create view filemanager.blade.php

<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Filemanager ui</title>
    <link rel="stylesheet" type="text/css" href="{{url('/')}}/bower_components/filemanager-ui/dist/css/filemanager-ui.min.css">
</head>
<body>
    <div id="filemanager1" class="filemanager"></div>   

    <script type="text/javascript" src="{{url('/')}}/bower_components/filemanager-ui/dist/js/filemanager-ui.min.js"></script>   
    <script type="text/javascript">
        $(function() {
            $("#filemanager1").filemanager({
                url:'{{url("/")}}/filemanager/connection',
                languaje: "ES",
                upload_max: 5,
                views:'thumbs',
                insertButton:true,
                token:"{{csrf_token()}}"
            });
        });
    </script>
</body>
</html>

routes.php

Route::controller('/filemanager','FilemanagerController');

##Demo http://php-filemanager.rhcloud.com/

demo2 demo1 demo3

filemanager-ui's People

Contributors

guillermomartinez avatar guille21 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.