Web Marketing Tool
Reseller
Chris B.
Member
Login

Member


An object for adding, viewing, editing and deleting a specific member.
Filename: /admin/tools/WMT\SQL\Member.php
Database Table: members
Extends: Entity
      Extends: Results
            Extends: AbstractDatabase


Member 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.

addFailedLogin() v4.03

Increments the amount of failed logins.

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

addPayment($paymentAmount, $notifyOn) v4.2

add Payment

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.

applyBinary() v5

applyCustomOneUp() v4.03

apply Custom One Up

applyOneUp() v4.03

apply One Up

applyTrackingType() v4.03

Applies tracking (exa: Pass UP, or Matrix). Should be executed when the member is first created.

canAddContact() v4.03

Returns true/false if this member is allowed to add a new contact. Returns false if the member has reached the contact limit for their membership.

canEmail() v4.03

Returns true/false based off if the member is allowed to send emails to contacts. Members can be restricted to sending a specific amount of emails each month and if the member has reached this limit false is returned.

canMarkPaid($aID) v4.03

Returns true/false if the current member is allowed to mark the specified member as paid. Returns false if not using direct payment. |
$aID = The id of the member that would receive the payment from the current member.

convertAll($message) v4.3

Returns the message (string) that was passed with all of the ~var#~ member variable values converted to the value belonging to the current member (so, ~var1~ is replace with this member's value for the member variable with an id of 1). Also, it converts: ~afname~, ~alname~, ~aphone~, ~aemail~, ~username~, ~ausername~ |
$message = The message to convert and return.

convertMember($message, $prefix = "") v4.03

Returns the message (string) that was passed with all of the ~var#~ member variable values converted to the value belonging to the current member (so, ~var1~ is replace with this member's value for the member variable with an id of 1). |
$message = The message to convert and return. |
$prefix = A prefix to use. For example, if you use the prefix of a then it will convert ~avar#~ instead of ~var#~.

createAffiliate($firstName, $email, $parentID, $approved, $dName, $package, $oParentID) v4.03

Creates a new member. Returns the id of the new member if successful. Returns -2 if the member already exists (email). Returns -3 if the email is not valid. Returns -4 if the username is already being used. |
$firstName = The first name of the member (string) |
$email = The email of the member (string) |
$parentID = The id of the member that is the new member's parent (id) |
$approved = 0 for not approved, 1 for approved |
$dName = The username of the new member (string) |
$package = The id of the membership of the new member |
$oParentID = The id of the member's original parent (typically same as parentid)

createSignature($emailType=1) v4.03

Creates the signature that goes at the bottom of every message this member sends if the signature is turned on under advanced features. Uses the format for the signature as defined in advanced features. |
$emailType = The type of email signature to create. 0 = Text; 1 = HTML.

getAdded() v4.03

Returns the timestamp of the date/time that the member was added.

getAdminPaid() v4.03

Returns true/false if the member has already made payment to the admin. NOTE: This setting is only used for Direct Payment.

getAID() v4.03

Returns the id of the member.

getAlwaysQualify() v4.03

Returns true/false if this member is always qualified. This is for when using passup. The parent is able to specify if a member is always qualified and does not have to passup any members to them.

getAmountPaid() v4.03

Returns the amount (integer) that the member has paid to other members. NOTE: This setting is only used for Direct Payment.

getApproved() v4.03

Returns true/false if the member is approved or suspended.

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.

getCanMarkPaid($aID) v4.03

Returns a string with an html anchor link if the current member is allowed to mark the specified member as paid. Returns a blank string if not using direct payment. Similar to canMarkPaid() but returns a string instead of true/false. |
$aID = The id of the member that would receive the payment from the current member.

getContactNotify() v4.2

Returns true/false based off if the member has turned on/off new contact notifications under /admin/profile

getCount() v4.2

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

getCurrentBalance() v4.23

Returns the current unpaid balance (integer) of commissions earned by the member. If a member has any money in holding then that amount is deducted from the balance that is returned.

getDefaultVariable($memberVariable) v5

This method allows you to get the default value for any variable as setup in member variable section

getDoubleOptin() v4.03

Returns true/false if double optin is turned on/off for the member.

getEmail() v4.03

Returns the email address (string) of the member.

getFailedLogins() v4.03

Returns the amount (integer) of consecutive failed login attempts by the member.

getFirstLogin() v4.03

Returns true/false based off if this is the first time that the member has logged into the members area.

getFullAddress() v4.03

Returns the full address (string) (address/city/state/zipcode/country) of the member.

getHoldAmount() v4.23

Returns the amount (integer) of commission earnings that the member currently has placed on hold.

getIDArray($idTitle = null) v4.92

getIP() v4.03

Returns the IP address used when the member first created their account.

getMarkAlwaysQualify($aID, $notRequiredText, $requiredText) v4.03

Returns a string specifying if the member is required to passup members according to the passup plan, or if the member is never required to passup members. It is returned as a link that can be clicked to turn on/off. Returns a blank result if passup is turned off or if the parent passed is not this member's parent. |
$aID = The id of the parent of the member. |
$notRequiredText = The text to use if the member is not required to qualify. |
$requiretedText = The text to use if the member is required to qualify.

getMembership() v4.03

Returns the id of the membership that the member belongs to.

getNextBillDate() v4.03

Returns a timestamp of the next date that a member is due to make payment for their membership fees.

getNextBillDateString($dateParams) v4.03

Returns a string of the next date that a member is due to make payment for their membership fees. |
$dateParams = The format of the date to return. Follows the same format as the date() php function.

getNextPayment() v4.03

For Direct Payment. Returns an array.

getObjects($query) v4.92

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

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.

getOriginalParentID() v4.03

Returns the id of the member who originally referred this member. If passup or matrix is turned on then the original parent might not be the same as the current parent.

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).

getParentID() v4.03

Returns the id of the member that is this member's parent. The parent is the person referred this member and that gets credit/paid commissions for this member. It is also used for many other similar situations where relationships are used.

getPassword() v4.03

Returns the md5 encrypted password of the member.

getPaymentDetails() v5

This method allows you to get all payment details for a member. this method return $paymentDetails;

getPhone() v4.23

Returns the phone number (string) belonging to the member formatted according to the phone formatting specified under advanced features.

getPrimaryCGroup() v4.03

Returns the id of the content group that the member has selected as their primary content group under /admin/update.php

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.

getSignature() v4.03

Returns the signature (string) that the member has created to be added to the bottom of every email sent to their contacts.

getSignupIP() v4.03

Returns the IP address used when the member first created their account.

getStatus() v4.03

Returns the status (string) of the member.

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.

getTestPayment() v4.03

Returns true/false if test payments are turned on/off for the member under /admin/update.php

getThirdPartyARID() v4.03

Returns the id of the 3rd party autoresponder that the member has chosen to use. If the member has not chosen to use a 3rd party autoresponder it returns 0.

getThirdPartyARVal1() v4.03

Returns a string for the value of the first third party autoresponder variable for this member. If this member has not setup a 3rd party autoresponder returns blank.

getThirdPartyARVal2() v4.03

Returns a string for the value of the second (2nd) third party autoresponder variable for this member. If this member has not setup a 3rd party autoresponder returns blank.

getThirdPartyARVal3() v4.03

Returns a string for the value of the third (3rd) third party autoresponder variable for this member. If this member has not setup a 3rd party autoresponder returns blank.

getURL() v4.03

Returns the redirect URL (string) as defined by the member on their /admin/update.php page.

getUsername() v4.03

Returns the username (string) that is assigned to the member. The username is the dname column in the affiliate database table.

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.

getVar($varID) v4.03

Returns the value saved by the member for a specific member variable. |
$varID = The id of the member variable to return the value for.

getVars() v4.03

Returns an array of all the member variable values saved by the member. The key of the array is the id of the member variable and the value of the array is the value the member has stored for the member variable.

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.

holdPayment($paymentAmount) v4.3

Adds the amount specified to the affholdings table for this member. This table is for commission that has been earned but is on hold and not eligible to be released as a payment to the member. |
$paymentAmount = The amount of commission to put on hold (int).

isQualified() v4.03

Returns true/false if the member is qualified to earn commission.

isQualifiedCustom() v4.03

DEPRECATED

loadAll() v4.3

Loads all of the records in the database table.

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.

loadMember($aID) v4.03

Loads this object with the values of a specific member. Same as loadValues($aID). |
$aID = The id of the member to load the values for.

markAdminPaid() v4.03

Updates the database record for the member to specify that the member has paid the admin.

packageQualified() v4.23

Returns true/false if this member is qualified to earn commissions based off qualifications in the packagequalify database table.

preloadAR() v4.03

Loads the member with the autoresponder messages belonging to the admin that are available for the member. This is done when the member is first created.

removeDoubleOptin() v4.03

Turns off double optin for the member.

resetFailedLogin() v4.03

Resets the failed logins (changes it to 0) for the member inside the database.

saveChanges() v4.03

Save changes to the database that were made to the public variables.

sendNewContactNotification($lcMail, $contact) v5

Sends a new contact notification email to the member as well as an SMS notification if Google Voice SMS notifications are turned on. |
$lcMail = An lcMail Object to use for sending the email. |
$contact = A Contact object for the new contact.

sendNewMemberNotifications() v4.03

Sends new Member notifications

setApproved($newApproved) v4.03

Sets whether or not this member is approved/suspended. |
$newApproved = 0 for if not approved/suspended and 1 if approved.

setContactNotify($nLNotify) v4.03

set Lead Notify

setDoubleOptin() v4.03

Turns on double optin for the member.

setEmail($newEmail) v4.03

Sets the email address for the member and stores it in the database.

setFirstLogin() v4.03

Sets the firstlogin value for this member to 1 (meaning that the member has already logged in).

setLanguage($lID) v4.23

This method allows you to set the members area language for the member. |
$lID = The id of the language to use

setNextBillDate($newBDate) v4.03

Sets the next bill date when this member will be charged for their next subscription payment. |
$newBDate = A timestamp of the date/time when the next subscription payment is due.

setOriginalParentID($newOPID) v4.03

Sets the oparentid (Original Parent) for this member. The original parent is the member that originally referred this member. |
$newOPID = The id of the member that is this member's original parent.

setPackage($newPackage) v4.03

Sets the membership that this member belongs to. |
$newPackage = The id of the membership that this member will belong to.

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.

setParentID($newPID) v4.03

Sets the parentid for this member. The parent is the member that gets credit/paid commissions for referring the current member. |
$newPID = An integer of the id of the member that should be this member's parent.

setPassword($newPassword) v4.03

Sets the password for this member. The password uses md5 encryption.

setPrimaryCGroup($newPCGroup) v4.03

Sets the primary Content Group for this member. |
$newPCGroup = The id of the Content Group.

setPrimaryPage($dPage) v4.03

Sets the primary page for the member. |
$dPage = The filename of the page to set as the primary page.

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.

setTrackingType($tType) v4.03

Sets the tracking type (integer) that is used in the isQualified() method.

setURL($newURL) v4.03

Sets the redirect URL for this member. |
$newURL = The URL to use.

setUsername($newUsername) v4.03

Sets the username used by the member and stores it in the database.

setVar($varID, $value) v4.03

set Var

setVars($postData) v4.03

set Vars

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.

uplinePosition($uplineAID) v4.03

upline Position

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($newEmail) v4.03

Returns true/false if the email address is valid and not being used by another member.

validateURL($valURL) v4.03

Returns true/false if the URL is a valid URL.

validateUsername($valUsername) v4.03

Returns true/false. Checks to make sure that the username is valid and is not used by another member.

__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.

Member PHP Variables

$address v4.03

The address of the member.

$city v4.03

The city of the member.

$country v4.03

The country of the member.

$firstName v4.03

The first name of the member.

$lastBroadcast v4.03

last Broadcast

$lastName v4.03

The last name of the member.

$phone v4.03

The phone number of the member.

$state v4.03

state

$zipcode v4.03

zip code


Columns in the members Database Table:

aid    firstname    parentid    lastname    email    username    url    phone    password    approved    added    address    city    state    zipcode    country    lastbroadcast    oparentid    failedlogins    signupip    doubleoptin    primarycgroup    membership    nextbilldate    apikey    contactnotify    constantcontacttoken    constantcontactusername    qualifycount    language    shoppergd    timezone    appkey    

Code Example




Sample Usage

Below is an example of how echo the name of the member that is logged in the member object to get the logged. 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