Web Marketing Tool
Reseller
WMT .
Contact
Referred By: Web Marketing Tool
Login

Contact


An object for adding, viewing, editing and deleting a specific contact (lead/optin/fan/guest).
Database Table: contacts
Extends: Entity
      Extends: Result
            Extends: AbstractDatabase


Contact PHP Methods

add(array $fieldValues) v5

Adds a new record.
PARAMETERS:
$fieldValues = Array of the values for each column when adding the record (Associative array with key = field name & value = field value).
RETURN VALUE:
int = id of the new record.
0 = if fails

addGroup(int $contactGroupID) v5

Assigns a contact to a contact group.
PARAMETERS:
$contactGroupID = int, contact group id.
RETURN VALUE:
bool = true if added successfully, false otherwise.

canViewEmail(string $vEmail) v5

Check if a user can view emails
PARAMETERS:
user's email address
RETURN VALUE:
Bool = True if user can view emails, False otherwise

checkLoaded() v5

Checks if record is loaded. throwing an error if the record failed to load successfully.
PARAMETERS:
NONE
RETURN VALUE:
VOID

convertAll(string $message, string $prefix = "", bool $urlEncode = false) v5

Convert all tilde codes in HTML Content Message to values
PARAMETERS
$message = String of HTML with tilde codes
$prefix = String tilde code prefixes (Default Empty)
$urlEncode = Bool value true when applying encoding, false otherwise (Default false)
RETURN VALUE:
String of HTML content after converting the tilde codes

convertHTML(string $htmlContent = "", string $prefix = "", bool $urlEncode = false) v5

Converts ~~ variables in the $htmlContent that is provided and returns the converted content. The title of the ~~ variables are converted by the content from the column in the database with the matching title.
PARAMETERS:
$htmlContent = String, HTML content body to convert.
$prefix= String, tilde code prefix if any.
$urlEncode = Bool, true if you want to apply URL encode to the content, false otherwise
RETURN VALUE:
String = Converted HTML

convertHTML(string $htmlContent = "", string $prefix = "", bool $urlEncode = false) v5

Convert all tilde codes in HTML Content to values
PARAMETERS
$htmlContent = String of HTML with tilde codes
$prefix = String tilde code prefixes (Default Empty)
$urlEncode = Bool value true when applying encoding, false otherwise (Default false)
RETURN VALUE:
String of HTML content after converting the tilde codes

createContact(\WMT\Container $container, string $firstName, string $lEmail, string $phone, string $phoneCountry, int $memberID, string $rIP) v5

Creates a new contact.
PARAMETERS:
$container = object, container.
$firstName = string, first name.
$lEmail = string, email address.
$phone = string, phone number.
$phoneCountry = string, phone country 2 letters code.
$memberID = int, referrer member id.
$rIP = string, contact IP.
RETURN VALUE:
int = 0 if failed, 2 if email exists as member, 1 otherwise.

createContactField(string $value, string $title) v5

Create a new contact field (contact variable).
PARAMETERS:
$value = String, variable value.
$title = string, variable title.
RETURN VALUE:
VOID.

delete(string $restoreQuery = "") v5

Deletes the loaded record from the database.
PARAMETERS:
$restoreQuery = FOR INTERNAL USE. FOR TYPICAL USAGE LEAVE THIS BLANK. The restore query to pass along when deleting an object with dependencies.
RETURN VALUE:
VOID

duplicate(array $newValues = null) v5

Creates a duplicate record in the database of the current object
PARAMETERS:
$newValues = array, associative array with field name as key and field value as array value containing the new values if any
RETURN VALUE:
int = the id of the new record.

function load(string $queryWhere) v5

Loads values for the record matching the criteria specified by $queryWhere. If the there is more than one record returned from the query then only the first record is loaded.
PARAMETERS:
$queryWhere = String, SQL where query.
RETURN VALUE:
Bool = true, if success, false otherwise

getAdditionalFields(string $viewContactAddlVarsTDHTML, string $viewContactAddlVarsTRHTML) v5

Display contacts variables as HTML using templates.
PARAMETERS:
$viewContactAddlVarsTDHTML = string, HTML template for the variable cell.
$viewContactAddlVarsTRHTML = string, HTML template for the variable row.
RETURN VALUE:
string = HTML table for contacts variables.

getAvatarURL(string $size = "") v5

Gets contact's avatar image URL.
PARAMETERS:
$size = string, avatar size like "small"
RETURN VALUE:
string = avatar image URL.

getCapturePageImageURL() v5

Set image of the capture page that the loaded contact used on optin.
PARAMETERS:
NONE.
RETURN VALUE:
string = capture page image URL.

getCapturePageIMG() v5

Set image of the capture page that the loaded contact used on optin.
PARAMETERS:
NONE.
RETURN VALUE:
string = capture page image HTML.

getContactFields() v5

Returns all contact fields for the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
Array = contact fields and values.

getCountryFlagIMG(\WMT\Map\Location $location) v5

Gets country flag image
RETURN VALUE:
String = HTML img tag for country flag image

getDatabaseName() v5

Returns object's database table name
PARAMETERS:
NONE
RETURN VALUE:
String = Database name

getDefaultTRHTML() v5

Returns the default html code for a tr row with all of the fields from the database in it as ~~ vars
PARAMETERS:
NONE
RETURN VALUE:
String = the default HTML code for a tr row with all of the fields from the database in it as ~~ vars

getEmail() v5

Gets Email for a contact/member
PARAMETERS:
NONE
RETURN VALUE:
String = member/contact email address

getFlagIMG() v5

Set contact's flag image URL if any set to the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
string = image HTML tag for the contact's flag.

getFullAddress() v5

Gets member's/contact's full address (Address, City, State, Zipcode and Country)
PARAMETERS:
None
RETURN VALUE:
String of full address
in format
Address, City, State Zipcode Country;

getID() v5

Sets object ID
PARAMETERS:
NONE
RETURN VALUE:
int = ID

getIP() v5

Gets IP address for the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
string = IP address.

getIsAdmin() v5

Check if member is admin or not
PARAMETERS:
None
RETURN VALUE:
Bool = True if member is an admin, False otherwise

getIsEmployee() v5

Check if member is employee or not
PARAMETERS:
None
RETURN VALUE:
Bool = True if member is an employee, False otherwise

getJSON(bool $returnArr = false) v5

Get JSON array for the loaded record.
PARAMETERS:
Bool = true if want to return JSON, false otherwise
RETURN VALUE:
Object Array or JSON encoded version of the array

getJSONArr() v5

Gets contact parameters list as JSON array.
PARAMETERS:
NONE.
RETURN VALUE:
array = contact parameters list array.

getNotesCount() v5

Gets number of notes added to the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
int = Notes count.

getPhone() v5

Gets phone number for a contact/member
PARAMETERS:
NONE
RETURN VALUE:
String = member/contact phone number formated

getPhoneCountry() v5

Returns country 2 letter code for a phone number.
if no country set, it returns US
PARAMETERS:
NONE
RETURN VALUE:
String = Country 2 letter code

getPhoneCountryCode() v5

Returns country code for a phone number
PARAMETERS:
NONE
RETURN VALUE:
int = Country Code

getStatsEmails() v5

Gets number of emails received by the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
int = number of emails received.

getStatsPageViews() v5

Gets number of page views by the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
int = number of page views.

getStatsSMS() v5

Gets number of SMS delivered by the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
int = number of SMS delivered messages.

getStatsVisits() v5

Gets number of visits by the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
int = number of visits.

getValue(string $fieldName = "value") v5

Returns the value from a specific column for this record.
PARAMETERS:
$fieldName = String, field name.
RETURN VALUE:
Field value

hasClickedEmailLink() v5

gets number of clicks which the loaded contacts clicked in emails.
PARAMETERS:
NONE.
RETURN VALUE:
bool = number of clicks.

hasField(string $fieldName) v5

Checks if the field shown or hidden
PARAMETERS:
$fieldName= String, Field title.
RETURN VALUE:
Bool= True if the field show is true, false otherwise

hideAllFields() v5

hides all fields(columns)
PARAMETERS:
NONE
RETURN VALUE:
VOID

hideField($fieldTitle) v5

Hides specific field title by its column title
PARAMETERS:
$fieldTitle = String, Field title.
RETURN VALUE:
VOID

isLoaded() v5

Checks if an object is loaded correctly (can be used to check if ID exists).
PARAMETERS:
NONE
RETURN VALUE:
Bool = True if the object loaded successfully, false otherwise

loadDoubleOptin(string $email, int $memberID) v5

Checks if a contact optin using double optin and didn't confirm the email yet.
PARAMETERS:
$email = string, contact's email.
$memberID = int, referrer id.
RETURN VALUE:
bool = true if the contact didn't confirm his email yet, false otherwise.

loadEmail(string $email, int $memberID = 0) v5

Checks if a contact exists by his email address.
PARAMETERS:
$email = string, contact's email.
$memberID = int, referrer id.
RETURN VALUE:
bool = true if the contact exists, false otherwise.

loadFirstID() v5

Get object's first id
PARAMETERS:
NONE
RETURN VALUE:
int = First ID

loadID(int $id) v5

Loads values for the record with the id specified.
PARAMETERS:
$id = int, record ID.
RETURN VALUE:
Bool = true, if success, false otherwise

loadMember(int $memberID) v5

Loads a contact record for a member has the same email address.
PARAMETERS:
$memberID = int, member id.
RETURN VALUE:
int = contact id.

openedMail() v5

Update opened emails total by increasing 1 for the loaded contact.
PARAMETERS:
NONE.
RETURN VALUE:
VOID.

postUpdateAdded(\WMT\Input\InputInterface $post) v5

Updates contact's added date.
PARAMETERS:
$post = object.
RETURN VALUE:
VOID.

postVariables(array $POST) v5

Sets every post value to the appropriate key for contact fields.
PARAMETERS:
$POST = Array, post array of vtitle and var fields.
RETURN VALUE:
VOID.

save(array $fieldValues) v5

Saves the record with the new values specified in the $fieldValuesarray.
PARAMETERS:
$fieldValues = Array of the values for each column when adding the record (Associative array with key = field name & value = field value).
RETURN VALUE:
Bool = True on success, False otherwise.

searchContactVariable(array $contactVariableArray) v5

Search contact variables for values.
PARAMETERS:
$contactVariableArray = array, key=name for variable title, key = value for variable value.
RETURN VALUE:
bool = true if found, false otherwise.

sendNotifyAPI(int $pageCurlID, \WMT\SQL\Member\Member $member) v5

Sends a notify API using CURL or file_get_contents.
PARAMETERS:
$pageCurlID = int, pagecurl id.
$member = object, member object.
RETURN VALUE:
VOID.

setEmail(string $email) v5

Sets Email Address for a contact/member
PARAMETERS:
$email = String, email address
RETURN VALUE:
Bool = True if the email is valid and added correctly, False otherwise

setMyMemberID(int $memberID) v5

Sets member's ID
PARAMETERS:
$memberID = int, member id
RETURN VALUE:
VOID

setNumberFormat(string $numberFormat) v5

Sets phone number format
PARAMETERS:
$numberFormat = String specifies phone number format like "(###) ###-####"
RETURN VALUE:
void

setPhone(string $phone, string $country = "") v5

Sets phone number for a contact/member
PARAMETERS:
$phone = String, phone number without formatting
$country = String, 2 letters country code
RETURN VALUE:
Bool = True if phone number is valid and added correctly, False otherwise

setRestoreID(int $id) v5

Sets restor point ID
PARAMETERS:
$id = int, restore ID
RETURN VALUE:
VOID

settingHTTPS(bool $useHTTPS = true) v5

Sets site to use https or http
PARAMETERS:
$useHTTPS = True if https on, false otherwise (default true).
RETURN VALUE:
VOID

settingSiteURL(string $siteURL) v5

Sets Site Domain
PARAMETERS:
$siteURL = String, site URL
RETURN VALUE:
VOID

setTracking(string $tracking, int $charLimit = 40) v5

Set contact's tracking compain which they used on optin.
PARAMETERS:
$tracking = string, tracking title.
$charLimit = int, tracking char limit
RETURN VALUE:
VOID.

showAllFields() v5

Show all fields(columns)
PARAMETERS:
NONE
RETURN VALUE:
VOID

showField($fieldTitle) v5

Shows specific field title by its column title
PARAMETERS:
$fieldTitle = String, Field title.
RETURN VALUE:
VOID

validateEmail(string $newEmail) v5

Validate a contact's new email.
PARAMETERS:
$newEmail = string, new email address.
RETURN VALUE:
bool = true if the email is valid, false otherwise.

validatePhone(string $phone, string $country = "US") v5

validate a phone number.
PARAMETERS:
$phone = String, phone number.
$country = string, country 2 letters code.
RETURN VALUE:
Bool = true if the phone number is valid, false otherwise.

Contact PHP Variables

🔎︎ %l4610%



Columns in the contacts Database Table:

id    member    firstname    lastname    added    address    city    state    zipcode    openedmail    tracking    capturepage    flag    password    points    lastactive    country    phonenumber    emailaddress    isactive    visit    

Code Example




Sample Usage

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



DMCA.com Protection Status Authorize.net
Valid HTML! Valid CSS!


Reseller: WMT
|
Login
(502) 225-3237