Welcome Guest, Not a member yet? Register   Sign In
filemanager integration
#1

(This post was last modified: 08-27-2017, 11:54 PM by neuron.)

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.
Reply
#2

I use this one very easy to add to CodeIgniter.

Responsive FileManager
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

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...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB