DaDaBIK Documentation

General information

Project name: DaDaBIK (DaDaBIK is a DataBase Interfaces Kreator)
Author: Eugenio Tacchini (eugenio at favoriti dot it)
Web site: http://www.dadabik.org/
Last release: 4.3 (released December 8, 2010). This documentation is about the 4.3 release, if you need the documentation for a previous release please read the documentation file included in each downloaded package.
License: DaDaBIK is released under the GPL license V. 2.

Table of contents

What is DaDaBIK?
Requirements
Installation
Upgrade from previous versions
Configuration
Authentication
Multiple function views: creating two instances of DaDaBIK
Security
Coding guidelines
FAQs
Known bugs and limitations

What is DaDaBIK?


DaDaBIK is a very popular and mature Open Source PHP application which allows you to easily create a highly customizable database front-end/application without coding. You can use it to create in a few minutes a very basic CRUD (create, read, update, delete) database front-end or to develop a more sophisticated database application.

No programming skills are needed to use it; if however you are a PHP programmer with DaDaBIK you can save tens of hours of work.

With DaDaBIK (differently from many competitors) you don't produce a PHP script, which would become outdated when you modify the schema of your database, but instead you directly use its abstraction layer that can be easily updated every time you modify your database's schema.

DaDaBIK uses the ADOdb Database Abstraction Library in order to support as many DBMSs as possible, at the moment it has been tested on MySQL, PostgreSQL, Oracle and MS SQL Server.

The strength of DaDaBIK lies in its ability to be customized. For example for each table field you can choose:

Other features include file uploading, master/details view, export to CSV, checking for possible duplication during an insert, authentication and authorization restrictions on view/update/delete, e-mail notices.

The graphic layout of DaDaBIK is customizable to help you to embed it in your own site.

DaDaBIK differs from PHPMyAdmin: it has not been created to offer the complete administration of a database, but rather to allow the creation of a customizable and user friendly database application. The target of a DaDaBIK application can be the final user instead of a DB administrator.

DaDaBIK is available in Italian, English, Dutch, German, Spanish, French, Portuguese, Croatian, Polish, Catalan, Estonian, Rumanian, Hungarian, Swedish, Slovak and Finnish.

Since its first release in 2001 it has been downloaded more than 150.000 times and its users community has produced about 10.000 posts in the forums.

Follow DaDaBIK on Twitter!
[back to top]

Requirements


[back to top]

Installation


  1. Copy everything which is contained in the directory program_files in a directory under your Web server
  2. Open the file /include/config.php with a text editor and edit it (specify at least $dbms_type, $host, $db_name, $user, $pass, $site_url, $site_path)
  3. Run the file http://your_host/your_dir/install.php to install DaDaBIK
  4. Open the file http://your_host/your_dir/index.php in your browser and have fun!! You can now start using DaDaBIK.

    You can now insert, search, update, delete the records of the tables contained in the database $db_name. You should have set a primary key for each table managed with DaDaBIK if you want to delete and update records, otherwise DaDaBIK won't show you the corresponding buttons.
    Also the "search similar record" feature during the insert needs a primary key.
    The "insert e-mail notice" feature needs a primary key auto increment field to work.

Please leave the link
Powered by: DaDaBIK database front-end
somewhere if you use DaDaBIK; it isn't compulsory but I would really appreciate it.

[back to top]

Upgrade from previous versions


If you want to upgrade from 4.3 rc2 to 4.3 without loosing your configuration you don't need to re-install DaDaBIK:

If you want to upgrade to 4.3 from a release older than 4.3 rc2 you should first upgrade to 4.3 rc2, read the related documentation to know how to do it.

[back to top]

Configuration


Introduction
The configuration of DaDaBIK can be managed at two different levels:
  1. Some general configuration parameters can be set from the file /include/config.php, just by opening it with a plain text editor and editing it. The file is self-explanatory. At this level you can, for example, set the database you want to manage with DaDaBIK, or enable/disable some DaDaBIK features
  2. For a more analytic tuning you are supposed to use the administration section http://your_host/your_dir/admin.php. At this level you can choose the table you want to include/exclude and, for each table, create your own DaDaBIK interface, choosing for example the field you want to include/exclude from the forms, the content of each field, the labels....
    Also the administration section is self-explanatory, so in the following paragraph we will explain in detail only the interface configurator, which is the core of the DaDaBIK configuration; you can reach it from the home page of the administration section.

The graphic customization can be done by changing the files /include/header.php and /include/footer.php and by using the CSS files /css/styles_screen.css and /css/styles_print.css, the former is the main one, the latter is used only when you print a page produced by DaDaBIK.
From the files under /include/languages you can customize all the sentences DaDaBIK uses.

Interface configurator
Here is the meaning of all the parameters you can set for each table field:

[back to top]

Authentication


An authorization model is available to prevent unauthorized accesses and to allow users to:

The owner of a record is the user who entered it.

To enable authentication, each table you want to protect must have a field whose field type is set to ID_user; you also have to set $enable_authentication = 1 in /include/config.php. By setting the parameters $enable_delete_authorization, $enable update authorization and $enable_browse_authorization you can then customize your authorization model.

