<%@LANGUAGE="VBSCRIPT"%> <% ' ================================ ' AIS Debug variables ' ================================ Dim AISdebugSet AISdebugSet = "N" ' ===================================== ' Make sure to catch any database error ' ===================================== On Error Resume Next ' ================================ ' AISNews Recordset and variables ' ================================ Dim AISNews Dim AISNewsError Dim AISNewsIndex Set AISNews = Server.CreateObject("ADODB.Recordset") AISNews.ActiveConnection = MM_Foundation_STRING AISNews.Source = "select M.msg_id,M.title,M.abstract,M.author,M.details,M.urgency,M.msg_date,M.expiry_date,M.app_name,A.name from navigator.app_messages M, navigator.sys_applications A where M.app_name = A.code and trunc(sysdate) between M.msg_date and M.expiry_date-1 order by msg_date desc" AISNews.CursorType = 0 AISNews.CursorLocation = 2 AISNews.LockType = 1 AISNews.Open() ' Check that DB connection and SQL run went fine If Err.Number <> 0 Then AISNewsError= Err.Description Else AISNewsError= "None" End If AISNewsIndex = 0 ' ================================ ' AISFocus Recordset and variables ' ================================ Dim AISFocus Dim AISFocusError Dim AISFocusIndex Dim AISFocusShownAlways Dim AISFocusToBeShown Dim AISFocusRequestedId Dim AISFocusContent Dim AISUpperLeftImage Dim AISUpperRightImage Dim AISNextFocusId Dim AISPreviousFocusId Set AISFocus = Server.CreateObject("ADODB.Recordset") AISFocus.ActiveConnection = MM_AISweb_STRING AISFocus.Source = "SELECT id, title, text, upper_right_image, upper_left_image, date_from, date_to, always_shown FROM articles WHERE (articles.date_from<=Date() Or IsNull(articles.date_from)) And (articles.date_to>=Date() Or IsNull(articles.date_to)) ORDER BY articles.always_shown,articles.id;" AISFocus.CursorType = 0 AISFocus.CursorLocation = 2 AISFocus.LockType = 1 AISFocus.Open() ' Check that DB connection and SQL run went fine If Err.Number <> 0 Then AISFocusError= Err.Description Response.Write(""&AISFocusError&"") Else AISFocusError= "None" End If AISFocusRequestedId = Request.QueryString("focusid") ' ================================ ' AIS Procedures used in page ' ================================ sub getFocus() ' =========================================== ' GET FOCUS ' This procedure build the focus and store it ' in the AISFocusContent variable ' =========================================== If (AISFocus.EOF OR AISFocusError<> "None") Then Call AISdebug("Focus query returned NO records - maybe database connection error or no focus active") ' No focus found, maybe an error connecting the database or none is active... ' Display a default hardcoded focus item AISFocusContent= "" AISFocusContent = AISFocusContent & "

AIS: the unique entry point to all administrative computing at CERN

" AISFocusContent = AISFocusContent & "
" AISFocusContent = AISFocusContent & "The AIS website provides you with links, documentation, Frequently Asked Questions pages, Quick Reference Guides etc on all administrative applications and projects at CERN." AISFocusContent = AISFocusContent & "

