## /p4a/libraries/standard.php

Description

P4A - PHP For Applications.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

To contact the authors write to:
CreaLabs
Via Medail, 32
10144 Torino (Italy)
Web: http://www.crealabs.it
E-mail: info@crealabs.it

The latest version of p4a can be obtained from: http://p4a.sourceforge.net

- author: Andrea Giardina <andrea.giardina@crealabs.it>
- author: Fabrizio Balliano <fabrizio.balliano@crealabs.it>
- license: GNU General Public License
- copyright: CreaLabs
- link: http://www.crealabs.it
- link: mailto:info@crealabs.it info@crealabs.it
- link: http://p4a.sourceforge.net

Functions
P4A_Array2file (line 120)

Converts an array into a "file" value.

- access: public

array P4A_Array2file (array $aFile)

- array $aFile: The file.

P4A_Error (line 73)

Stops program execution with an error.

- access: public

void P4A_Error (string $error, [string $message = ''])

- string $error: Error identifier.
- string $message: Error description or other message.

P4A_File2array (line 97)

Converts a "file" value into an array.

- access: public

array P4A_File2array (string $file)

- string $file: The file.

P4A_Get_File_Extension (line 258)

Returns the extension of the passed file path/url.

- access: public

string P4A_Get_File_Extension (string $url)

- string $url

P4A_Get_Microtime (line 213)

Returns the microtime.

- access: public

integer P4A_Get_Microtime ()
P4A_Get_Num_Pages (line 157)

Takes records number, page limit and returns the num of pages.

- access: public

integer P4A_Get_Num_Pages (integer $records_number, integer $page_limit)

- integer $records_number: Page Number.
- integer $page_limit: Records

P4A_Get_Offset (line 142)

Takes page number, records number, page limit and returns the necessary offset for a query.

- access: public

integer P4A_Get_Offset (integer $page_number, integer $records_number, integer $page_limit)

- integer $page_number: Page limit.
- integer $records_number: Records limit.
- integer $page_limit: Page limit.

P4A_Get_Unique_File_Name (line 173)

Tests if a file with the same name exists and return the correct file name.

Appends _1 (_2, _3) at the end fo the file name.

- access: private

string P4A_Get_Unique_File_Name (string $filename, string $directory)

- string $filename: The filename without path.
- string $directory: The directory (absolute).

P4A_Get_Valid_File_Name (line 201)

Strips "strange" chars from filename.

- access: public

string P4A_Get_Valid_File_Name (string $filename)

- string $filename

P4A_Include_Objects (line 224)

Includes all p4a objects for the application.

- access: private

void P4A_Include_Objects (string $dir)

- string $dir

P4A_Is_Error (line 86)

Checks if an object is an error object.

- access: public

void P4A_Is_Error (object object $object)

- object object $object: The object.

P4A_Is_Extension_Allowed (line 269)

Check if the extension is allowed to be uploaded

- access: public

boolean P4A_Is_Extension_Allowed (string $extension)

- string $extension

P4A_New_Line (line 48)

Prints out one or many HTML "new lines".

- access: public

void P4A_New_Line ([integer $number = 1])

- integer $number: The number of new lines to print.

P4A_Space (line 60)

Prints out one or many HTML "spaces".

- access: public

void P4A_Space ([integer $number = 1])

- integer $number: The number of spaces to print.

__ (line 281)

Returns an i18n translated string (like gettext)

- access: public

string __ (string $string)

- string $string: string to be translated

Documentation generated on Fri, 26 May 2006 12:43:36 +0200 by phpDocumentor 1.3.0RC5