Web Marketing Tool
Reseller
Chris B.
Contact
Login

Contact


An object for adding, viewing, editing and deleting a specific contact (lead/optin/fan/guest).
Filename: /admin/tools/WMT\SQL\Contact.php
Database Table: contacts
Extends: Entity
      Extends: Results
            Extends: AbstractDatabase


Contact PHP Methods

addApostrophe($nField, $newField) v4.92

addConditionalContent($cField, $cValue, $cTilde, $cContent) v4.3

Allows you to have dynamic data displayed in the results for each record that has a column that matches a specific value. If the value of the $cField column equals $cValue then $cContent is replaced with the value of $cTilde for that record inside the results returned. If $cField does not match $cValue then $cTilde is replaced with a blank value |
$cField = The name of the column in the database to use to compare against value. |
$cTilde = The title of the tilde used in the string used for formatting the results (exa: ~mytilde~). |
$cContent = The content that replaces the tilde in the records that contain a match.

addDate($dField, $nDate) v4.2

This method allows you to have a timestamp value to be formatted as a date in the results that are returned. |
$dField = The column name of the record that contains a time stamp |
$nDate = The format of the date to return. Follows the same format as the date() php function.

addGroup($gID) v4.03

add Group

addMethod($fField, $fName) v4.3

Adds a method to be called and used to get the value for a column field in the results. The value returned by the method is used. |
$tField = The name of the column that should use the method to get it's value. |
$fName = The name of the method belonging to the corresponding LCPSResult object that should be called.

addMoney($nField) v4.92

addSmartDate($dField, $displayType = 1, $showTime = -1, $showYear = -1, $abbrMonth = 1, $abbrDay = 0, $abbrOther = 0, $relType = 1) v4.92

addValueLabel($dField, $labelArray) v4.3

This method allows you to have a column that contains integers replaced with value of an array where they key of the array matches the value of the integer in the column. |
$dField = The column name of the records that contain an integers that should have their values replaced |
$nDate = An array where the key of the array maps to the value inside the results column that is defined by $dField. The value of that array is then used in place of the value in the column wherever the column value matches a key in the array. If the value of the column does not have a corresponding key in the array then the column value is used without being substituted.

createContact($lEmail, $lName, $aID, $rIP) v4.03

Creates a new contact.

createContactField($value, $title) v4.03

create Contact Field

createDummy($email, $firstName='John', $lastName='Doe', $phone='555-555-5555', $ip='UNKNOWN', $capturePage='NA', $aID=1) v4.03

create Dummy

deleteContact($aID) v4.03

Delete a contact. $aID = The id of the member the contact belongs to.

getAdded() v4.03

Returns a timestamp of the date/time that the contact was added.

getAdded() v4.03

get Added

getAID() v4.03

Returns the id of the member that owns this contact.

getArray($nField, $whereQuery = '', $orderQuery = '') v4.3

Returns an array of results from the database table. The key used in the array is the id of the record in the database. The value of the array is the value of the column specified by $nField. |
$nField = The name of the column to use for the value of the array that is returned. |
$whereQuery = The condition to use to filter the results that are returned. Should be formatted using mysql syntax. If blank returns all records in the database table. |
$orderQuery = The order with which the array should be sorted. If blank the array is sorted by the value of $nField ascending. Should be formatted using mysql syntax.

getCapturePage() v4.94

Returns the filename or url (string) of the capture page that this contact originally opted into. If the member was imported or added manually by the system a string indicating how it was added. If it returns the string MEMBER it means that it was generated by the system to represent a member when the admin sent out a message to all members.

getContactFields() v4.03

get Contact Fields

getCount() v4.2

Returns the amount of results found once the object has been loaded using a loadXXXX() method.

getEmail() v4.03

Returns the email address (string) of the member.

getFlag() v4.03

Returns the id of the flag color that this contact is flagged with. Returns 0 if this contact is not flagged.

getFlagIMG() v4.92

getGroupChanged() v4.03

Returns a timestamp of when the contact group that this contact belongs to was last changed. If the contact group was not changed or updated then returns the timestamp of when the contact was first added. The groupchanged timestamp is used to determine which day of autoresponder messages the contact receives.

getID() v4.03

Returns the id of the contact.

getIDArray($idTitle = null) v4.92

getIP() v4.03

Returns the IP address (string) used by the contact.

getNewestGroup() v4.03

get Newest Group

getObjects($query) v4.92

Get all objects without needing the following code:
$this->setResultLimit(0);
$this->useObjectsOn();
$this->loadCustomQuery($query);
$this->getResults();

getOpenedMail() v4.03

get Opened Mail

getOptions($nField, $whereQuery = '', $orderQuery = '') v4.3

Similar to the getArray() method except this method returns a string of html option results to be put inside of an html select tag. The value of the option is the id of the record in the database. The title of the option is the value of the column specified by $nField. |
$nField = The name of the column to use for the title of the options returned. |
$whereQuery = The condition to use to filter the results that are returned. Should be formatted using mysql syntax. If blank returns all records in the database table. |
$orderQuery = The order with which the options should be sorted. If blank the array is sorted by the value of $nField ascending. Should be formatted using mysql syntax.

getPages($filename, $pTitle = 'Page:') v4.3

Returns a string of links to pages providing a pagination index for the results. If the results only contains 1 page then this message returns a blank string. |
$filename = The name of the filename that the pagination links should point to. |
$pTitle = The title that should appear before the links if there is more than one page (if only 1 page the results returned is blank).

getPassword() v4.2

Returns the password of the contact. The contact password is not encrypted and is not as secure as the member's password.

getPhone() v4.3

getPoints() v4.2

Returns the amount of points that the contact has (based off activity).

getResultLimit() v4.2

Returns the maximum results that are allowed per a page. If 0 is returned it means that there is no limit and all of the results are returned on the first page.

getResults() v4.2

Returns an array of the results found. This is normally only used when objects are turned on (useObjectsOn()). If objects are turned on then this returns an array of LCPSResult objects.

getStatus() v4.03

get Status

getStatus() v4.03

get Status

getTable($trTemplate = '') v4.2

Returns a formatted string of the results. |
$trTemplate = The formatting to use for each row of data returned. ~COLUMNNAME~ can be used to specify where a value should appear in the results. For example ~id~ would be replaced by the value of the id column in the results. If left blank returns a table tr for each row that contains all of the columns in the database table.

getTracking() v4.94

Returns the title (string) of the tracking campaign that the contact opted in through. If the contact did not find the capture page through a tracking link then it returns a blank string.

getValue($itemID, $fieldName) v4.3

Returns the value of a specific column for the specified id. |
$itemID = The id of the record for which the value is pulled from. |
$fieldName = The column name which the value returned belongs to.

hideAllFields() v4.23

Hides all of the columns (fields) from the database table from being returned in the results.

hideField($fieldTitle) v4.23

Hides a specific column (field) from the database table from being returned in the results.

loadAll() v4.3

Loads all of the records in the database table.

loadContactLight($lID) v4.03

Loads a contact object but not with all values, just minimal values such as name and email.

loadCustomQuery($query) v4.2

Loads the results from a mysql query statement. |
$query = The mysql query to use to select the results from the database table.

loadLead($lID) v4.03

load Lead

loadMember($mID) v4.3

saveChanges() v4.03

save Changes

setCapturePage($splashPage) v4.94

Set the capture page that the contact came through.

setEmail($nEmail) v4.03

set Email

setFlag($nFlag) v4.3

setGroup($gID) v4.03

set Group

setPage($nPage) v4.23

Defines which page of results should be returned when using a method that returns the results. |
$nPage = An integer defining which page number should be returned.

setPassword($nPassword) v4.3

setResultLimit($nResultLimit) v4.2

The amount of results to return per a page. |
$nResultLimit = An integer defining the amount of results to display on each page. If set to 0 returns all the results on a single page.

setTracking($campaign) v4.94

Set a tracking campaign for the contact.

showAllFields() v4.23

Shows all the columns (fields) from the database table in the results that are returned.

showField($fieldTitle) v4.23

Shows a specific column (field) from the database table in the results that are returned.

useObjectsOff() v4.2

Turns off using objects for storing/retrieving values from the results. By default using objects is turned off.

useObjectsOn() v4.2

Turns on using objects for storing/retrieving values from the results. By default using objects is turned off.

validateEmail($lEmail) v4.03

validate Email

__construct($databaseTable = '') v4.2

If $databaseTable is specified then it opens for the specified database table. Objects extending WMTResults do not need this to be specified because it is set from a protected variable.

__construct() v4.2

construct

Contact PHP Variables

$address v4.03

The postal address of the contact.

$city v4.03

The city of the contact

$firstName v4.03

The first name of the contact.

$lastName v4.03

The last name of the contact.

$phone v4.03

The contact's phone number

$state v4.03

The state of the contact.

$timeToCall v4.03

time To Call

$zipcode v4.03

The zipcode of the contact.

createAuthorizeNetProfile($billing, $aID, $firstName, $lastName, $address, $city, $state, $zipcode, $country, $ccnum, $ccExp, $cvv) v4.92



Columns in the contacts Database Table:

cid    aid    firstname    lastname    phone    timetocall    email    added    address    city    state    zipcode    ip    status    openedmail    tracking    capturepage    flag    password    points    lastactive    

Code Example




Sample Usage

Below is an example of how to get contact details on a landing page. The example is from within / (the main/root folder):



webmarketingtool.com Webutation DMCA.com Protection Status Authorize.net GoDaddy
Valid HTML! Valid CSS!


SUBSCRIPTION PRICES
Reseller: Chris Brevig
|
PRODUCT PRICES
Login
(502) 225-3237