|
|
File: /home/inri/public_html/daCode-HEAD/daCode/src/phplib/hits.php3
daCode -
Hits
Hits
Used to count hits on links
|
private class Hits
Used to count hits on links
daCode http://www.dacode.org/
src/phplib/hits.php3
$Id: hits.php3,v 1.37 2002/05/14 21:11:08 jbcombes Exp $
|
|
|
|
|
Private Field Summary |
object Db |
$dbDb abstraction layer |
|
Public Method Details |
Hits |
public void Hits( )
|
|
Class constructor
|
Returns |
void |
|
view |
public mixed view( integer $id )
|
|
return number of hits
Calls echo on SQL failure
Used anywhere???
|
Parameter |
|
|
Returns |
mixed integer 61 on SQL failure, string "xxx hit(s)" on success |
|
make |
public string make( array $make_tempo )
|
|
Returns a <a href="url">name</a> link with appropriate redirect
|
Parameter |
|
array |
$make_tempo |
|
|
'id' => string link ID, 'url' =>string, 'name' => string label, 'hits' => integer number of hits |
|
Returns |
string the 'a' element. |
|
header |
public void header( integer $id )
|
|
Header the url
Class header to redirect to requested URL, then exit.
|
Parameter |
|
|
Returns |
void |
|
|
Private Method Details |
add |
private mixed add( integer $id )
|
|
Add hits+1 or create it
Calls echo on SQL failure
|
Parameter |
|
|
Returns |
mixed integer -1 on failure, void on success |
|
|
Private Field Details |
$db |
private object Db $db
>> <<
Db abstraction layer
|
|
|
|
|
PHPDoc 1.0beta |