Вы находитесь на странице: 1из 747
PHPRunner 8.1 Manual © 2015 Xlinesoft
PHPRunner 8.1 Manual © 2015 Xlinesoft

PHPRunner 8.1 Manual

© 2015 Xlinesoft

PHPRunner 8.1 Manual © 2015 Xlinesoft
PHPRunner 8.1 Manual © 2015 Xlinesoft
PHPRunner 8.1 Manual © 2015 Xlinesoft

I

I PHPRunner 8.1 Manual

PHPRunner 8.1 Manual

I PHPRunner 8.1 Manual

Table of Contents

Part I

Introduction

 

1

1 Welcom

e

1

2 System

r.e

q

u i.r.e

m

e

n t.s

 

14

3 Edition

s

c.o

m

p

a

r i.s.o

n

15

4 Licens.i.n

g

d

e t.a i.l.s

 

15

5 What i.s

t.h

e r.e

g i.s t.r.a t.i.o

n

16

6 Quick.s

t.a r.t g

u i.d

e

17

Part II Using PHPRunner

24

1 w i.t.h p r.o j.e

Workin

g

c t.s

24

2 Naviga

t.i.o

n b

a

r

28

3 Templ.a

t.e

s

29

What are temp

s

e

l.a t.e

s

29

Cars

31

Classified ads

31

Events

32

Jobs

32

Knowledge ba

e

32

News

33

Paypal

33

Real estate

34

Sporting

34

Vacation hous

s

35

4 Conne.c

t.i.n

g t.o t.h

e d

a t.a

b

a

e

s

35

Dataso

5 u r.c

e t.a

b l.e

s

42

6 -.d

Master

e

t.a i.l.s r.e l.a t.i.o

n

s

h i.p b

e t.w

e

e n t.a b l.e s

51

7 SQL q.u

e r.y p

a

g

e

64

About SQL qu.e

r

r

y d

e

s i.g

n

e

r

64

Query Design.e

65

SQL

70

Results

72

8 Charts

73

Creating char.t

t

t.y

p

e

n

c

h

s

t

c

h

h

a

a r.t

r.t.s

L

C /.C

u

t

c

h

73

Chart types

77

List of char

77

Accumulati.o

a r.t

 

78

Area chart

79

Bubble cha.r

82

Column/Bar

85

Combined c

88

Financial O.H

a

n

d l.e

s

t.ic

k c

h

a r.t.s

91

Gauge cha.r.t

94

Line chart Pie/Dough.n

r

a t.s

 

97

100

Contents

II

 

Chart param.e

t.e r.s

102

Chart appear

a

n

c

e

104

Formatting d.a

t

a p

o i.n t.s o

n a c

h

a

r

t

106

Using SQL to

s

h

a

p

e c

h

a

r

t

d

t

a a

 

117

9 Repo.r.t.s

121

 

Creating rep.o

r

t a

n

d s

e t.t.i.n

g p

a

r

a

m e

t.e r.s

121

Report totals

a

n

d l.a

y

o

u

t

126

10 Dash.b

o

a

r.d

s

128

Creating das.h

b

o

a

r

d

s

128

Master-detai.l.s

d

a

s

h

b

o

a

r

d

138

Dashboard s.e

a

r

c

h

142

11 Choo.s

e

p

a

g

e

s

146

12 Choo.s

e

f.i.e l.d

s

160

13 Field.s

o

r

d

e

r a

n

d t.o t.a l.s

168

14 Misce

l.l.a

n

e

o

u

s

e t.t.i.n

s

g

s

175

15 Addin

g

C

A

P

T

C

H

A

186

16 Secu.r.i.t.y

 

189

 

Login page

189

Login form a.p

p

n

e

d p

n

s s

e

w

c

a

r

a

a

o r.d

s

191

Registration.a

196

Advanced se

c

e

u

r

e t.t.i.n

n

i.t.y s

r

m i.s

s i.o

s

g

s

 

201

User group p

203

Dynamic Per.m

o

i.s s i.o

r.d l.o

n

c

s

k i.n

g

205

Audit and rec

209

Active Direct.o

r

y

214

 

Encryption

218

Facebook co.n

n

e

c

t

221

17 Style

E

d i.t.o

r

224

About Style E

d

i.t

o

r

 

224

Adding new .f.o

n

t.s t.o S t.y l.e E

d i.t.o

r

226

 

Customizing

l.a

y

o

u

t

227

Customizing

s

t.y l.e a

n

d c

o l.o

r s c

h

e

m

e

231

Page layouts

240

Add/Edit/V

i.e

w

p

a

g

e l.a

y

o

u

t.s

240

List page .l.a

y

o

u

t.s

247

Search pa

g

e l.a

y

o

u

t.s

253

18 Visua

l

E d i.t.o

r

256

"Edit as" sett

i.n

e

r

s

t.t.in

g

g

256

"Edit as" s

s

256

ColorPicke

261

Date

262

File/Image

264

Lookup w.i.z

a

r.d

268

Signature.P

a

d

280

Text area

t.y

t.t.i.n

e

g

t.t.in

s

s

p

s

e

280

Text field

281

Time

282

Validation

283

"Filter as" se

287

"Filter as"

g

s

287

III

III PHPRunner 8.1 Manual

PHPRunner 8.1 Manual

III PHPRunner 8.1 Manual
Boolean 289 Interval lis.t 290 Interval sl.id e r 293 Values lis.t 294 "View as"
Boolean
289
Interval lis.t
290
Interval sl.id
e
r
293
Values lis.t
294
"View as" se
"View as"
Audio
Custom
File
Image
Map
QRCode
Video
Customizing
t.t.i.n
g
s
297
s
e
t.t.in
g
s
297
301
302
303
304
307
311
312
a
p
p
e
a
r
a
n
c
e
313
Add butto.n
t.o '.W i.t.h s
e
le
c t.e
d
' p
o
p
u
p
313
Display de
t.a i.ls t.a
b l.e o
n t.a
b o
n A
d
d
/.E
d
it./.V i.e
w
p
a
g
e o
f m
a
s
t.e
r
r
e
c
o
r.d
315
About
318
Main Toolbar
325
Page Elemen
t.s
327
Adding PHP c
Insert button
Insert Map
Menu builde.r
o
d
e s
n i.p
p
e
t
331
333
339
343
19 Even.t
E
d i.t.o
r
348
20 Outpu
t
d i.r
e
c.t.o y
r
s
e t.t.i.n
g
s
355
21 After.y
o
u a r.e d
o
n
e
357
22 l.o
FTP u
p
a
d
359
23 Front.P
a
g
e
P
u
b l.i.s.h i.n
g
361
Part III
Advanced topics
363
1 Even.t.s
363
Predefined a.c
t
i.o
n
s
363
Send simp
l.e e
m
a i.l
363
Send ema.i.l
w
i.t.h n
e
w
d
a
t.a
364
Send ema.i.l
Save new
Save old d
w
i.t.h o
ld d
a t.a
365
d
a
t.a i.n a
n
o
t.h
e
r
t.a
b l.e
366
a
t.a i.n a
n
o
t.h
e
r t.a
b l.e
368
Insert a re
c
o
r.d i.n t.o a
n
o
t.h
e
r
t.a
b l.e
369
Check if s.p
Display a .m
e
c i.f.i.c r.e
c
o d e
r
x
is t.s
370
e
s
s
a
g
e o
n t.h
e W
e
b p
a
g
e
372
Redirect t.o
a
n
o
t.h
e
r p
a
g
e
373
Sample even
t.s
373
Appearan.c
e
373
Add
custom fiel.d
t.o f.o r.m
373
Add
dropdow n .l.is
t
b
o
x w it.h v
a l.u
e
s f.o
r s
e
a
r.c
h
374
Add foldable se.c
t.i.o
n
374
Add link to user
Add new button
p
r.o f.i.l.e t.o t.h
e m
e
n
u
375
t.o A
d
d /.E
d i.t p
a
g
e
s
376
Change cell bac.k
Change font siz.e
g
r.o
u
n
d c
o l.o
r
377
i.n t.e
x
t
b
o
x
377
Change 'Logged
Change row ba.c
o
n a
s
'.m
e
s
s
a
g
e
377
k.g o
r
u
n
d c
o
lo
r
377

Contents

IV

Change w idth o.f

e

t.e

d i.t b

f

x

o

ie l.d o

x w i.t.h A J.A

n Q

X

k S

u ic

p

e

o

r

a c

p

u

p

Disable record e

i.t.in

d

o

g

m

d

e r.o

d /.E

A

w s o

d i.t p

a

g

s

f d

e

a t.a

, b

g r.i.d

s

e

a

d o

n l.o

 

378

Change w idth o.f

t

h p

a

n

e

l

378

378

Hide buttons in s Hide controls on

g

g

e

d u

s

e

r n

a

m

e

379

379

Hide empty field.s

o

n V

ie

w

p

a

g

e

 

380

Hide repeating v

a

lu

e

s o

n L i.s

t p

a

g

e

380

Print search par.a

Redirect to deta.i.ls

m

e

t.e r.s o

f

n L i.s

t p

g

t.e

a

r m

a

s

p

a

g

e a t.e

e

r r.e

c

o d w

r

a

s a

d

d

e

d

381

382

Show

data from

m

a

s t.e

r t.a

b

le o

n d

e t.a i.l v

ie

w /.e

d

it./.a

d

d p

a

g

e

383

Show dropdow.n

l.is

t

o

f U

S s t.a t.e

s i.f U

S w

a

s s

e l.e

c

t.e

d i.n c

o

u

n

t.r.y l.is

t

383

Show

pop-up w

i.n

d

o

w

 

384

Database

Before deleting .a

r.e

c

o d c

r

h

e

c

k

f

o

r r.e l.a t.e

d r.e

c

r

o d

s

 

384

384

Dynamic SQL qu

e

r

y

 

385

Limit number of .r.e

c

r

o d

s u

s

e

r.s c

a

n a

d

d

385

Select multiple values from checkboxes or a list field and have them appear as individual database entries

Show list of cus

Store the date a.n

t.o

d

m

e

r o r.d

t.i.m

e w

e s

r

h

e

n a r.e

c

o d is m

r

o

d i.f.i.e

d

 

387

387

388

Update multiple .r.e

c

b

o r.d

le

s

s o

n t.h

e L i.s

t p

a

g

e

r.d

c

s

i.t.h u

o

s

c

d

ll u

e l.e

p

t.o a

t.e

a

d u

t.e

s

s

e

d f.i.e l.d

r.s

s o

n

ly

i.t.h a

t.t.a

c

h

m

e

n

t

f.r.o

m t.h

d

f

il.e

s

e d

a

t.e i.s e

i.n f.o e

t.o P

r.l.ie

d i.t p

n

a

r t.h

a

g

e

e

d d

n

n v

a

n e

n

p l.ic

s

r a

a

p

r.i.a

b

le

a

t.e

a t.i.o

n b

H

s

r

P u

s i.o

s

e

 

388

Update multiple .t.a

389

Email

389

Email selected r.e

389

Send an email to

391

Send an email w Send mass ema.i.l

e r.s

395

395

Send an email w Upload

t.a

b

a

s

e

396

397

Rename uploade

 

397

Misc

398

Check if start da

398

Redirect to user Restrict access

y I.P a

d

d

r.e

s

s

398

399

Save user data.i.n

 

399

Speed up data e

n

l

t.r.y u

l.o

g

in

s i.n

g e

v

e

n

t.s

399

Global event.s

400

Login pag.e

400

Before process

400

Before login

401

After successfu

