Subversion Repositories wimsdev

Rev

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