Diff for /parser3/src/www/htdocs/Attic/index.html between versions 1.208 and 1.228

version 1.208, 2001/06/27 14:23:21 version 1.228, 2001/07/17 13:51:14
Line 1 Line 1
   @USE
   dtformat.p
   input_date.p
   
   @href[href zzz;title xxxx;ставить]
   ^if($ставить){y;n}
   
   
   @call[name][method]
   $method[$$name]
   ^if(def $method){^method[]}
   
   @test1[]
   test1 result
   
 @main[]  @main[]
   ^call[test1]
   <hr>
   $input_date:input_date_auto_test
   <hr>
   #$string:z[1]
   #<hr>
   $path[/news/tululu/]
   $pieces[^path.lsplit[/]]
   $pieces{^count[]: ^menu{{$piece}}[,].}
   <hr>
   ^href[href;title](1<2)
   
   <hr>
   $stat[^file:stat[test.zip]]
   $stat{
   ^$size=$size<br>
   adate=^long_date_format[$adate]<br>
   mdate=^long_date_format[$mdate]<br>
   cdate=^long_date_format[$cdate]<br>
   }
   <hr>
   $дата[^input_date:parse[9.7.2001]]
   ^long_date_format[$дата]
   <hr>
   $дата[^parse_date[9.7.2001]]
   ^long_date_format[$дата]
   <hr>
   $сегодня[^date:now[]]
   $недельный_календарь[^table:calendar[rus]($сегодня.year;$сегодня.month;$сегодня.day)]
   <TT>
   $недельный_календарь{^menu{
           $year $month $day $weekday<BR>
   }}
   </TT>
   <hr>
   $сегодня[^date:now[]]
   $месячный_календарь[^table:calendar[rus;$сегодня.year;$сегодня.month]]
   <TT>
   ^месячный_календарь.menu{^for[i;0;6]{
           $day[$месячный_календарь.$i]
           ^if($day){$day}{&nbsp^;&nbsp^;}
   }<BR>}
   </TT>
   <hr>
   before $время[^date:now[]]^время.string[]<br>
   year+^время.roll[year](1)^время.string[]<br>
   month+^время.roll[month](1)^время.string[]<br>
   year-^время.roll[year](-1)^время.string[]<br>
   month-^время.roll[month](-1)^время.string[]<br>
   day+^время.roll[day](1)^время.string[]<br>
   day-^время.roll[day](-1)^время.string[]<br>
   <hr>
   $русский_день_недели[
           $0[Воскресенье]
           $1[Понедельник]
           $2[Вторник]
           $3[Среда]
           $4[Четверг]
           $5[Пятница]
           $6[Суббота]
   ]
   
   $время[^date:set(0;1;1;3;30;4)]
   $время{
           ^string[]<br>
           ${year}.${month}.${day} ${hour}:${minute}:${second}
   }
   <hr>
   $время[^date:set(1.5)]
   ^время.string[]
   <hr>
   $сейчас[^date:now[]]
   ^^сейчас.string[]=^сейчас.string[] $день_недели($сейчас.weekday) $русский_день_недели.$день_недели<br>
   $floatdays($сейчас) ^floatdays.format{%.20f}<br>
   ^eval(^math:frac($floatdays)*24)<br>
   ^eval(^math:frac($floatdays*24)*60)<br>
   ^eval(^math:frac($floatdays*24*60)*60)
   <hr>
   
   PI=^math:PI.format{%.40f}
   <hr>
   ^math:random(10)
   <hr>
   ^math:sqrt(16)
   <hr>
   $люди[
           $2федя[
                   $рост[176]
           ]
           $1василий[
                   $возраст[5]
           ]
   ]
   
   $имена[^люди.keys[]]
   $имена{
           ^sort{$key}
           ^menu{$key}[,].
   }
   <hr>
   
   $таблица[^table:set{a   b
   1       2
   }]
   $колонки[^таблица.columns[]]
   $колонки{
           ^menu{$column}[,].
   }
   
   <hr>
   
   ^if($form:id ne 'z"'){
           ne
   }{
           eq
   }
   <hr>
   
   
   ^rem{
   $one(1)
   $z(0)
   ^eval(^one.int[]%0)
   <hr>
   }
   
   $form:id:
   <hr>
   
 ^switch(2){  ^switch(2){
         ^case(1;4;3){143}          ^case(1;4;3){143}
         ^case[DEFAULT]{default}          ^case[DEFAULT]{default}
 }  }
   <hr>
   ^switch(2){
           ^case(1;2;3){143}
           ^case[DEFAULT]{default}
   }
   <hr>
   ^switch(2){
           ^case(1;5;3){143}
   }
   
 <hr>  <hr>
   ^switch(2){
           ^case(2){2}
   }
   
   <hr>
   ^switch[2]{
           ^case(2){![2]}
   }
   <hr>
   
   
 $hash[$a[1]]  $hash[$a[1]]
Line 127  $th[^t2.hash[key;a]] Line 289  $th[^t2.hash[key;a]]
   
 $filelist[^table:dir[.]]  $filelist[^table:dir[.]]
 <hr>  <hr>
 $path[/news/tululu/]  
 #^path.flip[]  
 <hr>  
 $branches[^table:set{name       val  
 index.cgihtml   123  
 }]  
 $splitURI[^request:uri.lsplit[/]]  
 name ^if(^branches.locate[name;$splitURI.1]){found;not found}:  
 $branches.name  
 <HR>  
 $splitURI[^request:uri.lsplit[/]]  
 $splitURI.0!$splitURI.1  
 <HR>  
   
 $t2[^table:set{dir      title  $t2[^table:set{dir      title
 /here   Here  /here   Here
 }]  }]
Line 193  ${comment}. Line 341  ${comment}.
 ^connect[$connect-string]{  ^connect[$connect-string]{
         $shit[^taint[our's]]          $shit[^taint[our's]]
 #       $paf[^table:sql{insert into paf (name, age) values ('$shit', ^random:generate(10000))}]  #       $paf[^table:sql{insert into paf (name, age) values ('$shit', ^random:generate(10000))}]
         ^nothing:sql{update paf set age=age+1}          ^void:sql{update paf set age=age+1}
         $paf[^table:sql{select * from paf order by id desc}(5)]          $paf[^table:sql{select * from paf order by id desc}(5)]
         $paf{          $paf{
         ^if(^empty[]){query result is empty}{          ^if(^empty[]){query result is empty}{
Line 202  ${comment}. Line 350  ${comment}.
                 ^menu{<tr><td>$id</td><td>$name</td><td>$age</td></tr>}                  ^menu{<tr><td>$id</td><td>$name</td><td>$age</td></tr>}
         </table>          </table>
         }}          }}
         ^^string:sql{select name from paf where id=1}=^string:sql{select name from paf where id=1}<br>  #       ^^string:sql{select name from paf where id=1}=^string:sql{select name from paf where id=1}{n/a}<br>
         ^^int:sql{select age from paf where id=1}=^int:sql{select age from paf where id=1}<br>  #       ^^int:sql{select age from paf where id=1}=^int:sql{select age from paf where id=1}(111)<br>
         ^^double:sql{select age from paf where id=1}=^double:sql{select age from paf where id=1}<br>  #       ^^double:sql{select age from paf where id=1}=^double:sql{select age from paf where id=1}(222)<br>
   
         $paf[^hash:sql{select id,age from paf}]          $paf[^hash:sql{select id,age from paf}]
         ^$paf.2.age=$paf.2.age<br>          ^$paf.2.age=$paf.2.age<br>

Removed from v.1.208  
changed lines
  Added in v.1.228


E-mail: