Ajax Poll Script
Ajax Poll Admin
Ajax Poll DX
Address Book Script
Form2DB
PayPal IPN + eProduct Delivery Script
Ajax Likes-Dislikes Counter
Text Ad Script
Lead Follow-Up Database Script
Ajax ContactUs Script
AdFreely -Ad Board Script-
Protect HTML Script
Fade-In Slideshow

Address Book Script

Ver 1.18 ( Security patch applied )
AB201-118

Download
Address Book
Address Book
  • First Name
  • Last Name
  • Company
  • Tel
  • Fax
  • Cell
  • Email
  • Street1
  • Street2
  • City
  • State
  • Zip
  • Address Book Mini
    Address Book Mini
  • First Name
  • Last Name
  • Department
  • Contact Email
  • Telephone Number
  • Contact Book Mini
    Contact Book Mini
  • Full Name
  • Full Address
  • Mobile No
  • Email ID/ Facebook ID
  • Comments
  • Company Directory
    Company Directory
  • Business Name
  • First Name
  • Last Name
  • Tel
  • Cell
  • Email
  • Street1
  • Street2
  • City
  • State
  • Zip
  • Country
  • Note
  • Customer List
    Customer List
  • First Name
  • Last Name
  • Home Phone
  • Home Phone2
  • Mobile Phone
  • Other Phone
  • Primary Phone
  • Business Phone
  • Anniversary
  • Birthday
  • Categories
  • Email
  • Email Display Name
  • Home Street
  • Home Street2
  • Home City
  • Home State
  • Home Zip
  • Note
  • Year
  • ... 2 more fields
    : Scripts generated by Address Book Script Builder
    : Scripts generated by Form2DB Builder

    This is a free Address Book PHP script with a MySQL database. This script allows users to search, view, add, edit, and delete address entries from a web browser. Each user can have a different login username.

    It's very easy to add/remove fields to/from the script. In fact, I've seen others using this script to store something totally different from addresses.

    You can customize Address Book Script online and/or manually.

    To manually customize it, please see Customization Quick Guide.

    To customize online, use Address Book Builder, which guides you through the steps of building a custom version of Address Book Script. To start Address Book Builder, click this link.

    License

    GPL

    Demo

    Installation Guide

    Quick Feedback to Tom, the developer

    If you have any suggestions or find any problems, please leave them as a comment down below. we'd appreciate the feedback!

    Name:
    Subject:
    Comment:
    Email: (Will not appear online)
    Posted by Paul Mureithi
    2015-08-21

    Hello, This is an amazing script that has literally saved my life and lots of headache. It is have a quick question though: Is there a way I can import the addresses from excel spreadsheet or export ... Read More
    Posted by Tom
    1440421630

    Hi,

    >Is there a way I can import the addresses from excel spreadsheet

    Unfortunately no, it doesn't have the import/export features. For now, you have to write code for it. It's definitely features ... Read More
    Posted by Didi
    2015-08-05

    Thanks Tom for advice, but i need show message "bla...bla..." can insert the message?

    Thanks.
    Posted by Tom
    2015-08-11

    Hi, I don't know exactly where you want to put the message but how about putting it in the template(web/staff/tpl.(table-name.)search.inc.php)?
    Posted by Ospath
    2015-08-05

    How can I give privileges to see only what they have entry by user,

    I have five people but some don't want to see other people entries only they entries.

    Can you Help me with my question..???
    Posted by Tom
    2015-08-11

    This script (http://www.phpkobo.com/lead_follow_up.php) does what you are looking for. Maybe you can transfer the feature to Address Book?
    Posted by Didi
    2015-08-04

    Hi Tom,

    its possible to lock/non active Edit button if login with USER?
    Please advice and thank you.
    Posted by Tom
    2015-08-05

    Hi, You can disable editing for non-admin. To do so, please take a look at this page:
    http://www.phpkobo.com/article--m2756
    Posted by Anton
    2015-08-03

    Hi Tom - Amazing scripts! So grateful for your work.

    Is it possible to increase the number of records shown on the results pane?
    Posted by Tom
    2015-08-05

    >Is it possible to increase the number of records shown on the results pane?

    Yes you can. Open web/staff/app/df.fieldlist.inc.php in a text editor and find the following line:
    XA_INIT_PAGE_SIZE=>20
    ... Read More
    Posted by Didi
    2015-07-31

    Great... thanks Tom.
    Posted by Tom
    2015-08-05

    You are welcome :)
    Posted by Xarilaos
    2015-07-29

    Members of "general staff" can add,delete,edit records. Can we have a "guest user" with no rights to add,delete,edit but only the right to search?
    Posted by Tom
    2015-08-05

    Hi,
    currently, Address book has only two types of users (Admin and non-Admin) and it's not so easy to add an extra user type. I'll make it easy it in a future version. Thanks for your suggesion!
    Posted by Didi
    2015-07-27

    Can I print all record after login as USER?
    Thanks before.
    Posted by Tom
    2015-07-29

    To add a print button, this page may help you:
    http://javascript.about.com/library/blprint.htm
    Posted by Willem van der Pas
    2015-07-21

    I use AddressBook for registration customers of the food bank. Now I want an extra table for date. Per customer, I want to see when they the food bank have visited. Is there a module for an extra ... Read More
    Posted by Tom
    2015-07-24

    Hi,

    >I want to see when they the food bank have visited. Is there a module for an extra table linked to customer number?

    Sorry, no there isn't but you can add code for an extra table.
    Posted by Shaun
    2015-07-08

    Hi Tom,

    Thanks for a great script. I am looking to modify it such that non admin users can only edit certain fields. I tried 'hiding' these fields by editing tpl.xxx.detail.inc.php to only show ... Read More
    Posted by Tom
    2015-07-09

    What you did is the correct first step. The second step is to remove '(fd)' for those fields. To do so, open web/codelib/asc/df.fl.(table-name).inc.php. You will find a line like this for most of ... Read More
    Posted by Mario
    2015-07-02

    Hi Tom,

    I have the problem with characters like "äöüß". I wrote "Mueßer Str. 5" - in the db I read only "Mue".
    Is it possible to write _any_ chars in the db? Or is the editform the problem?
    Posted by Tom
    2015-07-04

    >Is it possible to write _any_ chars in the db?

    Yes, you should be able to write any UTF-8 characters to the DB. There must be something wrong in the db. Maybe, mysql is a very old version and ... Read More
    Posted by vidi
    2015-06-28

    hi Tom.
    Thank you very much for this component. I want to know how can I delete all search boxes and place one box to search all filed in the table?
    Posted by Tom
    2015-06-29

    Deleting is easy. You just remove them from the template. "one box to search all filed" is not implemented, so you have to write it youself.
    Posted by Sergey
    2015-06-09

    Thank you but i meen another. In tpl.... search.php i have a table with some info. When i click "edit" opening tpl.....search.detail.php with editing info, right. But all this info are in "inputs ... Read More
    Posted by Tom
    2015-06-22

    To display a field as a simple text, please read this article:
    http://www.phpkobo.com/article--m2072
    Posted by Sergey
    2015-06-08

    Hello dear. PERFECT SCRIPT! Thanks to you!!!

    I want that on edit page (or other page) displaying editing info (with all inputs and textarea like in standard tpl.table_name.search.detail.php) and ... Read More
    Posted by Tom
    2015-06-09

    OK, so you want to edit the search page? Then edit the template for the search page. The path of the template is web/staff/tpl.(table-name).search.inc.php.

    To add a print button, this page may help ... Read More
    Posted by Jonathan
    2015-05-27

    I have made the tables in responsive using the code from http://codepen.io/geoffyuen/pen/FCBEg
    Just add table class and td data-th and add the css to page.css.
    I have hidden 'Add New' and 'Delete' ... Read More
    Posted by Jonathan
    2015-05-27

    Please can you tell us how to Import a list of companies on a csv file into database, or show me the relevant help file location?
    Posted by Tom
    2015-05-28

    >how to Import a list of companies

    Sorry, there aren't any guides for that. Please add some records in the admin panel, and then export the data to a csv file using phpMyAdmin. Use the csv file as a ... Read More
    Posted by Jonathan
    2015-05-27

    Yes, I had a redirect for the home page in htaccess, I temporarily disabled this and all is well. Please delete refernce in your post to actual site, this was only incuded in an email, not for public ... Read More
    Posted by Jonathan
    2015-05-27

    /web/install/ setup buton clicks but nothing happens - all browsers
    Posted by Tom
    2015-05-27

    Hi, I tried to open this url:
    http://www.(.......).com/membership/install/index.php
    The server redirected me to:
    http://www.(.......).com/membership/install/
    ( cutting off "index.php" )

    I ... Read More
    Posted by Tahmidul
    2015-05-24

    Hi Tom, i wanna know how can i add a label after generating this script ?
    Posted by Tom
    2015-05-24

    Hi Tahmidul, I can't be sure about which label you are referring to, but probably labels for data fields. You can find php constants for labels in web/codelib/cfg/res.eng.app.inc.php
    Posted by Robbie
    2015-05-05

    Hi Tom,

    First of all, thanks for the great scripts! .. I'm just starting to discover php and this is a big help.
    Do you think it's possible to make the email addresses and URLs "clickable" ? So you ... Read More
    Posted by Tom
    2015-05-12

    Hi Robbie, This article will help you.
    http://www.phpkobo.com/article--m2072
    Posted by Chris
    2015-05-01

    Thanks, you are awesome! Keep up the good work!
    Posted by Tom
    2015-05-12

    You are welcome :)
    Posted by MIke
    2015-04-29

    Here is a thought, providing a multi drop down menu to select categories of address lists. For example first select members - then from that the members group like firestone - then the list of ... Read More
    Posted by Tom
    2015-04-30

    That sounds cool. Thank you for your suggestions!
    Posted by Pierre
    2015-04-28

    Ok, The problem that I have concerning the date format seems to be that the European date format is not supported. So I don't have to search further.

    The other problems are resolved by changing the ... Read More
    Posted by Tom
    2015-04-30

    >the European date format is not supported.

    That's right. PHP can't read the European date format natively,
    you have to write code to parse it.
    Posted by Pierre
    2015-04-26

    Great script! I could use it and customize everything.
    The only thing I have some problems with its the date format.
    I want to change the date into (only) date (no time) and dit is as below. I also ... Read More
    Posted by Chris
    2015-04-17

    Hi,
    I love this script (and the builder), great work!

    I just have a tiny problem that really bugs me... I have a dropdown list and I don't know how to set the default option value. I tried to force ... Read More
    Posted by Tom
    2015-04-30

    XA_INIT_VALUE will help you.
    XA_INIT_VALUE=>array( 'reg'=>'--put-the-default-key-here--' ),
    You need to replace "--put-the-default-key-here--" with the default key
    you want to use. Insert the line ... Read More
    Posted by Pierre
    2015-04-17

    I have a problem with exporting the database.
    For some reason the database exports not the text from a lookup list but a number.
    For example if I select at the field "gender" the option Male, then ... Read More
    Posted by Tom
    2015-04-30

    I know what you mean. That's one of problems I have to fix in a future version. A currently availabel option is make a SQL join statement in the database. But then it requires a good SQL knowledge. ... Read More
    Posted by Michael
    2015-04-13

    Hi, thx for awesome script. Can you tell how can I change search results font size and / or increase or decrease tables cell and font inside ? I would like to modify for smaller fonts and cells for ... Read More
    Posted by Tom
    2015-04-30

    >Can you tell how can I change search results font size and / or increase or decrease tables cell and font inside ?

    You can edit the template file. The template file for search page is located at ... Read More
    Posted by Oleksiy
    2015-04-02

    I think that contacts book script builder is a wonderfull app but I think that it needs to have an opportunity to add a picture to any contact listed in the database.
    Posted by Tom
    2015-04-09

    There is a commercial product for it. It doesn't really put pictures to the database, though. It allows you to upload pictures to a folder and link it with a field in Address Book. ... Read More
    Posted by David
    2015-03-31

    Is there a way to make this awesome app responsive?
    Posted by Tom
    2015-04-09

    A short answer is "Not yet" it needs lots of css work. But I'm really interested in responsive design. These days, anything must be responsive! Thank you for your suggestion.
    Posted by Allyn
    2015-03-30

    Tom, Once the login function has been modified so that visitors can look but not edit, is there a way to remove the login screen for those visitors but have it for the staff? I have duplicated the ... Read More
    Posted by Tom
    2015-04-09

    Hi,

    The recommended procedure for creating guest pages is copy staff folder and rename it to guest or something. Keep the original staff folder for administration and modify guest folder for your ... Read More
    Posted by Allyn
    2015-03-28

    Tom I would like to modify the address book so that it:
    1. Allows users to create their own account.
    2. Allows non-registered users to search for records
    3. Search result displays vertically.
    Posted by Tom
    2015-04-09

    (1) and (2) aren't difficult. I'm not sure about what you meant by (3). Is (3) for smart phone? You can edit the template to change where each field is displayed.
    Posted by Weston
    2015-03-21

    When I click on Add New button it just sends me back to the log in page. please let me know any thoughts you might have. If you need additional information please email me.

    Thanks,
    -Weston
    Posted by Tom
    2015-03-25

    Hi,

    >it just sends me back to the log in page.

    Your PHP session is not working, so it can't keep your login status
    and kicks you out as soon as you try to do something in the admin panel.

    Please ... Read More
    Posted by Angus
    2015-03-19

    Great script! How can we export to pdf or csv format?
    Posted by Tom
    2015-03-25

    Hi Angus,

    Sorry the script doesn't have export features.
    I think it should. Thanks for your suggestion!
    Posted by Henster
    2015-03-02

    hi will this work on PHP 5.3.3 ?

    Posted by Tom
    2015-03-03

    Yes.
    Posted by FRANCK
    2015-02-25

    Hello,

    How to remove the icon MODIFY only for users?

    thank you
    Posted by Tom
    2015-03-03

    You can use the following condition on templates to excute code for users(non-admin) only.
    if ( !$sys->IsAdmin() ) {
    // The code placed here will be
    // executed for non-admin only.
    }
    Posted by FRANCK
    2015-02-24

    Hello,

    In tpl.customers.detail.inc.php file for a form: I want a Combo List if the database fields is empty and the text just appears without input if the field is already completed in the SQL ... Read More
    Posted by Tom
    2015-03-03

    Oh I see. There isn't a prewritten PHP class that does the job. You have to write one!
    Posted by FRANCK
    2015-02-24

    Hello,

    On the tpl.customers.detail.inc.php, how to display a field (eg the variable $ date) and save the fields in the SQL database?

    thank you
    Posted by Tom
    2015-03-03

    Sorry, I am not sure about what you are trying to do. Doesn't "tpl.customers.detail.inc.php" already display the field?
    Posted by Daniel
    2015-02-23

    Hi there, I am in the process of implementing IIS authentication to the Addressbook and would like to know is there is a quick link I could use to re-direct anonymous users to a read-only page?
    Posted by Tom
    2015-03-03

    Sorry, there isn't such a convenient link in the script.
    Posted by Daniel
    2015-02-19

    I tried using <?php echo $hm->Zb ('rs:def:rlog_edit_date_time');?> but its not returning me back with the last modified date time. Would you have any ideas why this would be?
    Posted by Tom
    2015-03-03

    Try this. Open web/codelib/asc/df.fl.(table-name).inc.php and
    find the following array:

    ... Read More
    Posted by Mainer
    2015-02-17

    Hello Tom. What a super service you're offering. Sadly, when I set up the script, I accidentally entered a field twice. Is there any way to edit after the fact or do I need to start over. The world ... Read More
    Posted by Tom
    2015-02-17

    Hi,

    > do I need to start over. The world wouldn't end but it would be nice not to have to.

    Removing a field is the reverse procedure of adding a field. If you can add a field manually, then you ... Read More
    Posted by Dario
    2015-02-17

    Hallo Tom
    Great Script. Thank you for share
    Posted by Tom
    2015-02-17

    You are welcome :)
    Posted by Nicola
    2015-02-13

    Hi Tom!
    I merged two database in one and i using it with two different instance of ADB script. I've done it in order to have
    a unique user login, adding in the top bar a link to connect each other ... Read More
    Posted by Tom
    2015-02-17

    Sorry, there isn't a simple way to do that. You just have to dig into the code and modify it.
    Posted by Daniel
    2015-02-10

    Hey there is there an easy way to add the last modified date in the search page? I want to dsplay the last time a record was modified while you performe your search.

    I tried adding something like: ... Read More
    Posted by Tom
    2015-02-17

    Hi,

    The field name of the last modified date&time is 'rlog_edit_date_time'
    Posted by mac
    2015-02-03

    I want to make one button for duplicate selected row and alocate new id (last id +1)
    Posted by Tom
    2015-02-13

    Sorry there is no built-in code for the task.

    >alocate new id (last id +1)

    This should be easy. Whenever you insert a new record, MySQL automatically assigns (last id +1) to the new record if you ... Read More
    Posted by Jim
    2015-02-02

    hi.
    Tks for sharing your work.
    Q: I want to know if there is a possibility to make a contact from the address book to be visible for all (public), only for specific groups (family& friends), and ... Read More
    Posted by Tom
    2015-02-13

    Hi, sorry, there is no build-in support for permissions on a per-record basis. You just have to write code to achieve the desired feature.
    Posted by dengyi
    2015-02-02

    Hi Tom

    Can I make the staff's permission to readonly? I don't hope that the staff can change the records.
    Posted by Tom
    2015-02-13

    Hi, your request is fairly similar to this post.
    http://www.phpkobo.com/article--m2745
    http://www.phpkobo.com/article--m2756
    Maybe you can improvise it?
    Posted by Adam
    2015-02-01

    Dear Tom,
    Thanks for great script, please guide me where to start if I want to export all search results as csv file or plain text?
    Posted by Tom
    2015-02-13

    I'll definitely start with web/staff/app/cls_ps_(table-name).inc.php.
    Good luck!
    Posted by Emre YILMAZ
    2015-01-30

    Hi Tom!
    Great work. Thank you for share that usefull script. I have a problem. When i try to add new record or new staff, there is "403 Forbidden Access to this resource on the server is denied!" ... Read More
    Posted by Tom
    2015-02-13

    Hi, it sounds like there is some problem outside of the script. Someone who had a similar problem said that he got wrong information from his ISP. I don't know exactly what information he was ... Read More
    Posted by Nicola
    2015-01-30

    Hi Tom!
    I saw in a old post that is possibile to merge two different script instance, using a unique database. Is it possible for more instance of adb script?
    TNX!
    Posted by Tom
    2015-02-13

    Hi, would you tell me which post you are referring to?
    I need to refresh my memory...

    Customization Quick Guide

    Important Note: The guide assumes that the table name in the script is "Address"

    Yes, it always used to be that way. ( for 4 years! )

    But the thing has changed. Address Book Builder v1.1 or later allows users to choose any name for the table, so the table name is no longer always "address."

    Before you start reading the guide, it's good idea to make sure what table name is used in your script. To do so, use phpMyAdmin to check the table names. There should be two tables. one is "staff", which stores the staffs data. And the other one holds your data.

    Monday, August 12, 2013

    Address Book Script: Converting a Text Field to a Date Field

    To convert a text field to a date field, open web/codelib/asc/df.fl.(table-name).inc.php, and find the text field that you want to modify.

    The following example is a typical text field definition:

    (example)

    'last_name'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_LAST_NAME,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
    

    Edit the value of XA_CLASS and XA_SEARCH, and add XA_FORMAT line like shown below:

    'last_name'=>array(
    XA_CLASS=>'CVDateTime',
    XA_CAPTION=>RSTR_LAST_NAME,
    XA_FORMAT=>'Y-m-d H:i:s',
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>36,
    XA_SEARCH_OP=>'s%',
    XA_SEARCH_OP=>'s=',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
    

    Lastly, change the data type of the field in the MySQL database from VARCHAR to DATETIME.

    Wednesday, April 24, 2013

    Address Book Script : Editing options in a dropdown listbox

    To edit the options of a dropdown list box generated by Address Book Builder, open web/config/config.selection.inc.php in a text editor. In the following example, three options are defined for the "State" dropdown list box.

    (example)

    define( 'SEL_STATE', "
    S1001=California
    S1002=New York
    S1003=Florida
    " );
    

    The format of options are a list of key-value pairs. The keys are stored in the database and the values are shown in the dropdown list box. You may freely add new key-value pairs to the list. Please make sure that all keys are unique and that the length of the key is equal to or less than the length of the field in the database.

    (example)

    Key=Value
    Key=Value
    Key=Value
    ...=.....
    ...=.....
    ...=.....
    ...=.....
    

    You are free to edit values any time you want. The changes are immediately reflected in the dropdown list box.

    On the other hand, editing a key may require extra works. If you have already created some records in the database, you must also change the corresponding keys in the records.

    Tuesday, March 26, 2013

    Address Book Script : Setting the id attribute of an input box

    Sometimes, you may need to specify the id attribuets of input boxes. You can set an id attribute by passing it in "$hm->Zb()."

    (example)

    <?php echo $hm->Zb('rs:def:first_name', ZB_ATTR, array( "id" => "enter-your-id-here" ) ); ?>
    

    Monday, March 25, 2013

    Address Book Script : Installing multiple copies in the same database

    If you try to install multiple copies of Address Book Script, table name collisions occur. In order to avoid it, you can change the table names before running the installation script. Change the table names in web/install/sql/sql.txt, which will be used to create tables in the database by the installation script. Also, you need to change the table names in web/codelib/cfg/config.table_name.inc.php.

    Sunday, March 24, 2013

    Address Book Script : changing the default sorting order

    To change the default sorting order, open web/staff/app/df.fieldlist.inc.php in a text editor and edit XA_INIT_ORDER_BY

    (example)

    'addresses' => array(
    XA_CLASS=>'cls_fl_addresses',
    XA_SPEC_FILE=>'df.fl.addresses.inc.php',
    XA_TABLE_NAME=>TBL_ADDRESSES,
    XA_ID_NAME=>'addresses_id',
    XA_INIT_ORDER_BY=>'addresses_id DESC',
    XA_INIT_PAGE_SIZE=>20
    ),
    

    Saturday, March 23, 2013

    Address Book Script : Template Path
    Search Page:
    Path: web/staff/tpl.(table-name).search.inc.php
    Detail ( Add New / Edit ) Page:
    Path: web/staff/tpl.(table-name).detail.inc.php

    Top
    Editing a Field Label

    You can often reuse existing fields by changing labels. For example, you can use the Cell field as the Office Tel# field by changing the caption of Cell to Office Tel#. To do so, follow the step below

     Step 1 
    Find the following code in web/codelib/cfg/res.eng.app.inc.php.
    define( 'RSTR_CELL', 'Cell' );
    Make the following modification (the BLUE text) like shown below. (1 location)
    define( 'RSTR_CELL', 'Office Tel#' );
     Done! 
    Note: The procedure above does not change the name of the field in the database.

    Top
    Making a Field Required or Optional

    You can easily make fields required or optional. For example, to make the email field required, follow the step below

     Step 1 
    Find the following code in web/codelib/asc/df.fl.address.inc.php.
    'email'=>array(
    XA_CLASS=>'CVEmail',
    XA_CAPTION=>RSTR_EMAIL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
    Make the following modification (the BLUE text) like shown below. (1 location)
    'email'=>array(
    XA_CLASS=>'CVEmail',
    XA_CAPTION=>RSTR_EMAIL,
    XA_SIZE=>24,
    XA_REQUIRED=>true,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
     Done! 
    To change it back to "optional", set it to "false" like XA_REQUIRED=>false,

    Top
    Changing Size of Input Box

    You can easily change the size of input box in the New/Edit page. For example, to change the size of the input box of the email field from 24 to 48, follow the step below

     Step 1 
    Find the following code in web/codelib/asc/df.fl.address.inc.php.
    'email'=>array(
    XA_CLASS=>'CVEmail',
    XA_CAPTION=>RSTR_EMAIL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
    Make the following modification (the BLUE text) like shown below. (1 location)
    'email'=>array(
    XA_CLASS=>'CVEmail',
    XA_CAPTION=>RSTR_EMAIL,
    XA_SIZE=>48,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
     Done! 

    Top
    Resizing Column Size (Field Size)

    Do you need to make the size of a field larger/smaller? The following guide will show you an example for changing the size of a field. In this guide, you change the size of the email field from 100 chars to 200 chars.

     Step 1 
    Use phpMyAdmin to change the size of "email" field of the table, tbl_address to 200 chars.

    If you prefer to use a sql statement, use the following command:
    ALTER TABLE `tbl_address` CHANGE `email` `email` VARCHAR( 200 ) DEFAULT NULL;
     Step 2 
    Find the following code in web/codelib/asc/df.fl.address.inc.php.
    'email'=>array(
    XA_CLASS=>'CVEmail',
    XA_CAPTION=>RSTR_EMAIL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
    Make the following modification (the BLUE text) like shown below. (1 location)
    'email'=>array(
    XA_CLASS=>'CVEmail',
    XA_CAPTION=>RSTR_EMAIL,
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>200,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
     Done! 

    Top
    Copying a Field

    Do you need another field similar to an exsiting field in the script? If so, the following step-by-step guide will help you. In this guide, you will add a copy of the email field to the script. Let's call it "email2."

     Step 1 
    Use phpMyAdmin to create a new field named "email2" in the table, tbl_address. The attributes of the email2 field should be exactly the same as the email field except the name.

    If you prefer to use a sql statement to create the email2 field, use the following statement:
    ALTER TABLE `tbl_address` ADD `email2` VARCHAR( 100 ) NULL AFTER `email`;
    		
     Step 2 
    Find the following code in web/codelib/asc/df.fl.address.inc.php.
    'email'=>array(
    XA_CLASS=>'CVEmail',
    XA_CAPTION=>RSTR_EMAIL,
    XA_SIZE=>24,
    XA_REQUIRED=>true,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
    Copy the code above, paste it after the original, and make the following modifications (the BLUE text) shown below. (2 locations)
    'email2'=>array(
    XA_CLASS=>'CVEmail',
    XA_CAPTION=>'My New Email2',
    XA_SIZE=>24,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(sr)(fd)'
    ),
     Step 3 
    Find the following code in web/staff/tpl.address.detail.inc.php.
    <tr>
    <td class='column_caption'>
    <?php if ( $b_reg || $b_edit ) { ?><span class="required"></span><?php } ?>
    <?php echo RSTR_EMAIL; ?> :
    </td>
    <td class='column_value'><?php echo $hm->Zb('rs:def:email'); ?>
    </td>
    </tr>
    Copy the code above, paste it after the original, and make the following modifications (the BLUE text) shown below. (2 locations)
    <tr>
    <td class='column_caption'>
    <?php if ( $b_reg || $b_edit ) { ?><span class="required"></span><?php } ?>
    My New Email2 :
    </td>
    <td class='column_value'><?php echo $hm->Zb('rs:def:email2'); ?>
    </td>
    </tr>
     Done! 
    Log in the staff area and check the detail page of one of address records. You will see the email2 field and it's ready to use!

    Optionally, you can add the email2 field to the Search page.
    To add it as a search criteria, see Adding a Search Criteria.
    To display it in the Search Results table, see Adding a Field to Search Results table.

    Top
    Adding a Search Criteria

    The following steps guide you add a search criteria to the Search page. Let's use the street1 field as an example.

     Step 1 
    Find the following code in web/codelib/asc/df.fl.address.inc.php.
    'street1'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_STREET1,
    XA_SIZE=>40,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(fd)'
    ),
    Insert the BLUE text like shown below. (1 location)
    'street1'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_STREET1,
    XA_SIZE=>40,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sp)(fd)'
    ),
     Step 2 
    Find the following code in web/staff/tpl.address.search.inc.php.
    <!-- [BEGIN] Main Form -->
    <div id="main_div">

    <?php include(INC_FORM_BEGIN); ?>

    <?php include(INC_BODY_INFO); ?>

    <!-- [BEGIN] Search Criteria -->
    <?php echo $hm->SectBegin( RSTR_SEARCH_CRITERIA ); ?>

    <div style='overflow:auto;'>
    <table width='99%'>


    Insert the BLUE text like shown below. (1 location)
    <!-- [BEGIN] Main Form -->
    <div id="main_div">

    <?php include(INC_FORM_BEGIN); ?>

    <?php include(INC_BODY_INFO); ?>

    <!-- [BEGIN] Search Criteria -->
    <?php echo $hm->SectBegin( RSTR_SEARCH_CRITERIA ); ?>

    <div style='overflow:auto;'>
    <table width='99%'>

    <tr>
    <td align="right"><?php echo RSTR_STREET1; ?> : </td>
    <td align="left"><?php echo $hm->Zb( 'sp:def:street1' ); ?></td>
    <td align="right">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="right">&nbsp;</td>
    <td align="left">&nbsp;</td>
    </tr>



     Done! 

    Top
    Adding a Field to Search Results table

    The following instruction explains how to display a field in the Search Results table. We use the street1 field as an example.

     Step 1 
    Find the following code in web/codelib/asc/df.fl.address.inc.php.
    'street1'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_STREET1,
    XA_SIZE=>40,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(fd)'
    ),
    Insert the BLUE text like shown below. (1 location)
    'street1'=>array(
    XA_CLASS=>'CVText',
    XA_CAPTION=>RSTR_STREET1,
    XA_SIZE=>40,
    XA_REQUIRED=>false,
    XA_MIN_CHAR=>0,
    XA_MAX_CHAR=>100,
    XA_SEARCH_OP=>'s%',
    XA_LIST=>'(sr)(fd)'
    ),
     Step 2 
    Find the following code in web/staff/tpl.address.search.inc.php.
    <tr class='data_table_caption'>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:address_id'); ?> <?php echo RSTR_ADDRESS_ID; ?></th>
    <th><?php include(INC_SR_SELREC_HEADER); ?></th>
    <th><?php include(INC_SR_EDIT_BTN_HEADER); ?></th>
    <th><?php echo RSTR_ACTIVE; ?></th>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:first_name'); ?> <?php echo RSTR_FIRST_NAME; ?></th>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:last_name'); ?> <?php echo RSTR_LAST_NAME; ?></th>
    <th><?php echo RSTR_CITY; ?></th>
    <th><?php echo RSTR_STATE; ?></th>
    <th><?php echo RSTR_EMAIL; ?></th>
    </tr>


    Insert the BLUE text like shown below. (1 location)
    <tr class='data_table_caption'>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:address_id'); ?> <?php echo RSTR_ADDRESS_ID; ?></th>
    <th><?php include(INC_SR_SELREC_HEADER); ?></th>
    <th><?php include(INC_SR_EDIT_BTN_HEADER); ?></th>
    <th><?php echo RSTR_ACTIVE; ?></th>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:first_name'); ?> <?php echo RSTR_FIRST_NAME; ?></th>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:last_name'); ?> <?php echo RSTR_LAST_NAME; ?></th>
    <th><?php echo RSTR_CITY; ?></th>
    <th><?php echo RSTR_STATE; ?></th>
    <th><?php echo RSTR_EMAIL; ?></th>
    <th>Street1</th>
    </tr>

     Step 3 
    Find the following code in web/staff/tpl.address.search.inc.php.
    <?php while( $hm->zb('@rs:def:begin_table') ) { ?>
    <tr>
    <td style='text-align:right;'><?php echo $hm->Zb('rs:def:address_id'); ?></td>
    <?php include(INC_SR_ID_PARAM); ?>
    <?php include(INC_SR_SELREC); ?>
    <?php include(INC_SR_EDIT_BTN); ?>
    <td style='text-align:center;'><?php echo $hm->Zb('rs:def:active'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:first_name'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:last_name'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:city'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:state'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:email'); ?></td>
    </tr>

    Insert the BLUE text like shown below. (1 location)
    <?php while( $hm->zb('@rs:def:begin_table') ) { ?>
    <tr>
    <td style='text-align:right;'><?php echo $hm->Zb('rs:def:address_id'); ?></td>
    <?php include(INC_SR_ID_PARAM); ?>
    <?php include(INC_SR_SELREC); ?>
    <?php include(INC_SR_EDIT_BTN); ?>
    <td style='text-align:center;'><?php echo $hm->Zb('rs:def:active'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:first_name'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:last_name'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:city'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:state'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:email'); ?></td>
    <td style='text-align:left;'><?php echo $hm->Zb('rs:def:street1'); ?></td>
    </tr>

     Done! 

    Top
    Adding Sort Buttons

    This section will explain how to add sort buttons on the header of Search Result Table.

    You already have sort buttons on First Name and Last Name, so let's try the City field.

     Step 1 
    Find the following code in web/staff/tpl.address.search.inc.php.
    <tr class='data_table_caption'>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:address_id'); ?> <?php echo RSTR_ADDRESS_ID; ?></th>
    <th><?php include(INC_SR_SELREC_HEADER); ?></th>
    <th><?php include(INC_SR_EDIT_BTN_HEADER); ?></th>
    <th><?php echo RSTR_ACTIVE; ?></th>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:first_name'); ?> <?php echo RSTR_FIRST_NAME; ?></th>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:last_name'); ?> <?php echo RSTR_LAST_NAME; ?></th>
    <th><?php echo RSTR_CITY; ?></th>
    <th><?php echo RSTR_STATE; ?></th>
    <th><?php echo RSTR_EMAIL; ?></th>
    </tr>


    Insert the BLUE text like shown below. (1 location)
    <tr class='data_table_caption'>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:address_id'); ?> <?php echo RSTR_ADDRESS_ID; ?></th>
    <th><?php include(INC_SR_SELREC_HEADER); ?></th>
    <th><?php include(INC_SR_EDIT_BTN_HEADER); ?></th>
    <th><?php echo RSTR_ACTIVE; ?></th>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:first_name'); ?> <?php echo RSTR_FIRST_NAME; ?></th>
    <th nowrap='true'><?php echo $hm->Zb('ob:rs:def:last_name'); ?> <?php echo RSTR_LAST_NAME; ?></th>
    <th><?php echo $hm->Zb('ob:rs:def:city'); ?> <?php echo RSTR_CITY; ?></th>
    <th><?php echo RSTR_STATE; ?></th>
    <th><?php echo RSTR_EMAIL; ?></th>
    </tr>

     Done! 

    Monday, March 4, 2013

    Bug Fix : Address Book Builder 1.2

    Description: This is a bug introduced in Address Book Builder v1.2. In some builds, some of data columns of the search result table get cut off. ( Thank you for reporting, Mikitty! )
    Status: Fixed

    Thursday, February 28, 2013

    Pickup Center Update : Popup Info Card

    Added popup info cards to Pickup Center. When you hover the mouse cursor over a script box, a small window pops up and displays the list of fields used in a script.

    Friday, February 22, 2013

    Address Book Builder v1.1 Update

    Address Book Builder was updated to v1.1. The new version of Address Book Builder allows you to choose a field type from an input box, textarea, checkbox and dropdown listbox.

    Also, you can name the table as you like. ( In the previous version, the name of the table is always "address" )

    Monday, January 21, 2013

    Address Book Builder v1.0 Now Available Online

    Address Book Builder allows you to generate a web-based Address Book Script ( PHP + MySQL ), which you can install on your web site.

    Just enter a title and a list of fields you would like to have. Address Book Builder will generate the PHP code for you.

    Since you can specify fields freely, the application is not limited to address books. You can use Address Book Builder to create scripts that store a member list, customer list, employee list or any lists you can imagine.

    Friday, December 14, 2012

    A new section, 'Adding Sort Buttons' was added to Customization Quick Guide

    Sunday, December 9, 2012

    The new section, 'Editing a Field Label' was added to Customization Quick Guide

    Tuesday, December 4, 2012

    An easy alternative way to upgrade Address Book Script v1.16 to v1.17

    To upgrade Address Book Script v1.16 to v1.17, you don't need to reinstall the entire script again.

    Download this zip file and replace "web/codelib/asc/df.fl.address.inc.php" in your copy of Address Book Script (v1.16) with "web/codelib/asc/df.fl.address.inc.php" in the zip package.

    Monday, December 3, 2012

    Address Book v1.17

    Bugfix: Fix duplicate string resources.