Subversion Repositories wimsdev

Rev

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

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