Main Page   Compound List   File List   Compound Members   File Members  

html.php File Reference

Go to the source code of this file.

Compounds

class  Menu
 class to manage menu More...


Functions

 js_sanitize ($string)
 clean backslashes in javascript sources

 array_to_html ($o,$space=0,$keys=1,$encode=true)
 convert a multidimensional array into a html list

 html_select ($name,$data,$default=false,$assoc=1,$padding=0,$mustdefine=1,$onchange="")
 create an html select from an array

 history_replace ($url)
 clean browser history

 var_dump_array ($arr,&$out,$var_name='')
 convert the input multidemensional array in a bidimensional array that contains in ["name"] php_name of the variable and in ["value"] his value;

 arr_to_hidden ($arr,$baseName='')
 return a string of input html tags (for POST query) from an input bidimensional array

 arr_to_url ($arr,$baseName='')
 return a string of urlencoded parameters (for GET query) from an input bidimensional array

 out ($string,$stdout=true)
 html_table ($arr,$headerCol=1,$headerRow=0,$noInterpolate=0,$headerColNoInterpolate=0,$headerRowNoInterpolate=0,$noInt_type=0,$transpost=0,$stdout=true)
 print a html table from a bidimesional array

 search_bar ($searchUrl,$previousUrl,$nextUrl,$otherUrl,$total,$offset=1,$limit=10,$numPages=10,$nameOffset="searchOffset")
 create a index bar for search engine

 date_select ($fieldname,$default="",$mustdefine=1,$locale="it_IT",$years="")
 date_select

 time_select ($fieldname,$default=false,$mustdefine=1)
 time_select

 JavaScript ($code='')
 store javascript code in a static variable

 Alert ($message='')
 store alert messages in a static variable

 Error ($message='',$goBack=0)
 store error messages in a static array

 HistoryGo ($page='')
 store history in a static var

 WriteJavascript ()
 write javascript code generate from JavaScript(), Alert(), HistoryGo(), Error() functions

 html_head ($code='')
 store html head code in a static variable and return all

 postgis_forminput ($fieldname,$default='',$type='POINT')
 crate an html input


Function Documentation

Alert   message = ''
 

store alert messages in a static variable

Parameters:
message 
Returns:
messages

Definition at line 519 of file html.php.

Referenced by WriteJavascript().

arr_to_hidden   arr,
  baseName = ''
 

return a string of input html tags (for POST query) from an input bidimensional array

Return a string of input html tags (for POST query) from an input bidimensional array in wich the second dimension ["name"] indicate the name of the variable and the second dimension["value"] indicate the value of the variable

Parameters:
arr  bidimensional array in wich the second dimension ["name"] indicate the name of the variable and the second dimension["value"] indicate the value of the variable
basename=  '' base name of all input names
Returns:
$src html code

Definition at line 152 of file html.php.

References out(), and var_dump_array().

Referenced by search_bar(), Pgtable::switch_actions(), and Pgtable::view_edit().

arr_to_url   arr,
  baseName = ''
 

return a string of urlencoded parameters (for GET query) from an input bidimensional array

Return a string of urlencoded parameters (for GET query) from an input bidimensional array in wich the second dimension ["name"] indicate the name of the variable and the second dimension["value"] indicate the value of the variable

Parameters:
arr  bidimensional array in wich the second dimension ["name"] indicate the name of the variable and the second dimension["value"] indicate the value of the variable
basename=  '' base name of all input names
Returns:
$url urlencoded

Definition at line 174 of file html.php.

References out(), and var_dump_array().

Referenced by Pgtable::order().

array_to_html   o,
  space = 0,
  keys = 1,
  encode = true
 

convert a multidimensional array into a html list

Parameters:
o  array
space  number of space to indent
keys  if display keys array: 1 if all, 2 if all except the last dimension of array, 0 for not
encode=true  if use htmlentities
Returns:
html code

Definition at line 47 of file html.php.

date_select   fieldname,
  default = "",
  mustdefine = 1,
  locale = "it_IT",
  years = ""
 

date_select

Parameters:
fieldname 
default 
mustdefine=1 
locale=it_IT 
years=  '' array of years, default 5 years befor and after current
Returns:
html code

Definition at line 438 of file html.php.

References html_select().

Error   message = '',
  goBack = 0
 

store error messages in a static array

Parameters:
message=  '' errore
goBack=0  if call HistoryGo(-1);
Returns:
errors array

Definition at line 533 of file html.php.

References HistoryGo().

Referenced by WriteJavascript().

history_replace   url
 

clean browser history

Parameters:
url  url to go after cleaning
Returns:
html code
Author:
Antonio Galea

Definition at line 104 of file html.php.

HistoryGo   page = ''
 

store history in a static var

Parameters:
page=  '' page
Returns:
var

Definition at line 546 of file html.php.

References HistoryGo().

Referenced by Error(), HistoryGo(), and WriteJavascript().

html_head   code = ''
 

store html head code in a static variable and return all

Parameters:
code 
Returns:
head code

Definition at line 580 of file html.php.

html_select   name,
  data,
  default = false,
  assoc = 1,
  padding = 0,
  mustdefine = 1,
  onchange = ""
 

create an html select from an array

Parameters:
name  name of select form
data  array of data
default=  '' selected value
assoc=1  if it is an associative array (name, value)
padding=0  indentation
mustdefined=1  if not add a void element
onchange=  '' javascript code
Returns:
html code

Definition at line 76 of file html.php.

References js_sanitize().

Referenced by date_select(), Pgtable::operator(), and time_select().

html_table   arr,
  headerCol = 1,
  headerRow = 0,
  noInterpolate = 0,
  headerColNoInterpolate = 0,
  headerRowNoInterpolate = 0,
  noInt_type = 0,
  transpost = 0,
  stdout = true
 

print a html table from a bidimesional array

NOTE: not write table tags

Parameters:
arr  associative bidimensional array
headerCol=1  if make header line using keys of $arr, 2 if use first element
headerRow=1  if make header column using keys of $arr, 2 if use first element
noInterpolate=0  if not interpole $arr values with htmlentities function. Note that this could be 1 or 0 and so it refers itself to all the input array, or a monodimensional array with a values for any
arr:
column if
noInt_type=0, line if $noInt_type=1 or a bidimensional array with a values for any $arr elemnt. If not all values are defined, default is interpoled.
Parameters:
headerColNoInterpolate  as $noInterpolate but for header
headerRowNoInterpolate  as $noInterpolate but for header
noInt_type=0, see  up
transpost=0  if matrix $arr must be transponded
stdout=true  if print table directly to stdout or return html code

Definition at line 210 of file html.php.

References out(), and transpose().

Referenced by Pgtable::switch_actions().

JavaScript   code = ''
 

store javascript code in a static variable

Parameters:
code 
Returns:
javascript code

Definition at line 507 of file html.php.

Referenced by WriteJavascript().

js_sanitize   string
 

clean backslashes in javascript sources

Parameters:
string  javascript code
Returns:
javascript code
Author:
Antonio Galea

Definition at line 30 of file html.php.

Referenced by html_select().

out   string,
  stdout = true
 

Definition at line 184 of file html.php.

Referenced by arr_to_hidden(), arr_to_url(), html_table(), and var_dump_array().

postgis_forminput   fieldname,
  default = '',
  type = 'POINT'
 

crate an html input

Definition at line 591 of file html.php.

search_bar   searchUrl,
  previousUrl,
  nextUrl,
  otherUrl,
  total,
  offset = 1,
  limit = 10,
  numPages = 10,
  nameOffset = "searchOffset"
 

create a index bar for search engine

Parameters:
searchUrl  the url to link(whit oll the parameters urlencoded requiered by the search script). Note that this function add automaticly searchOffset paramater; this if you need a get.... if you would use post method $searchUrl must be an array (key=name of hidden input, value=value...).
nextUrl  url of image for next page
previousUrl  url of image for previous page
otherUrl  url of image for other pages
total  the total records number
offset  the record number from which it starts to display this page (it is at minimum 1). If not set, default is 1
limit  the number of results to display, default is 10
numPages  the number of pages to display into the index bar Default is 10
Returns:
html code

Definition at line 365 of file html.php.

References arr_to_hidden(), and title.

Referenced by Pgtable::switch_actions().

time_select   fieldname,
  default = false,
  mustdefine = 1
 

time_select

Parameters:
fieldname 
default 
mustdefine=1 
Returns:
html code

Definition at line 479 of file html.php.

References html_select().

var_dump_array   arr,
&$    out,
  var_name = ''
 

convert the input multidemensional array in a bidimensional array that contains in ["name"] php_name of the variable and in ["value"] his value;

Note: it works also if $arr is not an array

Parameters:
arr  input array
&  $out the output array
var_name  the base name of the variable, default ''

Definition at line 128 of file html.php.

References out().

Referenced by arr_to_hidden(), and arr_to_url().

WriteJavascript  
 

write javascript code generate from JavaScript(), Alert(), HistoryGo(), Error() functions

Definition at line 557 of file html.php.

References Alert(), Error(), HistoryGo(), and JavaScript().


Generated on Mon Nov 29 01:21:59 2004 for phpPgWeb by doxygen1.2.18