Diff for /parser3/src/www/htdocs/Attic/index.html between versions 1.89 and 1.342

version 1.89, 2001/04/03 06:23:09 version 1.342, 2001/09/30 14:39:48
Line 1 Line 1
 @auto[]  @auto[]
 !!$html-typo[^table:set{user    html    comment  $CHARSETS[
 <<      &laquo^;        длинные user вперёд      $.windows-125o[^table::load[windows-1251.cfg]]
 >>      &raquo^;  ]
 \n\n    <p>     !эти есть в таблице по умолчанию  
 \n      <br>    !но т.к. заменяем, надо повторить.  
 <       &lt^;   !можно этим воспользоваться,  
 >       &gt^;   !и что-то сделать ДО обычных замен  
 "       &quot^; !например из << и >>  
 &       &amp^;  !сделать ёлочки-кавычки.  
 _       &nbsp^;  
 ^#AB    &laquo^;        windows коды ёлочек  
 ^#BB    &raquo^;        windows коды ёлочек  
 (c)     &copy^;  
 ^#A9    &copy^; windows (c)  
 }]  
   
 @dump[t]  
 ^t.menu{$n<BR>}  
 <HR>  
 @func[n]  
 $n  
 @twop[a;b]  
 ($a,$b)  
   
 @main[]  @main[]
 $dest[^table:set[nameless]{  $response:content-type[$.value[text/html] $.charset[windows-125o]]
 $form:d11       d12     d13  #^regexp[]<hr>
 d21     d22     d23  #^mail[]
 }]  #^exec[]
 $src[^table:set{a       b       c       d  #^fori[]
   #^connect[mysql://hren]{^void:sql{nothing}}
   ^xslt[]
   OK
   
   @regexp[]
   $s[abcАБВ]
   ^if(^s.match[б][i]){y}{n}
   
   @mail[]
   #$ORIGINS(1)
   ^mail:send[
           $.from[paf@design.ru]
           $.to[paf@design.ru]
           $.body[1
           
           2
           
           
                   3]
   ]
   
 s1      s2      s3      s4  @exec[]
 }]  $a[^file::exec[fc.exe;a;b]]
 1:<BR>^dest.menu{$0!$1!$2!$3!<BR>}  $a.status|$a.stderr<hr>
 ^dest.join[$src]  
 2:<BR>^dest.menu{$0!$1!$2!$3!<BR>}  @fori[][i]
   ^for[i](1;3){... =$i= ...}
 <HR>  
 $dest[^table:set{a      b       c  @xslt[]
 d11     d12     d13  $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-125o"?>
 d21     d22     d23  <!DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd">
 }]  
 $src[^table:set{a       b       c       d  <people>
 s1      s2      s3      s4          <man id="1">
 }]                  <name>P&#171^;AF</name>
 ^dest.join[$src]          </man>
 ^dest.menu{$a!$b!$c!<BR>}          <man id="2">
                   <name>ПИФ</name>
           </man>
   </people>
   }]
   
   ^show-xdoc2[$xdoc]<hr>
   #^show-xnode1[$xdoc]<hr>
   $people[^xdoc.select[*/man]]
   #^show1[]
   ^show-xnodes1[$people]<hr>
   #^people.0.owner.hren[]
   
 <HR>  ^show-xnode1[^xdoc.select-single[*/man[2]/name];0;1]<hr>
 ^^random:generate(10)=^random:generate(10)<BR>  
   
   by id:
   ^show-xnode1[^xdoc.getElementById[1];0;1]
   <hr>
   
 <HR>  @show1[array]
 $t[^table:load[/test.cfg]]  ^for[i](0;^array._count[]-1){
 $t{      $x[$array.$i]
 ^menu{$a!$b!$c<BR>}          $x.firstChild.nodeValue: 
 <HR>                  $pattributes[$x.parentNode.attributes]
 ^append{x       y       z}                  ^if(^pattributes._count[]){
 ^menu{$a!$b!$c<BR>}                          $pattributes.id.name=$pattributes.id.nodeValue
 <HR>                  }
 ^flip[]          <br>
 ^menu{$0!$1!$2!$3<BR>}  
 <HR>  
 }  }
           
 $a[vasya,fedya,kolya]  @show-xnodes1[array][i]
 ^^"$a".lsplit[,]=$as[^a.lsplit[,]]$as.0|$as.1|$as.2|$as.3<BR>  ^for[i](0;^array._count[]-1){
 ^^"$a".rsplit[,]=$as[^a.rsplit[,]]$as.0|$as.1|$as.2|$as.3<BR>          ^show-xnode1[$array.$i;0;1]
 ^^a.pos(sy]="^a.pos[sy]"<BR>  
 ^^a.pos[zsy]="^a.pos[zsy]"<BR>  
 ^^a.left(3)="^a.left(3)"<BR>  
 ^^a.right(3)="^a.right(3)"<BR>  
 ^^a.mid(1;3)="^a.mid(1;3)"<BR>  
 <HR>  
 ^^twop[a;]=^twop[a;]<BR>  
 ^$request:browser.type=$request:browser.type<BR>  
 ^$request:browser.version=$request:browser.version<BR>  
   
 $tf[^file:load[test.zip;abc.zip]]  
 $response:body[$tf]  
   
 ^$tf.name=$tf.name<BR>  
 ^$tf.size=$tf.size<BR>  
 ^$tf.mime-type=$tf.mime-type<BR>  
 ^$tf.text:<BR>  
 $tf.text<HR>  
 <HR>  
 ^file:find[test.cfg]<BR>  
 ^file:find[tes.cfg]{not found}<BR>  
 <HR>  
   
 $t[^table:set{n  
 3  
 01.3  
 1.2  
 2  
 }]  
 $t{^locate[n;2z]^found{$n}{not found}}<BR>  
 $t{^locate[n;3]^found{found:$n}{not found}}<BR>  
 ^$t:<BR>  
 ^dump[$t]  
 ^t.sort($n)  
 ^^t.sort(^$n):<BR>  
 ^dump[$t]  
 ^t.sort{^:func($n)}  
 ^^t.sort{^^:func(^$n)}:<BR>  
 ^dump[$t]  
 ^t.sort{$n}  
 ^^t.sort{^$n}:<BR>  
 ^dump[$t]  
 ^t.sort{$n}[desc]  
 ^^t.sort{^$n}[desc]:<BR>  
 ^dump[$t]  
 <HR>  
   
 ^if(-f index.html){y}{n}<BR>  
 ^taint[html-typo;не знаю  
 я ничего  
   
 <<слово длинное>>  
   
 (c) by Я  
 ]<HR>  
 $t[^table:load[/test.cfg]]  
 ^process[@b[]  
 f  
 ]  
 ^b[]<BR>  
   
 ^$t.a=$t.a<BR>  
 ^t.offset[2]  
 #$r[^t.record[]]  
 #^$r.a=$r.a<BR>  
   
 ^$request:uri=$request:uri<BR>  
 ^$env:PATH_INFO=$env:PATH_INFO<BR>  
 ^$env:REMOTE_ADDR=$env:REMOTE_ADDR<BR>  
   
 ^rem{  
 $response:body[]  
 $response:location[http://parser3/123]  
 }  }
   
   @show-xnode1[x;level;single][l]
 <HR>  ^if(def $x){
 ^^auto_test[]:<BR>      ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
 <ol>      ^if($x.nodeType == $xnode:ELEMENT_NODE){
 ^auto_test[]          &lt^;$x.nodeName
 </ol>              $pairs[$x.attributes]
 <HR>              ^if(def $pairs){
                   $names[^pairs._keys[]]
 ^${cookie:вот}=${cookie:вот}?<BR>                  ^names.menu{$names.key=$pairs.[$names.key].nodeValue }
 ^$request:query=$request:query<BR>              }
 ^$request:uri=$request:uri<BR>              &gt^;
       }{
 <form method=post>          [$x.nodeType]
 <table border=1 width=250><tr><td>$form:name</td></tr></table>      }
 <textarea name=name rows=5 cols=40>^untaint[html]{^default[$form:name;не знаю]}</textarea><BR>      
 <input type=submit>      ^if(def $x.nodeValue){$x.nodeValue}<br>
 </form>      ^show-xnode1[$x.firstChild]($level+1)
       ^if(!$single){
 <HR>              ^show-xnode1[$x.nextSibling]($level)
 $свойства_когда_пьян[      }
         $цвет_глаз[красный]  
 ]      ^if($x.nodeType == $xnode:ELEMENT_NODE){
 $вася[      ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
         $свойства[$свойства_когда_пьян]      }
 ]  
   
 $кусок_имени_поля[ства]  
 ^$кусок_имени_поля=$кусок_имени_поля<BR>  
 ^$вася.свой^$кусок_имени_поля.цвет_глаз=$вася.свой$кусок_имени_поля.цвет_глаз  
 <HR>  
 <form method=post enctype=multipart/form-data>  
 <input name=photo type=file>  
 <input type=submit>  
 </form>  
 <hr>  
 ^if($form:photo){  
         <pre>  
         ^$form:photo.name='$form:photo.name'  
         ^$form:photo.size='$form:photo.size'  
         ^$form:photo.text='$form:photo.text'  
         ^form:photo.save[paf.txt]  
         </pre>  
 }  }
   
 #todo proper! untaint $response:refresh[$value[2] $content[url=http://design.ru]]  
   
   
 @default[test;def]  
 $result[^if(^test.length[]){$test}{$def}]  
   
 @exception[origin;source;comment;type;code]  
 <body bgcolor=black>  
 <font color=white>  
 ERROR:  
 ^if(def $source){$origin '$source'}  
 ${comment}.  
 ^if(def $type){type=$type}  
 ^if(def $code){code=$code}  
   
 @auto_test[]  
 ^BASE.auto_test[]  
 <li>${request:uri}!  
   
   @show-xdoc2[xdoc]
   ^xdoc.save[save.xml;
   #       $.encoding[windows-1251]
           $.method[xml]
   ]
   $file[^xdoc.file[
   #       $.encoding[windows-1251]
           $.method[html]
   ]]
   ^file.save[text;save_file.html]
   ^taint[^xdoc.string[]]
   #       $.encoding[windows-1251]
   #       $.method[xml]
   #]]

Removed from v.1.89  
changed lines
  Added in v.1.342


E-mail: