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 |
|
|
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 |
$format |
= >>"png"<< |
|
format (extension) of the file. Default (png) should be kept whenever possible |
|
Returns |
string the url |
|