BLHTML.org

BLHTML.org / Web Programming / BLHTML / BLHTML Manual / BLHTML funktion list / BLHTML funktion list /

 
  DO 2852 1
#DO# gör snabba datalistor.
Rights to use this function #DO#:
  • BASIC

  • #DO# manage loppar for arrayer, or from and to satser.
    #DO limit=20# do sätts to 20 for att forhindra evighetslopar

    Variables:
    variable:  description:
    $postCurrent värde from $array/$array[+]
    $post_nameArrayname: $post = $array[$post_name]
    $stepStep som har utforts

    Attributes:
    values:  defaults:  description:
    SQL-fråga:
    idcurrent accountAccount som agerar som datalist
    whereSQL where expression
    echofalseecho=true, Shows SQL-fråga

    foreach array:
    arrayarray=$array/$array[+] som skall stegas
    skipskip=$amount, hoppa över $amount steg
    gotoHoppa över and starta stega där goto=$post value on posten
    limit20Show do amount stegningar

    for from to:
    from1Startvärde for stegning
    to1Stega to värde to
    step1stega step for varje stegning
    skipskip=$amount, hoppa över $amount steg
    gotoHoppa över and starta stega där goto=$post value on posten
    limit20Show do amount stegningar

    Example:
    1
    #$key[+](A B C D E)#

    key=#$key#<br>
    key=#$key[+]#<br><br>

    // Stegar arrayen $key, hoppar över de 2 forsta postsna and skriver max ut value 100 gånger
    #DO array=$key skip=2 limit=100
    value(
            step(#$step#).
            post_name(#$post_name#)
            post(#$post#)
            key(#$key[$post_name]#)<br>
    )
    #
    <br><br>

    Start:
    // Stegar -2 from 30 and to 1, hoppar över de 5 forsta stegen, gör maximalt 3 amount stegningar
    #DO from=30 to=1 step=-2 skip=5 limit=3
    value(
            post(<b>#$post#</b>)
            #IF($post == 8) then(#HALT#)#
    )
    #

    the End

    Returns:
    key=Array
    key=A B C D E

    step(1). post_name(2) post(C) key(C)
    step(2). post_name(3) post(D) key(D)
    step(3). post_name(4) post(E) key(E)


    Start: post(20) post(18) post(16) the End

    More information:
  • DO with AJAB Asynkron stegning
  • AJAB slideshow with DO
  • #ECHO#
  • #GOTO# #GOSUB# and #RETURN#
  • #IF#
  • #SWITCH#
  •   DO with AJAB 1101 0
    Script som anropar AJAB script:
    #IF($data_1) else(#$data_1=5#)#
    #IF($data_2) else(#$data_2=1#)#
    #IF($data_3) else(#$data_3=10#)#



    <center>
    Asynkron stegning:<br>
    <table class=box>
    <tr>
            <td valign=top><a onclick="clr(); send('a=-1'); object('out'); echo(8, 'H');"><img src="images/left.png" alt=previous border=0></a></td>
            <td>

                    from:<br>
                    #DATA[data_2] id=data_2 post=new cols=5 class=txtbox#<br>
            </td>
            <td>

                    to:<br>
                    #DATA[data_3] id=data_3 post=new cols=5 class=txtbox#
            </td>
            <td valign=top><a onclick="clr(); send('a=1'); object('out'); echo(8, 'H');"><img src="images/right.png" alt=next border=0></a></td>
    </tr>
    <tr>
            <td></td>
            <td colspan=2>

                    do:<br>
                    #DATA[data_1] id=data_1 post=new cols=15 class=txtbox#<br>
            </td>
            <td></td>
    </tr>
    </table>


    <div id=out>

    #DO from=$data_2 to=$data_3 skip=$data_0 limit=$data_1 loop=true
            value( #$post#\n)
    #

    </div>
    </center>

    AJAB script $ID=8 $page=H
    /*
            $data_0 skip
            $data_1 do
            $data_2 from
            $data_3 to
    */

    #IF($data_1) else(#$data_1=5#)#
    #IF($data_2) else(#$data_2=1#)#
    #IF($data_3) else(#$data_3=10#)#
    #SUM value($data_3 - 1) return=obj#
    #IF($data_2 > $data_3) then(#HALT#)# // This is for att INTE krasha forum!

    #IF($a) then(#SUM value($data_0 $a) return=data_0#)#
    #IF($data_0 < 0) then(#$data_0=$obj#)#
    #IF($data_0 > $obj) then(#$data_0=0#)#
    #IF($data_1) else(#$data_1=5#)#
    #IF($data_1 > 20) then(#$data_1=20#)#

    <input id=data_0 type=hidden value=#$data_0#>

    #DO from=$data_2 to=$data_3 skip=$data_0 limit=$data_1 loop=true
            value( #$post#\n)
    #

    Returns:
    Asynkron stegning:
    previous from:

    to:
    next
    do:

    1 2 3 4 5

    More information:
  • AJAB
  • AJAB slideshow with DO
  • BLHTML forum  


    apache MySQL PHP No to software patents! BLHTML
    © 2003, 2010 BLHTML
    This page is created with BLHTML in 0.0829 seconds