htmlserver

you can use this object only in html-server-window

don't create this object. Name of object is shtml

 

 

 

html (?, out)

send the html-script to the body of full html-script. See ?

php, phpscript

send a php-script to the connector (runs only, if the connector is php). See phpscript

js, java, javascript

send the command to the java-area see javascrpt

setuser

set the current user in the actual session

setlanguage

set the current language shtml=setlanguage=E

insertmenu

load the menu-script in the actual session. see insertmenu

message

message=typ$messageid$message

insert in the [messagearea] the message

typ=error, ok or info. See "message"

 

sqltable

objekt to work with tables. See sqltable

login

login

shtml=login=<user>=<pwd>=<stationid>=<location>

logout

logout from the current session after the current page

if you send a full logout, use requesttype=logout

print

print-object. See print. shmtl=print=command

debug

send current variable-List

sessionvariable, setglobal

set a global Session-Variable

shtml=sessionvariable=myvariable=myvalue

in script

? Current Variable @session.myvariable@

localvariable, setlocal

set a local window-variable

this variable is only visible in the current window

shtml=windowvariable=myvariable=myvalue

? Current Variable @local.myvariable@

shtml=continue=true/false

Example in a Sub-Function

shtml=continue=false

in the Master-Script

if <shtml.continue> = true then

 // ... next function

end if

 

 

links and window

shtml=callrequest=<requestname>

 

 

? <a href=@callrequest=myrequest@>Click Start</a>

If the user click on "Click Start" then the request-function

"myrequest" in the same window is calling

shtml=callrequest=<text>=<request>=<columns>

shtml=callrequest=edit item=edititem=col_item

translate and output the text "edit item"

if click: call the request "edititem" with url-Parameter the content from "col_item". Generate follow html:

? <a href="....requesttype=edititem&page=..&col_item=..">edit text</a>

 

You can set default-Values for Variable with ":", if the Variable not existing. You can set with "::" the content withour searching for the Value

Example: Set Variable col_area allways to "P"

shtml=callrequest=edit typ=edittyp=col_area::P

page=dscription=

  page=parameter

shtml=page=logout

generate follow script

<a id=link href=index.php?page=pagename> description </a>

beas insert the correct php-file, check the pagename and description

if you set parameter, beas send this to the index.php

Logout:

shtml=page=logout

Other window:

shtml=page=My Own Page=mypage=&itemcode=<is_itemcode>

you can set this with beas-placeholder

[html]

@page=main@<br>@page=My Own Page=mypage@<br>

[/html]

go2page=page

shtml=go2page=<newpage>

 

special sides

this   Current Page

back   Last Page with the last parameter

 

to generate Placeholder

@page=page?parameter...@

go2request=<requestname>

call direct a request

shtml=go2request=myupdaterequest [=page/app]

if you don't set the page/app then you call the current page/app. Urgent: in the login-sequence you must set "login" as page.

windowname=page

Execute the Script of this window but don't leave the current window

ajax=replaceid=ajaxcommand=ajaxparameter

replaceid = the textarea to replace

ajaxcommand = set the variable ajaxcommand

ajaxparameter = set the variable ajaxvariable

 

1. set a Area for the result with "id"
  shtml=html=<p id="mylist"> </p>

2. shtml=ajax=mylist=list=1

3. in the page - ajax

   you've follow parameters: ajaxcommand and ajaxparm

   in this script: return a result

4. beas replace the area "mylist"with the result in the page

 

you can generate direct a link in html-placeholder

@ajax=text=replaceid=ajaxcommand=ajaxparameter@

ajax2=function=ajaxcommand,ajaxparameter

Create the Call-Function [functionname]_start, the Receipt from Ajax call the function [functionname_receipt]. The second command you must create self. See ajax2

shtml=var2hiddeninput=mask

create hidden-input fields for all local variables with this mask. see var2hiddeninput

 

shtml=htmlareastart

Push the actualarea in variable "htmlareapush" and cleare the actual html-script. Restore with htmlareaend. See htmlareastart

shtml=htmlareaend=<var>

copy the current html-script in varialbe "var" and restore the html-area from "htmlareapush". see htmlareaend

shtml=area=<areaname>=<shtmlscript>

it is the same as shtml=htmlareastart .. shtml=htmlareaend

But only with one line

Example: add a html-Source to Area "selects"

shtml=area=selects=<b>Hello world</b>

To Display this Area

? @selects@

 

shtml=expand

Create a Icon for hidden/unidden-Areas

see expand

shtml=send2common=<var>[=<priority>]

If variable <shtml.asynchron> is activ (1) then the script <var> is executing asynchron from beas-common-interface otherwise directly.

 

Example:

#define ls_script

for ll_loop=1 to 10

 ...

next

#end

shtml=send2common=<ls_script>

 

if asynchron is activ, then beas execute the script on the beas-common-service otherwise direct.

if asynchron, the webclient can continie is work directly

 

asynchron-work:

all defined variables are sending to the beas-common-interface.

Example

 

setvar=ls_test=hello world

#define ls_Script

setvar=ls_test2=<ls_test>

#end

 

create folow script for beas-common-interface

 

setvar=ls_test=hello world

setvar=ls_test2=<ls_test>

 

Attention!

works only with not declared variables!

 

You can check with variable <shtml.asynchron> if the system is activ

 

Priority

High work load will queue the script to the common interface. To control the priority of a script use the <priority> value. The lower this value is the smaller the waiting time becomes.

 

Example:

shtml=send2common=<ls_script>=-1 // urgent

shtml=send2common=<ls_script>=-100 // very urgent!

shtml=send2common=<ls_script>=500 // do it when you are free

 

 

 

Format-Function

shtml=del_htmlattrib=<var>

Delete in the Variable all html-Attribs

Example

setvar=col_text=<b>Hello</b>

shtml=del_htmlattrib=col_text

? @col_text@

=> output normal "Hello"  without <b> and </b>

 

Session-Functions

shtml=window=<name>

set the new app as current app and execute this main-script

shtml=design

set the design. see design

shtml=setlanguage=<language>

set Language for current Session

 

formulars

shtml=form=<propertie>

Genarete Simple Forms. See form

shtml=inputinfo=<text>

Set Variable <shtml.inputinfo> with translated Text and call the beas-Script-Function "inputinfo". Use this for insert a Help-Text for the input-Fields.

shtml=formstart

Create Script

<form name="f1" action="@home@">

shtml=formend

if you set a parameter, then the function var2hiddeninput is called before </form>

 

you can set:

variable,begin of variable,variable:value = withoutvariable

Example

"col_" send all Variables beginning with "col_"

"requesttype:update" send the Variable "requesttype" with this value

 

 

Example

The currentform have the
variable col_mycolor=mycolor and

variable col_width=50

 

shtml=formstart

? <input name="col_itemcode">

shtml=formend=page,col_,requesttype:update=col_width

the last command create follow script

<input type="hidden" name="page" value="itemedit">

<input type="hidden" name="col_mycolor" value="mycolor">

<input type="hidden" name="requesttype" value="update">

</form>

search=<requesttype>=<var>

Ref: the same page with the on this command defined requesttype

and all defined variables

Example:

setvar=col_itemcode=ABC

setvar=col_warehouse=01

shtml=search=itemlist=col_

Start the same window but only the request-function "itemlist" with all Variables beginning with "col_"

Create a URL with

...?page=<pagename>&col_itemcode=ABC&col_warehouse=01&requesttype=itemlist

 

if you set as requesttype=sqltable:<objectname>, then you can call directly the Search-SQL-List

shtml=search=sqltable:itemlistsql=col_

 

if a search-Function is called, beas will fill the Variable is_bsearch with <a href="url-String">

shmtl=setfocus=fieldname

shtml=html=<form><input name="col_itemcode">

shtml=setfocus=col_itemcode

set focus to this field

this function generate follow script:

window.onload = function() { document.getElementsByName("col_itemcode")[0].focus();  document.getElementsByName("col_itemcode")[0].select();}

shtml=var2hiddeninput=mask

create hidden-input fields for all local variables with this mask. see var2hiddeninput

shtml=doublecheck=set/check

for this all "col_"-variables are copied to session-Variable "doublecheck"

with "check" the command check, if the variables are the same. If no, the Variable will be deleted.

So you can check and after then if Variable not empty, you cancel the Function.

If empty, you set the Variable with this command.

set = set the doublecheck

check = check and delete doublecheck-Variable, if difference

checkreset = check and delete doublecheck-Variable, if difference. If not ok, then delete all col_ - Variables and set scriptcontinue to "true"

System-Functions

reloadscript

reload all scripts from database to the server (call this after changing source)

reload

reload or replace parts of the memory

reload=userrights   -> Reload the user rights

reload=language=<new language> -> change Language for current Session



 

Session-Variable

<currentpage>

current page

<requesttype>

requesttype

ajax - ajax-request

update - update-request

<PHPSESSID>

Session-Id

<clientname>

Name of Client

 

shtml-Variable

<shtml.session_id>

Current Session_id (PHPSESSID)

<shtml.station_id>

Station-Id, Reference to beas_sys_station.station_id

<shtml.user_id>

Current User-Id

<shtml.pers_id>

Current Personell (beas_pers.pers_id)

<shtml.username>

Current Name of User

<shtml.shift>

Current Shift from User

(you can set this shift only in the login-function with Variable "col_shift")

<shtml.requesttype>

Current request-Type - see Session-Variable requesttype

<shtml.isajax>

if request-Type is ajax, this variable is true

<shtml.islogin>

if user is loged in, this variable is true

<shtml.program.description>

Name of current program (description in program-declaration)

<shtml.program.id>

Id from current program (beas_webprogram.programid)

<shtml.program.
statiocheckname>

return the Property from "stationcheckname" 0=No Check, 1=Check and 2=Check allways. If allways disable, if no web-Station-Clients in the Station-List is defined

<shtml.program.
locationcheck>

return locationcheck-Property. 0=No Check, 1=Check, 2=Check mandatory

is allways 0, if no location is defined

<shtml.connecttype>

U=Personell Username + Pwd

T=Personell Cardnumber (Terminal)

C=Contactperson (OCPR) name + Pwd (user_id=cardcode, uersname=contact-name)

<shtml.windowmenutext>

Menutext from current window

<shtml.currentpage>

Name of current window

other name: <shtml.is_page>

<shtml.pictureurl>

the url or path from pictures. default "static/gfx/"

<var2url=col..,page>

generate a full URL-Parameterlist vor all Variables with this Mask. In this example for all Variable beginning with "col" and "page"

<shtml.continue>

Information to continue or not continue the window-Master-Script

you can set this with "shtml=continue=true/false"

and can check this with <shtml.continue>

<shtml.access=[accessid]>

You can create a new object from type "access"

In the Application-Access-Settings you can set this per Authorization-Group.

with this placeholder you can check, if the user with his autohorization-group have access to this function. Normal is 1 = ok, 0=block

if <shtml.access=forum_del> <> 1 then

  return failure

end if

<shtml.asynchron>

if asynchron work is activ? 1=Yes, 0=No (0=Standard)

 

Location

<shtml.location_id>

Location. Reference to table beas_sys_location

<shmtl.location_udf?>

UDF1 to UDF4 from current location

Example <shtml.location_udf1>

 

Global Variables

<shtml.path>

local path of php-file on the php-server

<shtml.indexname>

name of the php-file without path, e.c. index.php

shortform: <home>

<shtml.url>

url-adress

<shtml.comm>

connector-path for interface php <-> beas-html-server

 

Setup Variable

(User-Setup for an App)

<shtml.setup1>

value from first setup-Variable

<shtml.setup2>

value from 2. setup-Variable

<shtml.setup3>

value from 3. setup-Variable

<shtml.setup4>

value from 4. setup-Variable

 

Standard-Post-Variables

is_user

User to Login

is_pws

Pwd from User

ib_logout

if true, beas will logout the session

col_shift

Current Shift