BLHTML.org

Post and database management / basket /

 
  attrib 2070 2
attrib Is a table that can be created in BLHTML. attrib has 3 fields:
  • id typ H8
  • user typ str(16)
  • status typ H4
If field: "user" is not in table "attrib" then status = 0
(then only table owner can read / write to table).

user:description:
AdminAdmin accounts: 1 to 99
Ownerpost with field who = #SYSTEM[whoami]#
MemberAccountn >= 200
GuestNot logon, visitors
AllAdmin, member, guest and alla

Value:Bit:   description:
Create new posts:
10Admin
21Owner
42Member
83Guest
16

4

All

Update posts:
2568Admin
5129Owner
102410Member
204811Guest
4096

12

All

Erase posts:
6553616Admin
13107217Owner
26214418Member
52428819Guest
1048576

20

All

Supplementary information:
1677721624Keyvalue: is equal to whoami (logon datapage id)
3355443225Insert IP-address to field IP
6710886426Can only write post 1 time, save IP-address to field IP (can't update post)
13421772827who: insert user id to field: who
26843545628who: insert uniqe user id to field: who
who has higher priority and takes precedence over the key value
(If a post contain your who then you can't insert a new post only update your own who post)

More information:
  • basket
  •   Key value = whoami 1563 0
    Example on att läsa in personlig post där id = whoami:
    #SYSTEM[whoami] return=id#

    #IF($id) else(#HALT#)#

    #READ value=$id#

    • id sätts to whoami (logon datapages id)
    • If ej logon avslutas datapage
    • READ: läser in posts där $id = whoami
    More information:
  • basket
  • attrib
  •   Write unik who 1529 0
    If key field inte kan/får vara samma som whoami
    • basket ger ej errormessage if field who not contains
    Data information for example:
    #SYSTEM[whoami]# är BLHTML user id
    User is logon as 126 Adam (#SYSTEM[whoami]# = 126)
    Tabell write to: 30 test
    "who: skriver unkit användar id in who" är satt in attrib for test
    id = 1012

    Example 1:
    Adam manipulerar id = 1010
    and skickar to basket som tittar if 1010 finns?
    If id = 1010 är tom är detta ok and basket skriver to 1010

    Example 2:
    Adam skriver a new post to test:
    id är inte satt and sätts to 1012

    Adam forsöker skriva igen, sätter id = 1010 skickar to basket
    basket ser att who (Adam) redan skrivit and change id to id där who = whoami som är 1012

    Example on att läsa in denna post:
    // Read the field id where who = #SYSTEM[whoami]#
    #DATA[id] post=set where(who = #SYSTEM[whoami]#)#

    // IF #SYSTEM[whoami]# have a post?
    #IF($id) else(#HALT#)#

    // Read user #SYSTEM[whoami]# post
    #READ value=$id#
    • If who har skrivit in table sätts id = who
    • IF: if id ej är declared (who har inte skrivit to table) sätts id = whoami
    • READ: läser in posts där id = #SYSTEM[whoami]#
    More information:
  • basket
  • attrib
  • Key value = whoami
  • BLHTML forum  


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