401

After unsucces.s

f.u

l l.o

g

in

402

Before display

403

JavaScript OnLo

a

d

404

Menu pag.e

 

405

Before process

 

405

Before display

406

JavaScript OnLo

a

d

407

Register p

a

g

e

408

Before process

 

408

Before registrat.i.o

n

409

After successfu

l

r.e

g i.s t.r.a t.i.o

n

410

After unsucces.s

f.u

l r.e

g i.s t.r.a t.i.o

n

410

Before display

411

V

V PHPRunner 8.1 Manual

PHPRunner 8.1 Manual

V PHPRunner 8.1 Manual

JavaScript OnLo

a

d

 

412

Change p.a

s

s

w

o r.d p

a

g

e

413

Before process

 

413

a

s

s

w

o r.d

 

414

Before change .p After passw ord

c

h

a

d

a

n

g

e

d

 

415

Before display

416

JavaScript OnLo

417

Remind pa

s

s

w

o d p

r

a

g

e

418

Before process

 

418

Before

passw o.r.d

r

e

m

i.n

d

e

r

s

e

n

t

418

After passw ord

r.e

a

d

m

in

d

e

r s

e

n

t

419

Before display

 

420

JavaScript OnLo

421

After app.li.c

t.i.o

a

M

i.t l.o

o

n in i.t.i.a li.z

e

d

422

Menu item.:

d i.f.y

423

Before au.d

g

426

Table events

o

a

d

 

427

Add page

427

Before process

427

Copy page: OnL

427

Before record a.d

d

e

e

d

d

428

Custom add

430

After record ad.d

431

Process record

v

a

lu

e

s

432

Before display

433

JavaScript OnLo

a

d

434

Edit page

435

Before process

 

435

Before record u.p

d

a t.e

d

436

Custom record u

p

d

a t.e

438

Process record

v

a

lu

e

s

439

After record up.d

t.e

a

r.y

a

d

d

l.e t.e

d

440

Before SQL que

441

Before display

442

JavaScript OnLo

443

List page

444

Before process

444

Before record d.e

445

After record de.le

t.e

d

446

After group of r.e

c

o r.d

s d

e l.e t.e

d

 

447

Before SQL que

r.y

 

447

Before record p.r

o

c

e

s

s

e

d

448

After record pro

c

e

a

d

s

s

e

t.c

h

e

d

449

Before display

450

JavaScript OnLo

451

Get Row Count

452

Custom Query

453

Custom record f

454

Report pa.g

e

455

Before process

r.y

 

455

Before display

455

Before SQL que

456

JavaScript OnLo

a

d

457

Chart pag.e

458

Contents

VI

Before process

r.y

a

d

 

458

Before SQL que

459

Before display

460

JavaScript OnLo

461

Update chart se.t.t.i.n

g

s

462

Printer-frie

n

d l.y p

a

g

e

466

Before process

r.y

466

Before SQL que

467

Before record p.r

o

c

e

s

s

e

d

468

After record pro

c

e

a

d

s

a

v

r.y

lu

a

d

s

e

e

s

d

469

Before display

470

JavaScript OnLo

471

View pag.e

472

Before process

472

Process record

472

Before SQL que

473

Before display

474

JavaScript OnLo

475

Search pa

g

e

476

Before process

 

476

Before display

477

JavaScript OnLo

a

d

478

Import pag

e

479

Before record in

s

e r.t.e

d

 

479

Before import st.a

r

t.e

d

480

After import finis

h

e

d

480

Export pa.g

e

 

481

Before process

r.y

 

481

Before SQL que

482

JavaScript OnLo

a

d

482

Before record e.x

p

r

o t.e

d

483

After table

i.n i.t.ia l.i.z

e

d

484

Get Table

P

e

r.m

is

s i.o

n

s

485

Is Record

E

d

it.a

b l.e

486

Page life cyc.l.e

o

v

e r.v

i.e

w

487

Common eve

n

t p

