BLHTML.org

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

 
  vote 2612 0
vote is a database function

Table information for a voting account:
name  typ  description:
idH8
oidstr32Name on click object
grpH1vote option
IPstr15If vote shall not count every IP, then IP = 8
forIPstr15php forIP does not work anymore
datestr6
sumH2the number of grp which has been clicked
whoH8

Example if not IP recorded radio buttons:
#SET_CATCH_PAGE#
#DATA[blhtml_cmd] post=hidden value=vote#

#IF($reset)
        then(#COUNTCLICK id=90 click=Unlimited action=reset value(1 2 3 4 5 6 7 8 9 10)#)
#

<br>
#COUNTCLICK id=90 click=Unlimited show=all decimal=2 return=all#
all: #$all[*]#<br><br>

ant: #$all[0]#<br>
sum: #$all[1]#<br>
avg: #$all[2]#<br><br>

What do you think?<br>
#DATA[vote_0900Unlimited] value(1) post=new type=radio class=std# 1 urk
#DATA[vote_0900Unlimited] value(2) post=new type=radio class=std# 2
#DATA[vote_0900Unlimited] value(3) post=new type=radio class=std# 3
#DATA[vote_0900Unlimited] value(4) post=new type=radio class=std# 4
#DATA[vote_0900Unlimited] value(5) paper=EEEEEE post=new type=radio# 5
#DATA[vote_0900Unlimited] value(6) post=new type=radio class=std# 6
#DATA[vote_0900Unlimited] value(7) post=new type=radio class=std# 7
#DATA[vote_0900Unlimited] value(8) post=new type=radio class=std# 8
#DATA[vote_0900Unlimited] value(9) post=new type=radio class=std# 9
#DATA[vote_0900Unlimited] value(10) post=new type=radio class=std# 10 top

#PLOPP value(vote this)# #PLOPP name=reset value=reset#
<br><br>

#COUNTCLICK id=90 click=Unlimited show=array return=dia#
array[-]: #$dia[-]#<br>
array[+]: #$dia[+]#<br><br>

<font size=3><b>Chart:</b></font><br>
#$info[+](<b>urk</b>(ill done)(NOT goed)bad(<b>just is</b>)(can beh better)goed(pretty OK)(woow)(<b>High score</b>))#
#DIAGRAM info=$info value=$dia text_width=90 show=%#<br><br>

<center>

#DIAGRAM
        info=$info value=$dia
        color(00CCCC 888888 004D98 CC6600 00984A FF0000 00FF00 0000FF 00FFFF FF00FF FFFF00)
        paper=FFF5D4 size=3 border=2 format=3 width="50%" text_width=120 fat=2
#

</center>

Returns:

0 all: 0 6 1 13 2 2.17 count 6 sum 13 avg 2.17

ant: 6
sum: 13
avg: 2.17

What do you think?
1 urk 2 3 4 5 6 7 8 9 10 top

0 array[-]: 1 8
array[+]: 5 1

Chart:
urk83%
 
ill done0% 
NOT goed0% 
bad0% 
just is0% 
can beh better0% 
goed0% 
pretty OK17%
 
woow0% 
High score0% 


urk5
 
ill done0 
NOT goed0 
bad0 
just is0 
can beh better0 
goed0 
pretty OK1
 
woow0 
High score0 



#DATA[blhtml_cmd] post=hidden value=vote#
Make the form to call function vote when form sent with #PLOPP#-button

#DATA[vote_09021]# tell $blhtml_cmd to value=vote executes the following:
Name vote_ indicates that this is a click variable containing the following 3 data:

090 tell the vote function, that the data account 90 shall store the election statistics

the 4 character: 2 manages information about:
  • bit 0 (bit value: 1) Only registered member
  • bit 1 (bit value: 2) Recorded only one object and click IP Address
  • bit 2 (bit value: 4) Reset the IP registration and the same IP can vote / click again the next day
  • bit 3 (bit value: 8) Registering only votes / clicks and total

  • #DATA[vote_09001]# Unlimited registration of Objects
    #DATA[vote_09021]# One IP can only click one time

    The fourth character plus 32 character is the name of the clicks objects stored in the field oid
    #DATA[vote_09021]# The name of the click object set to oid = "1"
    BLHTML forum  


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