Tracking by downloads.
$list = false;
$lead_id = false;
+ // Every Time a user request a Download
+ // They need to have a logged in contact.
+ // Need to get the member id.
+ if ( isset( $this->config['loggedInUser']['contactUser']['ref_dest'] ) ) {
+ if ( $member_id = filter_var( $this->config['loggedInUser']['contactUser']['ref_dest'], FILTER_VALIDATE_INT ) ) {
+ $this->wpdb->insert(
+ GLM_MEMBERS_TRAVEL_PLUGIN_DB_PREFIX . 'search_reports',
+ array( 'member_id' => $member_id, 'search_date' => date( 'Y-m-d H:i:s' ) ),
+ array( '%d', '%s' )
+ );
+ }
+ }
+
// Get registration event ID if supplied
if (isset($_REQUEST['lead_id'])) {
$list = false;
$lead_id = false;
+ // Every Time a user request a Download
+ // They need to have a logged in contact.
+ // Need to get the member id.
+ if ( isset( $this->config['loggedInUser']['contactUser']['ref_dest'] ) ) {
+ if ( $member_id = filter_var( $this->config['loggedInUser']['contactUser']['ref_dest'], FILTER_VALIDATE_INT ) ) {
+ $this->wpdb->insert(
+ GLM_MEMBERS_TRAVEL_PLUGIN_DB_PREFIX . 'search_reports',
+ array( 'member_id' => $member_id, 'search_date' => date( 'Y-m-d H:i:s' ) ),
+ array( '%d', '%s' )
+ );
+ }
+ }
+
// Get registration event ID if supplied
if (isset($_REQUEST['lead_id'])) {
}
// $entry = $this->getList( $where );
- $orderBy = 'T.company ASC,T.lname ASC,T.fname ASC,T.updated DESC';
+ $orderBy = 'T.company ASC,T.lname ASC,T.fname ASC,T.updated DESC';
$entryResults = $this->getList( $where, $orderBy, true, 'id', $start, $limit );
+ $stats = $this->getStats( $where );
// Get paging results
$params = '';
$numbDisplayed = $entryResults['returned'];
- $leadCount = $numbDisplayed;
+ // $leadCount = $numbDisplayed;
$lastDisplayed = $entryResults['last'];
if ( $start == 1 ) {
$prevStart = false;
$haveLeads = true;
}
- $leadCount = count( $entry );
+ $leadCount = $stats;
$view = 'index.html';
// Every Time a user request a search store a report.
// They need to have a logged in contact.
// Need to get the member id.
- if ( $searching && isset( $this->config['loggedInUser']['contactUser']['ref_dest'] ) ) {
- if ( $member_id = filter_var( $this->config['loggedInUser']['contactUser']['ref_dest'], FILTER_VALIDATE_INT ) ) {
- $this->wpdb->insert(
- GLM_MEMBERS_TRAVEL_PLUGIN_DB_PREFIX . 'search_reports',
- array( 'member_id' => $member_id, 'search_date' => date( 'Y-m-d H:i:s' ) ),
- array( '%d', '%s' )
- );
- }
- }
+ // if ( $searching && isset( $this->config['loggedInUser']['contactUser']['ref_dest'] ) ) {
+ // if ( $member_id = filter_var( $this->config['loggedInUser']['contactUser']['ref_dest'], FILTER_VALIDATE_INT ) ) {
+ // $this->wpdb->insert(
+ // GLM_MEMBERS_TRAVEL_PLUGIN_DB_PREFIX . 'search_reports',
+ // array( 'member_id' => $member_id, 'search_date' => date( 'Y-m-d H:i:s' ) ),
+ // array( '%d', '%s' )
+ // );
+ // }
+ // }
}