contenido\includes\functions.stat.php
Description: Define the "stat" related functions
Requirements:
- Author
- Olaf Niemann
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- Contenido Backend includes
- Since
- file available since contenido release <= 4.6 {@internal created 2002-03-02 modified 2008-06-26, Frederic Schneider, add security fix modified 2008-07-22, Ingo van Peeren, fixed SQL syntax error due to security fix modified 2009-10-23, Murat Purc, removed deprecated function (PHP 5.3 ready) and commented code $Id: functions.stat.php 1085 2009-10-24 02:01:34Z xmurrix $: }}
- Version
- 1.0.3
Functions
buildHeapTable(string $sHeapTable, \DB_Contenido $db) : voidDeletes existing heap table (table in memory) and creates it.
| Name | Type | Description |
|---|---|---|
| $sHeapTable | string | Table name |
| $db | \DB_Contenido | Database object |
statCreateLocationString(int $idcat, string $seperator, string $cat_str) : voidGenerates the location string for passed category id.
Performs a recursive call, if parent category doesn't matches to 0
| Name | Type | Description |
|---|---|---|
| $idcat | int | The category id |
| $seperator | string | Separator for location string |
| $cat_str | string | The location string variable (reference) |
statDisplayTopChooser(\none $default) : stringReturns a drop down to choose the stats to display
| Name | Type | Description |
|---|---|---|
| $default | \none |
| Type | Description |
|---|---|
| string | Returns a drop down string |
- Author
- Timo A. Hummel
- Copyright
- four for business AG
statDisplayYearlyTopChooser(\none $default) : stringReturns a drop down to choose the stats to display for yearly summary pages
| Name | Type | Description |
|---|---|---|
| $default | \none |
| Type | Description |
|---|---|
| string | Returns a drop down string |
- Author
- Timo A. Hummel
- Copyright
- four for business AG
statGetAvailableMonths(mixed $year, $client, $lang) : arrayReturn an array with all months for a specific year which are available as stat files
| Name | Type | Description |
|---|---|---|
| $year | mixed | many |
| $client | ||
| $lang |
| Type | Description |
|---|---|
| array | Array of strings with months. |
- Author
- Timo A. Hummel
- Copyright
- four for business AG
statGetAvailableYears(mixed $client, $lang) : arrayReturn an array with all years which are available as stat files
| Name | Type | Description |
|---|---|---|
| $client | mixed | many |
| $lang |
| Type | Description |
|---|---|
| array | Array of strings with years. |
- Author
- Timo A. Hummel
- Copyright
- four for business AG
statResetStatistic(int $client) : voidResets the statistic for passed client
| Name | Type | Description |
|---|---|---|
| $client | int | Id of client |
statReturnCanonicalMonth(int $month) : stringReturns the canonical month.
Wrapper for function getCanonicalMonth()
| Name | Type | Description |
|---|---|---|
| $month | int | The digit representation of a month |
| Type | Description |
|---|---|
| string | Textual representation of a month |
statsArchive( $yearmonth) : \noneArchives the current statistics
| Name | Type | Description |
|---|---|---|
| $yearmonth | String with the desired archive date (YYYYMM) |
| Type | Description |
|---|---|
| \none |
statsDisplayInfo(int $id, string $type, int $x, int $y, int $w, int $h) : stringDisplays statistic information layer (a div Tag)
| Name | Type | Description |
|---|---|---|
| $id | int | Either article or directory id |
| $type | string | The type |
| $x | int | Style top position |
| $y | int | Style left position |
| $w | int | Style width |
| $h | int | Style height |
| Type | Description |
|---|---|
| string | Composed info layer |
statsOverviewAll( $yearmonth) : \noneGenerates a statistics page
| Name | Type | Description |
|---|---|---|
| $yearmonth | Specifies the year and month from which to retrieve the statistics, specify "current" to retrieve the current entries |
| Type | Description |
|---|---|
| \none |
- Author
- Jan Lengowski
@modified Timo A. Hummel - Copyright
- four for business AG
statsOverviewTop( $yearmonth, $top) : \noneGenerates a top
| Name | Type | Description |
|---|---|---|
| $yearmonth | Specifies the year and month from which to retrieve the statistics, specify "current" to retrieve the current entries | |
| $top | Specifies the amount of pages to display |
| Type | Description |
|---|---|
| \none |
- Author
- Timo A. Hummel
- Copyright
- four for business AG
statsOverviewTopYear( $year, $top) : \noneGenerates a top
| Name | Type | Description |
|---|---|---|
| $year | Specifies the year from which to retrieve the statistics | |
| $top | Specifies the amount of pages to display |
| Type | Description |
|---|---|
| \none |
- Author
- Timo A. Hummel
- Copyright
- four for business AG