Description of phpAddEdit Script Files

  • addedit-ajax.php – this will hold any AJAX functions that are needed; currently the only one is the selectbox_other ability.
  • addedit-create-form.php – loops through the form fields and variables and calls function (found in addedit-form-fields.php) to generate the field elements
  • addedit-customize.php – use this to do any custom coding before the form is actually rendered.
  • addedit-error-check.php – contains the code to do the error checking after a form is submitted
  • addedit-error-check-custom.php – blank by default; put your own PHP code in this file if you need some error checking not currently offered
  • addedit-execute.php – this file, called by addedit-render.php, loops through all the relevant tables and fields and generates the relevant sql code and then executes; it also sends emails and re-directs to a success/failure page if necessary
  • addedit-execute-custom.php – blank by default; put your own PHP code in this file if you need something to happen after a form is submitted besides the obvious
  • addedit-form-fields.php – this file is called by addedit-create-form.php and actually generates the individual form elements
  • addedit-functions.php – contains lots of goodies, including a set of file manipulation functions, basic functions, database functions, etc.
  • addedit-getversion.inc.php – fetches the latest version of the script from the phpAddEdit website so users can be notified when a new version is available
  • addedit-login.php – this file handles the login routine to provide a small measure of security to the script
  • addedit-render.php – this is the file that is called by the end result form file (e.g. myform.php); it actually does all the work to create the form, mostly by including other relevant files
  • addedit-rss.php – this file creates an RSS feed after form submission
  • addedit-steps.php – this file contains all the functions for each step of the form creation process; each function is called from the index.php file
  • addedit-trackback.php – this file will look for trackback URIs and attempt to issue a trackback ping if you specify the form to do so when creating it
  • config.php – this is the file that contains the database information that will be needed to create or edit a form
  • index.php – main page
  • resequence.php – if your form has selectbox items, the script will delete all existing entries and then add the selected items. This can bloat the primary key (index) for affected tables. The resequence file will go through a table and renumber the primary key. You must edit this file to suit your database table names
  • includes/admin.css – the CSS controlling the look and feel of the form generator itself; feel free to change this at will to suit your tastes
  • includes/ajax_file_upload.inc.php – because the file upload AJAX functionality can’t be accomplished easily, this form is used instead of the addedit-ajax.php file
  • includes/class-IXR.php – an open source file useful in generating pings for the RSS functionality
  • includes/cleanit-functions.php – this file is used only if you set the option to use the cleanit function in the configuration; it will “cleanup” the crappy HTML code that MS Word creates (only applies to use of the FCKeditor textarea field type
  • includes/db.php – this file is more or less the db.php file used by WordPress. I am not really using it effectively but I originally intended to and maybe will someday…
  • includes/dbconnect.inc.php – this file creates a database conncection ($aedb) based on the information in the config file
  • includes/email_template.php – this file contains the basic HTML template for any HTML emails that will be sent after form submission
  • includes/header.php – the header of the form generator; includes 3 rows/bars of pages/steps/options
  • includes/javascripts.js – handles any relevant javascript needs which mostly means showing and hiding certain divs in the Options (2) step
  • includes/login.css – this is only used when logging in or installing the script
  • includes/style.css – this is only used when viewing or testing the form you have created. It contains CSS for the form class options. Edit it to suit your needs or replace with your own file or just ignore it…
  • includes/validateurl.php – used in the error checking (validation) routine if a field has been designated with a valid url requirement; it mostly works but isn’t perfect by any means…
  • includes/verifyemail-lib.php – this code from Lars B. Jensen provides the functionality for verifying email addresses in the error_cheking routine; it offers three different validation levels:

    Level 1 : Correct formatting of email

    Level 2 : Server exists in DNS as MX record

    Level 3 : Does the user exist on the email given

  • includes/version.inc.css – just contains the current version of the script and is used to compare with the latest version on the phpAddEdit website to determine if an upgrade is available
  • phpmailer/ – there are three files in this directory and are used to send emails upon form submission if the SMTP method is selected
Click to see/join the conversation