Update for 2016 conference · KcsDev1982/sunbelt-plb-samples@588868f · GitHub
Skip to content

Commit 588868f

Browse files
committed
Update for 2016 conference
Information and samples from the 2016 conference
1 parent 26bd777 commit 588868f

15 files changed

Lines changed: 401 additions & 0 deletions

conf2016/CSSandHTML2016.pdf

256 KB
Binary file not shown.

conf2016/WhatIsPws2016.pdf

206 KB
Binary file not shown.

conf2016/advance2016.pdf

302 KB
Binary file not shown.

conf2016/class2016.prj

Lines changed: 82 additions & 0 deletions

conf2016/classtest.pls

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
*---------------------------------------------------------------
2+
.
3+
. Program Name: classtest
4+
. Description: Conf 2016 Sample
5+
.
6+
. This program requires gauge.html, myjstest.html
7+
. and mycss.css to be put in the http_root or plbwv_html directory
8+
.
9+
INCLUDE plbequ.inc
10+
INCLUDE plbmeth.inc
11+
INCLUDE plbstdlib.inc
12+
13+
*-------------------------------------------------------
14+
15+
ClassForm PLFORM "classtest.pwf"
16+
Client CLIENT
17+
Count FORM "0"
18+
OkFlag FORM "1"
19+
ErrTry FORM "5"
20+
.
21+
.
22+
.
23+
HtmlPageQR INIT "<img src='https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=Hello%20world&choe=UTF-8' ":
24+
" alt='QR code' />"
25+
.
26+
. Table
27+
.
28+
HtmlTable INIT "<table>":
29+
"<tr><th>Month</th><th>Weather</th></tr>":
30+
"<tr><td>March</td><td>Snow<td></tr>":
31+
"</table>"
32+
.
33+
. Map
34+
.
35+
LocData DIM 300
36+
LocHtml DIM 300
37+
.
38+
. Chart
39+
.
40+
ChartHtml INIT "<iframe width='500px' height='200px' src='gauge.html'</iframe>"
41+
.
42+
. Js Class
43+
.
44+
ResStr DIM 200
45+
HtmlObjId DIM 20
46+
GetJsStr PROFILE !js@frame1,MyJsFuncStr,DIM,DIM
47+
HtmlPageJs1 INIT "<iframe id='frame1' style='width:80%; border-width:0; margin-left:10px;'":
48+
" src='myjstest.html' sandbox='allow-same-origin allow-scripts allow-top-navigation'></iframe>"
49+
.
50+
.
51+
.
52+
WINHIDE
53+
FORMLOAD ClassForm
54+
WebForm1.SetAsClient
55+
LOOP
56+
EVENTWAIT
57+
REPEAT
58+
STOP
59+
60+
TestIt LFUNCTION
61+
ENTRY
62+
ADD "1" TO Count
63+
PERFORM Count Of TestItQR, TestItTable,TestItLoc, TestItG, TestItJs
64+
FUNCTIONEND
65+
66+
67+
TestItQR LFUNCTION
68+
ENTRY
69+
Panel1.InnerHtml Using HtmlPageQR
70+
FUNCTIONEND
71+
72+
TestItTable LFUNCTION
73+
ENTRY
74+
Client.AddCss Using "mycss.css"
75+
SETPROP Button2,WebClass="myclass"
76+
Panel1.InnerHtml Using HtmlTable
77+
FUNCTIONEND
78+
79+
TestItLoc LFUNCTION
80+
ENTRY
81+
Client.GetLocation Giving LocData
82+
PACK LocHtml Using "<img src='http://maps.googleapis.com/maps/api/staticmap?center=":
83+
LocData:
84+
"&zoom=14&size=400x300&sensor=false' />"
85+
86+
Panel1.InnerHtml Using LocHtml
87+
FUNCTIONEND
88+
89+
TestItG LFUNCTION
90+
ENTRY
91+
Panel1.InnerHtml USING ChartHtml
92+
FUNCTIONEND
93+
94+
TestItJs LFUNCTION
95+
ENTRY
96+
MOVE "0" To Count
97+
Panel1.InnerHtml Using HtmlPageJs1
98+
Client.FlushMessages
99+
Client.JsMakeString Giving HtmlObjId Using "MyJsTest1"
100+
MOVE "5" To ErrTry
101+
TRAP RetryFunc Noreset If Object
102+
LOOP
103+
MOVE "1" To OkFlag
104+
WINAPI GetJsStr Giving ResStr Using HtmlObjId
105+
BREAK If (OkFlag = 1)
106+
REPEAT
107+
TRAPCLR Object
108+
SETPROP LabelText1, Text=ResStr
109+
FUNCTIONEND
110+
111+
RetryFunc LFUNCTION
112+
ENTRY
113+
SUB "1" From ErrTry
114+
IF ( ErrTry = 0 )
115+
TRAPCLR Object
116+
ELSE
117+
MOVE "0" To OkFlag
118+
ENDIF
119+
PAUSE "1"
120+
FUNCTIONEND
121+
122+
123+
124+

conf2016/classtest.pwf

4.46 KB
Binary file not shown.

conf2016/cordova2016.pdf

194 KB
Binary file not shown.

conf2016/docgi.pls

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
*---------------------------------------------------------------
2+
.
3+
. Program Name: docgi
4+
. Description: Conference 2016 Sample CGI Program
5+
.
6+
. This program requires docgitest.html to be
7+
. put in the http_root directory. This html page
8+
. must be used to run the docgi program
9+
.
10+
. The webserver configuration must set PLBWEB_CGI_INFODIR
11+
.
12+
. PLBWEB_CGI_INFODIR=c:\temp\cgi
13+
.
14+
INCLUDE plbequ.inc
15+
INCLUDE plbmeth.inc
16+
INCLUDE plbstdlib.inc
17+
18+
*-------------------------------------------------------
19+
20+
R RUNTIME
21+
DATA DIM 240
22+
xDATA DIM 300
23+
CgiName DIM 30
24+
.
25+
X PLFORM docgi.pwf
26+
.
27+
FORMLOAD X
28+
.
29+
CALL FetchQuery_String_Raw
30+
.
31+
LOOP
32+
EVENTWAIT
33+
REPEAT
34+
STOP
35+
.....
36+
. 'GetCGI'
37+
.
38+
GetCGI FUNCTION
39+
CgiKey DIM 30
40+
Opt FORM 2
41+
ENTRY
42+
.
43+
R.CgiString Giving DATA Using CgiKey, Opt
44+
PACK xData, CgiKey, "='", DATA,"'"
45+
INSERTITEM DataList1, 0, xData
46+
.
47+
FUNCTIONEND
48+
.....
49+
. 'GetUserParm'
50+
. This function retrieves a URL parameter by
51+
. keyname found in the EditText1.
52+
.
53+
GetUserParm FUNCTION
54+
ENTRY
55+
.
56+
GETPROP EditText1, TEXT=CgiName
57+
.
58+
SQUEEZE CgiName, CgiName
59+
TYPE CgiName
60+
IF EOS
61+
SETPROP STATTEXT1, TEXT="CGI Name Required!"
62+
RETURN
63+
ENDIF
64+
.
65+
CALL GetCGI USING CgiName, "1" //Fetch URL parameter data!
66+
.
67+
FUNCTIONEND
68+
.
69+
.....
70+
. 'GetField'
71+
. This function retrieves a URL parameter by
72+
. pre-defined (static) keyname.
73+
.
74+
GetField FUNCTION
75+
ENTRY
76+
.
77+
NVAR FORM 3
78+
CNT FORM 3
79+
.
80+
ComboBox1.GetCurSel GIVING NVAR
81+
ComboBox1.GetText GIVING CgiName USING NVAR
82+
.
83+
IF ( NVAR == 0 )
84+
DataList1.ResetContent
85+
ENDIF
86+
.
87+
CALL GetCGI USING CgiName, "2" //Fetch pre-defined HTTP header fields!
88+
.
89+
ComboBox1.GetCount GIVING CNT
90+
INCR NVAR
91+
IF ( NVAR >= CNT )
92+
CLEAR NVAR
93+
ENDIF
94+
ComboBox1.SetCurSel USING NVAR
95+
.
96+
FUNCTIONEND
97+
.
98+
.....
99+
.
100+
FetchQuery_String_Raw FUNCTION
101+
ENTRY
102+
.
103+
R.CgiString Giving DATA Using "QUERY_STRING" //Query_String raw!!
104+
.
105+
PACK xData, "QUERY_STRING='", DATA,"'"
106+
TYPE DATA
107+
IF EOS
108+
SETPROP STATTEXT1, TEXT="URL Query_String not specified!"
109+
RETURN
110+
ENDIF
111+
.
112+
INSERTITEM DataList1, 0, xData
113+
SETPROP STATTEXT1, TEXT="URL QUERY_STRING parameters available!"
114+
.
115+
FUNCTIONEND
116+
.

conf2016/docgi.pwf

2.86 KB
Binary file not shown.

conf2016/docgitest.html

Lines changed: 15 additions & 0 deletions

0 commit comments

Comments
 (0)