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