PEAK XOOPS - Re: how to implement gticket2 in englishin japanese

Re: how to implement gticket2

List posts in the topic

question Re: how to implement gticket2

msg# 1.1
depth:
1
Previous post - Next post | Parent - Children.1 .2 | Posted on 2006/5/4 6:00
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi krobi.

It is not so easy to explain how to use a library

gticket2 is almost the same as gticket.

- include_once it
- add hidden into your form
- add check() into your transaction


form side with XoopsForm:
	$form = new XoopsThemeForm( ... );
	$GLOBALS['xoopsGTicket']->addTicketXoopsFormElement( $form , __LINE__ , 1800 , '(your area name)' ) ;

form side with plain HTML:
	$xoopsGTicket->getTicketHtml( __LINE__ , 1800 , '(your area name)' )


transaction side:
	if ( ! $xoopsGTicket->check( true , '(your area name)' ) ) {
		redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
	}
If an error occurs in cheking the ticket, "repost form" is displayed automatically.

If you don't want to display "repost form", call check() like this.
	if ( ! $xoopsGTicket->check( true , '(your area name)' , false ) ) {
		redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
	}

Votes:0 Average:0.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!