beautypg.com

Grandstream GXV3140 GMI Guide User Manual

Page 33

background image

Grandstream Networks, Inc.

GMI HTML SDK and API Guide

Page 33 of 43

www.grandstream.com

Last Updated: 09/2010

case

37

:

//Left process here

break

;

case

38

:

//Up process here

case

40

:

//Down process here

break

;

case

39

:

//Right process here

break

;

default

:

break

;

}

}

script

>

head

>

<

body

onkeydown="softkey_process

(

event

.keyCode

)

;"

>

<

table

id

=

'vote_result'

align

=

"center"

><

tr

><

td

>

/******************************************************************************

* Query the database and output the result as html

******************************************************************************/

$

conn

=

mysql_pconnect

(

$

mysqlserver

,

$

mysqluser

,

$

mysqlpass

)

or

die

(

"

Sorry

,cannot connect

"

)

;

//if(mysql_num_rows(mysql_query("SHOW TABLES LIKE

'".$mysqltable."'"))==1) {}

$

result

=

mysql_list_tables

(

$

mysqldb

)

;

$

tableexist

=

false

;

for

(

$

i

=

0

;

$

i

<

mysql_num_rows

(

$

result

)

;

$

i

++

){

if

(

mysql_tablename

(

$

result

,

$

i

)

==

$

mysqltable

){

$

tableexist

=

true

;

break

;

}

}

if

(

!$

tableexist

){

printf

(

"

Table is not exist,creating...

\n

"

)

;

$

sql

=

'

CREATE TABLE `myvote` (

`name` VARCHAR( 30 ) NOT NULL,