Subversion Repositories wimsdev

Rev

Rev 15324 | Blame | Compare with Previous | Last modification | View Log | RSS feed

!read adm/language lang/names.phtml
!set swlist=coq, gap, graphviz, m2, maxima, octave, pari, povray, geogebra, jsxgraph
!set swname=COQ, Gap, Graphviz, Macaulay 2, Maxima, Octave, PARI/GP, Povray, GeoGebra, Jsxgraph
!set year=!char 1 to 4 of $wims_now

!readdef wimshome/log/wims.conf
!default mu_publish_site=!defof DF_mu_publish_site in wimshome/public_html/bases/sys/defaults.conf

!! when the selection of the site is done by the developpers
publish_site=$submitpublish_site
!default publish_site=$mu_publish_site

publishsitesname=$empty
zonelist=$empty
levellist=$empty
!for name in $mu_publish_site
  tmp=!defof publishname in wimshome/public_html/bases/sys/publishcenter/$name
  tmp=!replace internal , by , in $tmp
  publishcentersname=!append item $tmp to $publishcentersname
  tmp=!defof zonepublish,levellist in wimshome/public_html/bases/sys/publishcenter/$name
  zonepublishs=!append item $tmp to $zonepublishs
  tmp=!defof zonelist,levellist in wimshome/public_html/bases/sys/publishcenter/$name
  zonelist=!append item $tmp to $zonelist
  tmp=!defof levellist in wimshome/public_html/bases/sys/publishcenter/$name
  levellist=!append item $tmp to $levellist
!next name
zonelist=!listuniq $zonelist
zonelist=!listuniq $zonelist
zonepublishs=!listuniq $zonepublishs
levellist=!listuniq $levellist
!! read the specification of $publish_site
!if $submitpublish_site!=$empty
  !read wimshome/public_html/bases/sys/publishcenter/$submitpublish_site
  zonepublishs=$zonepublish
!endif
wims_nw=job mod existing serial_number auth_login auth_passwd \
  original2 originalheader empty devdir fname target
wims_nr=wims_sesrandom

#############################################################
jobs=modname create flist index edfile showfile delfile delconfirm\
  backup restore copy move del publish prop diff binfile changefile changeconfirm
maxlist=100
sellist=10
alnum=0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
searchsymbol=.*+-_~\[]|()<>
searchchars=$alnum$searchsymbol
langlist=!words2items $wims_site_languages
!read lang/langname.$modu_lang
deflist=title, description, language, category, domain, \
  level, keywords, require, scoring, copyright,\
  author, address, version, wims_version, vardef, \
  translator, translator_address, data, maintainer, maintainer_address,\
  deprecated

wims_form_method=post
!read tabletheme

!if $cmd=help or robot isin $session
  !exit
!endif

jobreq=!word 1 of $jobreq
!if $jobreq!=$empty and $jobreq iswordof $jobs
  job=$jobreq
!endif
jobreq=

!if $wims_class!=$empty
  !read adm/class/userdef classes,$wims_class,$wims_user
!endif
!if $wims_developer=$empty and $wims_class!=$empty and $wims_user!=$empty
  !if $wims_user=supervisor
    !if $wims_sup_secure>=0
      wims_developer=!getdef wims_developer in $userdef
    !endif
  !else
    wims_developer=!getdef wims_developer in $userdef
  !endif
  !distribute item $wims_developer into wims_developer,devpass
  !if $devpass=$empty
    !reset wims_developer
  !endif
!endif

!if $wims_ismanager>=2 and $change=yes
  wims_developer=
!endif

!if $wims_developer!=$empty and $auth_login=$empty
  n=!recordcnt wimshome/log/.developers
  !for i=1 to $n
    r=!record $i of wimshome/log/.developers
    !distribute lines $r into ll,pp,nn,ee
    !if $ll=$wims_developer
      pp=!passcrypt $pp
      !! devpass is in the class file 'supervisor', it is crypten
      !! pp come from .developpers, in the future will be crypten
      !if $devpass!=$empty
        pass_check=!passcheck $devpass and $pp
      !endif
      !!?? $devpass=$empty ??
      !if ($devpass=$empty or $pass_check=yes or $devpass=$pp)
        auth_login=$ll
        auth_passwd=$pp
        auth_name=$nn
        auth_email=$ee
        login=$wims_developer
        sesdir=!translate internal _ to $ $ in $wims_sesdir
        sesdir=!word 1 of $sesdir
        !setdef wims_developer=$login in wimshome/$sesdir/var.stat
        !if $original!=$empty and $job=$empty
          job=copy
        !endif
        !if $wims_developer!=$empty and $modreq!=$empty
          !default job=flist
        !endif
        !default job=modname
        !break
      !endif
    !endif
  !next i
  !if $auth_login=$empty
    wims_developer=
    job=auth
  !endif
!endif
!default job=auth

!if $auth_login=$empty and $wims_ismanager<2
  job=auth
!endif
!if $auth_login!=$empty
  devdir=modules/devel/$auth_login
!endif

!read scripts/getindex.proc $modreq
!default i_translation_language=$translation_language

deflist1=translation_language
trans_lang=!words2items $i_translation_language
i_translation_language=!listintersect $trans_lang and $langlist
i_translation_language=!listcomplement $i_language in $i_translation_language
!for l in $(i_translation_language)
  deflist1=!append item title_$l to $deflist1
  deflist1=!append item description_$l to $deflist1
  deflist1=!append item keywords_$l to $deflist1
  deflist1=!append item translator_$l to $deflist1
  deflist1=!append item translator_address_$l to $deflist1
!next

!read $job.proc

!if $(name_$job)!=$empty
  !!module_title=$module_title - $(name_$job)
  wims_title_title=$(name_$job)
!endif

!if ~ isin $mod
  m=!translate internal ~ to , in $mod
  m1=!item 1 of $m
  !reset pubtit
  !if $m1!=test and $m1 isitemof $zonelist
    m=!translate internal ~ to / in $mod
    pubtit=!module title $m
    pubversion=!module version $m
  !endif
!endif

!reset validate_out
!if $validator_address!=$empty and $validation_ask!=$empty
  !read adm/validation/validate.proc
!endif

!if $job iswordof showfile edfile binfile index publish diff backup move copy changefile changeconfirm
  !set wims_ariane=!append line modcontent,1,cmd=reply&jobreq=flist\
to $wims_ariane
!endif
!if $job iswordof move copy
  !set wims_ariane=!append line "$name_index",1,cmd=reply&jobreq=index\
to $wims_ariane
!endif