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
URL Shortening 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 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...
    Posted by doki
    2015-01-28

    Hi it is possible to add a attachment field? for example, we can upload a PDF/jpg/etc (scanned Calling card, ID, etc.) file associated to the address book entry.
    Posted by Tom
    2015-01-29

    Edited on 05-02-13

    Hi,

    >it is possible to add a attachment field?

    Sorry, there is no attachment field in Address Book Script.

    I wrote the FileUpload addon as a commercial product a year ... Read More
    Posted by Tim J
    2015-01-27

    Hello Tom,
    I installed the address book with modified fields using the Address Book Builder tool. I could log in with the admin/password. But I cannot
    add contact records or cannot edit or add ... Read More
    Posted by Tom
    2015-01-29

    Hi,

    >Forbidden
    >You don't have permission to access /members/staff/index.php on this server.

    Very weird! I remember someone reported a similar problem several month ago. He didn't get back though. ... Read More
    Posted by mac
    2015-01-27

    Hi Tom,
    I want to include this validation and format before insert on databases(when save on add new)
    http://technologyordie.com/php-mac-address-validation
    Posted by Tom
    2015-01-29

    I'll point out where the script saves data. Open web/staff/app/cls_ps_(table-name).inc.php[/b] and find the following lines.
    [code]//-- [BEGIN] Save data into database
    $def->SetList( ... Read More
    Posted by Michele
    2015-01-22

    Hi Tom!
    There's a possibility to exclude the ID column when an user login into the adrerss book?
    Posted by Tom
    2015-01-29

    Yes, it is safe to remove the ID column from the template, web/staff/tpl.(table-name).search.inc.php. Go ahead and remove it.
    Posted by tommy
    2015-01-12

    tnks Tom. and now how can i change the language ??? i hv downloaded address book mini. and i want to put more details. how can i do that ?
    Posted by Tom
    2015-01-29

    You can edit this file, web/codelib/cfg/res.eng.app.inc.php
    All the texts are in there.
    Posted by Spencer
    2014-12-28

    Hi,

    would like to have the option edit the dropdown list from database instead of from php file, with a link to perform this option.
    Posted by Tom
    2015-01-06

    Hi Spencer,

    >would like to have the option edit the dropdown list from database instead of from php file, with a link to perform this option.

    You are right. The script should be able to ... Read More
    Posted by Jorma Hytönen
    2014-12-23

    Thank's Tom
    I now have a finnish language and "maroon" version of that excellent script. And my wife is happy too. She do not understand the english version :-)
    Only changes that I'v made is to ... Read More
    Posted by Tom
    2015-01-06

    All right, Glad to hear that!
    Posted by Matteo
    2014-12-17

    Use this simple and fantastic script for the management of tourism facilities in Italy. I wanted to know if the number of contacts that can be put to max 9999 or I can go further. Thank you very much
    Posted by Tom
    2014-12-20

    >I wanted to know if the number of contacts that can be put to max 9999 or I can go further.

    If you mean the maximum number of records you can put into the script, then there is no limit.

    OK, ... Read More
    Posted by Jorma Hytönen
    2014-12-15

    So, If I copy all button images from staff/images/buttons/eng/ to staff/images/buttons/fin and make new button images include Finish language. Where I can tell AddressBook to find new images? In case ... Read More
    Posted by Tom
    2014-12-20

    >In case that I do not want overwrite English button

    Please just overwrite English buttons. You can always get the English buttons from the zip package and restore them in the folder.
    Posted by Jorma Hytönen
    2014-12-15

    How can I use custom CSS? So, change look and feel from blue something else. Is there anything else that modify page.css and repaint all buttons.
    Posted by Tom
    2014-12-20

    >Is there anything else that modify page.css and repaint all buttons.

    No. That's all you need to do!
    Posted by Mike
    2014-12-15

    Hello. I just created my phonebook script with your builder. But if it possible how can i do so that everyone can enter to contacts and see their information without login, but just administrator ... Read More
    Posted by Tom
    2014-12-20

    To remove the login feature, please read the following article:

    http://www.phpkobo.com/article--m2635
    Posted by mercy
    2014-12-14

    please tell me i dont want guests to change anything on the database what do i do?
    Posted by Tom
    2014-12-20

    To prevent non-administrators from adding/editing/deleting records, open web/staff/app/cls_ps_(--table-name--).inc.php and add
    if ( !$this->sys->IsAdmin() ) exit;
    after
    case 'edit_inp':
    The ... Read More
    Posted by Jeppe Jensen
    2014-12-14

    Hi Tom

    Couldnt find out how to reply - so put my thanks here:
    Thanks for a great script, for making it public and for helping with the question! It works perfect now :-)

    best regards and a happy ... Read More
    Posted by Tom
    2014-12-20

    You are welcome :)
    Posted by don
    2014-12-09

    (1064) You have an error in your SQL syntax near 'NAMES utf8' at line 1
    Sorry, you got an error. Please check your database settings and click Setup again.
    Posted by Tom
    2014-12-20

    >You have an error in your SQL syntax near 'NAMES utf8' at line 1

    It shouldn't happen. There seems to be some problems in MySQL server. Probably, nothing is working there. Ask your web administrator ... Read More
    Posted by Corey
    2014-12-08

    i corrected my errors in the question to make more sense.

    Thank you for you your time and effort in developing this wonderful resource.

    My question:

    on the edit contact page ... Read More
    Posted by Tom
    2014-12-12

    This article explains how to get a plain text (instead of an input box) on detail page:

    http://www.phpkobo.com/link--m2072
    Posted by Corey
    2014-12-06

    Thank you for you your time and effort in developing this wonderful resource.

    My question:

    on the edit contact page (tpl.contacts.detail.inc.php) i have added a separate ajax Facebook style ... Read More
    Posted by Jeppe Jensen
    2014-12-03

    Hi

    Thanks for a very nice script!!

    I am trying to adjust the out of members search and details view by using the suggestion given here: http://www.phpkobo.com/link--m2072

    It works perfectly in my ... Read More
    Posted by Tom
    2014-12-12

    In search page, please use the following code to display raw text.
    <?php echo $hm->Zb('rs:def:medlemsnummer='); ?>
    Notice that there is '=' after rs:def:medlemsnummer
    Posted by Carlo
    2014-12-03

    Hi Tom
    i want to show Zero result , when i get the first page means after logging .
    Posted by Tom
    2014-12-12

    >i want to show Zero result , when i get the first page means after logging .

    It's been requested several times. I really want to write a tutorial about it but I haven't had a chance.

    This is ... Read More
    Posted by Albert
    2014-12-01

    Hi Tom,
    Again thank you kindly for letting us use your application (Address Book).

    I found out how to change my username and password from within one of the forms but now I have forgotten them. ... Read More
    Posted by Tom
    2014-12-04

    > From which file can I change the Username and Password

    Passwords are stored in the database. The table name is tbl_staff.
    Posted by Jorma Hytönen
    2014-11-29

    How about MD5 hash of passwords. In where and how?
    Posted by Tom
    2014-12-04

    >How about MD5 hash of passwords. In where and how?

    Open web/staff/app/cls_sys_base.inc.php and find the following lines.
    ... Read More
    Posted by Jorma Hytönen
    2014-11-28

    True awesome, I used Address Book Script as SMS messaging service to store contact information
    Posted by Tom
    2014-12-04

    I'm glad you like it!

    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.