⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class.formhandler.inc.php

📁 asterisk 計費模塊
💻 PHP
📖 第 1 页 / 共 5 页
字号:
<?php// ## created by Belaid Arezqui // %% date : 27 December 2004// %% last update : 29 May 2006// ##// ************************************************************************// 		FormHandler - PHP : Handle, Form Generator (FG)// ************************************************************************class FormHandler{		var $_action = '';	var $_vars = null;	var $_processed = array();	var $DBHandle;	var $VALID_SQL_REG_EXP = true;	var $RESULT_QUERY = false;			/* CONFIG THE VIEWER : CV */	var $CV_TOPVIEWER = '';	var $CV_NO_FIELDS = "THERE IS NO RECORD !";	var $CV_DISPLAY_LINE_TITLE_ABOVE_TABLE = true;	var $CV_TEXT_TITLE_ABOVE_TABLE = "DIRECTORY";	var $CV_DISPLAY_FILTER_ABOVE_TABLE = true;	var $CV_FILTER_ABOVE_TABLE_PARAM = "?id=";	var $CV_FOLLOWPARAMETERS = '';	var $CV_DO_ARCHIVE_ALL = false;				var $CV_DISPLAY_RECORD_LIMIT = true;	var $CV_DISPLAY_BROWSE_PAGE = true;	var $CV_CURRENT_PAGE = 0;	var $FG_VIEW_TABLE_WITDH = '95%';	var $FG_ACTION_SIZE_COLUMN = '25%';	/**    * Sets the debug output (1 = low, 2 = Normal, 3 = High). Default value is "0" .    * @public	-	@type integer    */	var $FG_DEBUG = 0;	 	/**    * Sets the table name.    * @public	-	@type string    */	 	var $FG_TABLE_NAME="";	 	 	/**    * Sets the instance_name, used to descripbe the name of the element your are managing    * @public	-	@type string    */	var $FG_INSTANCE_NAME="";	/**    * Sets the main clause - Clause to execute on the table    * @public	-	@type string    */		var $FG_TABLE_CLAUSE = "";	/**    * Sets the table list you will need to feed the SELECT from element    * @public	-	@type array - ( String to display, value to save)    */		var $tablelist = array();		/**    * ARRAY with the list of element to display in the ViewData page    * @public	-	@type array    */	var $FG_TABLE_COL = array();	/**    * Sets the fieldname of the SQL query to display in the ViewData page, ie: "id, name, mail"    * @public	-	@type string    */	var $FG_COL_QUERY = "";    /**    * Keep the number of column  -  Number of column in the html table    * @public	-	@type integer    */	var $FG_NB_TABLE_COL=0;	var $FG_TOTAL_TABLE_COL=0;		 	/**    * Keep the ID of the table    * @public	-	@type string    */	var $FG_TABLE_ID = 'id';		/**    * Sets if we want a colum "ACTION" to EDIT or to DELETE    * @public	-	@type boolean    */	var $FG_DELETION=false;	var $FG_EDITION=false;	var $FG_OTHER_BUTTON1=false;	var $FG_OTHER_BUTTON2=false;		/**    * Keep the link for the action (EDIT & DELETE)    * @public	-	@type string    */	var $FG_EDITION_LINK	= '';	var $FG_DELETION_LINK	= '';		var $FG_OTHER_BUTTON1_LINK	= '';	var $FG_OTHER_BUTTON2_LINK	= '';		var $FG_OTHER_BUTTON1_IMG = '';	var $FG_OTHER_BUTTON2_IMG = '';		var $FG_EDIT_PAGE_CONFIRM_BUTTON	= '';	var $FG_DELETE_PAGE_CONFIRM_BUTTON	= '';	var $FG_ADD_PAGE_CONFIRM_BUTTON		= '';		/**    * Sets the number of record to show by page    * @public	-	@type integer    */	var $FG_LIMITE_DISPLAY=10;	var $SQL_GROUP = null;		/**    * Sets the variable to control the View Module    * @public	-	@type integer    */	var $FG_STITLE = '';	var $FG_CURRENT_PAGE  = 0;	var $FG_ORDER = '';	var $FG_SENS = '';	var $FG_NB_RECORD_MAX  = 0;	var $FG_NB_RECORD  = 0;		/**	* Sets the variables to control the Apply filter	* @public  - @type string	*/	var $FG_FILTER_FORM_ACTION = 'list';		var $FG_FILTER_APPLY = false;	var $FG_FILTERTYPE = 'INPUT'; // INPUT :: SELECT :: POPUPVALUE	var $FG_FILTERFIELD = '';	var $FG_FILTERFIELDNAME = '';		var $FG_FILTERPOPUP = array('CC_entity_card.php?popup_select=1&', ", 'CardNumberSelection','width=550,height=350,top=20,left=100'");	// SECOND FILTER	var $FG_FILTER_APPLY2 = false;	var $FG_FILTERTYPE2 = 'INPUT'; // INPUT :: SELECT :: POPUPVALUE	var $FG_FILTERFIELD2 = '';	var $FG_FILTERFIELDNAME2 = '';	var $FG_FILTERPOPUP2 = array();		/**	* Sets the variables to control the search filter	* @public  - @type boolean , array , string	*/	var $FG_FILTER_SEARCH_FORM = false;	// to display or not the Date Month	var $FG_FILTER_SEARCH_1_TIME = true;	var $FG_FILTER_SEARCH_1_TIME_TEXT = '';	// to display or not the Date Day	var $FG_FILTER_SEARCH_2_TIME = true;	var $FG_FILTER_SEARCH_2_TIME_TEXT = '';	var $FG_FILTER_SEARCH_2_TIME_FIELD = 'creationdate';		// to display the number of months 	// will show the select on search with options like 	// Select card older than : 3 Months, 4 Months, 5.... 12 Months	var $FG_FILTER_SEARCH_3_TIME = false;	var $FG_FILTER_SEARCH_3_TIME_TEXT = '';	var $FG_FILTER_SEARCH_3_TIME_FIELD = 'creationdate';			var $FG_FILTER_SEARCH_FORM_1C = array();	var $FG_FILTER_SEARCH_FORM_2C = array();	var $FG_FILTER_SEARCH_FORM_SELECT = array();	var $FG_FILTER_SEARCH_FORM_SELECT_TEXT = '';	var $FG_FILTER_SEARCH_TOP_TEXT = "";		var $FG_FILTER_SEARCH_SESSION_NAME = '';	var $FG_FILTER_SEARCH_DELETE_ALL = true;			/**	* Sets the variable to define if we want a splitable field into the form	* @public  - @type void , string (fieldname)	* ie : the value of a splitable field might be something like 12-14 or 15;16;17 and it will make multiple insert	* according to the values/ranges defined.	*/	var $FG_SPLITABLE_FIELD = '';		/**	* Sets the variables to control the top search filter	* @public  - @type void , string	*/	var $FG_TOP_FILTER_VALUE = 0;	var $FG_TOP_FILTER_NAME = '';		/**	* Sets the variables to control the CSV export	* @public  - @type boolean	*/	var $FG_EXPORT_CSV = false;    var $FG_EXPORT_XML = false;	var $FG_EXPORT_SESSION_VAR = '';		/**    * Sets the fieldname of the SQL query for Export e.g:name, mail"    * @public	-	@type string    */    var $FG_EXPORT_FIELD_LIST = "";	/**     * Sets the TEXT to display above the records displayed      * @public   -  @string     */	var $FG_INTRO_TEXT="You can browse through our #FG_INSTANCE_NAME# and modify their different properties<br>";	/**     * Sets the ALT TEXT after mouse over the bouton      * @public   -  @string     */		 	var $FG_DELETE_ALT = "Delete this record";	var $FG_EDIT_ALT = "Edit this record";	var $FG_OTHER_BUTTON1_ALT = '';	var $FG_OTHER_BUTTON2_ALT = '';	//	-------------------- DATA FOR THE EDITION --------------------		/**    * ARRAY with the list of element to EDIT/REMOVE/ADD in the edit page    * @public	-	@type array     */			var $FG_TABLE_EDITION = array ();	var $FG_TABLE_ADITION = array ();		/**    * ARRAY with the comment below each fields    * @public	-	@type array     */		var $FG_TABLE_COMMENT = array ();		/**    * ARRAY with the regular expression to check the form    * @public	-	@type array     */		var $FG_regular = array();	/**    * Array that will contain the field where the regularexpression check have found errors    * @public	-	@type array     */		var $FG_fit_expression = array();		/**    * Set the fields  for the EDIT/ADD query    * @public	-	@type string    */	var $FG_QUERY_EDITION='';	var $FG_QUERY_ADITION='';		/**    * Set the width  of the column to the EDIT FORM    * @public	-	@type string    */	var $FG_TABLE_EDITION_WIDTH = '122';	/**    * Keep the number of the column into EDIT FORM    * @public	-	@type integer    */	var $FG_NB_TABLE_EDITION = 0;	var $FG_NB_TABLE_ADITION = 0;	/**    * Set the SQL Clause for the edition    * @public	-	@type string    */	var $FG_EDITION_CLAUSE = " id='%id' ";	/**    * Set the HIDDED VALUE for the edition/addition	* to insert some values that you do not want to display into the Form but as an hidden field	* FG_QUERY_EDITION_HIDDEN_FIELDS = "field1, field2"	* FG_QUERY_EDITION_HIDDEN_VALUE = "value1, value2"	* FG_QUERY_ADITION_HIDDEN_FIELDS = "field1, field2"	* FG_QUERY_ADITION_HIDDEN_VALUE = "value1, value2"	* FG_QUERY_SQL_HIDDEN = ',field1, field2';    * @public	-	@type string    */	var $FG_QUERY_EDITION_HIDDEN_FIELDS = '';	var $FG_QUERY_EDITION_HIDDEN_VALUE  = '';	var $FG_QUERY_ADITION_HIDDEN_FIELDS = '';	var $FG_QUERY_ADITION_HIDDEN_VALUE  = '';	var $FG_QUERY_SQL_HIDDEN = '';		/**    * Set the EXTRA HIDDED VALUES for the edition/addition    * @public	-	@type array    */	var $FG_QUERY_EXTRA_HIDDED = '';     /**     * Set the Hidden value for the edition/addition     * It helps to generate the values for the sip and iax account     * if this variable is set from the calling file, then framwork will not build values for it.     * Set its length to 0 if you want framework to generate the values and provide required values     * into the POST data.     */     var $FG_QUERY_ADITION_SIP_IAX_VALUE = '';	/**    * Sets the link where to go after an ACTION (EDIT/DELETE/ADD)    * @public	-	@type string    */	var $FG_GO_LINK_AFTER_ACTION;	var $FG_GO_LINK_AFTER_ACTION_ADD;	var $FG_GO_LINK_AFTER_ACTION_DELETE;		var $FG_GO_LINK_AFTER_ACTION_EDIT;			/** ####################################################     * if yes that allow your form to edit the form after added succesfully a instance	 * in the case if you don't have the same option in the edition and the adding option     * @public   -  @string    */	var $FG_ADITION_GO_EDITION = "no";	var $FG_ADITION_GO_EDITION_MESSAGE = "The document has been created correctly. Now, you can define the different tariff that you want to associate.";	// ------------------- ## MESSAGE SECTION  ## -------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -