UNIBASE

start_html – generic web application startup

start_html is a generic start script for all Unibase web applications.

To use this, symbolically link it to the bin directory for your application:

ln -s /usr/local/lib/ub/bin/start_html /usr/local/app/<your application>/bin

start_html does many important things to set up an application.

  • Logs the user in /var/log/messages (from REMOTE_USER)
  • puts STAFFNO into the session which makes it available as an environment variable in the application
  • puts EMAIL_USER into session file. Same. EMAIL_USER is the user email address.
  • Customer portal access is provided.
    • There has to be a table called “contacts” and it must have a field called “portalUser”.
    • If the field “portalUser” has the REMOTE_USER as it’s value then the start page for the contact is the customer portal
    • The customer portal is a report “customer_portal.rep “. This is run with a match value of the customer_id. Needed for customer specific reports.
  • User roles are supported
    • if a user has one role then the start page for that role is run
  • If the user has a start HTML page then that is run
  • Otherwise it is an error and the login page is reloaded