Ajax Poll Script
Address Book Script
Form2DB
PayPal IPN + eProduct Delivery Script
Lead Follow-Up Database Script
Ajax ContactUs Script
AdFreely -Ad Board Script-
Ajax Likes Script
Fade-In Slideshow
Text Ad Script
URL Shortening Script
Ajax Poll Admin
Fileup Addon

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 zec
    1466870055

    Hello, I have a list of contacts with multiple users to each one got a nickname and some data more, what I want is that they update only some form fields and can not modify the other, how can I make ... Read More
    Posted by Tom
    1466933956

    Sorry, there aren't any turn key solutions for that in the script.
    But it's definitly possible. You just have to read the code and come up with some modification!
    Posted by Dima
    1466677940

    Hello dear Tom.

    Please help me. How can i do search button as text button not image.
    Thank you.
    Posted by Tom
    1466734117

    Hi Dima, this article will help you.
    http://www.phpkobo.com/article--m3484
    Posted by zec
    1466559746

    very good job, my question as I create a user with another feature
    1. registration (administrator )
    2. Reading (staff)
    3. Amendment (new )

    Thank you...
    Posted by Tom
    1466625241

    Yes, I think the roll-based security feature is important. It's in our to-do list. Thanks for your suggestion!
    Posted by Dima
    1466361643

    Hello dear Tom. This time a have a problem like this.

    How can i preview only last 3 record in address book. For example.
    I have a little window in about.detail.php file, and i need to preview in it ... Read More
    Posted by Tom
    1466505679

    Hi, there are no utilties you can use in the script to get the last 3 ids. You need to open the database and run a query, which requires a basic knowledge about PHP and mysql.
    Posted by johgats
    2016-06-07

    Thanks for the good work.

    how can i make some fields on the form mandatory and also reduce the search fields.
    Posted by Tom
    2016-06-08

    Open web/codelib/asc/df.fl.(table-name).inc.php and find the field definition array.
    For example, the following is the field definition array of the "first_name"
    ... Read More
    Posted by Ehab Magdy
    2016-06-05

    I need to edit the note field to be department field "rename"
    how can i do that?

    Thanks

    Posted by Tom
    2016-06-06

    Hi,

    >I need to edit the note field to be department field "rename"

    If you just want to change the caption of the field, you can do it in
    web/codelib/cfg/res.eng.app.inc.php
    Posted by Rami
    2016-06-01

    how i can hide add and delete option for staff users
    i wanna this options for admin user just

    thank you
    Posted by Tom
    2016-06-02

    Hi,

    >how i can hide add and delete option for staff users

    these articles will help you!
    http://www.phpkobo.com/article--m2756
    http://www.phpkobo.com/article--m3342
    Posted by Poul
    2016-05-28

    Hi, Tom

    I'm implementing Address Book Script to do something you probably don't expect :) I'm try to use it for CDR viewer. I'm almost done but I have problem witch search.

    I need to do search for ... Read More
    Posted by Tom
    2016-05-30

    >I need to do search for date grader than (>) and lower than (<).

    Hi, the following example is for the 'rlog_edit_date_time' field.
    In web/codelib/asc/dl.fl.address.inc.php, find ... Read More
    Posted by Abd
    2016-05-22

    Pls!!..how do I change the default username and password?
    Posted by Tom
    2016-05-23

    Hi,

    >how do I change the default username and password?

    (1) Log in to the admin panel
    (2) Click Staff
    (3) Click the edit icon of the admin record
    (4) Enter a new username and password
    (5) Click OK
    Posted by Brian
    2016-05-19

    how can I add: <a href="tel:5555555555">555-555-5555</a>
    to the tel and cell engine. So when I add a tel/cell this will auto generate the click to call tag.

    thanks
    Posted by Tom
    2016-05-20

    Hi, this article will help you. Check it out!
    http://www.phpkobo.com/article--m2072
    Posted by Abd
    2016-05-19

    Pls sir...aside the admin panel, is there a page that is conected to the database where an ordinary user can fill there information and submit? thanks
    Posted by Tom
    2016-05-20

    Hi, I think Form2DB is close to what you are looking for. Check it out!
    http://www.phpkobo.com/form2db.php
    Posted by Ben
    2016-05-08

    Hey Tom, thanks for all of your hard work :) I love the address book script.

    I am doing some design changes to the files eg:
    http://goo.gl/EqGIh5 & http://goo.gl/kJx07Z

    and I just cant seem to ... Read More
    Posted by Tom
    2016-05-09

    Hi,

    >how to remove the image from the buttons and change them to pure css.

    First, open web/codelib/sys/CHtmlMacro.inc.php in a text editor. Find the following line:
    ... Read More
    Posted by Diego Acosta
    2016-05-03

    Hola muy buena la agenda, como puedo crear un grupo de solo lectura

    gracias
    ---------------------------
    Hello very good agenda, as I can create a read-only group

    Thank you
    Posted by Tom
    2016-05-04

    Thank you :)
    Posted by Dima
    2016-04-25

    Hello dear Tom)
    Now i'm about translating. I translate your script to russian and ukraine languages and i have some problem)
    I can't find where they were for the field <?php echo ... Read More
    Posted by Tom
    2016-04-26

    HI Dima,
    You can change the caption of "active" field in web/codelib/cls_fl_aso.inc.php.
    Find these lines:
    ... Read More
    Posted by Dima
    2016-04-23

    Hi dear Tom.

    I find my mistake in "cls_ps_<table_name>.inc.php"

    Thank you for best script and best communications!
    Posted by Tom
    2016-04-24

    Glad to hear that! :)
    Posted by Oscar
    2016-04-22



    Tom

    Thank you I gat it.. Thank A lot, I did the connection with my PDF File

    how can I add .pdf at the end


    <?php echo $hm->Zb('rs:def:address_id',ZB_CBF,'getTextValue')
    Posted by Tom
    2016-04-24

    You can do
    <?php echo $hm->Zb('rs:def:address_id',ZB_CBF,'getTextValue'); ?>.pdf
    or
    <?php echo $hm->Zb('rs:def:address_id',ZB_CBF,'getTextValue') . ".pdf"; ?>
    Either will do!
    Posted by Oscar
    2016-04-22

    Dear: Tom

    This is the Link for the location
    <td align='center'> <a href='http://22.19.7.7/01-WH_Time_Line\FTP WH\MRR\R12070.pdf' target='_blank'>

    R12070.pdf' = is going to be ID Number
    but at the ... Read More
    Posted by Tom
    2016-04-22

    OK, so you want to display the ID in the detail page, right?

    First, you need this helper function. Open web/staff/common.inc.php in a text editor, and put the following line on the top, then the ... Read More
    Posted by Oscar
    2016-04-20

    Dear: Tom

    Do you know how can add Download link a PDF file using the Text Name. I have this Example:

    <a href='http://77.11.55.045/01-WH_Time_Line\FTP WH/file%20upload.html' target='_blank'>

    But ... Read More
    Posted by Tom
    2016-04-20

    Hi,

    <a href='http://77.11.55.045/01-WH_Time_Line\FTP WH/file%20upload.html' target='_blank'>

    About the link above, shouldn't the url end with a filename with the PDF extension if you want to have ... Read More
    Posted by Dima
    2016-04-18

    Yes, i know, but when i click on it script write an error - wrong page sequencer and i can't do anything ( Maybe there is another way to do it?
    Posted by Tom
    2016-04-20

    Hi, First of all, I assume you didn't modify the code and you are experiencing the problem right after you installed it. (Correct me if my assumption is wrong.) Then there must be some other external ... Read More
    Posted by Dima
    2016-04-17

    Hello dear Tom. How can i do back button? No java script. When i try to do it by myself the script does a mistake when clucking button like (wrong page sequanser). Please help me.
    Posted by Tom
    2016-04-18

    Hi, There is the cancel button in the record detail page. I think that's what you are looking for.

    Posted by Jenny
    2016-04-11

    Hi I am new to programming and I am getting the following warnings when trying to install (ie when doing Step 3 Uploading script to your website) and not really sure what to do with them

    "Warning: ... Read More
    Posted by Tom
    2016-04-11

    Hi,

    >I did find a previous message from 2014-11-08...but I have downloaded the latest zip and it still throws the above warning/error.

    It's weird. This problem was solved more than a year ago and I ... Read More
    Posted by Jeremy
    2016-04-05

    Hi Tom,

    I made a guest directory, modified the backend code for removing the opportunity to guests to modify/add/delete the entries, and now I just want to remove the buttons (because if we click ... Read More
    Posted by Tom
    2016-04-05

    Hi,

    >but can't find the buttons in there, or a way to remove them.

    Please edit web/staff/include/tpl.sr.top_bar.inc.php.
    Posted by Brooks
    2016-03-31

    Thank you so much for your script! i installed thsi but I can't log in. when I try to login, the login page refreshes and redirects to itself. Any advice?
    Posted by Tom
    2016-04-01

    Hi, it looks like PHP session is not working, so the script can't keep your login status and directs you back to the login page. Please ask your web administrator to fix the PHP session.
    Posted by Dima
    2016-03-12

    Hello dear Tom. You write brilliant script, but i have some problem. I want that users see only "active" records, i do some changes in df.table-name.search file in "active" string like: .... array ... Read More
    Posted by Tom
    2016-03-14

    Hi, If you want permanently to set active to Yes, you can remove the following from web/staff/tpl.(table-name).search.inc.php
    <?php echo $hm->Zb( 'sp:def:active' ); ?>
    and put this instead:
    ... Read More
    Posted by Lewis
    2016-03-10

    Tom, this is the best script i have seen! i have a some people asking for 2 changes. 1: automatically add dashed when inputting a phone number. 2. either a popup calendar or a button that will input ... Read More
    Posted by Tom
    2016-03-11

    >1: automatically add dashed when inputting a phone number.

    I'm not sure I can add it because I feel the feature is too specific.

    >2. either a popup calendar or a button

    This is in my to-do list. ... Read More
    Posted by Richard
    2016-03-07

    Hi ,

    I get the " Fatal Error: Call to undefined function mysql_connect() in c:\xampp\htdocs\web\install\app\lib.inc.php on line 81 "

    while installing the application...

    Please can you help me ... Read More
    Posted by Tom
    2016-03-07

    Hi,

    You need to have the mysql extension installed in your PHP. Most rental websites have it though. If you installed PHP yourself, then you would need to add the mysql extention to your PHP.
    Posted by shoka
    2016-03-06

    how can i change username and password
    plz tell me
    Posted by Tom
    2016-03-07

    Hi, Log into the admin panel and click staff from the top menu. You'll see the list of users. Click the edit icon of the user account you want to edit.
    Posted by Marian A.
    2016-02-29

    Hi,

    Great job and thank you for work.
    I managed to have more than table in the "Address Book" for different purposes and I wanna ask you if it's possible to add a button or something which can ... Read More
    Posted by Tom
    2016-03-01

    >it's possible to add a button

    It's possible if you don't mind writing code. Export is a frequently asked request and it's in my to-do list. Thank you for your suggestion!
    Posted by Olufemi
    2016-02-26

    Hi There,

    Awesome job you are doing.

    I have been struggling with installing the "Address Book Script". I am using Wamp server on my laptop to simulate the web environment.

    The trouble is actually ... Read More
    Posted by Tom
    2016-02-26

    Hi,

    >"Can not connect to database server [ localhost ] : Access denied for user 'myusername'@'localhost' (using password : YES)"

    The error message indicates the username or password ( or maybe both ... Read More
    Posted by Chad
    2016-02-23

    Is there a way that I can make it so that Guests can view details of like 10 or 20 on a page? Not change anything just have it show the contents?
    Posted by Tom
    2016-02-23

    Hi, maybe this article will help you!
    http://www.phpkobo.com/article---m3350
    Posted by nick
    2016-02-22

    hello, it wouldd be real nice if you could add a field ,where the user can upload a file (photo,txt etc.)
    Regards
    Posted by Tom
    2016-02-23

    Actually, an add-on for file upload exists. It's a commercial product, though.
    http://www.phpkobo.com/fileup-addon
    Posted by Kevin
    2016-02-20

    I got a warning message. Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. ... Read More
    Posted by Tom
    2016-02-20

    I think you are using one of PHP v3.x series. It seems some PHP distributor accidentally injected a bug in php.ini file and that's causing the warning message in any PHP scripts that use the date() ... Read More
    Posted by Kim
    2016-02-12

    Dima,
    I forgot to add that you can change your start page here:
    cls_sys_base.inc.php

    XA_START_PAGE =>
    Posted by Tom
    2016-02-15

    Thanks!
    Posted by Shaun
    2016-02-09

    Hi Tom,

    I checked out the 2 posts referring to making a field clickable email or URL), as I need to do this. However, you mention making the changes in tpl.(table-name).detail.inc.php.

    The problem ... Read More
    Posted by Tom
    2016-02-10

    In tpl.(table-name).search.inc.php, the procedure is much simpler.
    Replace
    <?php echo $hm->Zb('rs:def:(field-name)'); ?>
    with
    ... Read More
    Posted by Kim
    2016-02-07

    Whoops, sorry the backslash was stripped from the file names.
    Sorry about that. If you can't figure it post back and I'll try and give you a better list when I am at home.

    Kim
    Posted by Tom
    2016-02-08

    Wow, You are a pretty much hardcore! :)
    Posted by Kim
    2016-02-07

    Dima,
    Its pretty easy to add extra pages is you make copies of the type of page you want (Search, Detail, Login etc.) I have several tables and copied the search page to create different search ... Read More
    Posted by Dima
    2016-02-05

    Hello. Tom, your script are perfect, but can i add some new pages that i need, and how can i do it?

    Can i change start page from default tpl.table_name.search.php to my-page.php? How can i do it? ... Read More
    Posted by Tom
    2016-02-06

    Sorry, it hasn't been documented yet. It's fairly complex. Maybe you could try duplicating the "about" page. I think that's much easier than adding a new page.
    Posted by Sergey
    2016-02-03

    Thank you Tom, but in html not workin, they do it in one vertical line, but i need in 3-4 vertical column. Twenty entries per page, i need 4 vertical and five horizontal lines, but with simple html ... Read More
    Posted by Tom
    2016-02-05

    Sorry I can't. Your request is out of the scope of this feedback box. Anyway, I think you first need a good HTML coder. In your case, it's important to write correct HTML code before editing the ... Read More
    Posted by Jeremy
    2016-02-01

    Hi Tom,
    How do I hide The ID in the criteria search AND in the list of contacts?

    Thank you.
    Jeremy
    Posted by Tom
    2016-02-03

    >How do I hide The ID in the criteria search

    Please edit the template, tpl.(table-name).search.inc.php
    Posted by Sergey
    2016-01-31

    I edit the template web/staff/tpl.(table name).search.inc.php, but all entries are placed like that:

    name address
    name address
    name address

    but i need

    id4 name adress | id5 name adress | id6 ... Read More
    Posted by Tom
    2016-02-03

    I think it's just a HTML issue. First, try it in a stand-alone HTML page.
    Posted by Sergey
    2016-01-31

    For example.

    I have some people with address in UA, in UK, in USA, ....

    Can i display numbers of records in each categories of address? If i can, please help me how to do this.
    Posted by Tom
    2016-02-03

    There is no buildin feature for that. You need to write code to achieve it .
    Posted by Sergey
    2016-01-29

    Sorry for many quastions dera Tom. But...

    Can i display numbers of records in each categories of address? If i can, please help me how to do this.

    And can i do like in AdFreely, if "URL" input ... Read More
    Posted by Tom
    2016-01-30

    >Can i display numbers of records in each categories of address?

    Sorry, I don't understand "each category of address" Would you clarify it?

    >if "URL" input field is empty the link is not clickable ... Read More
    Posted by Sergey
    2016-01-29

    And one more questions. How can i place checked checkbox for default options?
    Posted by Tom
    2016-01-30

    Let's suppose the field name of the checkbox is "newsletter".
    Open web/codelib/df.fl.(tablename).inc.php and find the following array.
    ... Read More
    Posted by Sergey
    2016-01-29

    Hello dear Tom.

    Please can you help me. Could i change positions of all entries of addressbook from horizontal to vertical with 3 or 4 column? And how can i do this? For example.

    I want that in one ... Read More
    Posted by Tom
    2016-01-30

    >Could i change positions of all entries of addressbook from horizontal to vertical

    Yes you can. Just edit the template web/staff/tpl.(table name).search.inc.php
    Posted by Jeremy
    2016-01-29

    Hi Tom,

    Thank you for the previous answer, it works well.
    Is it possible to hide the ID in search AND in the contacts list ?

    Thank you.
    Posted by Tom
    2016-01-30

    >Is it possible to hide the ID in search AND in the contacts list ?

    Yes, it is!
    Posted by Jeremy
    2016-01-28

    Hi Tom,

    Really happy with this address book, but as the admin I can see and search for contacts. But, as I put a link to the address book on my site, how anyone can see it without login.
    Want to ... Read More
    Posted by Tom
    2016-01-28

    Hi,

    >how anyone can see it without login.

    You need to create a guest version. to do so, the first step is copy the staff folder and rename it as something like "guest" The "guest" folder now works ... Read More
    Posted by Sergey
    2016-01-28

    Thank you dear Tom, for fast reply, but your example:
    ?_sc=address/&rs:def:_lv:ob=cls_rlog_date_time%20ASC not working (i change address to my db name). The script write this: "Invalid Order By : ... Read More
    Posted by Tom
    2016-01-28

    >"Invalid Order By"

    This would appear if you forgot to add (sr).
    Would you check it again? Also try other fields like "first_name" to
    see the problem occurs on others as well as ... Read More
    Posted by Sergey
    2016-01-19

    Hello again dear Tom.
    This time please help me with links. I wanna do a sorting by date creating or date editing strings like:
    <a href="?_sc=customers/&sr:def:rlog_edit_date_time=19.01.16; ... Read More
    Posted by Tom
    2016-01-20

    To sort in cls_rlog_date_time, you need to add (sr) to rlog_edit_date_time array.

    To do so, open web/codelib/asc/df.fl.address.inc.php and find the following array.
    ... Read More
    Posted by Sergey
    2016-01-14

    Thank you.
    Posted by Tom
    2016-01-15

    You are welcome :)
    Posted by Sergey
    2016-01-13

    Hello dear Tom. Please can you tell me what I must to do that in search form i can place a checbox not simple selectfield. For example, I have some checkbox to check in adding new adress form, but ... Read More
    Posted by Tom
    2016-01-13

    Sorry, there isn't an easy way to convert the select to a checkbox. The reason why <select> is used is because a select can offer three choices: (1) Checked (2) Unchecked (3) All. If you change the ... Read More

    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.