Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/inri/public_html/daCode-HEAD/daCode/src/phplib/redirects.php3
daCode -

Redirect

Redirect

Class to redirect to an url after a hit

 

private class Redirect

Class to redirect to an url after a hit

daCode http://www.dacode.org/
src/phplib/redirects.php3
$Id: redirects.php3,v 1.44 2002/05/13 21:34:03 jbcombes Exp $

Depends: Config Db

AuthorsFabien Penso <penso@linuxfr.org>

 

Public Method Summary

void

Redirect()

Class constructor
mixed

view(string $url)

return the number of hits of an url
integer

add(string $url)

Add hits+1 or create it on DB
string

make(string $name, [ string $url, string $arg, string $html_args ])

Returns a <a href="url">name</a> link with appropriate redirect
void

header(string $url)

Redirect to URI and add one hit

Private Field Summary

object Db

$db

Call to class db
string

$QUERY_STRING

$HTTP_SERVER_VARS['QUERY_STRING']
array

$HTTP_GET_VARS

$HTTP_GET_VARS

Public Method Details

Redirect

public void Redirect( )

  Class constructor

Returns void


view

public mixed view( string $url )

  return the number of hits of an url

return 0 if $config->countredirect!=0
return -1 if DB error
else a sentence like "n hit(s)"

Parameter
string $url
url
Returns mixed

n hit(s) or an error code


add

public integer add( string $url )

  Add hits+1 or create it on DB

Return nothing if request is succesful
return 0 if $config->countredirect!=0
return -1 if DB error

Parameter
string $url
url
Returns integer

an error code or void


make

public string make( string $name, [ string $url, string $arg, string $html_args ] )

  Returns a <a href="url">name</a> link with appropriate redirect

more arguments can be added with the 3rd and 4th parameters.

Parameter
string $name
name that'll be displayed
string $url = >>""<<
URI
string $arg = >>""<<
the args of the url
string $html_args = >>""<<
html arguments. Basically, it can be used for CSS
Returns string

<a href="url"></a>


header

public void header( string $url )

  Redirect to URI and add one hit

Call header() to redirect to the URI and call exit.

Parameter
string $url
url
Returns void


Private Field Details

$db

private object Db $db

>><<

Call to class db


$QUERY_STRING

private string $QUERY_STRING

>><<

$HTTP_SERVER_VARS['QUERY_STRING']


$HTTP_GET_VARS

private array $HTTP_GET_VARS

>><<

$HTTP_GET_VARS



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta