| DesignThe page describes how the tcpIQ Site Editor is designed. When you initially view a web page that calls SiteEditor(PageName, Path) the ASP code with this function checks for the existence of file called _<PageName>.html in the same directory as the web page. If it cannot be found then a file is created and its contents set to '<p>Create your web page here</p>'. This file is then read, searches are made for any replacement text and then it is written to the browser. Visitors to the site think that it is a normal web page. If the visitor has previously logged on then an ASP session variable will have been set. The ASP code will display the Edit and Log off buttons at the bottom of the page. If the Edit button is clicked the web page is redisplayed and the contents of the _<PageName>.html is embedded within an HTML Rich Text Area. The user can then edit and save this information and the _<PageName>.html file is updated. Prior to the _<PageName>.html file being written, a directory is created called _<PageName> and the existing _<PageName>.html file is copied into it. It is renamed by appending the current date and time so as to avoid any filename conflicts. When the authorised user clicks 'Load from Backup' this directory is read and the date of the previous backed up files are displayed in the list on the left hand side of the page. The file's date time stamp is used as the source of date that is displayed rather than parsing the filename. |
|