Close this window

What is the 'Interface Creator'
The 'Interface Creator' makes it easy to customize the forms that are used to insert, edit or delete data in MySQL database tables. It also allows one to browse and search for data in the MySQL database tables as well as to export those data in CSV format. Thus, it can be used as front-end or as a back-end web application. For using it as a back-end application, record detailing, editing, insertion, and deletion jobs are passed to it from another, front-end, web application; the index_short.php script can be advantageously used as it does not generate header and footer (unlike the index.php script) for the web page, making it suitable for use in pop-up windows. It is based (with slight modifications) on the DaDaBik software (version 3.2).

Parts of the Interface Creator
The Interface Creator has two sections.
      The administration section has two parts - the front part or home page is used to add MySQL tables (and their fields) to the system. For every table (e.g., 'proteins') that is added, the system creates a new MySQL table named similarly, but with a 'dadabik_' prefix (e.g., 'dadabik_proteins'; the prefix is specified in config.php). The second part allows one to configure the way forms used to manipulate data for particular tables appear. E.g., a form used to enter a new entry for a 'proteins' table may have a field where one uses a pull-down menu to select the 'nature' of the protein entry being added. The Interface Creator allows one to specify the options that will appear in the pull-down menu.
      The data-browser part of the Interface Creator are the front pages. One can browse (and search) the data, and can add, delete or edit them.

Using the Interface Creator to configure the forms for manipulating table data and to show listings of table records
To do so, browse to the front part or home page of the Interface Creator and choose the right table (at the top).
      If the table you want to 'have configured' is missing, it means that it has not been 'installed' into the Interface Creator. To do so (install), browse towards the bottom of the administration front page. 'Installation' results in two things - first, a 'dadabik_' prefixed table is created in the database; secondly, the table is added to the dadabik_table_list, an interface-creator-installed MySQL table that lists the tables that have been 'installed' into Interface Creator.
      On the configuration page, choose the field you want to configure from the pull-down menu. (The field is named the same as in the corresponding MySQL table.) Then use the provided form. The settings that you specify are the ones that get stored in the dadabik_prefixed tables. A description of the options is provided below:
      A little understanding of HTML forms and MySQL tables will ensure that you configure the form fields properly (scroll to bottom for some helpful links). Similarly, error-free filling of the forms in Interface Creator will ensure that things run as you expect.
      Also note that if a form was configured in a certain way earlier and used to add data to the MySQL database tables, then changing a form-field's configuration may make data from the database tables appear 'strange' or not at all in the Interface Creator.

Authentication
An authorization model is available to prevent unauthorized accesses and/or to allow users to delete, modify or view only their own records. (The owner of a record is the user who entered it.) With authorization enabled, the administration pages are protected too; also, see 'security' below.
      By default, the authentication system is OFF. You must enable it in config.php by setting $enable_authentication to 1. Certain parameters regarding authentication are set there too. Users and encrypted passwords, and the rights of the user (administrator or not), are stored in the users_tab that Interface Creator installs in the database. Config.php can be altered to set another table for authentication (see config.php). With just authentication enabled, a visitor will have to log in but he can view, edit, etc., all records of all tables. You may be happy with just this. Also, by setting $enable_admin_authentication to 1 in config.php, you can restrict access to the administrative pages to admin users only (irrespective of the $enable_authentication settings.
      Authentication can be further extended so that every authenticated user can work with his or her records only. To make this work, each table you want to protect must have a field whose field type is set to ID_user, and this field must be set as 'ID_user' field type in the form configurator; you also have to set $enable_authentication = 1 in config.php. By setting the parameters $enable_delete_authorization, $enable_update_authorization and $enable_browse_authorization you can then customize your authorization model. E.g., if $enable_update_authorization is set to true (enabled), then the logged-in user can update only those records that have the 'ID_user' field set with their 'ID_user' value (i.e., their own records). Those records for which an 'ID_user' value has not been set or for which the values are different (meaning that they were created by someone else) will not be accessible. This will apply for all, but only those, tables that have the 'ID_user' field, with the field set to 'ID_user' field type in the configurator.
      The 'record ownerships' can be transferred from one user to another using the re-assignment form on the administration page.
      There are two types of users: normal users and administrator users. The Interface Creator is released with the following default administrator user - root, password - letizia (please change this after installation). The Interface Creator uses by default the table 'users_tab' (which it installs by default; this default table name is specified in config.php) to store user information; but, you can use your own users table, changing the $users_table_* parameters in config.php. User passwords are MD5-encrypted.
       Follow these steps for authentication to work. Change settings in config.php. Create (or edit) the MySQL tables to have a field labelled 'ID_User' (VARCHAR 64, NOT NULL). Choose to use either the Interface Creator-created users_tab table or a different users table. If different, it still must have atleast the types of fields that are in users_tab (it can have other fields too) and those fields must be specified in config.php. Also, if using a different table, create atleast one admin account (the Interface Creator's users_tab comes filled with one admin account - root/letizia) and populate the table with user names, passwords (MD5 encrypted), user type (admin or normal), etc., using phpMyAdmin, Navicat application, etc. (The Interface Creator won't do so).
      Note that the field for password stores values in MD5 version. That is, the MD5-encoded password values are stored. There are many ways to create MD5 values. On UNIX-like systems (e.g. using Mac OS X, using the Terminal application), you can type 'md5 -s password' (where password is the text) to generate the MD5 value. Alternately, 'install' the users table (e.g., users_tab) into the Interface Creator (from the administration page), and start adding users after going to the data browser pages. When you do so, you can use the 'create password' link to generate the MD5 encrypted password.
      Finally, configure the forms for the tables in the interface configurator, and for the 'ID_user' field, select 'ID_user' as field type, and make the field 'not shown' in insert/update forms. This is required for authentication to work.

Further configuration of the Interface Creator
Some configuration changes, such as the type of messages users see, are implemented through the config.php file. You may want to go through it to change certain parameters. You can of course modify the PHP codes to suit your needs.

Securing Interface Creator
Besides code modification and authentication (see 'authentication' above), other means to secure Interface Creator may be implemented. Using .htaccess files is a common method - see, for example, this site for more.

Debugging
Certain parameters in config.php can be turned on to enable debugging for fixing issues.

Some helpful links
1. DaDaBik website - the Interface Creator is a modified version of (DaDaBik 3.2). Support information on the DaDaBik website will usually apply for this version too.
2. What is MySQL - a very basic MySQL tutorial.
3. HTML forms - a tutorial from w3schools.com

Close this window