Packageindex Classtrees Modulegroups Elementlist Report XML Files

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

Session

Session

Class to manage user's session

 

private class Session

Class to manage user's session

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

 

Public Method Summary

void

Session()

Class constructor
void

close(string $reload)

Close the session of a user
void

modify_karma(array $c, [ string $type ])

This function does change the karma table
string

newsurls(integer $id, string $section, string $topic, integer $yea, integer $mon, integer $day, [ integer $score, boolean $absolute, boolean $generic ])

Returns the relative url for the news based on the session
string

href_theme(string $file)

Return an url of a themable file
string

imgurl(string $name, [ string $format ])

Return images URL depending on current theme

Private Method Summary

mixed

check()

Check the session of the user

Public Field Summary

boolean

$checked

Tells whether the user is identified or not.

Private Field Summary

object Db

$db

Call to class db
integer

$user_id

user's id
string

$fname

user's first name
string

$lname

user's last name
string

$login

user's login
string

$email

user's email
integer

$level

user's level give info about his right
integer

$param

user's parameters (sig, userboxes...)
integer

$timestamp

user's account creation date
integer

$last

user's last login date
boolean

$sig_id

user's sig_id in table "sig"
boolean

$hide_sig

user's want to hide his sig or not
string

$homesite

user's home site url
string

$signature

user's signature
string

$password

user's encrypted password
boolean

$status

tell if a user was ever logged.
integer

$score

user's inferior limit of visible comments
integer

$theme

number of the theme selected by user
array

$supp_info

user's additionnal information
array

$user_boxes

user's boxes
boolean

$has_user_boxes

did user selected boxes ?
integer

$foo

Public Method Details

Session

public void Session( )

  Class constructor

Returns void


close

public void close( string $reload )

  Close the session of a user

remove session_id from db and
call to header() and exit

Parameter
string $reload
the reload argument to put after the url
Returns void


modify_karma

public void modify_karma( array $c, [ string $type ] )

  This function does change the karma table

Warning: call to exit if DB is off

Parameter
array $c
array with the user_id
string $type = >>"="<<
"+=" ou "="
Returns void


newsurls

public string newsurls( integer $id, string $section, string $topic, integer $yea, integer $mon, integer $day, [ integer $score, boolean $absolute, boolean $generic ] )

  Returns the relative url for the news based on the session

Parameter
integer $id
the id of the news
string $section
the section of the news, 0 for none
string $topic
the topic of the news, 0 for none
integer $yea
the year of the news's date
integer $mon
the month of the news's date
integer $day
the day of the news's date
integer $score = >>-2<<
the score for the comments
boolean $absolute = >>true<<
absolute url if true, relative if false.
boolean $generic = >>false<<
true if the URL is to be generic, 0 if it is for the current users's set of preferences
Returns string

the url of the news


href_theme

public string href_theme( string $file )

  Return an url of a themable file

Parameter
string $file
file name.
Returns string

the url


imgurl

public string imgurl( string $name, [ string $format ] )

  Return images URL depending on current theme
Name of the file is name.format

Parameter
string $name
file name
string $format = >>"png"<<
format (extension) of the file. Default (png) should be kept whenever possible
Returns string

the url


Private Method Details

check

private mixed check( )

  Check the session of the user

Warning: call to exit if DB is off.

Returns mixed

Error message or boolean, 1 if ok, 0 if not, -1 db error


Public Field Details

$checked

public boolean $checked

>><<

Tells whether the user is identified or not.


Private Field Details

$db

private object Db $db

>><<

Call to class db


$user_id

private integer $user_id

>><<

user's id


$fname

private string $fname

>><<

user's first name


$lname

private string $lname

>><<

user's last name


$login

private string $login

>><<

user's login


$email

private string $email

>><<

user's email


$level

private integer $level

>><<

user's level give info about his right


$param

private integer $param

>><<

user's parameters (sig, userboxes...)


$timestamp

private integer $timestamp

>><<

user's account creation date


$last

private integer $last

>><<

user's last login date


$sig_id

private boolean $sig_id

>><<

user's sig_id in table "sig"


$hide_sig

private boolean $hide_sig

>><<

user's want to hide his sig or not


$homesite

private string $homesite

>><<

user's home site url


$signature

private string $signature

>><<

user's signature


$password

private string $password

>><<

user's encrypted password


$status

private boolean $status

>><<

tell if a user was ever logged.


$score

private integer $score

>><<

user's inferior limit of visible comments


$theme

private integer $theme

>><<

number of the theme selected by user


$supp_info

private array $supp_info

>><<

user's additionnal information


$user_boxes

private array $user_boxes

>><<

user's boxes


$has_user_boxes

private boolean $has_user_boxes

>><<

did user selected boxes ?


$foo

private integer $foo

>><<




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta