Version :

Instructions
CrushFTP will need to be able to load the java driver for whatever SQL type you are using.

You can get the MySQL driver here: http://dev.mysql.com/downloads/connector/j/5.0.html

Then use the browse button above to pick the .jar file. If you move the folder where this .jar file is at, you will need to pick it again. (MySQL: mysql-connector-java-5.0.4-bin.jar)
There is nothing that limits this plugin to MySQL, its just the database I have provided the table creation scripts for. The tables are simple, and you can create them by hand as well. Just be sure to match up the column names correctly, as well as the table names.

Setup
1) You will be using these tables (The table scripts are included below):
users, directories, events, etc.
2) Create a database for CrushFTP...name it something like 'crushftp'.
3) Use the table scripts to generate the table structures in the 'crushftp' database.
4) Change the settings above to match the SQL driver you are using. Also set the correct IP to the server, the correct database name, and a valid user / pass.
5) Create a record in the users table. Give it a username and password...the rest can be left at their defaults.
6) Create a record in the directories table. The directory's ID must link to a user's ID. For example: ID=1,dirName=MyApps, dirFTPPath=/, dirLocalPath=/Applications/, privDownload=Y, privView=Y (leave the rest at their defaults.)
dirName is the display name CrushFTP will display this item as.
dirFTPPath is the FTP path at which this item should appear. (usually '/')
dirLocalPath is the local directory path this item links to. It MUST end and start with '/'. If this is a path on windows you should use forward slashes ex:'/C:/Program Files/'. If this is MacOS X '/Applications/'.
7) Go login with an FTP client and test!

If you do not know what to enter in a field, look at a user.xml file for a user that was made in the CrushFTP User Manager. The tables basically represent the xml file.

Microsoft SQL Server Setup Instructions
1)The Microsoft SQL Server driver is sqljdbc.jar, and can be downloaded here: http://msdn2.microsoft.com/en-us/data/aa937724.aspx If the sqljdbc.jar is loaded into c:\CrushFTP, then the Database Driver File input box would hold: 'C:\CrushFTP\sqljdbc.jar'.
2)The class name has changed between SQL Server 2000 JDBC driver and the SQL Server 2005 JDBC driver. The class name for the SQL Server 2000 JDBC driver is: 'com.microsoft.jdbc.sqlserver.SQLServerDriver'. The SQL Server 2005 JDBC driver class name is 'com.microsoft.sqlserver.jdbc.SQLServerDriver'. Note the change from 'microsoft.jdbc.sqlserver' to 'microsoft.sqlserver.jdbc'.
3)The URL prefix has also changed between the SQL Server 2000 JDBC driver and the SQL Server 2005 JDBC driver. The SQL Server JDBC driver uses a URL prefix of 'jdbc:microsoft:sqlserver://', while SQL Server 2005 JDBC driver uses a URL prefix of: 'jdbc:sqlserver://'. Note the removal of 'microsoft' from the URL path.

--Ben Spink ben@crushftp.com

The SQL scripts below are for MySQL. (You will have to tweak them slightly for MS SQL.) They will generate the tables needed by this plugin. You can add additional columns to the users table, just look in the user.xml file for the proper column names. (CMD-C, or CTR-C will copy the text if you select it even though there is no right click or 'Edit' menu.)

# Database: crushftp
# ************************************************************
# Dump of table directories
# ------------------------------------------------------------

CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`userName` varchar(50) NOT NULL default 'anonymous',
`userPass` varchar(50) NOT NULL default '',
`maxIdleTime` int(11) NOT NULL default '10',
`expireDate` datetime default NULL,
`maxSimultaneousLogins` int(11) NOT NULL default '0',
`maxLoginsPerIP` int(11) NOT NULL default '0',
`canRequestFilesAsZip` char(1) NOT NULL default 'Y',
`requireEncryption` char(1) NOT NULL default 'N',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;


CREATE TABLE `directories` (
`id` int(11) NOT NULL default '0',
`dirName` varchar(255) NOT NULL default 'dirName',
`dirFTPPath` varchar(255) NOT NULL default '/',
`dirLocalPath` varchar(255) NOT NULL default '/',
`privDownload` char(1) NOT NULL default 'Y',
`privUpload` char(1) NOT NULL default 'N',
`privView` char(1) NOT NULL default 'Y',
`privDelete` char(1) NOT NULL default 'N',
`privDeleteDir` char(1) NOT NULL default 'N',
`privMakeDir` char(1) NOT NULL default 'N',
`privRename` char(1) NOT NULL default 'N',
`privResume` char(1) NOT NULL default 'Y',
`privRealQuota` char(1) NOT NULL default 'Y',
`quotaBytes` varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


# Dump of table events
# ------------------------------------------------------------

CREATE TABLE `events` (
`userid` int(11) NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
`command` varchar(255) NOT NULL default '',
`event_dir_data` varchar(255) NOT NULL default '',
`event_if_list` varchar(255) NOT NULL default '',
`event_action_list` varchar(255) NOT NULL default '',
`event_user_action_list` varchar(255) NOT NULL default '',
`event_after_list` varchar(255) NOT NULL default '',
`event_plugin_list` varchar(255) NOT NULL default '',
`from` varchar(255) NOT NULL default '',
`to` varchar(255) NOT NULL default '',
`cc` varchar(255) NOT NULL default '',
`bcc` varchar(255) NOT NULL default '',
`subject` varchar(255) NOT NULL default '',
`body` varchar(255) NOT NULL default '',
`event_always_cb` varchar(10) NOT NULL default 'false',
`event_after_cb` varchar(10) NOT NULL default 'false',
`event_now_cb` varchar(10) NOT NULL default 'false',
`event_if_cb` varchar(10) NOT NULL default 'false'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


# Dump of table ip_restrictions
# ------------------------------------------------------------

CREATE TABLE `ip_restrictions` (
`userid` int(11) NOT NULL default '0',
`start_ip` varchar(255) default NULL,
`type` varchar(1) default NULL,
`stop_ip` varchar(255) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


# Dump of table users
# ------------------------------------------------------------

# Dump of table domain_root_list
# ------------------------------------------------------------

CREATE TABLE `domain_root_list` (
`userid` int(11) NOT NULL default '0',
`domain` varchar(255) default NULL,
`path` varchar(255) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


# Dump of table web_buttons
# ------------------------------------------------------------

CREATE TABLE `web_buttons` (
`userid` int(11) NOT NULL default '0',
`sort_order` int(11) NOT NULL default '0',
`key` varchar(255) default NULL,
`value` varchar(255) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


# Dump of table web_customizations
# ------------------------------------------------------------

CREATE TABLE `web_customizations` (
`userid` int(11) NOT NULL default '0',
`key` varchar(255) default NULL,
`value` varchar(255) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Browse..

You can specify which server item will use this plugin. Example : lookup_21, or lookup_8080. (Leave blank for all.)

Test Settings


Browse..