In the first line a session has to be started to use cookies for loggin in.


The main function has two purposes:

  1. Pagelayout
    With the strings $head and $foot the layout for all pages is centrally defined.
  2. Pagecontent
    What is shown is controlled via $what2do which indicates which functions should be executed by the switch-case structure.
    If $what2do is not set, the default page is shown. In any other case it is checked first whether the user authentificated herself such that $_SESSION['IamGod'] is set - if not the user is redirected to the login.


Function to login/logoff the user.
Special feature is the increasing delay if someone should try to steal the password.


Just to indicate that the pulling of the weather forecast works, this fuctions reads the last line of the weather logfile and shows its values.