[ Index ]

PHP Cross Reference of Quick Form DataBase

title

Body

[close]

/ -> quickformdb.php (summary)

Main File of Quick Form DataBase (QFDB) Framework

Author: Everaldo Wanderlei Uavniczak
License: BSD License <http://www.qfdb.net/bsd_license.txt>
Version: 0.5
File Size: 3449 lines (115 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

quickformdb:: (96 methods):
  __construct()
  __destruct()
  init_cache()
  debug_msg_make_content()
  init_debug_msg()
  init_output()
  init_db()
  init_error()
  init_message()
  init_restriction()
  init_header_footer()
  set_cache()
  get_ok()
  set_status()
  get_status()
  set_id()
  get_id()
  set_css()
  set_css_value()
  get_css_value()
  set_abort_on_warning()
  set_debug()
  get_debug()
  set_charset()
  get_charset()
  set_debug_msg()
  set_js()
  get_js()
  set_dtd()
  get_dtd()
  register_restriction()
  set_pagetitle()
  concat_pagetitle()
  get_pagetitle()
  add_var()
  capture_var()
  get_var()
  set_indent()
  get_indent()
  i()
  add_qfdb_type()
  add_header()
  add_footer()
  add_body()
  parse_matrix()
  parse_all_matrix()
  load_header()
  load_footer()
  load_body()
  load_object_file()
  action()
  make_html()
  make_db()
  get_db_values()
  make_db_insert()
  make_db_update()
  make_db_sucess()
  make_db_alias()
  remove_alias()
  make_value()
  make_validate()
  make_postval2db()
  fixed_common_properties()
  make_common_properties()
  fix_disabled()
  fix_readonly()
  fix_display_2()
  fix_display_3()
  fix_others()
  fix_colspan_others()
  fix_button_type()
  fix_required()
  fix_radiocheck_cols()
  fix_textpass_size()
  db_connect()
  db_set_table()
  make_error_ref()
  clear_on_error()
  qfdb_error_object_properties()
  add_user_error()
  add_generic_error()
  add_warning()
  add_critical_error()
  put_user_error()
  strip_tab_nl()
  qfdb_varname()
  scape_htmlentities()
  defined_in_status()
  defined_in_qfdbtype()
  add_output()
  output_js()
  display_error2str()
  display_error()
  display()
  display_sources()
  display_debug()


Class: quickformdb  - X-Ref

__construct()   X-Ref
Constructor Method of QFDB

param: : void
return: : void

__destruct()   X-Ref
Destructor Method of QFDB

param: : void
return: : void

init_cache()   X-Ref
Initialize quickformdb::cache

param: : void
return: : void

debug_msg_make_content(&$d)   X-Ref
Generate message to put in file or send mail to make debug_message

param: : array of string   $d   Array with messages
return: : void

init_debug_msg()   X-Ref
Initialize quickformdb::output

param: : void
return: : void

init_output()   X-Ref
Initialize quickformdb::output

param: : void
return: : void

init_db()   X-Ref
Initialize quickformdb::db

param: : void
return: : void

init_error()   X-Ref
Initialize quickformdb::error

param: : void
return: : void

init_message()   X-Ref
Initialize quickformdb::message

param: : void
return: : void

init_restriction()   X-Ref
Initialize quickformdb::restriction

param: : void
return: : void

init_header_footer()   X-Ref
Initialize quickformdb::matrix_[header | body | footer]

param: : void
return: : void

set_cache($active = false, $db_table = 'qfdb_cache', $filename='./index.php', $init_filename = './main_qfdb_init.php')   X-Ref
Configure cache parameters

param: : bool   $active         Active cache
param: : string $db_table       DataBase table to chache
param: : string $filename       Index filename
param: : string $init_filename  Init filename
return: : void

get_ok()   X-Ref
Return quickformdb::ok

param: : void
return: : bool

set_status($status)   X-Ref
Set quickformdb::status

param: : int   $status  Status that QFDB will be run
return: : void

get_status()   X-Ref
Return value of the quickformdb::status properties

param: : void
return: : bool

set_id($id)   X-Ref
Set the data ID that will be edited or updated.

param: : int   $id    Data ID edited
return: : void

get_id()   X-Ref
Get the data ID that will be edited or updated.

param: : void
return: : mixed

set_css($css)   X-Ref
Define if will be used the default CSS classname

param: : bool  $css  Define the default CSS classname
return: : void

set_css_value($index, $class_name)   X-Ref
Set a specific CSS classname for one QFDB Object

param: : string    $index    Index of quickformdb::css[]
param: : string    $value    Name of CSS ClassName
return: : void

get_css_value($index)   X-Ref
Get a specific CSS classname for one QFDB Object

param: : string    $index    Index of quickformdb::css[]
return: : string

set_abort_on_warning($abw)   X-Ref
Specific if WARNING will be same as CRITICAL_ERROR

param: : string    $index    Index of quickformdb::css[]
return: : string

set_debug($debug=false)   X-Ref
Define QFDB to run in debug mode

param: : bool    $debug    Debug mode
return: : void

get_debug()   X-Ref
Get value of the quickformdb::debug properties

param: : void
return: : bool

set_charset($charset='utf-8')   X-Ref
Define characters-sets used in QFDB Project -> default: UTF-8

param: : string    $charset    Character Sets
return: : void

get_charset()   X-Ref
Get characters-sets used in QFDB Projet -> default: UTF-8

param: : string    $charset    Character-set
return: : void

set_debug_msg($debugmsg='screen', $warning=true, $aux='', $mail='', $include_qfdb=false, $include_globals=false)   X-Ref
Configure how  error and warning messages will be treaties

param: : mixed   $debugmsg         How the error and warning message will be treaties
param: : bool    $warning          Show warning message
param: : string  $aux              Auxiliary var if $debugmsg equal 'file' or 'db'
param: : string  $mail             Mail to send message if $debugmsg == 'db' or 'file'
param: : bool    $include_qfdb     Include $qfdb Object
param: : bool    $include_globals  Include $GLOBALS
return: : void

set_js($js)   X-Ref
This Method specified the use of JavaScript

param: : bool  $js   Specifies the use of JS
return: : void

get_js()   X-Ref
Return value of quickformdb::js

param: : void
return: : bool

set_dtd($dtd='xhtml_transitional')   X-Ref
Define DTD of Document

param: :  string  $dtd   DTD of Document
return: : void

get_dtd()   X-Ref
Return value of quickformdb::dtd

param: : void
return: : string

register_restriction($step, $_status, $function, $message)   X-Ref
Allow set restrictions for one or more status.

param: :  string  $step       When the restrictions are applied (before or after)
param: :  int     $status     Allow define one or more status
param: :  string  $function   Function to be called
param: :  string  $message    Message shown if the function returns false
return: : void

set_pagetitle($pagetitle)   X-Ref
Define title of document

param: :  string  $pagetitle  Title of Document
return: : void

concat_pagetitle($pagetitle)   X-Ref
Concat a string to the title

param: :  string  $pagetitle  Title of Document
return: : void

get_pagetitle()   X-Ref
Return quickformdb::pagetitle value

param: :  void
return: : string

add_var($_varname, $value)   X-Ref
Add variable to a QFDB Object

param: :  string  $varname   Varname (add like index of quickformdb::vars)
param: :  mixed   $value     Value to set
return: : void

capture_var($_varname='', $order='PGCSA', $default='')   X-Ref
Capture variable to a QFDB Object

param: :  string   $varname    Varname (add like index of quickformdb::vars)
param: :  string   $order      Location to seek values
param: :  mixed    $default    Value to set if no one $order is set
return: : void

get_var($varname)   X-Ref
Get variable registered in QFDB Object

param: :  string  $varname   Index of quickformdb::vars to return
return: : mixed

set_indent($indent='')   X-Ref
Set one or more characteres to be used in code indentation

param: :  string  $indent   One or more characteres used to indent HTML code
return: : void

get_indent($n=1)   X-Ref
Get quickformdb::indent value

param: :  int     $n   Print quickformdb::indent $n times
return: : string

i($n=1)   X-Ref
Same of quickformdb::get_indent()

param: :  int     $n   Print quickformdb::indent $n times
return: : string

add_qfdb_type(&$matrix, $qfdb_type='body', $parsed=true)   X-Ref
Add qfdb_type properties for each QFDB Object

param: :  array of mixed   $matrix   Matrix to parser or Parsed Matrix with QFDB Objects
param: :  string           $type     Type of qfdb_type properties of all QFDB Objects
param: :  bool             $parser   Indicate if $matrix was parsed or not
return: : void

add_header($matrix_header)   X-Ref
Parse $matrix_header

param: :  array of string    $matrix_header   Matrix with Page's Header
return: : void

add_footer($matrix_footer)   X-Ref
Parse $matrix_footer

param: :  array of string    $matrix_footer   Matrix with Page's Footer
return: : void

add_body($matrix_body)   X-Ref
Parse $matrix

param: :  array of string    $matrix   Matrix with Page's Body
return: : void

parse_matrix($area='')   X-Ref
Parse all $matrix

param: :  void
return: : void

parse_all_matrix($matrix, $area)   X-Ref
Parse $matrix and fixed struct of all QFDB Objects

param: :  array of mixed    $matrix   Matrix to fixed struct of QFDB Objects
return: : void

load_header($matrix_header)   X-Ref
Load $matrix_header

param: :  array of string    $matrix_header   Matrix with Page's Header (Parsed)
return: : void

load_footer($matrix_footer)   X-Ref
Load $matrix_footer

param: :  array of string    $matrix_footer   Matrix with Page's Footer (Parsed)
return: : void

load_body($matrix_body)   X-Ref
Load $matrix_body

param: :  array of string    $matrix_body   Matrix with Page's Body (Parsed)
return: : void

load_object_file($constant)   X-Ref
Load QFDB Object File and its  language file

param: :  string    $constant   File Constant to define and avoids new attempt to load it.
return: : void

action($status, $id=0, $print_header=true, $print_footer=true)   X-Ref
Execute all QFDB Objects

param: :  int     $status         Status to set the QFDB
param: :  mixed   $id             ID of Data to edited or updated
param: :  bool    $print_header   Will be print Page Header
param: :  bool    $print_footer   Will be print Page Footer
return: : void

make_html($user_error = false)   X-Ref
Execute QFDB Objects in HTML Mode

param: :  bool   $user_error   Indicate that user error as occured
return: : void

make_db()   X-Ref
Execute QFDB Objects in DB Mode

param: :  void
return: : void

get_db_values()   X-Ref
Get DB Value of register in DB Table with ID=$this->db['id']  if $this->status==3

param: :  void
return: : void

make_db_insert()   X-Ref
Execute DB Query to insert new register in DataBase

param: : void
return: : void

make_db_update()   X-Ref
Execute DB Query to update register in DataBase

param: : void
return: : void

make_db_sucess($case)   X-Ref
Make a Message Box if Register has inserted or updated in DB with sucess

param: :  string   $case   Indicate if register has inserted or updated in DataBase
return: : void

make_db_alias()   X-Ref
Generate DB Aliases used 'db_field' and 'form_field' QFDB Properties to obfuscate DataBase Table Structure

param: :  bool   void
return: : void

remove_alias()   X-Ref
No description

make_value()   X-Ref
Get value to set 'value' QFDB Object Properties

param: :  void
return: : void

make_validate()   X-Ref
Make 'validate' QFDB Object Properties

param: :  void
return: : void

make_postval2db()   X-Ref
Rescue POST Values and insert it in $qfdb->postval_rescue properties

param: :  void
return: : void

fixed_common_properties()   X-Ref
Fixed all Common QFDB Object Properties

param: :  void
return: : void

make_common_properties()   X-Ref
Make the 'if' Common QFDB Object Properties and verifies if remove the QFDB Object or not

param: :  void
return: : void

fix_disabled()   X-Ref
Fix 'disabled' QFDB Object Properties

param: :  void
return: : void

fix_readonly()   X-Ref
Fix 'readonly' QFDB Object Properties

param: :  void
return: : void

fix_display_2($default='one_cell')   X-Ref
Fix 'display' QFDB Object Properties with 2 options

param: :  void
return: : void

fix_display_3($default='two_cell')   X-Ref
Fix 'display' QFDB Object Properties with 3 options

param: :  void
return: : void

fix_others()   X-Ref
Fix 'others' QFDB Object Properties

param: :  void
return: : void

fix_colspan_others()   X-Ref
Fix 'colspan_others' QFDB Object Properties

param: :  void
return: : void

fix_button_type()   X-Ref
Fix 'type' of button QFDB Object Properties

param: :  void
return: : void

fix_required()   X-Ref
Fix 'required' QFDB Object Properties

param: :  void
return: : void

fix_radiocheck_cols()   X-Ref
Fix 'cols' of radio and checkbox QFDB Object Properties

param: :  void
return: : void

fix_textpass_size()   X-Ref
Fix 'size' of text and password QFDB Object Properties

param: :  void
return: : void

db_connect($host, $user, $password, $db, $persistency=true)   X-Ref
Make a DB connection

param: :  string  $host        DataBase Host
param: :  string  $user        User of DataBase
param: :  string  $password    User's Password
param: :  string  $db          Db to Select
param: :  bool  $persistency   Make a persistency connection
return: : void

db_set_table($table, $primary_key)   X-Ref
Select DataBase Table and indicate the Primary Key Field

param: :  string  $table        DataBase Table
param: :  string  $primary_key  Primary Key Field of DB Table
return: : void

make_error_ref($id_error)   X-Ref
Return link to Error Reference to qfdb.org

param: :  mixed  $id    Error ID
return: : void

clear_on_error()   X-Ref
Clear the quickformdb::output properties if Critical Error Occured

param: :  void
return: : void

qfdb_error_object_properties()   X-Ref
Verify if has inserted invalid properties to QFDB Object

param: :  void
return: : void

add_user_error($msg)   X-Ref
Add User Error (USER_ERROR) message

param: :  string  $msg  Error message to User
return: : void

add_generic_error()   X-Ref
Add Generic user error (USER_ERROR)

param: :  void
return: : void

add_warning($msg, $step='', $user_msg='')   X-Ref
Add a Warning Message (WARNING)

param: :  string  $msg           Warning Message
param: :  string  $step          Label to describe step that error was occured
param: :  string  $user_message  Message to add in USER_ERROR
return: : void

add_critical_error($msg, $step='', $user_msg='')   X-Ref
Add Critical Error Message (CRITICAL_ERROR)

param: :  string  $msg           Critical Error Message
param: :  string  $step          Label to describe step that error was occured
param: :  string  $user_message  Message to add in USER_ERROR
return: : void

put_user_error($clear = false)   X-Ref
Generate output of user error

param: :  bool  $clear  Clear error['user_msg']?
return: : void

strip_tab_nl($str, $replace=' ')   X-Ref
Replace tab (\t), Carrier Return (\r) and New Line (\n) to $replace char

param: :  string  $str      String to replace  '\t', '\r' and '\n' char.
param: :  string  $replace  Char to Replace
return: : string

qfdb_varname($varname)   X-Ref
Fix QFDB varname with ER [^0-9a-zA-Z_-]

param: :  string  $varname  String to replace chars to HTML Entities
return: : string

scape_htmlentities($str)   X-Ref
Scape chars [<>"] to HTML entities

param: :  string  $str  String to replace chars to HTML Entities
return: : void

defined_in_status()   X-Ref
Verify if QFDB Object was defined in this quickformdb::status

param: :  void
return: : void

defined_in_qfdbtype()   X-Ref
Verify if QFDB Object was defined in this 'qfdb_type' properties of QFDB object

param: :  void
return: : void

add_output($type, $content)   X-Ref
Add content to quickformdb::output properties

param: :  string    $type    Type of Output (html, js, sjfunc, jsonload or jsall)
param: :  string    $type
return: : void

output_js()   X-Ref
Generate JavaScript Code to Output

param: :  void
return: : void

display_error2str($error_msg)   X-Ref
Convert error message from array to HTML

param: :  mixed   $error_msg   Array with Error Message
return: : void

display_error()   X-Ref
Make Error Message and put to quickformdb::output

param: :  void
return: : void

display($return=false)   X-Ref
Print Content of Page

param: :  bool  $return  Return the HTML Code
return: : string

display_sources($return=false)   X-Ref
Print Content of Page apply PHP function htmlentities()

param: :  bool  $return  Return the HTML Code
return: : string

display_debug($return=false)   X-Ref
Print Content of quickformdb::error

param: :  bool  $return  Return the HTML Code?
return: : mixed



Generated: Fri Nov 14 17:48:13 2008 Cross-referenced by PHPXref 0.7