Subversion Repositories wimsdev

Rev

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

  1. !if $wims_read_parm=$empty
  2.  !exit
  3. !endif
  4. !if $wims_read_parm=help
  5.   !read help/$lang/special/imagefill.phtml
  6.   !exit
  7. !endif
  8.  
  9. !set parm=!replace internal $   $, by , in $wims_read_parm
  10. !set parm=!replace internal $   $ by $ ; $ in $parm
  11. !set parm1=!row 1 of $parm
  12.  
  13. !distribute items $parm1 into imgurl,bigsize,smallsize
  14.  
  15. !set bigsize=!translate x, to $  $ in $bigsize
  16.  
  17. !distribute words $bigsize into bigsizex,bigsizey
  18. !set ssize=!translate x, to $  $ in $smallsize
  19. !distribute words $ssize into ssizex,ssizey
  20. !set parm2=!row 2 to -1 of $parm
  21. !set parm2=!nonempty rows $parm2
  22. !set icnt=!rowcnt $parm2
  23.  
  24. !if $printing=yes or $cmd=hint
  25.  <img src="$imgurl" alt="$imgurl" style="width:$(bigsizex)px;height:$(bigsizey)px;vertical-align:text-top" />
  26.  !exit
  27. !endif
  28.  
  29. !set fill_reposition=yes
  30. !reset flist hlist
  31. !default fillcnt=0
  32. !set oldfillcnt=$[$fillcnt+1]
  33. !for t=1 to $icnt
  34.  !set l=!row $t of $parm2
  35.  !set l=!translate x to , in $l
  36.  !distribute item $l into n_,x_,y_,sizei
  37.  !default sizei=1
  38.  !set n_=!text select 0123456789()+-*/ in $n_
  39.  !set n_=$[$n_]
  40.  !bound n_ between integer 1 and 100 default $
  41.  !if $n_!=$empty and r$n_ notitemof $embedded and\
  42.     $(replytype$n_) iswordof clickfill dragfill
  43.   !default wims_fill_type=$(replytype$n_)
  44.   !set embedded=!append item r$n_ to $embedded
  45.   !set flist=!append item $n_ to $flist
  46.   !set i=$n_
  47.   !set inputsize=$smallsize $sizei
  48.   !read anstype/fill.inc noshow
  49.   !set hlist=$hlist<input type="hidden" name="reply$n_" value="" />
  50.   !set fill_namelist=!append item $oldfillcnt to $fill_namelist
  51.   !increase fillcnt
  52.   !set serial_$fillcnt=$i
  53.   !set reposition_$fillcnt=$x_,$y_
  54.  !endif
  55. !next t
  56.  
  57. <a id="fill$oldfillcnt"><img src="gifs/transparent.gif" alt="transparent"
  58. style="width:$(bigsizex)px; height:$(bigsizey)px;vertical-align:text-top" /></a>
  59. !set thisjs=var f_bigimage$oldfillcnt=new DynLayer();\
  60. f_bigimage$oldfillcnt.setAnchor({topA:'fill$oldfillcnt',leftA:'fill$oldfillcnt',\
  61. stretchH:$bigsizex,stretchV:$bigsizey});\
  62. dynapi.document.addChild(f_bigimage$oldfillcnt);\
  63. f_bigimage$oldfillcnt.setHTML('<img src="$imgurl" style="width:$(bigsizex)px; height:$(bigsizey)px" alt="" />');
  64. !if $q_form=yes
  65.  $hlist
  66.  !set fillafter_js=$fillafter_js\
  67. $thisjs
  68. !else
  69.  !distribute item 40C040,FF4040 into colorr_good,colorr_bad
  70.  !set colorr_ana=C8C8E0
  71.  !distribute item 20,15 into Sx,Sy
  72.  !set cc1='<table border="0" cellpadding="0" cellspacing="0" style="width:$(ssizex)px;height:$(ssizey)px"><tr><td align="center">'
  73.  !set cc2='<\/td><\/tr><\/table>'
  74.  !set wims_ins_alt=none
  75.  !read js/dynapi3.phtml
  76.  <script type="text/javascript">
  77.  /*<![CDATA[*/
  78.  dynapi.onLoad(function() {
  79.   $thisjs
  80.  !for c=$oldfillcnt to $fillcnt
  81.   !set i=$(serial_$c)
  82.   !set embcnt=!positionof item r$i in $embedded
  83.   !default reply_$i=$(reply$i)
  84.   !set p_=$(reply_$i)
  85.   !set tt=!word 1 of $(replygood$i)
  86.   !if $tt!=?analyze
  87.     !set cl=$(colorr_$(diareply$i))
  88.   !else
  89.     !set cl=$colorr_ana
  90.     !set embedded_analyze=!append item $i to $embedded_analyze
  91. !!    !set embedded_bracket=$embedded_bracket [$embcnt]
  92.   !endif
  93.   !set replyname$i=[$embcnt]
  94.   !distribute item $(reposition_$c) into rx,ry
  95.   var f_l$c=new DynLayer();
  96.   var f_t$c=new DynLayer();
  97.   f_l$c.setAnchor({topA:'fill$oldfillcnt',leftA:'fill$oldfillcnt',
  98.     left:$rx,top:$ry,stretchH:$sizei*$ssizex,stretchV:$ssizey});
  99.   dynapi.document.addChild(f_l$c);
  100.   f_l$c.setBgColor('#$cl');
  101.   !set ss=!replace internal " by \" in $(reply$i)
  102.  !set ss=!replace internal , by &nbsp; in $(reply$i)
  103.  !set ss=!replace internal ' by \' in $ss
  104.  f_l$c.setHTML($cc1+'$ss'+$cc2);
  105.  !if $tt!=?analyze
  106.   f_t$c.setAnchor({topA:'fill$oldfillcnt',leftA:'fill$oldfillcnt',
  107.    left:$rx+$ssizex-4,top:$ry,stretchH:$Sx,stretchV:$Sy});
  108.   dynapi.document.addChild(f_t$c);
  109.   f_t$c.setHTML('<small>[$embcnt]<\/small>');
  110.   f_t$c.setZIndex(100);
  111.  !endif
  112. !next c
  113. });
  114. /*]]>*/
  115. </script>
  116. !endif
  117.