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 file. 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, and can be downloaded from http://www.linuxcult.com/forum/crystal.php. In the archive that can be downloaded there are several sets of icons, each with a different size. Net2ftp uses the 32x32 set.

The original icons are shown when the mouse moves over the image. When the mouse is not over the image, a brighter image is shown. This effect was obtained by using The Gimp to change the Brightness.

Here is how to do it: Open the image with The Gimp, right-click on it, and select Image > Colors > Brightness-Contrast. Move the slider until you get Brightness 70 (or just enter it). Save the file as image_light.png and a second time as image_light.gif.

In (recent) Mozilla-based browsers, PNG images with a transparent background are shown fine. In Internet Explorer however they are not. Therefor the images were converted to the GIF format; this was also done with Gimp. Depending on the browser, a PNG or GIF image is shown.

There are 3 kinds of icons: 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:

Known bugs