PEAK XOOPS - Re: Minor problem with IIS in englishin japanese

Re: Minor problem with IIS

List posts in the topic

question Re: Minor problem with IIS

msg# 1.1.1.1
depth:
3
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/2/25 5:01
GIJOE  Gunnery Sergeant   Posts: 4110
- copy gtickets.php into modules/(dirname)/include/
- include gtickets.php in your scripts
- add Ticket hidden into your forms like this:
<input type='hidden' name='op' value='order' />
".$xoopsGTicket->getTicketHtml( __LINE__ )."
<input type='submit' name='submit' value='"._SUBMIT."' />
4 methods are valid for each usages.
See the last of this post.

- add Ticket checker into your recipent of form data like this:
if ( ! $xoopsGTicket->check() ) {
	redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
}
- That's all!


4 methods of getting a ticket:
	// render form as plain html
	function getTicketHtml( $salt = '' , $timeout = 1800 )
	{
		return '<input type="hidden" name="XOOPS_G_TICKET" value="'.$this->issue( $salt , $timeout ).'" />' ;
	}

	// returns an object of XoopsFormHidden including theh ticket
	function getTicketXoopsForm( $salt = '' , $timeout = 1800 )
	{
		return new XoopsFormHidden( 'XOOPS_G_TICKET' , $this->issue( $salt , $timeout ) ) ;
	}

	// returns an array for xoops_confirm() ;
	function getTicketArray( $salt = '' , $timeout = 1800 )
	{
		return array( 'XOOPS_G_TICKET' => $this->issue( $salt , $timeout ) ) ;
	}

	// return GET parameter string.
	function getTicketParamString( $salt = '' , $noamp = false , $timeout=1800 )
	{
	    return ( $noamp ? '' : '&' ) . 'XOOPS_G_TICKET=' . $this->issue( $salt, $timeout ) ;
	}

Votes:0 Average:0.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!