" AISFocusContent = AISFocusContent & "Choose one of the menu items on the left. If you are not sure on which option to use, the shortcuts on the right may help you finding the good one." Else Call AISdebug("Focus query returned records") AISFocusToBeShown = 0 ' Check if a given focus has been past as parameter ' In that case search for that focus (supposing it is active and therefore in the query results) If (AISFocusRequestedId) <> "" Then Call AISdebug("Requested focus: " & AISFocusRequestedId) AISFocus.MoveFirst Do Until (AISFocus.EOF) If (Cstr(AISFocus.Fields.Item("id")) = AISFocusRequestedId) Then AISFocusToBeShown = 1 Call AISdebug("Requested focus found: " & AISFocus.Fields.Item("title")) Exit Do Else Call AISdebug("Current focus id = " & AISFocus.Fields.Item("id")& ". Check next.") AISFocus.MoveNext End if Loop If (AISFocus.EOF) Then Call AISdebug("Requested focus not found or not active") End if End if ' Check if there was no requested focus or it has not been found or it is not active If (AISFocusToBeShown = 0) Then Call AISdebug("Choose a focus randomly") AISFocus.MoveFirst ' Check if there are any "Always Shown" focus (should always be on first record) AISFocusShownAlways = AISFocus.Fields.Item("always_shown").Value Call AISdebug("Always shown focus exists = " & AISFocusShownAlways) ' Check how many focus may be displayed (taking into account existence of "always shown" ones) While (NOT AISFocus.EOF) If AISFocusShownAlways Then ' There is at least one "Always Shown" focus, count only those ones If AISFocus.Fields.Item("always_shown").Value Then AISFocusIndex = AISFocusIndex+1 End If Else ' There are no "Always Shown" focus, all are counted AISFocusIndex = AISFocusIndex+1 End If AISFocus.MoveNext Wend Call AISdebug("Number of potential focus found = " & AISFocusIndex) ' Now decides (random) which focus is to be shown Randomize AISFocusToBeShown = Int((AISFocusIndex*Rnd)+1) Call AISdebug("Chosen focus = " & AISFocusToBeShown & "/" & AISFocusIndex) ' Move back to the randomly chosen focus AISFocus.MoveFirst For i = 1 to AISFocusToBeShown-1 AISFocus.MoveNext Next End if ' Now we should be placed on the focus to be displayed ' Get the to be displayed focus id AISFocusToBeShownId = AISFocus.Fields.Item("id") Call AISdebug("Chosen focus id = " & AISFocusToBeShownId) ' Find out what is the next focus id AISFocus.MoveNext If AISFocus.EOF Then AISFocus.MoveFirst End if AISNextFocusId = AISFocus.Fields.Item("id") Call AISdebug("Next focus id = " & AISNextFocusId) ' Move back to shown focus and find out at the same time which is the previous focus id AISFocus.MoveFirst If (AISFocus.Fields.Item("id") = AISFocusToBeShownId) Then ' Chosen focus was the first one, the previous one is therefore the last one Call AISdebug("Chosen focus is the first one") Do Until (AISFocus.EOF) AISPreviousFocusId = AISFocus.Fields.Item("id") AISFocus.MoveNext Loop AISFocus.MoveFirst Else Do While (AISFocus.Fields.Item("id") <> AISFocusToBeShownId) AISPreviousFocusId = AISFocus.Fields.Item("id") Call AISdebug(" - Current focus id = " & AISFocus.Fields.Item("id")) AISFocus.MoveNext Loop End If Call AISdebug(" - Moved back to chosen focus") Call AISdebug("Previous focus id = " & AISPreviousFocusId) ' Display the focus Call AISdebug("Build focus") AISUpperLeftImage = AISFocus.Fields.Item("upper_left_image") AISUpperRightImage = AISFocus.Fields.Item("upper_right_image") AISFocusContent = "" If (Len(AISUpperLeftImage)>0) Then Call AISdebug(" - upper left image is #" & AISUpperLeftImage & "#") AISFocusContent = AISFocusContent & "" Else Call AISdebug(" - no upper left image") End if If (Len(AISUpperRightImage)>0) Then Call AISdebug(" - upper right image is #" & AISUpperRightImage & "#") AISFocusContent = AISFocusContent & "" Else Call AISdebug(" - no upper right image") End if AISFocusContent = AISFocusContent & "

" & AISFocus.Fields.Item("Title").Value & "

" AISFocusContent = AISFocusContent & "
" AISFocusContent = AISFocusContent & AISFocus.Fields.Item("text") End If ' Checked if "any" focus was found end sub %> AIS

AIS Administrative Information Services

Home Previous News AIS Mandate Site Map
Applications
Projects
Business Map
Link
Presentations
AIS People
Ais Support


**Main Applications**
- EDH
- CET
- HRT
- OracleHR
- Qualiac

AIS website authoring resources

Go back to AIS website resource page

The AIS website (which you are currently browsing) has been developed using Macromedia Dreamweaver with an extensive usage of Templates, Library Items and Cascading Style Sheets (CSS). Here are some explanations and links related to those items. Feel free to let us know about other links or resources you may know or need.

Dreamweaver

Dreamweaver is a user friendly web authoring tool made by Macromedia. We are currently using version 3 at CERN.

Here are some of the features of Dreamweaver:

