Subversion Repositories wimsdev

Rev

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

  1.  
  2. !distribute items $sw,$sw into sw_1,sw_2
  3.  
  4. !if $sw=pari
  5.   !set sw_1=gp
  6. !endif
  7. !if $sw iswordof draw
  8.   !set sw_1=flydraw
  9.   !set sw_2=flydraw
  10. !endif
  11. !if $sw iswordof tikz
  12.   !set sw_1=tikz
  13.   !set sw_2=tikz
  14. !endif
  15. !if $sw=insmath
  16.   !set sw_1=latex
  17.   !set sw_2=latex
  18. !endif
  19. !if $sw=jsxgraph
  20.   !set sw_1=js
  21. !endif
  22.  
  23. !! a modifier quand il y aura d'autres styles
  24. !default sw_1=flydraw
  25.  
  26. !if $sw=jsxgraph
  27.  !read js/jsxgraph.phtml
  28. !endif
  29.  
  30. !if $(module_title_$modu_lang)!=
  31.  !set module_title=$(module_title_$modu_lang)
  32. !endif
  33. !header
  34. !if $compute=yes
  35.  !if $swout=$empty
  36.    <span class="wims_warning">$SW</span> $name_non_execute.
  37.  !else
  38.    <h2 class="center">$SW</h2>
  39.    !if $sw=draw
  40.      <img src="$swout" alt="">
  41.      !goto after
  42.    !endif
  43.    !if $sw=povray
  44.      <img src="$swout" alt="">
  45.      !goto after
  46.    !endif
  47.    !if $sw=graphviz
  48.      !set swout=!line 1 of $swout
  49.      <img src="$swout" alt="">
  50.      !goto after
  51.    !endif
  52.    !if $sw=graphvizsvg
  53.      $swout
  54.      !goto after
  55.    !endif
  56.    !if $sw=jsxgraph
  57.      <div id="jsxbox" class="box" style="width:400px; height:400px;text-align:center;"></div>
  58.      <script>$swout</script>
  59.      !goto after
  60.    !endif
  61.    !if $sw=insmath
  62.      MathML: $swout
  63.      Image:
  64.      !instex $src1
  65.      !goto after
  66.    !endif
  67.    !if $sw=canvasdraw
  68.      $swout
  69.      !read script_canvasdraw
  70.      !goto after
  71.    !endif
  72.    !if $sw=jmol
  73.      !set swout1=!lines2rows $swout
  74.      !readproc slib/chemistry/jmolshow $swout1,200,200,white,,
  75.      $slib_out
  76.      !goto after
  77.    !endif
  78.    !if $sw=jsme
  79.      !set swout1=!lines2rows $swout
  80.      !readproc slib/chemistry/chemshow $swout1,200,200,white,,
  81.      $slib_out
  82.      !goto after
  83.    !endif
  84.    !if $sw=reactiondraw
  85.      !readproc slib/chemistry/reactiondraw $swout,html
  86.      $slib_out
  87.      !goto after
  88.    !endif
  89.    !if $sw=tikz
  90.      <pre>$swout</pre>
  91.      !goto after
  92.    !endif
  93. !!! no space at the beginning of the line
  94.    <pre style="font-weight:bold;font-family:Courier New,Courier,mono;overflow:auto;color:blue;">
  95. $swout
  96.    </pre>
  97.  !endif
  98. !else
  99.  !read lang/intro.phtml.$modu_lang
  100. !endif
  101.  
  102. :after
  103. !if $msg!=$empty
  104.  <hr>
  105.  $name_msg <em>$SW</em> :
  106.  <pre style="color:red;font-size:80%">
  107.  $msg
  108.  </pre>
  109. !endif
  110.  
  111. !form reply
  112. !default sw=sh
  113. <div class="field">
  114.  !set wims_formselect_switch=onchange='submit()'
  115.  <label for="sw">$name_execute_by</label>
  116.  !formselect sw list $swlist prompt $swname
  117.  !set wims_formselect_switch=
  118. $ :
  119. $ $
  120.  <input type="submit" value="$name_execute">
  121.  
  122.  !set wims_ref_class=wims_secondary_button wims_button
  123.  !href cmd=renew $name_empty
  124. $ $
  125.  !set wims_ref_class=wims_button_help
  126.  !href cmd=help&special_parm=$sw_2 $wims_name_help
  127. $ $
  128.  !set src=!reinput $src
  129.  !set src=!replace internal &amp;#36; by &#36; in $src
  130.  !set src=!replace internal &amp; by & in $src
  131. </div>
  132.  
  133. <div class="field">
  134.  <label for="wims_deposit">$name_code_to_execute</label><br>
  135.  <textarea id="wims_deposit" wrap="off" name="src" cols="80" rows="15">
  136. $src
  137. </textarea>
  138. $(name_remark_$sw)
  139. </div>
  140.  
  141. !formend
  142.  
  143. !tail
  144.  
  145. !reset src sw
  146.