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

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 Michele
    1493461193

    Hello Tom, sorry but in what file I must enter the code:

    <?php if ( $sys->IsAdmin() ) {
    //code to hide from non-admin
    } ?>

    Thanks for your info.
    Posted by Michele
    1493399424

    Thank you Tom for your info. Now I'm wondering if it's possible to limit add/ delete only to administrator. Staff can only see and do research. Thank you
    Posted by Tom
    1493459282

    You can make code effective only to admins by enclosing the code with if ( $sys->IsAdmin() ) { like this
    <?php if ( $sys->IsAdmin() ) {
    //code to hide from non-admin
    } ?>
    If you want to show it to ... Read More
    Posted by Jason Dion
    1493157245

    Hi, I understand that you can specify the code that you want to disable in the templates. Can you tell me specificaly what code I would disable to turn off editing, deleting and adding new entries? ... Read More
    Posted by Tom
    1493191681

    First off, open web/staff/app/cls_ps_(table-name).inc.php
    To disable editing records, find the line
    case 'edit_init':
    and add "return;" to the end like
    case 'edit_init': return;
    Do the ... Read More
    Posted by Michele
    1493101440

    Hi Tom, how can i insert a date field eg. dd / mm / yy. Thank you
    Posted by Tom
    1493191036

    If you mean you want to change the output foramt of a date fileld, you can do so by editing web/staff/codelib/df.fl.(table-name).inc.php. Open the file and find the date field you want the change the ... Read More
    Posted by Arun
    2017-04-20

    After setup in web/install, when we try to access web/staff it shows unable to display pages
    Posted by Tom
    2017-04-20

    Hi Arun,

    It is likely that the problem resides outside of the script. If this is the first time you install any php script, chances are the website is not configured properly. You should install ... Read More
    Posted by Aryan!
    2017-04-19

    Hello again
    thanks for the reply, you are amazing!

    **excuse me. I can't speak English well.

    I have two questions:
    1. How can display the user's date of create in the Search Results table?
    2. How do ... Read More
    Posted by Tom
    2017-04-20

    Hi,

    >How can display the user's date of create in the Search Results table?

    Please read the article below:
    Adding a Field to Search Results table ... Read More
    Posted by aryan
    2017-04-18

    Hi Tom!
    The script is excellent.
    How do I store dropdown list values in the table . I do not want to store the keys in the table.
    Posted by Tom
    2017-04-19

    Hi, if you remove a key then it will use the value as a key. Open web/config/config.selection.inc.php. You will find something like
    ... Read More
    Posted by Maximo Ramos
    2017-03-26

    Hi!!

    I applied the the following instructions: http://www.phpkobo.com/article--m2072 in tpl.-mydatabase-.search.inc.php

    But it doesn't work, in the search results the 'mailto:' html tag does not ... Read More
    Posted by Tom
    2017-03-27

    >I applied the the following instructions: http://www.phpkobo.com/article--m2072

    Hi, try this instead
    http://www.phpkobo.com/article--m3721
    Posted by Michele
    2017-03-26

    Hi Tom, how can I attach one or more files to a record
    Posted by Tom
    2017-03-27

    >how can I attach one or more files to a record

    Sorry this is no file upload features yet. You need to add it yourself.
    Posted by Eliza
    2017-03-24

    Hello!

    How to hide (delete) and (edit) for staff. I want to leave them only ADD NEW?

    Thnx in advance!
    Posted by Tom
    2017-03-25

    Hi, enclose the code you want to hide from staff like this
    <?php if ( $sys->IsAdmin() ) {
    //code to hide
    } ?>
    It works in template files (web/staff/tpl.(-----).inc.php)
    Posted by Nasko
    2017-03-22

    Hello!

    I followed the instruction how to disable the edit, delete button. After the staff tries to edit, they can't edit or delete (that's good), they dont get an error message they just get a blank ... Read More
    Posted by Tom
    2017-03-23

    Hi, it's better you remove the edit/add-new/delete buttons from
    the template, web/staff/tpl.(table-name).search.inc.php
    Or you can hide it from staff. To hide code in a template, enclose it with
    ... Read More
    Posted by Michele
    2017-03-15

    Hello Tom, thanks for your info. Tom would like to ask how can I do to use logoff menu to link to other pages remaining in same browser tab.
    Posted by Tom
    2017-03-15

    The links are created in web/staff/include/tpl.body.header.inc.php line 32
    <a class="dmenu_item" href="<?php echo $hm->Url( '_sc=' . $sc . '&' ); ?>"
    ><?php echo $caption; ?></a>
    Maybe you should ... Read More
    Posted by Ashwinkumar
    2017-03-15

    how to increase / decrease the number of rows. currently there are 25 rows in display but the error is that the bottom message showing 1-50 instead of 1-25...can you tell me which files to edit
    Posted by Tom
    2017-03-15

    >how to increase / decrease the number of rows

    Open web/staff/app/df.fieldlist.inc.php and find array like this:
    ... Read More
    Posted by Michele
    2017-03-13

    Tom excuse me, where I find the template file
    Posted by Tom
    2017-03-13

    >where I find the template file

    It's in staff folder. The template files are prefixed with tpl. like tpl.address.search.inc.php.
    Posted by Aleksey
    2017-03-11

    Hi Tom.
    Thanks for your answers.
    Just one question: when i login as admin, in header i see four menus: Address, Staff, About and Log Off. When i login with a staff password, i dont see in header a ... Read More
    Posted by Tom
    2017-03-13

    Hi,

    >Which script do this check, what menu is going to be appear according to user type?

    cls_auth_base function in web/staff/app/cls_auth_base.inc.php
    Posted by Michele
    2017-03-08

    Thank you. If you can tell me when you do upgrade, for me is very important.
    Posted by Tom
    2017-03-08

    Sorry, I can't say it. Whenever I get a chance!
    Posted by Aleksey
    2017-03-07

    Hi.
    First, thank you very much for this great script.
    Second, I have some questions about Address Book Script:
    1. Where i can translate all contents?
    2. Its possible to convert this script to R-T-L ... Read More
    Posted by Tom
    2017-03-08

    Hi,

    1. Where i can translate all contents?

    web/codelib/cfg/res.eng.app.inc.php
    web/codelib/cfg/res.eng.sys.inc.php

    2. Its possible to convert this script to R-T-L (Hebrew for example)? ... Read More
    Posted by Michele
    2017-03-06

    Tom, I would look for the data also using logical operators eg. <> = 'Then all nr. > 44 the result will be 45, 46 etc ..., or> 44 & <50 the result will be 45 .... 48,49. Thanks Tom
    Posted by Tom
    2017-03-07

    Hi, I know what you mean... but sorry there isn't an easy way to implement it in the current version. I'll put in my to-do-list. Thanks for your suggestion!
    Posted by Michele
    2017-03-06

    Thanks Tom for your info. Now I would like to replace with a new logoff link. If I click logoff I would go on my other page, how can I do? Thank you.
    Posted by Tom
    2017-03-07

    I think it's a good idea to remove the top menu entirely. And put any links you want in the template file.
    Posted by samadhan
    2017-03-05

    Hello Friends,
    I am getting stuck one stage. I am new here for the phpkobo scrpt. I downloaded all the from cpanel and trying to connect on my local machine. i had changed my database file database ... Read More
    Posted by Tom
    2017-03-07

    Hi,

    >its getting error after login like "could not connect"

    Did you run the installation script? Your description sounds you configured the config file but skipped running the installation script ... Read More
    Posted by Michele
    2017-03-03

    Ops...Tom, I click logoff this error:
    Location : cls_ps_frame/CVPageSet::GetFieldListAttri
    Message : Fieldset () does not exist in spec_fieldsets : PageSet Name = frame...
    Whait.?...
    Posted by Tom
    2017-03-04

    >Ops...Tom, I click logoff this error:

    Please remove the logoff link. Since you've already removed the login feature, logoff just doesn't make sense. You no longer need it.
    Posted by Nicole Taylor
    2017-03-03

    I think this a wonderful program and I use it faithfully for my clients when they call. I have learned how to remove the delete record from the page for guest view.. but I want to change the css ... Read More
    Posted by Tom
    2017-03-04

    Hi,

    The path to the style sheet is web/staff/css/page.css.
    Probably, you need to make a lot of modifications on template files, also.
    This was written in pre-responsive design area, so it's not ... Read More
    Posted by Michele
    2017-03-03

    Thank you Tom, your info is very ok.
    Posted by Tom
    2017-03-03

    You are welcome :)
    Posted by Michele
    2017-03-02

    Wonder if you can go directly to the contact page, I want to rule out the authentication page. I don't need authentication. Thank you.
    Posted by Tom
    2017-03-02

    To bypass login page, please see this article:
    http://www.phpkobo.com/article---m3350
    Posted by maxi
    2017-03-01

    thanx you have done something amazing.
    can you help me out on how to import exel file with attributes First name, last name, company, fax, address1, address2, zip, state, and cell?
    Posted by Tom
    2017-03-02

    Hi,

    >can you help me out on how to import exel file with attributes First name, last name, company, fax, address1, address2, zip, state, and cell?

    Sorry, it doesn't have the csv import feature.
    Posted by Michele
    2017-02-28

    It is possible to bypass the control users, directly pointing to the page addresses?
    Posted by Tom
    2017-02-28

    Hi,

    > bypass the control users

    I'm not really sure what you meant by "bypass the control users" Would you clarify it, please?
    Posted by murat
    2017-02-20

    thank you very much tom , it works , now i can make a call from asterisk when i click on search result
    you really should add a donate button to your site.
    you are saving alot of people s time ... Read More
    Posted by Tom
    2017-02-21

    You are welcome!
    Posted by murat
    2017-02-19

    Hello , thank you for the great utilities which you share with people

    i installed your addressbook onto an asterisk system based on centos
    freepbx also uses mysql so easily i installed on pbx
    now ... Read More
    Posted by Tom
    2017-02-20

    Hi,

    >only what i couldnt do is i need to get current username too

    If you mean the username of a user who is currently loggin in
    then you can get it with the following code:
    ... Read More
    Posted by Jan Wiekens
    2017-01-29

    Hello, your script works perfectly!
    I have one question.
    is it possible to make some fields bigger? I have a field called "note" and that field is very short.
    Is it possible to make this lager?
    Posted by Tom
    2017-01-30

    Hi, you can format textarea (or any HTML elements) by surrounding with a div or span tag. In the following example, a textarea is surrounded by <span class="my-style"></span>
    ... Read More
    Posted by Alex
    2017-01-26

    Hello Tom and Thanks for your script.

    I need to edit multiple records same time .
    For example i whant to edit the "home zip" field at the same time for 10 customers.

    Howe can i do that ?


    Thank ... Read More
    Posted by Tom
    2017-01-27

    Hi,
    >I need to edit multiple records same time
    Sorry, the script does not have the feature.
    Posted by Nikita
    2017-01-21

    Good Morning.

    I have a little request:

    It's possible to impliment Google reCAPTCHA into the login page?
    Posted by Tom
    2017-01-21

    Hi, at this moment there isn't a plan to add a capture. If you are getting unfriendly accesses to the login page, you can rename the folder name "staff" to, say "staff2"
    Posted by Maximo Ramos
    2017-01-14

    Hello! Great work by the way!!

    I followed these instructions but I guess it is outdated or I am doing something wrong:

    http://www.phpkobo.com/article--m2072

    It sure does make the email address ... Read More
    Posted by Tom
    2017-01-15

    Hi,

    >It sure does make the email address clickable but only in edit mode, not in search results mode.
    No, the article is not for the search page. For the search page, you need to do the same on ... Read More
    Posted by Sergey
    2017-01-03

    Hello dear Tom.
    This time my question about this. Can i print random info for random users, like this? ... <?php If ($system-->$isAdmin) { ?>admin info<?php } else if ($system->$isPeter) {?>info for ... Read More
    Posted by Tom
    2017-01-04

    Hi,

    First of all, you need to identify the user logging in. This is how to obtain the user id of the user who accessed a page in the staff folder.
    ... Read More
    Posted by Chris
    2016-12-18

    Regards from Switzerland! Thanks for your great application.
    Is there a possibility, to display "Checkboxes" as Checkboxes in the search pane?
    Currently these items are represented as "selects" ... Read More
    Posted by Tom
    2016-12-18

    It's on purpose. As you know, a checkbox has two states:

    (1) checked and (2) unchecked.

    To search for records, you need three states:

    (1) checked, (2) unchecked, and (3) Don't care.

    That's why it ... Read More
    Posted by Willem
    2016-12-07

    Hi Tom,
    Greetings from Holland! Thanks for your script.
    I thought I've seen a description how to add extra checkboxes to the frontend. Also how to add these to the Db and search on the checkbox ... Read More
    Posted by Tom
    2016-12-08

    Hi, please read this section.
    http://www.phpkobo.com/address_book.php#copy_a_field
    It applies to checkbox too.
    Posted by Linckon
    2016-12-03

    need to send email to selected users in addressbook
    Posted by Tom
    2016-12-04

    Sorry, there is no built-in mailing feature. You have to add it yourself.
    Posted by Alex
    2016-11-28

    What's up?
    First, thanks for the system. He is really helping me!
    I need to manage users access permissions. How can i create or change a group/user permission to make them with no write/alteration ... Read More
    Posted by Tom
    2016-11-28

    Hi,

    >I need to manage users access permissions. How can i create or change a group/user permission to make them with no write/alteration

    Sorry, there aren't any built-in features for group ... Read More
    Posted by Pär
    2016-11-28

    Worked like a charm. Thanks!
    One small problem occurred. If I present a field as a text, it works fine, IF the the data is correct. If the database dont have any value on that field, the server ... Read More
    Posted by Tom
    2016-11-28

    Then try this helper function instead.
    <?php function getTextValue( $key, $val ){ return isset($val->attri['value']) ? $val->attri['value'] : ""; } ?>
    It takes care of the case that there is no ... Read More
    Posted by Pär
    2016-11-25

    style='display:none;' will remove the whole row, that's for sure.
    What I would like to have is The filed name followed with its value, where the name and value should be visible, but not editable. ... Read More
    Posted by Tom
    2016-11-25

    You can display the value of a field with this helper function
    Open web/staff/common.inc.php in a text editor, and put the following line on the top, then the function will be available anywhere ... Read More
    Posted by Pär
    2016-11-23

    Hi
    Is it possible to make some of the fields locked and just presented as a plain text? There is some of the data I don't want to mess with. So when editing a client record, there should only be text ... Read More
    Posted by Tom
    2016-11-24

    Hi, the easiest way is just hide the entire row with style='display:none;'.
    For example,
    ... Read More
    Posted by ashwinkumar
    2016-11-05

    is there any possibility to merge the records by company name...for example, i have companies a,b,c and there are several contacts like 123 in company a, 4,5,6 in company b and 7,8,9 in company c. ... Read More
    Posted by Tom
    2016-11-05

    >is there any possibility to merge the records by company name

    No because it requires two tables. But you can always search records by company name.
    Posted by xok
    2016-11-04

    Hi again
    After the criterion of the research,,for example i have 10 rows....on those 10 rows there is a field of a,b,c
    i need to sum all the rows of A list to a new field below...or in a different ... Read More
    Posted by Tom
    2016-11-05

    >for example i have 10 rows....on those 10 rows there is a field of a,b,c
    i need to sum all the rows of A list to a new field below...or in a different ..

    Oh, that's what you mean...Then no, you ... Read More
    Posted by xok
    2016-11-02

    Hello,
    It is possible to Calculate, from field A & field B as a Percentage to field C ?
    or
    It is possible to Calculate total ,after Search Criteria as field A .
    Posted by Tom
    2016-11-03

    Yes, it's possible. Open the templateweb/staff/tpl.(table-name).search.inc.php and find the fields you want to calculate. e.g.
      
    <?php echo $hm->Zb('rs:def:my-field-name'); ?>

    You can use the ... Read More
    Posted by ashwinkumar
    2016-11-01

    Dear Tom, I am using the script with combination of followup script. To my recent surprise the "Last modified at" is not matching the system / server time due to which there is a delay of 5.30 hrs to ... Read More
    Posted by Tom
    2016-11-01

    >the "Last modified at" is not matching the system / server time due to which there is a delay of 5.30 hrs

    You can adjust your time zone by the date_default_timezone_set function. For example,
    ... Read More
    Posted by Sergey
    2016-10-21

    Hello dear Tom. As i say earlier - your script is brilliant!
    Today i have another important question. How can i do searching all that i have in database by one field?
    Thank you for fast reply.
    Posted by Tom
    2016-10-21

    Hi,

    >How can i do searching all that i have in database by one field?

    Sorry, it's not implemented. You just have to dig into the code and implement it!
    Posted by Kotob
    2016-10-11

    Hello, your script works perfectly! Thank you. I want to remove search button. Is it possible???
    Posted by Tom
    2016-10-12

    Yes, you can remove it from the template web/staff/tpl.(table-name).search.inc.php
    Posted by Kamil
    2016-10-04

    Hello,
    it is possible to connect two databases into one Address Book...?
    I would like to have one login and have two links to both databases (in top menu)...
    Posted by Tom
    2016-10-05

    >it is possible to connect two databases into one Address Book...?

    Sorry, there isn't a turn key solution. You just have to modify the code.
    Posted by ray
    2016-10-04

    Hi
    I downloaded the sample forms which contains these files in zip folder:
    codelib
    config
    install
    staff

    After successful installation, i can access the staff area but i can't find the form itself.
    Posted by Tom
    2016-10-05

    Hi,

    > i can access the staff area but i can't find the form itself.

    Address Book doesn't have the form folder but From2DB does.

    Form2DB:
    http://www.phpkobo.com/form2db.php
    Posted by Sergey
    2016-09-29

    Thank you Tom for fast reply.
    So. Right values will only "work" in tpl.table_name.detail.inc.php file? Whatever. What can i do to display not caption (left values) in tpl.table_name.search.inc.php ... Read More
    Posted by Tom
    2016-09-29

    You can use Russian on both sides like
    >Имя=Имя
    >Фамилия=Фамилия
    >Город=Город
    Posted by Sergey
    2016-09-28

    Database in UTF-8, even more.. code good working from tpl.table_name.detail.inc.php (but i need to add ZB_CBF,'getTextValue'), but not working from tpl.table_name.search.inc.php (in any)
    very ... Read More
    Posted by Tom
    2016-09-29

    >Name=Имя
    >LastName=Фамилия
    >City=Город

    The right values are a caption, so it'll not be picked up by search, but the left values will.

    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.