Subversion Repositories wimsdev

Rev

Rev 2233 | Rev 2732 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. !!************** headmenu.phtml  ****************
  3.  
  4. !! This File creates a set of 1 to 11 links, to put in the head menu of Wims, for anonymous users.
  5.  
  6. !! **********************************************
  7.  
  8. !if robot isin $session or $wims_mode=popup or _check isin $session or $module=help/main.$lang
  9.  !exit
  10. !endif
  11.  
  12. !! la variable window=embeded est utilisee dans le cadre d'un appel depuis le lecteur exportable
  13. !! window=embeded is used for embedded players
  14. !if embededwindow isin $module_init_parm
  15.         !set window=embeded
  16. !endif
  17.  
  18. !read name.phtml.$lang
  19. !default wims_name_bgcolor=$wims_ref_bgcolor
  20. !if $wims_hm!=$empty
  21. !goto defend
  22. !endif
  23. !if $job=print or $printing=yes
  24. !goto defend
  25. !endif
  26. !reset 1_
  27.  
  28. !!********* Link #1 : "Close Window" or "Home"
  29.  
  30. !if _ isin $wims_subsession
  31. !set 1_=!append line back,3,window.close() to $1_
  32. !else
  33. !if $window != embeded and $module!=home
  34.   !set 1_=!append line home,1,session=$wims_session.1 to $1_
  35. !endif
  36. !endif
  37.  
  38. !!********* Link #2 : "Quit"
  39. !if $httpd_HTTP_REFERER!=$empty and $window != embeded
  40. !set 1_=!append line exit,2,$httpd_HTTP_REFERER to $1_
  41. !endif
  42.  
  43. !!********* Link #3 : "Work"
  44. !if $cmd=intro
  45. !set 1_=!append line work,1,module=$module&cmd=new to $1_
  46. !endif
  47.  
  48. !!********* Link #4 : "Sheet"
  49. !if $wims_sheet>0 or P isin $wims_sheet
  50. !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
  51. !endif
  52.  
  53. !!********* Link #5 : "Intro"
  54. !if $window != embeded and $module_has_intro=yes and $cmd notwordof intro help
  55. !set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 to $1_
  56. !endif
  57.  
  58. !!********* Link #6 : "References"
  59. !if _ notin $wims_session and adm/ notin $module and home notin $module\
  60.         and $cmd notwordof help ref
  61. !! !set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
  62. !endif
  63.  
  64. !!********* Link #7 : "Help"
  65. !if $module_has_help=yes and $cmd notwordof intro help
  66. !if $module_help=nopopup
  67.   !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_  
  68. !else
  69.   !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  70. !endif
  71. !endif
  72.  
  73. !!********* Link #8 : "Resume"
  74. !if $cmd=help or $cmd=hint
  75. !set 1_=!append line resume,1,cmd=resume to $1_
  76. !endif
  77.  
  78. !!********* Link #9 : "About"
  79. !if $window != embeded \
  80.         and $module_has_about=yes \
  81.         and adm notin $module and tool notin $module and home notin $module \\
  82.         and $cmd notwordof help intro and _exam notin $session
  83.        
  84.                 !!!set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
  85. !endif
  86.  
  87. !!********* Link #10 : "WIMS Help"
  88. !if $module!=home and _exam notin $session and $wims_version_theme=0
  89. !set 1_=!append line whelp,4,module=help/main&$wims_helper,help to $1_
  90. !endif
  91.  
  92. !!********* Link #11 : "Other Languages"
  93. !if $wims_ref_otherlangs=yes and $wims_otherlangs!=$empty
  94. !if $wims_light_module=yes
  95.  !set wims_name_pagebase=!char 1 to -4 of $phtml
  96.  !for i_ in $wims_headmenu_languages
  97.   !set 1_=!append line $i_,0,<a href="wims.cgi?session=$session&+lang=$i_&+useropts=$useropts&+module=$module&+phtml=$wims_name_pagebase.$i_&+parm1=$parm1&+parm2=$parm2&+parm3=$parm3&+parm4=$parm4&+parm5=$parm5"><img src="gifs/$i_.gif" border="1" alt="$i_"></a> to $1_
  98.  !next i_
  99. !else
  100.  !set wims_name_mbase=!char 1 to -4 of $module
  101.  !for i_ in $wims_otherlangs
  102.   !set 1_=!append line $i_,0,<a href="wims.cgi?session=$session&+lang=$i_&+useropts=$useropts&+module=$wims_name_mbase"><img src="gifs/$i_.gif" border=1 alt=$i_></a> to $1_
  103.  !next i_
  104. !endif
  105. !endif
  106.  
  107. !set wims_hm=$1_
  108.  
  109. :defend
  110. !set wims_hm_cnt=!linecnt $wims_hm
  111. !read themes.phtml header
  112. !if $module=home
  113. <div class="wimstrap">
  114. !else
  115. <div class="wimsbody">
  116. !endif
  117.