Subversion Repositories wimsdev

Rev

Rev 10285 | Rev 11469 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
973 obado 1
!!************** homeref.phtml  ****************
10792 bpr 2
!! This File creates 2 sets of links, to put in the left menu or tail menu of Wims.
973 obado 3
!! 1st set contains up to 6 links
4
!! 2nd set contains informations about author(s), and mail links to them.
5648 obado 5
!! **********************************************
6
<!-- begin of html/homeref.phtml -->
973 obado 7
 
5648 obado 8
!if yes isin $wims_lightpopup
2976 bpr 9
 !if $wims_lightpopup_option=$empty
10252 bpr 10
  !set 1_=!append line itemsep,0, $wims_name_devwims to $1_
11
  !set 1_=!append line itemsep,0, $wims_name_Author: $module_author to $1_
5648 obado 12
  !set wims_rm_2=$1_
2995 bpr 13
  !goto rmend
2976 bpr 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
2761 bpr 18
  !set wims_rm_1=$1_
19
  !goto rmend
2976 bpr 20
 !endif
2727 guerimand 21
!endif
973 obado 22
 
16 reyssat 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
5648 obado 33
    <small><a href="http://wims.unice.fr/wims/$(wims_md)_$wims_ff.html">The most recent version</a></small><br/>
16 reyssat 34
   !endif
35
  !endif
36
 !endif
37
 !changeto robotref.phtml
38
!endif
39
 
40
!if $wims_mode=popup
973 obado 41
 <div class="wimstail">
5755 bpr 42
        <hr/>
973 obado 43
        <table border="0" width="100%">
44
                <tr><td align="left">
45
                <small>
1111 bpr 46
                 <a target="wims" href="http://$httpd_HTTP_HOST$httpd_SCRIPT_NAME">WIMS @ $httpd_HTTP_HOST</a>
973 obado 47
                </small>
48
                </td></tr>
49
        </table>
50
 </div>
16 reyssat 51
 !exit
52
!endif
53
 
54
!if _test isin $session and $wims_hacked_variables!=$empty
5843 bpr 55
 <p><span class="wims_warning">WIMS WARNING</span>. The following variables of your module could be hacked
16 reyssat 56
 by students using manually modified http addresses! You might want to put more
4318 bpr 57
 strict permissions to them in var.def, in order to build a secure exercise module.
5843 bpr 58
 </p>
4318 bpr 59
 <pre>$wims_hacked_variables</pre>
16 reyssat 60
!endif
61
 
62
!read name.phtml.$module_language
9309 bpr 63
!read themes/$wims_theme/lang/name.phtml.$lang
16 reyssat 64
!default wims_homeref_bgcolor=$wims_ref_bgcolor
973 obado 65
 
1193 bpr 66
!if $wims_rm_1=no
67
 !reset wims_rm_1
68
 !goto local
69
!endif
16 reyssat 70
!if $wims_rm_1!=$empty
71
 !goto rm2
72
!endif
73
!reset 1_
973 obado 74
 
75
!!********* Link #1 : "Close Window" or "Home" (Not Shown if Embedded)
16 reyssat 76
!if _ isin $wims_subsession
2373 bpr 77
 !set 1_=!append line back,3,window.close() to $1_
16 reyssat 78
!else
973 obado 79
 !if $window != embeded
9800 bpr 80
  !!set 1_=!append line home,1,session=$wims_session.1 to $1_
973 obado 81
 !endif
16 reyssat 82
!endif
973 obado 83
 
84
!!********* Link #2 : "Sheet"
16 reyssat 85
!if $wims_sheet>0 or P isin $wims_sheet
2865 guerimand 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
16 reyssat 99
!endif
973 obado 100
 
10792 bpr 101
!if ($wims_user=$empty or $wims_developer!=$empty or $wims_user=supervisor)\
102
  and $exoprev$exonext != $empty and $wims_sheet=$empty
103
   !set wims_menu_items=!append line itemsep,0\
104
prev,1,cmd=new&module=$module&exo=$exoprev&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 \
105
     to $wims_menu_items
106
   !set wims_menu_items=!append line next,1,cmd=new&module=$module&exo=$exonext&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 \
107
to $wims_menu_items
108
  !reset exoprev exonext
109
!endif
110
 
973 obado 111
!!********* Link #3 : "Resume"
16 reyssat 112
!if $cmd=help or $cmd=hint
113
 !set 1_=!append line resume,1,cmd=resume to $1_
114
!endif
973 obado 115
 
116
!!********* Link #4 : "Introduction" (Not Shown if Embedded)
117
!if $window != embeded and $module_has_intro=yes and $cmd notwordof intro help
1970 guerimand 118
 !set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3 to $1_
16 reyssat 119
!endif
973 obado 120
 
2233 bpr 121
!if _ notin $wims_session and adm/ notin $module and home notin $module\
122
        and $cmd notwordof help ref
7351 bpr 123
 !!!set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
2233 bpr 124
!endif
125
 
973 obado 126
!!********* Link #5 : "Help"
127
!if $module_help!=$empty and $module_has_help=yes and $cmd notwordof intro help
128
 !if $module_help=popup
16 reyssat 129
  !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
130
 !else
131
  !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
132
 !endif
