Jump to content

"elFinder" Connection with other Table & Variable


Joob

Recommended Posts

Hello guys,

 

I do not know if anyone work or have worked with the "elFinder (file manager)" ..

I incorporate "elFinder" to my platform .. and have the following question ..

 

Have its connector:

 

Code:

-------------------------------------

 

//za screen imeto

function clean($string) {

$string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.

$string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.

 

return preg_replace('/-+/', '-', $string); // Replaces multiple hyphens with single one.

}

//end

 

$srvname = mysql_real_escape_string(trim($_POST['servername'])); //ime na servera

$port = (int)$_POST['ports']; //port na servera

$ip = mysql_real_escape_string(trim($_POST['serverip'])); //serverip

 

$screen = clean($srvname).$port.'_'.uniqid(); //screen imeto

 

mysql_query("INSERT INTO server (screen) VALUES('$screen')") or die(mysql_error());

 

$opts = array(

'locale' => 'en_US.UTF-8',

'bind' => array(

// '*' => 'logger',

'mkdir mkfile rename duplicate upload rm paste' => 'logger'

),

'debug' => true,

'roots' => array(

array(

'driver' => 'LocalFileSystem',

'path' => ''.$screen.'',

'startPath' => ''.$screen.'',

'URL' => dirname($_SERVER['PHP_SELF']) . ''.$screen.'',

// 'treeDeep' => 3,

// 'alias' => 'File system',

'mimeDetect' => 'internal',

'tmbPath' => '.tmb',

'utf8fix' => true,

'tmbCrop' => false,

'tmbBgColor' => 'transparent',

'accessControl' => 'access',

'acceptedName' => '/^[^\.].*$/',

// 'disabled' => array('extract', 'archive'),

// 'tmbSize' => 128,

'attributes' => array(

array(

'pattern' => '/\.js$/',

'read' => true,

'write' => false

),

array(

'pattern' => '/^\/icons$/',

'read' => true,

'write' => false

)

)

// 'uploadDeny' => array('application', 'text/xml')

),

--------------------------------------

 

It doesn't work..

I need help for connect to the variable "$screen"..

How can call the "table $screen" ?

 

"table $screen": folders are automatically created by users

 

 

Regards,

Joob

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.