Overview of the code
net2ftp uses one script file (index.php) for all screens: login, browse, copy, ...

The functions are stored in different include files according to what they do: Two state variables (state and state2) determine which screen is shown.
Below is some sample code taken from index.php.


The login information and state variables are passed from screen to screen via forms.
There is a function to print the login information in an HTML form: printLoginInfo().


Sessions and cookies
For the moment net2ftp doesn't use sessions. This was to avoid session timeouts after 20 or 30 minutes; you can work without worrying about it for as long as you want. In the meanwhile some users have pointed out on the forum how to avoid session timeouts, but I don't know what benefit sessions would bring. There isn't really any information that has to be stored during a session.

Cookies are used to store the last FTP server, username and directory used.

Settings
net2ftp can be configured using the settings.inc.php and settings_authorizations.inc.php files. When a function needs to access a variable, this variable is declared as global in the beginning of the function. These variables are never changed during the execution of the program.


Icons
The icons were developed by Everaldo for KDE, and can be downloaded from http://www.everaldo.com.

There are 3 kinds of icons:
In (recent) Mozilla-based browsers, PNG images with a transparent background are shown fine. In Internet Explorer however they are not: the transparent regions are grey. Microsoft has issued a note on how to fix this: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294714

The onMouseOver effect increases the icon size from 32x32 to 34x34 pixels. To avoid that the rest of the content would move, there is margin of 2px when the icon is 32x32, and a margin of 0px when it is 34x34.

There are currently 2 action icon sets: the Crystal set, and the Kids set. Which set is used depends on the skin. All the code behind icons is in the skins.inc.php file.

How to participate in the development
If you're interested in helping with the development of net2ftp, feel free!

Post a message on the forum telling which feature you'ld like to develop, just to make sure someone else isn't working on the same thing. If you need help or would like some advice, don't hesitate. Once you're done, send the code to David, who will test it and include it in the main distribution.

In the future we may start working together on a common development server at net2ftp.org.


Requested features
More exotic features: