CodeIgniter Forums
filemanager integration - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: filemanager integration (/thread-68800.html)



filemanager integration - neuron - 08-27-2017

Hi, 

Can somebody give me filemanager integration example?
I am trying to integrate this library:
2.http://www.responsivefilemanager.com/#sthash.SJpbbiRf.dpbs

1. I put this library in assets folder
2. configured application and system path in index.php
3. configured upload directory path in library's config.php

problem is I can't authorize user.
in library's config file:
PHP Code:
<?php
if (session_id() == ''session_start();

mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
mb_http_input('UTF-8');
mb_language('uni');
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');
date_default_timezone_set('Europe/Istanbul');

ob_start();
include(
'../../index.php');
ob_end_clean();
$CI =& get_instance();
$CI->load->driver('session');
if(@
$_SESSION['file_access'] == TRUE){
    
$codeigniterAuth true;
} else {
    
$codeigniterAuth false;



withou user authentication it works fine, but with this code above when I try to access dialog.php it just redirects to Home page.


RE: filemanager integration - InsiteFX - 08-28-2017

I use this one very easy to add to CodeIgniter.

Responsive FileManager


RE: filemanager integration - neuron - 08-28-2017

After doing numeral experiments I found the problem.

Problem was that when I request  (domain)/assets/responsive_filemanager/filemanager/dialog.php


this path, it was redirecting to home page.

In my router I had this rule:
$route['default_controller'] = "welcome";

where in controller/welcome.php:
PHP Code:
class Welcome extends CI_Controller {
 
 public function index() {
 
   if (isset($this->session->userdata['user_id'])) {
 
     redirect('home');
 
   } else {
 
     redirect('login');
 
   }
 
 }


Somebody who worked in this project before me did this non sense.
After all I fixed route to:
$route['default_controller'] = "home";
to this.
it works fine now...