Subversion Repositories wimsdev

Rev

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

  1. !!************** homeref.phtml  ****************
  2.  
  3. !! This File creates 2 sets of links, to put in the tail menu of Wims.
  4. !! 1st set contains up to 6 links
  5. !! 2nd set contains informations about author(s), and mail links to them.
  6.  
  7. !! **********************************************
  8.  
  9.  
  10. !if robot isin $session or _check isin $session
  11.  !if robot isin $session and wims.unice.fr notin $httpd_SERVER_NAME\
  12.         and $cmd iswordof new intro
  13.   !set wims_c1=!char 1 of $module
  14.   !if $wims_c1 isin ABCDEFGHIJKLMNOPQRSTUVWXYZ or ../tool isin ../$module
  15.    !set wims_md=!translate . to , in $module
  16.    !set wims_md=!item -1 of $wims_md
  17.    !set wims_mdcnt=!charcnt $wims_md
  18.    !if $wims_mdcnt=2
  19.     !set wims_ff=!translate / to ~ in $module
  20.     <small><a href="http://wims.unice.fr/wims/$(wims_md)_$wims_ff.html">The most recent version</a></small><br>
  21.    !endif
  22.   !endif
  23.  !endif
  24.  !changeto robotref.phtml
  25. !endif
  26.  
  27. !if $wims_mode=popup
  28.  </div>
  29.  <div class="wimstail">
  30.         <hr>
  31.         <table border="0" width="100%">
  32.                 <tr><td align="left">
  33.                 <small>
  34.                  <a target="wims" href="http://$httpd_HTTP_HOST$httpd_SCRIPT_NAME">WIMS @ $httpd_HTTP_HOST</a>
  35.                 </small>
  36.                 </td></tr>
  37.         </table>
  38.  </div>
  39.  !exit
  40. !endif
  41.  
  42. !if _test isin $session and $wims_hacked_variables!=$empty
  43.  <p><b>WIMS WARNING</b>. The following variables of your module could be hacked
  44.  by students using manually modified http addresses! You might want to put more
  45.  strict permissions to them in var.def, in order to build a secure exercise module.</p>
  46.  <tt><b>$wims_hacked_variables</b></tt>
  47.  <br>
  48. !endif
  49.  
  50. !read name.phtml.$module_language
  51. !default wims_homeref_bgcolor=$wims_ref_bgcolor
  52.  
  53. !if $wims_rm_1=no
  54.  !reset wims_rm_1
  55.  !goto local
  56. !endif
  57. !if $wims_rm_1!=$empty
  58.  !goto rm2
  59. !endif
  60.  
  61. !reset 1_
  62.  
  63. !!********* Link #1 : "Close Window" or "Home" (Not Shown if Embedded)
  64. !if _ isin $wims_subsession
  65.  !set 1_=!append line back,3,window.close() to $1_
  66. !else
  67.  !if $window != embeded
  68.   !set 1_=!append line home,1,session=$wims_session.1 to $1_
  69.  !endif
  70. !endif
  71.  
  72. !!********* Link #2 : "Sheet"
  73. !if $wims_sheet>0 or P isin $wims_sheet
  74.  !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
  75. !endif
  76.  
  77. !!********* Link #3 : "Resume"
  78. !if $cmd=help or $cmd=hint
  79.  !set 1_=!append line resume,1,cmd=resume to $1_
  80. !endif
  81.  
  82. !!********* Link #4 : "Introduction" (Not Shown if Embedded)
  83. !if $window != embeded and $module_has_intro=yes and $cmd notwordof intro help
  84.  !set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3 to $1_
  85. !endif
  86.  
  87. !if _ notin $wims_session and adm/ notin $module and home notin $module\
  88.         and $cmd notwordof help ref
  89.  !set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
  90. !endif
  91.  
  92. !!********* Link #5 : "Help"
  93. !if $module_help!=$empty and $module_has_help=yes and $cmd notwordof intro help
  94.  !if $module_help=popup
  95.   !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  96.  !else
  97.   !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  98.  !endif
  99. !endif
  100.  
  101. !!********* Link #6 : "About"
  102. !if $module_has_about=yes and $cmd notwordof help intro
  103.  !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
  104. !endif
  105.  
  106. !set wims_rm_1=$1_
  107. :local
  108. !reset 1_
  109. !set 1_=!append line $wims_menu_items to $1_
  110. !set wims_rm_0=$1_
  111. !set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
  112. :rm2
  113. !if $wims_rm_2!=$empty
  114.  !goto rmend
  115. !endif
  116. !reset 2_
  117.  
  118. !!********* Link #8 : "Author(s)"
  119. !if $module_author!=$empty and @ isin $module_address
  120.  !set wims_homeref_author_num=!itemcnt $module_author
  121.  !if $wims_homeref_author_num>1
  122.   !set 3_=$wims_name_authors:
  123.  !else
  124.   !set 3_=$wims_name_author:
  125.  !endif
  126.  !set 4_=!mailurl $module_address $module_author\
  127. WIMS $module_title [$module_language]
  128.  !set 2_=!append line author,0,$3_ $4_ to $2_
  129. !endif
  130.  
  131. !!********* Link #9 : "Translator(s)"
  132. !set mod_transl=$(module_translator_$lang)
  133. !if $module_transl!=$empty
  134.    !set module_translator=$mod_transl
  135.    !set module_translator_address=$(module_translator_address_$lang)
  136. !endif
  137.  
  138. !if $module_translator!=$empty and $module_translator_address!=$empty
  139.  !set 3_=!mailurl $module_translator_address $module_translator\
  140. WIMS $module_title [$module_language]
  141.  !set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_
  142. !endif
  143.  
  144. !!********* Link #10 : "Version & Copyright"
  145. !if $module_version$module_copyright!=$empty
  146.  !set 2_=!append line vesion,0,Version $module_version, $module_copyright to $2_
  147. !endif
  148.  
  149. !!********* Link #11 : "Modify"
  150. !if $wims_developer!=$empty and COPYING isin $module_copyright
  151.  !set V_=!char 1 of $module
  152.  !set M_=!translate internal / to , in $module
  153.  !set M_=!item 1 of $M_
  154.  !if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $M_ iswordof local contrib tool
  155.   !set  wims_rm_0=!append line modify,1,module=adm/modtool&original=$module to $wims_rm_0
  156.  !endif
  157. !endif
  158.  
  159. !!********* Link #12 : "Server Time"
  160. !if $wims_ismanager>=2
  161.  !set 2_=!append line time,0,Server time: $wims_now to $2_
  162. !endif
  163.  
  164. !set wims_rm_2=$2_
  165.  
  166. :rmend
  167. !set wims_homeref_n1=!linecnt $wims_rm_1
  168. !set wims_homeref_n2=!linecnt $wims_rm_2
  169. !set wims_homeref_n0=!linecnt $wims_rm_0
  170. !set wims_homeref_n3=!linecnt $wims_rm_3
  171. </div>
  172.  
  173. !read themes.phtml tail
  174. !robottrap
  175.  
  176.