a

r.a

m

e

t

e

r

s

491

2 Progr a m m i.n g t.o p i.c.s 492 Buttons 492 Button ob.je
2 Progr
a m m i.n
g t.o
p i.c.s
492
Buttons
492
Button ob.je
c
t
492
Button object
492
Methods
493
getCurrentReco
r.d
493
getNextSelecte.d
R
e
c
o d
r
493
row Data o
b
j.e
c
t
494
row Data object
494
Data Access .L
About Dat.a
Using DAL
Methods
Add
a
y
e
r (.D
A
L
)
495
A
c
c
e
s
s L
a
y
e
r
495
f
u
n
c
t.io
n
s i.n p r.o j.e
c
t.s w i.t.h m
u
lt.i.p l.e d
a
t.a
b
a
s
e c
o
n
n
e
c
t.io
n
s
497
499
499
CustomQuery
500
Delete
500
DBLookup
501
FetchByID
502

VII

VII PHPRunner 8.1 Manual

PHPRunner 8.1 Manual

VII PHPRunner 8.1 Manual

Query

502

QueryAll

 

504

TableName

 

505

Update

 

505

UsersTableNam.e

 

506

w hereAdd

507

Javascript AP

I

507

About Jav

a

s

c

r.i.p

t A

I

P

507

Control ob

je

c

t

508

About Control o.b

je

c

t

508

Methods

511

addClass

511

addStyle

512

addValidation

512

clear

514

clearEvent

515

getDispElem

515

getValue

516

hide

517

invalid

517

isReadonly

518

makeReadonly

519

makeReadWrite

519

on

 

520

removeClass

 

521

removeValidatio

n

 

521

reset

 

522

setDisabled

 

523

setEnabled

524

setFocus

524

setValue

525

show

 

526

validate

 

526

validateAs

527

InlineRow

o

j.e

b

c

t

529

About InlineRow

o

b

j.e

c

t

529

RunnerPa.g

e o

j.e

b

c

t

529

About RunnerPa

g

e o

j.e

b

c

t

529

Methods

 

530

getSearchCont.r.o

l.le

r

530

hideField

 

530

show Field

531

SearchCo.n

t.r

o

ll.e

r

o

b j.e

c

t

532

About SearchCo

n

t.r

o

ll.e

r

o

b j.e

c

t

532

Methods

 

533

addField

 

533

clear

 

535

deleteField

 

535

display

536

getSearchField.s

 

536

toggleCriteria

 

537

toggleOptions

538

SearchFie

ld

o

b j.e

c

t

539

About SearchFi.e

ld

o

b j.e

c

t

539

Contents

VIII

 

Methods

 

540

addOption

 

540

getControl

541

getName

 

541

getOption

 

542

getOptions

543

getSecondCont.r

o

l

543

 

remove

 

544

removeOption

 

545

 

setOption

545

Examples

546

How

How

to access.P to ask for .c

H

P v

o

n

f.i.r.m

a

r.i.a

a

b

t.io

s

n b

le

f

e o

r.e s

a

v i.n

g r.e

c

o r.d

 

546

547

How

to calculat.e

v

a

lu

e

s o

n t.h

e f

ly

548

How

to change.f

o

n

t

s

iz

e i.n t.e

x

t b

o

x

548

How

to change.f

o

n

t

in "

e

d

it." c

o

n

t.r.o l.s

548

How

to change.w

id

t.h o

f e

d

it

b

o

x w it.h A

J

A

X p

o

p

u

p

 

550

How

to change.w

id

t.h o

f t.e

x

t

f.i.e

ld o

n Q

u i.c

k

S

e

a

r.c

h p

a

n

e

l

551

How

How

to control I.n

to convert

l.in

p

in

e A

u

d

d

/.E

d i.t f.u e

p

t i.n t.o u

p

r

n

c

c

a

t.i.o

s

n

e

a

li.t.y f.r

o

m

s

c

r

ip

t

551

552

How

to display .a

ll

O

p

t.io

n

s o

n S

e

a

r.c

h p

a

n

e

l

552

How

to enable/d

i.s

a

b

le a b

u t.t.o

n

553

How

to hide 'Ed.it

e l.e

s

r

i.s

id o

t p

c

t.e

d './.'D

e

le t.e s

e l.e

c

t.e

d

' b

u

t.t.o

n

s

 

554

How

to refresh.g

n L i.s

t p

a

g

e

555

How

to refresh.L

a

g

e a

f.t.e

r In l.i.n

e A

d

d /.E

d i.t

555

How to show d.r.o

p

d

o

w

n l.i.s

t o

f U

S s

t.a t.e

s

556

How

to

w ork

w.i.t.h

f.o l.d

a

b

le s

e

c t.i.o

n

557

How

to

w ork

w.i.t.h

t.a

b

s

557

Page class

 

559

 

About Pag

e c l.a

s

s

559

Methods

560

getCurrentReco.r.d

 

560

getMasterRecor.d

560

hideField

 

561

setProxyValue

 

562

show Field

 

562

SQLQuery cla

s

s

 

563

 

About SQ.L

Q

u

e

r.y c l.a

s

s

 

563

Methods

564

addField

 

564

addWhere

 

565

deleteField

565

replaceField

566

replaceWhere

 

567

Troubleshoo

t.i.n

g t.i.p

s

568

 

Troublesh.o

o t.i.n

g c

h

a r.t.s

 

568

Troublesh.o

o t.i.n

g c

u

s

t.o

m b

u

t.t.o

n

s

571

Troublesh.o

o t.i.n

g J

a

v

a

s

c

r.i.p

t e

r.r.o s

r

575

Troublesh.o

o t.i.n

g t.i.p

s

579

Data formatti.n

g

 

580

How

to creat.e

y

o

u

r o

w

n E

d i.t c

o

n

t.r

o

l p l.u

g i.n

 

581

How

to execu

t.e S

Q

L S

e

r

v

e

r

/.M

y

S

Q

L s

t.o r.e

d p

r

o

c

e

d

u

r

e

s

587

Master-detai.l.s

r.e l.a t.i.o

n

s

h i.p

s

587

PHPRunner s

e

s

s i.o

n v

a

r i.a

b l.e

s

588

IX

IX PHPRunner 8.1 Manual

PHPRunner 8.1 Manual

IX PHPRunner 8.1 Manual

m

p l.a t.e

s

591

PHPRunner t.e

u

n

c i.o

t

n

594

runner_mail.f Template file

Template lan

s

g

p r.o

u

a

g

e

L

q

u

c

e

s

s i.n

g r

u l.e

s (.F i.l.e

s t.x )

t

597

597

Useful links

604

Using JOIN S.Q

e r.i.e

s

604

3

Publi.s

h i.n

g P

H

P a

p

p l.i.c

a t.i.o

n t.o t.h

e r.e

m

o t.e W

e

b s.e r.v

e

r

 

605

Using

FTP cli.e

n

t

t.o p

u

b l.i.s

h P

H

P

p

a

g

e

s t.o t

h

e r

e

m

o e W

t

e

b s

e r.v

e

r

605

Using FrontP.a

g

e t.o p

u

b l.i.s

h P

H

P

p

a

g

e

s t.o t

h

e r

e

m

o e W

t

e

b s

e r.v

e

r

606

4

Demo

A

c

c

o

u

n

t

608

What is the D

e

m o A

c

c

o

u

n t.?

608

Terms and C

o

n

d i.t.i.o

n

s

608

5

Web.r.e

p

r

o t.s

610

Online repor.t./.c

h

a

r.t b

u i.l.d

e

r

 

610

Creating web

r.e

p

o

r

t

615

Creating web

c

h

a

r

t

628

Custom SQL

640

6

Doma

i.n h

o

t i.n s.t.r.u

s

c t.i.o