linea21-utils
[ class tree: linea21-utils ] [ index: linea21-utils ] [ all elements ]

Procedural File: lib_common.php

Source Location: /lib/lib_common.php



Page Details:



Tags:

author:  linea21 <info@linea21.com>
version:  $id SVN
access:  public
filesource:  Source Code for this file
license:  http://opensource.org/licenses/gpl-3.0.html








addDynamicCSS [line 1785]

void addDynamicCSS( $url)



Parameters

   $url  
[ Top ]



AddDynamicFooter [line 1816]

void AddDynamicFooter( )

AddDynamicFooter()

Display JS footer




[ Top ]



AddDynamicHeader [line 1806]

void AddDynamicHeader( )

AddDynamicHeader()

Display JS and CSS header




[ Top ]



availablePlugins [line 1446]

array availablePlugins( )

availablePlugins()

Return available plugins




[ Top ]



cancel_button [line 1162]

string cancel_button( $back_uri $back_uri)

cancel_button() génére un bouton de retour



Parameters

$back_uri   $back_uri  
[ Top ]



check4newVersion [line 1833]

string check4newVersion( )

check4newVersion()

Display a link to download new version if available




[ Top ]



checkdate_validity [line 1057]

boolean checkdate_validity( string $date, [string $msg = ''])

checkdate_validity() Vérifie la validité d'une date



Tags:

return:  true or error message (string)


Parameters

string   $date  
string   $msg   (optionnal)
[ Top ]



cleanString [line 2292]

string cleanString( string $string, [array $allowed = array()])

cleanString()

Remove exotic characters form string same as used in filemanager




Parameters

string   $string  
array   $allowed  
[ Top ]



commentEnabled [line 1996]

boolean commentEnabled( string $m)

commentEnabled($m)

Check if comment is enabled on given module




Parameters

string   $m  
[ Top ]



cutBody [line 566]

array cutBody( string $text)

cutBody() Renvoie un texte en 2 parties dans un tableau



Parameters

string   $text  
[ Top ]



cutText [line 537]

void cutText( string $content, integer $length, [integer $abbr = 0], [string $end = '...'])

cutText() Découpe un texte à une longeur donnée.



Parameters

string   $content  
integer   $length  
integer   $abbr  
string   $end  
[ Top ]



date_compare [line 775]

boolean date_compare( $date1 $date1, $date2 $date2, $op $op)

date_compare() Compare 2 dates with a given operator.



Parameters

$date1   $date1  
$date2   $date2  
$op   $op  
[ Top ]



date_rfc2822 [line 985]

string date_rfc2822( string $date)

date_rfc2822()

Format date to RFC 2822 date format




Tags:

return:  (exemple : Thu, 21 Dec 2000 16:01:07 +0200)


Parameters

string   $date  
[ Top ]



display_errors [line 1100]

void display_errors( string $msg)

display_errors() Affichage d'un message d'erreur utilisateur



Tags:

return:  (echo)


Parameters

string   $msg  
[ Top ]



Display_linkin_page [line 1189]

void Display_linkin_page( $table_link, $total, $debut, [ $pas = SELECT_LIMIT])

Display_linkin_page()



Tags:

todo:  remove


Parameters

   $table_link  
   $total  
   $debut  
   $pas  
[ Top ]



display_statut [line 1296]

string display_statut( string $statut)

display_statut() renvoie le statut en pleines lettres



Parameters

string   $statut  
[ Top ]



distInclude [line 833]

void distInclude( string $file, $default_dist)

distInclude() Include the required file if no user file is found, includes the dist/ version file.

Localized files have the priority




Parameters

string   $file  
   $default_dist  
[ Top ]



dragTableSettings [line 201]

void dragTableSettings( )

dragTableSettings()

Include jQuery DragTable plugin settings




[ Top ]



empty_nc [line 1011]

string empty_nc( string $content)

empty_nc() retourne le contenu ou N.C



Parameters

string   $content  
[ Top ]



empty_none [line 1026]

string empty_none( string $content)

empty_none() retourne le contenu ou 'aucun'



Parameters

string   $content  
[ Top ]



empty_numeric [line 1041]

string empty_numeric( string $content)

empty_none() retourne le contenu ou 0



Parameters

string   $content  
[ Top ]



enabledPlugins [line 1465]

array enabledPlugins( )

enabledPlugins()

Return available plugins




[ Top ]



error_redirect [line 553]

void error_redirect( [ $file = 'error.php'])

error_redirect()

Redirect to error page




Parameters

   $file  
[ Top ]



ExcedMaxSize [line 1148]

boolean ExcedMaxSize( string $path, integer $width_max)

ExcedMaxSize() Teste si une image dépasse ou non la taille autorisée (en pixels)



Parameters

string   $path  
integer   $width_max  
[ Top ]



extRegex [line 176]

string extRegex( $list)

extRegex()

Transform a list given in the form "jpg,png,gif" into "(jpg)|(png)|(gif)" format




Parameters

   $list  
[ Top ]



fnumber_format [line 1335]

void fnumber_format( $number, $dec, [ $forceprefix = true])



Parameters

   $number  
   $dec  
   $forceprefix  
[ Top ]



footerAddInlineJS [line 1716]

boolean footerAddInlineJS( string $str, [string $pos = 'default'], [ $wrap = true])

footerAddInlineJS()

Add inline JS into footer the resulting js is wrapped with <script> tags and jQuery .ready() function if $wrap == true




Parameters

string   $str  
string   $pos  
   $wrap  
[ Top ]



footerAddJS [line 1755]

boolean footerAddJS( string $path, [string $pos = 'default'])

footerAddJS()

Add JS into footer




Parameters

string   $path  
string   $pos  
[ Top ]



formatBytes [line 2146]

string formatBytes( int $bytes, [int $precision = 2])

formatBytes()

Make File size readable




Parameters

int   $bytes  
int   $precision   (optional)
[ Top ]



formatDate [line 958]

string formatDate( string $date, [boolean $db = false])

formatDate() Renvoie la date aux formats yyyy-mm-dd ou dd-mm-yyyy suivant le cas de départ Si $db == true renvoie toujours la date au format yyyy-mm-dd



Parameters

string   $date  
boolean   $db  
[ Top ]



formatNavTitle [line 600]

string formatNavTitle( string $content)

formatNavTitle() Formatage des titres ( interface admin )



Parameters

string   $content  
[ Top ]



formatText [line 658]

string formatText( $content $content, [string $format = -1])

formatText() Formatage de texte pour affichage



Parameters

string   $format  
$content   $content  
[ Top ]



formatTextli [line 615]

string formatTextli( string $content)

formatTextli() Formatage des listes ( interface admin )



Parameters

string   $content  
[ Top ]



formatTitleh2 [line 629]

string formatTitleh2( string $content)

formatTitleh2() Formatage des titres h2 ( interface admin )



Parameters

string   $content  
[ Top ]



GenerateXhtmlPage [line 1593]

void GenerateXhtmlPage( $string $string, [integer $time = 2], [unknown $redirect = CURRENT_APP_URL])

GenerateXhtmlPage()



Parameters

integer   $time  
unknown   $redirect  
$string   $string  
[ Top ]



geocode [line 1553]

object geocode( $address $address)

geocode()

get Long/Latitude coordinates




Parameters

$address   $address   string
[ Top ]



GetAllFiles [line 2048]

array GetAllFiles( string $folder, [array $ext = array('txt')], [boolean $recursif = true])

GetAllFiles()

Return an arry of filenames




Parameters

string   $folder  
array   $ext  
boolean   $recursif  
[ Top ]



getBreadcrumb [line 2024]

string getBreadcrumb( [string $sep = '»'])

getBreadcrumb()

get the Breadcrumb for displaying




Parameters

string   $sep   (optional)
[ Top ]



GetDisplayUserRight [line 1175]

string GetDisplayUserRight( string $indice, [string $module = -1])

GetDisplayUserRight() renvoie les droits d'un utilisateur



Parameters

string   $indice  
string   $module  
[ Top ]



getHttpParameters [line 34]

string getHttpParameters( [ $prefix = '?'])

getHttpParameters()

Renvoie les paramètres HTTP sous forme de chaîne de caractères




Parameters

   $prefix  
[ Top ]



getmicrotime [line 1434]

float getmicrotime( )

getmicrotime() renvoie le temps en microsecondes



[ Top ]



getOverridePluginsFiles [line 878]

array getOverridePluginsFiles( array $a, string $filename)

getOverridePluginsFiles()

return an array of paths corresponding to the given filename and matching the array of given plugins




Parameters

array   $a  
string   $filename  
[ Top ]



getProgressbar [line 1531]

string getProgressbar( $value $value, $max $max, $unit $unit)

getProgressbar()

Return a graphic progress bar




Parameters

$value   $value   integer
$max   $max   integer
$unit   $unit   string
[ Top ]



getThemes [line 2189]

array getThemes( string $f)

getThemes()

Return installed themes into an array




Parameters

string   $f  
[ Top ]



get_linkin_page [line 1203]

void get_linkin_page( array $table_link, integer $total, integer $debut, [integer $pas = SELECT_LIMIT])

get_linkin_page()



Parameters

array   $table_link  
integer   $total  
integer   $debut  
integer   $pas  
[ Top ]



get_min_name [line 1132]

string get_min_name( string $path)

get_min_name() obtenir le nom de la miniature d'un fichier



Tags:

todo:  can be removed later / still used in class.upload.php


Parameters

string   $path  
[ Top ]



headerAddCSS [line 1642]

boolean headerAddCSS( string $path, [string $pos = 'default'])

headerAddCSS()

Add CSS into header




Parameters

string   $path  
string   $pos  
[ Top ]



headerAddJS [line 1678]

boolean headerAddJS( string $path, [string $pos = 'default'])

headerAddJS()

Add JS into header




Parameters

string   $path  
string   $pos  
[ Top ]



i2c_realip [line 2330]

void i2c_realip( )



[ Top ]



implode_with_keys [line 20]

string implode_with_keys( string $glue, string $array)

implode_with_keys()

implode avec clefs associées renvoyées sous forme de chaîne de caractères




Parameters

string   $glue  
string   $array  
[ Top ]



includeCodeEditor [line 281]

void includeCodeEditor( )



[ Top ]



IncludeColorboxJs [line 415]

void IncludeColorboxJs( string $selector)

IncludeColorboxJs()

Include Colorbox jQuery plugin




Parameters

string   $selector   £selector
[ Top ]



IncludeFancyUploadJs [line 190]

void IncludeFancyUploadJs( )

IncludeFancyUploadJs()

Include jQuery Fancy Upload




[ Top ]



IncludeLightRte [line 122]

void IncludeLightRte( $a)

IncludeLightRte()

Include nicEdit as light RTE param : array $a




Parameters

   $a  
[ Top ]



IncludeMappingLibraryJs [line 441]

void IncludeMappingLibraryJs( )

IncludeMappingLibraryJs()

Include the current mapping library if needed




Tags:

todo:  not used - Gmaps is used instead


[ Top ]



IncludePHPDebug [line 141]

void IncludePHPDebug( )

IncludePHPDebug()

Include Js & css for PHP_DEBUG




[ Top ]



IncludeRichTextEditor [line 358]

void IncludeRichTextEditor( )



[ Top ]



IncludeTimeline [line 98]

void IncludeTimeline( )

IncludeTimeline()

Include SIMILE Timeline JS code if needed




[ Top ]



IncludeTooltipJs [line 153]

void IncludeTooltipJs( string $selector)

IncludeTooltipJs()

Include jQuery tooltip plugin




Parameters

string   $selector  
[ Top ]



IncludeTreeJs [line 235]

void IncludeTreeJs( )

IncludeTreeJs()

Include jQuery tree plugin




[ Top ]



isNullDate [line 996]

void isNullDate( $date)



Parameters

   $date  
[ Top ]



isRawText [line 642]

bool isRawText( string $t)

isRawText() check if raw text or html text



Parameters

string   $t  
[ Top ]



is_module [line 48]

boolean is_module( string $str)

is_module()

Test if the current page matches the given module and action (optionnal) examples : (1) is_module('system'), (2) is_module('system/edit_files') interpreted as : (1) rub=system, (2) rub=system and todo=edit_files




Parameters

string   $str  
[ Top ]



json_decode [line 1891]

void json_decode( $content, [ $assoc = false])

For compatibility with PHP < 5.2

json_decode




Parameters

   $content  
   $assoc  
[ Top ]



json_encode [line 1907]

void json_encode( $content)

For compatibility with PHP < 5.2

json_encode




Parameters

   $content  
[ Top ]



linkin_content [line 1368]

string linkin_content( string $content, [string $option = 'ALL'])

linkin_content() Cherche les liens et emails dans du contenu -> linkage



Parameters

string   $content  
string   $option  
[ Top ]



linkin_page [line 1253]

string linkin_page( string $string_uri, integer $total, integer $debut, [integer $pas = SELECT_LIMIT])

linkin_page() création d'un navigateur de pages numérotées



Parameters

string   $string_uri  
integer   $total  
integer   $debut  
integer   $pas  
[ Top ]



ListDir [line 2080]

string ListDir( int $dir_handle, string $path, string $url, boolean 3)

ListDir()

Return an HTML list for a given folder




Parameters

boolean   3  
int   $dir_handle  
string   $path  
string   $url  
[ Top ]



ln10filename [line 811]

string ln10filename( string $file)

ln10filename() Build a localized filename according to the current language



Parameters

string   $file  
[ Top ]



loadThemeInfo [line 1866]

string loadThemeInfo( string $type, string $name)

loadThemeInfo()

Load theme info




Parameters

string   $type  
string   $name  
[ Top ]



logfile [line 2165]

void logfile( string $src, array $a)

logfile()

Log into file




Parameters

string   $src  
array   $a  
[ Top ]



mb_ucfirst [line 514]

string mb_ucfirst( string $string, [string $encoding = CHARSET])

mb_ucfirst()

UTF-8 ucfirst function




Parameters

string   $string  
string   $encoding  
[ Top ]



notifyUsersMsg [line 2214]

boolean notifyUsersMsg( array $a)

notifyUsersMsg()



Tags:

access:  public


Parameters

array   $a   $a['owner'] : item owner $a['user'] : the one who posted the item (can be an adminsitrator or animator)
[ Top ]



num_phpversion [line 501]

integer num_phpversion( )

num_phpversion() Retourne un entier comme numéro de version PHP



[ Top ]



override [line 905]

string override( string $file, [string $path = null], [ $default = true])

override()

check if ovveride version exists for the whole app then if a template file version exists or not finally, if no user file is found in theme, return the default module version file.




Parameters

string   $file  
string   $path  
   $default  
[ Top ]



placeholderReplace [line 1577]

array placeholderReplace( $array $array, $input $input)

placeholderReplace()

format '{$key}'




Parameters

$array   $array  
$input   $input  
[ Top ]



QuickBoxNow [line 1395]

string QuickBoxNow( string $module, string $h1, string $liste, [string $suffixclass = ''])

QuickBoxNow() Génération de la quickbox



Parameters

string   $module  
string   $h1  
string   $liste  
string   $suffixclass  
[ Top ]



ReloadIndex [line 1416]

void ReloadIndex( string $item)

ReloadIndex() Chargement de l'index après destruction de sessions



Parameters

string   $item  
[ Top ]



removeEmptyP [line 587]

array removeEmptyP( $str, string $text)

removeEmptyP() Remove empty P tags



Parameters

string   $text  
   $str  
[ Top ]



ReplaceInvalidChars [line 690]

string ReplaceInvalidChars( string $str)

ReplaceInvalidChars() Remplacement des caractères invalides par leurs entités HTML



Parameters

string   $str  
[ Top ]



securityCheck [line 2371]

boolean securityCheck( )

securityCheck()

Test and sanitize user input from request




[ Top ]



setBreadcrumb [line 2012]

void setBreadcrumb( array $array)

setBreadcrumb()

Set breadcrumb content




Parameters

array   $array  
[ Top ]



sortItems [line 1080]

array sortItems( $rub, $data)

sortItems()

Return an array with key and value with ID as key and RANGE as value




Parameters

   $rub  
   $data  
[ Top ]



sql_dump2array [line 1488]

array sql_dump2array( $url $url, [$a $a = -1])

sql_dump2array()



Tags:



Parameters

$url   $url  
$a   $a  
[ Top ]



sql_status_filter [line 1509]

string sql_status_filter( $fieldname $fieldname, $a $a)

sql_status_filter()



Parameters

$fieldname   $fieldname  
$a   $a   array
[ Top ]



stripAccents [line 712]

void stripAccents( $string)



Parameters

   $string  
[ Top ]



stripText [line 722]

void stripText( $text)



Parameters

   $text  
[ Top ]



strip_input [line 75]

string strip_input( string $str, [string $exceptions = false])

strip_input()

Remove PHP and HTML code




Parameters

string   $str  
string   $exceptions  
[ Top ]



SureCreateDir [line 468]

integer SureCreateDir( string $pathname, integer $perms)

SureCreateDir() Créer un dossier s'il n'existe pas.



Parameters

string   $pathname  
integer   $perms  
[ Top ]



SureRemoveDir [line 483]

integer SureRemoveDir( $dir, $DeleteMe)

SureRemoveDir() Supprime le contenu d'un dossier et le dossier lui-même si précisé.



Parameters

   $dir  
   $DeleteMe  
[ Top ]



system_error [line 1115]

void system_error( [string $msg = ERROR_SYSTEM])

system_error() Affichage d'un message d'erreur syst�me



Tags:

return:  (echo)


Parameters

string   $msg  
[ Top ]



toStringSqlDate [line 744]

string toStringSqlDate( [string $format = 'short'])

toStringSqlDate() Renvoie la date au format SQL



Parameters

string   $format  
[ Top ]



validEmail [line 1922]

void validEmail( $email)



Parameters

   $email  
[ Top ]



_debug [line 1624]

void _debug( string $string)

_debug()

Display a debug message




Parameters

string   $string  
[ Top ]



Documentation generated on Thu, 20 Mar 2014 16:48:27 +0100 by phpDocumentor 1.4.1