There are two types of users: normal users and administrator users. Administrator users can view and manage users list by using DaDaBIK itself.

DaDaBIK is released with the following default administrator user: It is strongly recommended to change the default root password for security reasons.
DaDaBIK uses by default the table users_tab to store user information, but you can also use your own users table, changing the $users_table_* parameters in /include/config.php. User passwords need to be md5 encrypted before being registered/updated, so before inserting a new user or changing the password for an existing one it is necessary to create the encrypted password by following the "md5 crypter" link in the users form.

[back to top]

Multiple function views: creating two instances of DaDaBIK


Sometimes it is necessary to have one view for users where they can only view the data and a second view for the database administrators to manage the data being displayed. This will help you set up two instances of DaDaBIK to look at the same database.

  1. Install your first instance of DaDaBIK using the default DaDaBIK table prefixes contained in the /include/config.php file (last two variables in the file).
    http://your_host/your_dir/install.php

    If you want things to look the same in both installations like headers, footers, logos, etc., you can make those changes now so that you only have to make them once; otherwise you can worry about prettying it up later.

  2. Copy your entire DaDaBIK folder into a new folder you wish to use for the second instance: http://your_host/your_dir/ <-- all contents copied to: http://your_host/your_dir/admin-dir-name/
  3. Open /include/config.php from the /your_dir/admin-dir-name/include/ folder and change the table prefix and table list name in this file to something like:
    dadabik_admin_
    and
    dadabik_admin_table_list

    It does not matter what your prefixes are -- just so long as they are different from the first install prefixes.

    Also in /include/config.php, change the $site_url to the correct URL for the admin area so the correct installation is used.

  4. Now, install your second instance of DaDaBIK:
    http://your_host/your_dir/admin-dir-name/install.php
  5. This will create additional tables with your admin prefix for all your original DaDaBIK tables also. You should remove them by going to the admin interface for the second instance you just installed and uninstall those tables.

    For this example, we'll assume you used the following:
    1st install: "dadabik_" table prefix with "dadabik_table_list" table list name
    2nd install: "dadabik_admin_" table prefix with "dadabik_admin_table_list" table list name

    In the admin for the 2nd install (http://your_host/your_dir/admin-dir-name/admin.php), "uninstall" each table you see beginning with "dadabik_".

  6. Now you can manage both instances independent from each other through:
    http://your_host/your_dir/admin.php
    and
    http://your_host/your_dir/admin-dir-name/admin.php

    Once you have two (or more) instances created, you can apply security to each one separately. Refer to the Authentication and Security sections for more information.

[back to top]

Security


After the program is installed it is a good practice to remove the file install.php and all the upgrade*.php files since they could be used by malicious users in order to change or even re-install your DaDaBIK installation.

The files admin.php and internal_table_manager.php could also be used to modify your installation. If you enable the authentication within DaDaBIK, access to the files will be protected, otherwise other methods of protecting these files may be required.

Read carefully this documentation file (see above, configuration section) before using the HTML content type and the rich_editor field type, which can lead to high secrutity risks

[back to top]

Coding guidelines


If you want to contribute to the DaDaBIK code you have to follow some coding guidelines; this document: http://www.evolt.org/article/PHP_coding_guidelines/18/60247/ fits most of DaDaBIK coding style rules, in particular follow the sections:

In addition and/or modification to the above document sections, here are other rules:
Other coding rules should be learned looking for the DaDaBIK code. Please contact me if you have any doubts.

[back to top]

FAQs


I am looking for an old version of DaDaBIK, can anybody help me with a link to DaDaBIK x.x ??

Old releases of DaDaBik can be found at sourceforge.

but you are strongly encouraged not to use old releases, which can have security problems

I get:
"[06] Error: during database connection.
MySQL server said: Client does not support authentication protocol requested by server; consider upgrading MySQL client".
Why?


It is due to the authentication protocol introduced with MySQL 4.1.x; here:
http://dev.mysql.com/doc/mysql/en/old-client.html you can find several solutions.

I get [08] Error Message
I get "Error during query execution"


Please open the file include/config.php, look for the variable named $debug_mode. Set it to 1, so that you'll be able to see what the error is. If you still cannot figure it out post the error message in the support forum.

I can't see the edit/delete record icons in the results view

You did not set a primary key in the table, so you are able to see the records but DaDaBIK cannot edit/delete them.

I get "your database is empty" error, why?

You first have to set up a database and then you can install DaDaBIK.

Are multiple primary keys supported?

Not yet. Not planned. If you're interested in developing it please contact me (eugenio at favoriti dot it).

Page not showing after Insert/Update.

Open include/config.php and make sure the variable $site_url is set to the the complete path to your DaDaBIK installation.
(E.g http://www.yoursite.com/dadabik_folder/)

How to change graphic layout etc?

The role of the files is self-explicatory
include/header.php
include/footer.php

This takes care of the general styles
css/style.css

These two functions take care of forms and results table styles
change build_form() and build_results_table()

[back to top]

Known bugs and limitations


[back to top]