Editing functionalities

  • Graphical or HTML code editing
    Pseudo WYSIWYG editing and HTML code editing with automatic update
  • Text
    Text can be assigned a custom style from style sheets: right-click then select "custom style"
    Support font sets ("font families")
    HTML styles (version 3)
  • Links
    Links can be document or root based
    Links can be defined in the properties palette (drop down list of recently used URLs) or using the drag and drop "target" icon directly to any opened page, element or a file in the Site Files window.
  • Images and imagemaps
    Drag and drop selectable
    Image preview in the properties palette and open file dialogue box
    External editor can be defined in the preferences
    Imagemaps editable from an integrated easy-to-use tool
  • Tables
    Easily customizable from the properties palette
    Support "table in table" solutions
  • Forms
  • Templates
    Possibility to predefine pages with some elements (logo, table, footer)
    Templates are made of editable and non-editable regions
    Automatic update of pages using a given template which has been changed
  • Library items
    Pieces of reusable HTML code (not pages i.e. no header, no meta-tags etc.)
    Automatic update of pages using a given library item which has been changed
  • Style sheets
    Dreamweaver supports Cascading Style Sheets which allows site-wide style definition without having to update tags in the pages but only one style definition file (.css)
    CSS files located in the css sub-directory
  • Browser compatibility check
    "Check target browser" in the "File" menu
    Manages browser version and javascript versions
  • Layers (not HTML compliant)
    Layers are used to position elements at exact locations in the browser window.
    Layers can contain text, images, plugins, and even other layers anything you can put in the body of an HTML document you can also put in a layer.
    Layers are especially useful for making parts of your page overlap
  • Timeline (not HTML compliant)
    Creates animation by changing the position, size, visibility, and stacking order of layer
  • Behaviours (not HTML compliant)
    A behaviour is a combination of an event and an action.
    Actions are prewritten JavaScripts that perform specific tasks, such as opening a browser window, playing a sound, or stopping a Shockwave movie
  • Plug-ins
    Manages Java applet, Shockwave movie, Flash Player movie, ActiveX control or Netscape plugin
  • New definable objects
    Programmed in javascript or downloaded from the web

Site management functionalities

  • FTP access
    (simple and supported by every server but some limitations)
  • Synchronize
    Newer files from remote/local site
  • Links checks and update
    Whole site or selected files/folders
  • Site-wide search and replace
  • Date is hard coded

Here are some links to useful sites and resources concerning Dreamweaver:

Official Macromedia sites:

User's site

Templates

A template is a document that you can use as the foundation for other documents. When you create a template, you can indicate which elements of a page should remain constant (noneditable) and which elements can be changed (editable areas). This allows you to get common items automatically predefined when creating a new page. For example, if you want the banner to be the same on all your pages, you should define it as a noneditable item on a template and base all your pages on this template.

Later on if you modify the template, all pages associated to it will be changed automatically by Dreamweaver. In our example, you can change your banner look and feel on all your pages in a minute by just modifying the template!

Good examples of templates are: template for writing minutes of a meeting, template for writing specifications of a project, template for describing a person's activity in the group... Bad example of templates is a template to write the welcome page of a specific project... as it would be used by one page only...

The current page is based on a template called "APPS.DWT" which predefines

  • the left-hand menu (menu with "Applications" level opened)
  • the banner
  • the top and bottom toolbars
  • the copyright and contact notices at the bottom
Note that all these predefined items are Library Items (see below)

The 3 only editable areas on this page are:

  • the top left logo
  • this central text part
  • the author's signature at the bottom.

Here are some links to interesting resources about Dreamweaver templates:

Library Items

Library Items are "pieces of HTML" which can be reused on many pages but maintained at one place only. This is very convenient if you have some tables, menus etc... to be reused on many pages and if you do not want to use frames. Dreamweaver takes care of copying the Library Item code on every page which uses it and to update pages if you change the Library Item. The big difference with templates is that the Library Item is NOT an HTML page but a piece of HTML code (a part of an HTML page in fact, like a table, or some paragraphs...).

On this page...

  • the left-hand side menu
  • the top and bottom toolbars
  • the top banner
  • the copyright and contact notices below

... are all Library Items.

Cascading Style Sheets (CSS)

Cascading Style Sheets is a World Wide Web Consortium standard allowing web authors to separate web pages content and look and feel. In a word, it works a bit like the "styles" on a word processor, allowing you to define some styles to be applies on specific part of your pages. The styles definition is made either on every pages or on a separate file which eases the update of styles (you do not have to change or republish pages to completely change the look and feel of all your site).

Here are some links to interesting resources about Cascading Style Sheets: