Subversion Repositories wimsdev

Rev

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

  1. !!************** headmenu.phtml  ****************
  2.  
  3. !! This File creates a set of 1 to 11 links, to put in the head menu of Wims, for anonymous users.
  4.  
  5. !! **********************************************
  6.  
  7. !if robot isin $session or $wims_mode=popup or _check isin $session
  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 name.phtml.$module_language
  18. !default wims_name_bgcolor=$wims_ref_bgcolor
  19. !if $wims_hm!=$empty
  20. !goto defend
  21. !endif
  22.  
  23. !reset 1_
  24.  
  25. !!********* Link #1 : "Close Window" or "Home"
  26. !if _ isin $wims_subsession
  27. !set 1_=!append line back,3,window.close() to $1_
  28. !else
  29. !if $window != embeded
  30.   !set 1_=!append line home,1,session=$wims_session.1 to $1_
  31. !endif
  32. !endif
  33.  
  34. !!********* Link #2 : "Quit"
  35. !if $httpd_HTTP_REFERER!=$empty and $window != embeded
  36. !set 1_=!append line exit,2,$httpd_HTTP_REFERER to $1_
  37. !endif
  38.  
  39. !!********* Link #3 : "Work"
  40. !if $cmd=intro
  41. !set 1_=!append line work,1,module=$module&cmd=new to $1_
  42. !endif
  43.  
  44. !!********* Link #4 : "Sheet"
  45. !if $wims_sheet>0 or P isin $wims_sheet
  46. !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
  47. !endif
  48.  
  49. !!********* Link #5 : "Intro"
  50. !if $window != embeded and $module_has_intro=yes and $cmd notwordof intro help
  51. !set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$wims_intro_parm to $1_
  52. !endif
  53.  
  54. !!********* Link #6 : "References"
  55. !if _ notin $wims_session and adm/ notin $module \
  56.         and $cmd notwordof help ref
  57. !set 1_=!append line ref,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
  58. !endif
  59.  
  60. !!********* Link #7 : "Help"
  61. !if $module_help!=$empty and $module_has_help=yes and $cmd notwordof intro help
  62. !if $module_help=popup
  63.  !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  64. !else
  65.  !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  66. !endif
  67. !endif
  68.  
  69. !!********* Link #8 : "Resume"
  70. !if $cmd=help or $cmd=hint
  71. !set 1_=!append line resume,1,cmd=resume to $1_
  72. !endif
  73.  
  74. !!********* Link #9 : "About"
  75. !if $window != embeded \
  76.         and $module_has_about=yes \
  77.         and adm notin $module \
  78.         and $cmd notwordof help intro
  79.        
  80.                 !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
  81. !endif
  82.  
  83. !!********* Link #10 : "WIMS Help"
  84. !set 1_=!append line whelp,4,module=help/main&$wims_helper,help to $1_
  85.  
  86. !!********* Link #11 : "Other Languages"
  87. !if $wims_ref_otherlangs=yes and $wims_otherlangs!=$empty
  88. !if $wims_light_module=yes
  89.  !set wims_name_pagebase=!char 1 to -4 of $phtml
  90.  !for i_ in $wims_headmenu_languages
  91.   !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_
  92.  !next i_
  93. !else
  94.  !set wims_name_mbase=!char 1 to -4 of $module
  95.  !for i_ in $wims_otherlangs
  96.   !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_
  97.  !next i_
  98. !endif
  99. !endif
  100.  
  101. !set wims_hm=$1_
  102.  
  103. :defend
  104. !set wims_hm_cnt=!linecnt $wims_hm
  105.  
  106. !read themes.phtml header
  107. <div class="wimsbody">
  108.