\Utilities

Summary

Methods
Properties
Constants
checkFileName()
optimizeOutputString()
validateInput()
randomCode()
getRowHtml()
getCollapseHtml()
No public properties found
SYS_VERSION
POLL_ID
ADMIN_CODE
CAPTCHA
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

SYS_VERSION

SYS_VERSION

The system's Version

POLL_ID

POLL_ID

Possible chars for:

ADMIN_CODE

ADMIN_CODE

CAPTCHA

CAPTCHA

Methods

checkFileName()

checkFileName(  $name) 

Checks if a String is a valid file-name (file only, no dirs)

Parameters

$name

the filename

optimizeOutputString()

optimizeOutputString(  $cont) 

Does some optimizing on the give string to output it for html display nl2br and htmlentities

Parameters

$cont

the string to optimized

validateInput()

validateInput(  $s,   $reg,   $len) : \the

Validates a string by the given rex and cuts lenght **no boolean return**

Parameters

$s

the string to check

$reg

the regular expressions (/[^a-z]/ to allow only small latin letters)

$len

the maximum length

Returns

\the —

clean string (empty, if other input than string or only dirty characters)

randomCode()

randomCode(  $len,   $chars) 

Generates a random code

Parameters

$len

the code lenght

$chars

the chars to choose of (string) e.g. consts POLL_ID, ADMIN_CODE

getRowHtml()

getRowHtml(  $first,   $second,   $clF = '',   $clS = '') 

Returns a typical div colum having two rows.

Parameters

$first

the data in the first cell

$second

the data in the second cell

$clF

classes to add to first cell

$clS

classes to add to second cell

getCollapseHtml()

getCollapseHtml(  $name,   $content) : \HTML

Generates a collapsable HTML-Element

Parameters

$name

the name of the element (click on this to open)

$content

The content to collapse

Returns

\HTML —

String