\

Namespaces

lf

Constants

APP

APP

ENV

ENV

LF

LF

ROOT

ROOT

Functions

build_hidden()

build_hidden(  $items,   $edit) 

Parameters

$items
$edit

build_menu()

build_menu(  $menu,   $edit,   $parent = -1,   $depth = -1,   $prefix = '',   $snip) 

Parameters

$menu
$edit
$parent
$depth
$prefix
$snip

build_nav_cache()

build_nav_cache(  $menu,   $parent = -1,   $prefix = '') 

Parameters

$menu
$parent
$prefix

curl_get_contents()

curl_get_contents(  $url) 

Parameters

$url

get_include()

get_include(  $path) 

Include and return output as string

Parameters

$path

hasnotice()

hasnotice(  $namespace = 'lf') 

Parameters

$namespace

jsprompt()

jsprompt(  $msg = 'Are you sure?') 

`return 'onclick="return confirm(\''.$msg.'\');"';`

Parameters

$msg

lfbacktrace()

lfbacktrace() 

linked_app()

linked_app(  $menu,   $edit,   $parent = -1,   $depth = -1,   $prefix = '',   $snip) 

Parameters

$menu
$edit
$parent
$depth
$prefix
$snip

linked_apps_h()

linked_apps_h(  $items,   $edit) 

Parameters

$items
$edit

notice()

notice(  $msg = '',   $namespace = 'lf') 

Parameters

$msg
$namespace

pre()

pre(  $str,   $func = 'print_r') 

Parameters

$str
$func

redirect302()

redirect302(string  $url = '') 

Shortcut for headers to redirect to HTTP_REFERER. Very handy after a successful DELETE, INSERT, or UPDATE.

Parameters

string $url

Optionally specified alternative URL to the default $_SERVER['HTTP_REFERER']

revert()

revert() 

no longer used :\

since()

since(  $timestamp) 

Parameters

$timestamp

strdump()

strdump(  $str) 

Parameters

$str

textarea()

textarea(  $str) 

Parameters

$str

thumbnail()

thumbnail(string  $html, string  $dimensions = '200x200') : string

Process HTML to produce thumbnails from larger images. It scrapes and replaces the image URLs.

Parameters

string $html

String of HTML text containing 'img src="[^"]+"' to be thumbnailed

string $dimensions

"HeightxWidth" pixels. Defaults to 200x200.

Returns

string —

$html, with img src=".jpg" replaced with links to the thumbnails of the image.

Unzip()

Unzip(  $dir,   $file,   $destiny = "") 

I copied this from somewhere. Unzip a given file at $dir/$file

Parameters

$dir
$file
$destiny

upgrade()

upgrade() 

Upgrades littlefoot automatically if the system.zip exists in lf/

upload()

upload(string  $destfolder, array<mixed,string>  $allowedExts = array("jpg", "jpeg", "gif", "png"),   $allowedTypes = array("image/gif", "image/jpeg", "image/pjpeg", "image/png"), integer  $limit = 5) : array<mixed,string>

Process submitted $_FILES, allow only images by default

Parameters

string $destfolder

File path to where the file(s) should be uploaded

array<mixed,string> $allowedExts

An array of strings that list that accepted file types

$allowedTypes
integer $limit

Maximum number of files that can be uploaded at once from $_FILES (default = 5)

Returns

array<mixed,string> —

An array of the upload results as strings. Array keys are the name="" of the input in the form.