Exemple #1
0
 /**
  * Main Constructor.
  * Refer to the _samples/php directory for examples.
  *
  * @param string $instanceName
  */
 public function __construct($instanceName)
 {
     $this->InstanceName = $instanceName;
     $this->BasePath = getPathinDomain() . '/fckeditor/';
     $this->Width = '100%';
     $this->Height = '200';
     $this->ToolbarSet = 'Default';
     $this->Value = '';
     $this->Config = array();
 }
Exemple #2
0
 * == END LICENSE ==
 *
 * Configuration file for the File Manager Connector for PHP.
 */
global $Config;
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
//		authenticated users can access this file or use some kind of session checking.
//只有管理员可以上传
if ($_SESSION["adminname"] == NULL || $_SESSION["adminname"] == "") {
    $Config['Enabled'] = FALSE;
} else {
    $Config['Enabled'] = TRUE;
}
// Path to user files relative to the document root.
$Config['UserFilesPath'] = getPathinDomain() . '/userfiles/';
//Iron修改文件存储路径规则
$customFilesPath = date("Y/m/d/");
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '';
// Due to security issues with Apache modules, it is recommended to leave the
// following setting enabled.
$Config['ForceSingleExtension'] = true;
// Perform additional checks for image files.
// If set to true, validate image size (using getimagesize).
$Config['SecureImageUploads'] = true;
// What the user can do with this connector.
$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder');