The following code block is takem from contacts/index.php, its the main module script for contacts. The very first 5 lines are important to be moregroupware-module compliant.
<?php $myEnv["module"] = "contact"; $myEnv["output"] = "html"; include("../config.inc.php"); include(INCLUDEPATH . "container.inc"); // adding file revision into global array revisionInit("\$Revision: 1.5 $", __FILE__);
The first line is a declaration of the modulename, the modulename MUST be the same as the folder name. This string will be used in the complete framework to determine the different paths in the groupware. The second line identifies the output target, this will be normally html.
The next two lines are mandatory, you can copy them into your own module script. In the next chapter there is a description of what these two important includes do.
The last line adds the file's revision number to a global array, this is used as a debugging aid.
Please use never an include like described above, because this way you open a big security hole. Always use something like this: include(ROOTPATH . "/folder/myinclude.php")
You should always use $HTTP_*_VARS to access input data! Never rely on register_globals being on! It is deprecated, insecure and clumsy!