133
!endif
973 obado 134
 
135
!!********* Link #6 : "About"
9762 bpr 136
!if $module_has_about=yes and $cmd notwordof help
9800 bpr 137
  !!set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
16 reyssat 138
!endif
973 obado 139
 
1222 bpr 140
!set wims_rm_1=$1_
1193 bpr 141
:local
1222 bpr 142
!reset 1_
10285 bpr 143
!if $wims_menu_items!=$empty
144
  !set 1_=!append line itemsep,0,\
9706 bpr 145
$wims_menu_items to $1_
10285 bpr 146
!endif
1222 bpr 147
!set wims_rm_0=$1_
6270 bpr 148
!!wims_menu_tabs not used - to delete
1407 bpr 149
!set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
16 reyssat 150
:rm2
151
!if $wims_rm_2!=$empty
152
 !goto rmend
153
!endif
154
!reset 2_
973 obado 155
 
156
!!********* Link #8 : "Author(s)"
4318 bpr 157
 
8002 bpr 158
!if $module_author!=$empty and (@ isin $module_address or $module_address=$empty)
4318 bpr 159
 !read namewriting.phtml $module_author
4922 bpr 160
 !set module_address=!replace internal ; by , in $module_address
4318 bpr 161
 !set wims_homeref_author_num=$script_cnt
16 reyssat 162
 !if $wims_homeref_author_num>1
163
  !set 3_=$wims_name_authors:
164
 !else
7808 bpr 165
  !set 3_=$wims_name_author:
16 reyssat 166
 !endif
4346 bpr 167
 !set 4_=
168
 !for ad=1 to $wims_homeref_author_num
8002 bpr 169
   !set adreplace=$(module_address[$ad])
170
   !if $adreplace=$empty
171
      !set adreplace=$module_maintainer_address
172
   !endif
173
   !if $adreplace!= and @ isin $adreplace
174
!!!#### xiao treatment - should disappear when modules are republished
175
     !if xiao isin $adreplace
176
       !set adreplace=qualite@wimsedu.info
177
     !endif
178
!!!####
179
     !set 4__=!mailurl $adreplace $(script_out[$ad])\
4346 bpr 180
WIMS $module_title [$module_language]
181
   !else
182
     !set 4__=$(script_out[$ad])
7808 bpr 183
   !endif
4346 bpr 184
    !set 4_=!append item $4__ to $4_
7808 bpr 185
  !next
4346 bpr 186
  !set 2_=!append line author,0,$3_ $4_ to $2_
16 reyssat 187
!endif
973 obado 188
 
189
!!********* Link #9 : "Translator(s)"
2233 bpr 190
!set mod_transl=$(module_translator_$lang)
191
!if $module_transl!=$empty
192
   !set module_translator=$mod_transl
193
   !set module_translator_address=$(module_translator_address_$lang)
194
!endif
195
 
16 reyssat 196
!if $module_translator!=$empty and $module_translator_address!=$empty
4346 bpr 197
 !read namewriting.phtml $module_translator
4922 bpr 198
 !set module_translator_address=!replace internal ; by , in $module_translator_address
4346 bpr 199
 !set module_translator=$(script_out[1])
4922 bpr 200
 !set wims_homeref_translator_num=$script_cnt
201
 !for ad=1 to $wims_homeref_translator_num
202
   !set 3_=!mailurl $(module_translator_address[$ad]) $(module_translator[$ad])\
16 reyssat 203
WIMS $module_title [$module_language]
4922 bpr 204
   !set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_
205
 !next
16 reyssat 206
!endif
973 obado 207
 
208
!!********* Link #10 : "Version & Copyright"
16 reyssat 209
!if $module_version$module_copyright!=$empty
2561 bpr 210
 !set 2_=!append line version,0,$wims_name_Version $module_version, $module_copyright to $2_
16 reyssat 211
!endif
973 obado 212
 
213
!!********* Link #11 : "Modify"
16 reyssat 214
!if $wims_developer!=$empty and COPYING isin $module_copyright
215
 !set V_=!char 1 of $module
216
 !set M_=!translate internal / to , in $module
217
 !set M_=!item 1 of $M_
218
 !if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $M_ iswordof local contrib tool
1236 bpr 219
  !set  wims_rm_0=!append line modify,1,module=adm/modtool&original=$module to $wims_rm_0
16 reyssat 220
 !endif
221
!endif
973 obado 222
 
223
!!********* Link #12 : "Server Time"
16 reyssat 224
!if $wims_ismanager>=2
2561 bpr 225
 !set 2_=!append line time,0,$wims_name_server_time: $wims_now to $2_
16 reyssat 226
!endif
227
 
228
!set wims_rm_2=$2_
973 obado 229
 
16 reyssat 230
:rmend
9706 bpr 231
!set wims_homeref_n0=!linecnt $wims_rm_0
16 reyssat 232
!set wims_homeref_n1=!linecnt $wims_rm_1
233
!set wims_homeref_n2=!linecnt $wims_rm_2
6270 bpr 234
!!!set wims_homeref_n3=!linecnt $wims_rm_3
16 reyssat 235
 
5648 obado 236
<!-- END of html/homeref.phtml -->
16 reyssat 237
!read themes.phtml tail
238
!robottrap