Subversion Repositories wimsdev

Rev

Rev 10562 | Rev 11279 | 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. !if robot isin $session or $wims_mode=popup or _check isin $session or $module=help/main.$lang
  8.  !exit
  9. !endif
  10.  
  11. !! la variable window=embeded est utilisee dans le cadre d'un appel depuis le lecteur exportable
  12. !! window=embeded is used for embedded players
  13. !if embededwindow isin $module_init_parm
  14.         !set window=embeded
  15. !endif
  16.  
  17. !read language name.phtml
  18. !default wims_name_bgcolor=$wims_ref_bgcolor
  19. !if $wims_hm!=$empty or $wims_lightpopup=yes
  20. !goto defend
  21. !endif
  22. !if $job=print or $printing=yes
  23. !goto defend
  24. !endif
  25. !reset 1_ home_
  26.  
  27. !!********* Link #1 : "Close Window" or "Home"
  28.  
  29. !if _ isin $wims_subsession
  30. !set 1_=!append line back,3,window.close() to $1_
  31. !else
  32. !if $window != embeded and $module!=home
  33.   !set home_=!append line home,1,session=$wims_session.1 to $home_
  34. !endif
  35. !endif
  36.  
  37. !!********* Link #2 : "Quit"
  38. !if $httpd_HTTP_REFERER!=$empty and $window != embeded
  39. !set 1_=!append line exit,2,$httpd_HTTP_REFERER to $1_
  40. !endif
  41.  
  42. !!********* Link #3 : "Work"
  43. !!if $cmd=intro
  44. !! !set 1_=!append line work,1,module=$module&cmd=new to $1_
  45. !!endif
  46.  
  47. !!********* Link #4 : "Sheet"
  48. !if $wims_sheet>0 or P isin $wims_sheet
  49. !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
  50. !endif
  51.  
  52. !!********* Link #5 : "Intro"
  53. !if $window != embeded and $module_has_intro=yes and $cmd notwordof intro help
  54.  !if $wims_theme!=default
  55.    !set wims_ariane=!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 $wims_ariane
  56.    !set wims_ariane_self=no
  57.  !else
  58.    !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_
  59.  !endif
  60. !endif
  61. !!********* Link #6 : "References"
  62. !if _ notin $wims_session and adm/ notin $module and home notin $module\
  63.         and $cmd notwordof help ref
  64. !! !set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
  65. !endif
  66.  
  67. !!********* Link #7 : "Help"
  68. !if $module_has_help=yes and $cmd notwordof intro help
  69. !if $module_help=nopop
  70.   !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  71. !else
  72.   !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  73. !endif
  74. !endif
  75.  
  76. !!********* Link #8 : "Resume"
  77. !if $cmd=help or $cmd=hint
  78. !if _test isin $session
  79.   !set 1_=!append line resume,1,cmd=resume to $1_
  80. !else
  81.    !if _help isin $session
  82.      !set 1_=!append line back2,1,cmd=resume to $1_
  83.    !endif
  84. !endif
  85. !if $module_category!=adm
  86.   !set wims_ariane=!append line resume,1,cmd=resume\
  87. to $wims_ariane
  88. !endif
  89. !endif
  90.  
  91. !!********* Link #9 : "About"
  92. !if $window != embeded \
  93.         and $module_has_about=yes \
  94.         and _tool notin $module and home notin $module \
  95.         and $cmd notwordof help and _exam notin $session\
  96.         and (adm notin $module or $wims_user iswordof supervisor developper or $wims_user=$empty)
  97.                 !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp,,$wims_name_module_infos ($module) to $1_
  98. !endif
  99.  
  100. !!********* Link #10 : "WIMS Help"
  101. !if $module!=home and _exam notin $session and $wims_version_theme=0
  102. !set 1_=!append line whelp,4,module=help/main&$wims_helper,help to $1_
  103. !endif
  104.  
  105. !!********* Link #11 : "Other Languages"
  106. !if $wims_ref_otherlangs=yes and $wims_otherlangs!=$empty
  107. !if $wims_light_module=yes
  108.  !set wims_name_pagebase=!char 1 to -4 of $phtml
  109.  !for i_ in $wims_headmenu_languages
  110.   !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_
  111.  !next i_
  112. !else
  113.  !set wims_name_mbase=!char 1 to -4 of $module
  114.  !for i_ in $wims_otherlangs
  115.   !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_
  116.  !next i_
  117. !endif
  118. !endif
  119.  
  120. !if $wims_user$wims_developer!=$empty and _ notin $session
  121.  !set wims_link_close=!append line visitor,1,cmd=close&module=home\
  122.  to $wims_link_close
  123. !endif
  124.  
  125. !set wims_hm=$1_
  126. !set wims_home_items=$home_
  127. :defend
  128. !set wims_hm_cnt=!linecnt $wims_hm
  129. !set wims_home_items_cnt=!linecnt $wims_home_items
  130. !set wims_link_close_cnt=!linecnt $wims_link_close
  131. !read themes.phtml header
  132. !if $module=home
  133.  <div class="wimstrap">
  134. !else
  135.  
  136.  <div class="wimsbody">
  137. !endif
  138. <!-- END of headmenu -->
  139.