Notice Board Web App (0.0.1)
This module implements a simple notice board for company communications. download noticeboard
(RAR file)
Can be used as-is with Xitami, Apache and IIS7. Needs
latest libraries
(free2.max).
The app is over-simplyfied to make easier its understanding, yet is completely usable as is, with some care such as limiting access to the maintenance page only to authorized users.
![]() |
![]() |
![]() |
![]() |
Overall structure of the module
| Main pages | |||
| index.msp | Frame page | Contains the frames. | Contains the code for tracking users that access the application. Creates automatically all necessary files. Users are monitored by IP address. |
| index_frm0.msp | Top frame | Top banner | This is a 2-passages page: when first called gets from browser some informations by using a javascript, then submits the results to itself to
process it. The results are converted into MaxScript variables for later use. |
| index_frm1.msp | Left frame | Vertical left menu | Main menu: shows available choices and the code to query the tracker database to offer informations on user (such last visit's date and time). |
| index_frm2.msp | Right frame | Target frame for menu choices and most operations | Contains the code to generate all tables and indexes for the application, except user tracking. Shows the application logo and some quick links. |
| index_frm3.msp | Bottom frame | Links and aknowledgments. Not used by the app | Available for personalizations, credits and useful links. |
| Actuator pages | |||
| browse.msp | Left frame | List of records with links for display the content | shows on left panel the list of notices available. When clicked shows the corresponding record on target frame on right. |
| display.msp | Right frame | Display the board with the current notice in graphical view | Needs VAR_RECNO carrying the record number to go. Gathers some fields and display the content on the notice board picture. |
| edit.msp | Right frame | Display a web form for editing current record | MaxObject: VAR_ACTION accepts APPEND, SAVE, LIST, EDIT and SHOW. Needs VAR_RECNO for record positioning. |
| Static pages | |||
| maint.htm | Right frame | Links for add a new record or edit existing ones | Contains two links with appropriate parameters for the MaxObject that implements all the necessary functions. Just remove them and place the links
anywhere else to restrict the capabilities to add notices to everyone. For example you can create a folder where to place this page or its links, then protect its access by editing Xitami default.aut authorization file |
| about.htm | Right frame | Shows info about the app | Available for personalization |
| help.htm | Right frame | Show an help page | Available for personalization |
| htmlheader.txt | none | used by MaxScript | Common HTML header to be included in pages using the function include() |
Installation instructions
Download the compressed file.
It contains a folder noticeboard: just extract it as a whole and place it under your current site into /APPS (i.e.
c:\dbfree\webpages\lib or c:\dbfree\webpages\public\web1\apps
depending by your DBFree version).
The module is immediately active: you can test it by calling it from your browser at the address http://localhost.winix.it/apps/noticeboard/index.msp (assuming you have DBFree 1.9)
If you have latest DBFree 2.1 version you should already see an automatically generated link
listed in your application menu.
Otherwise just create manually a link.
Databases structure
|
Structure of table BOARD |
Structure of table BOARD_DET |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
(not used) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
How to build databases for notice board The module builds all the necessary files when lauched. In case, this is the code to rebuild databases (indexes will be re-created automatically first time the module is invoked):
cDb := cDBpath + "BOARD.DBF"
cDb := cDBpath + "BOARD_DET.DBF"
|
About the application
There are numberous improvements needed by this example app:
For a real corporate use a login system is compulsory. Anyway this can't be provided by this module: it must be implemented at application level (i.e. using the standard DBFree login module).
Edit page offers a LIST function that simply shows all records: this is good for learning purpouses, but a real usage needs a browser functionality. It can be added to this page object with relative ease, but we didn't to avoid to make the code too complicated.
As you noticed the database structure is fairly more complicated that what needed: in facts several fields are not used at all, not to menction the child table that is completely ignored by the app. This is because this example is only the sketch of a complete message board application where those fields will find their profitable utilization.
The child table, for example, is to log the notice readers and give a confirmation they actually read the messages and when.
These and other issues will be amended in future versions, that will be available soon, and will hopefully guide you into a throughful understanding of the inner workings of the programming in MaxScript by providing implementations of increasing complexity to achieve a fully functional application.