DeleteLinkByID($removeid); $results=$afflctable->DeleteDailyStatisticsByID($removeid); $results=$afflctable->DeleteTracksByID($removeid); } if ( isset( $_GET['reset'] ) ) { $resetid=$_GET['reset']; global $afflctable; $results=$afflctable->DeleteDailyStatisticsByID($resetid); $results=$afflctable->DeleteTracksByID($resetid); } ?> m_sort_item = 'createdate'; $this->m_sort_flag = 'desc'; if ( isset( $_GET['sort'] ) ) $this->m_sort_item = $_GET['sort']; if ( isset( $_GET['sortflag'] ) ) $this->m_sort_flag = $_GET['sortflag']; } function CreateSortLinkClass( $sortitem ) { if ( $this->m_sort_item == $sortitem ) { echo ( 'manage-column sorted ' . $this->m_sort_flag ); } else { echo ( 'manage-column sortable ' . $this->m_sort_flag ); } } function CreateSortURL( $sortitem ) { if ( 'asc' == $this->m_sort_flag ) { $nextsortflag = 'desc'; } else if ( 'desc' == $this->m_sort_flag ) { $nextsortflag = 'asc'; } $sorturl = admin_url('admin.php?page=affiliate-link-cloaking/affiliatelinkcloaking.php&sort=' . $sortitem . '&sortflag=' . $nextsortflag ); echo ( $sorturl ); } function ShowAllLink() { global $afflctable; $results=$afflctable->GetLinksAndHitsForMainUISortBy( time() , $this->m_sort_item, strtoupper($this->m_sort_flag) ); foreach( $results as $rowdata ) { echo(''); echo ''; echo $rowdata->linktitle.''; echo '
Edit | Delete | Reset
'; echo ''; $shortlink=get_bloginfo('url').'/'.$rowdata->cloaklink; echo ''.$shortlink.''; echo ''.$rowdata->afflink.''; if ( $rowdata->dayhits == null ) $rowdata->dayhits = 0; if ( $rowdata->monthhits == null ) $rowdata->monthhits = 0; echo '' . $rowdata->dayhits . '/' . $rowdata->monthhits . ''; if ( $rowdata->dayuvs == null ) $rowdata->dayuvs = 0; if ( $rowdata->monthuvs == null ) $rowdata->monthuvs = 0; echo '' . $rowdata->dayuvs . '/' . $rowdata->monthuvs . ''; $linkflag="Yes"; if ( 0 == $rowdata->autoshortlink ) $linkflag="No"; echo ' ' . $linkflag . ''; echo '' . $rowdata->createdate . ''; echo(''); } } function VertifyPerLink() { $perlink = get_option( 'permalink_structure' ); if ( $perlink == "" ) { echo ('

You must set the "Permalinks" first to use affiliate link cloaking. Make sure it is not "Default". Here is Permalink Settings

'); } } function afflc_GetMessage() { global $wpdb; $lastgetvar = $wpdb->prefix."afflc_lasttime"; $lastmsgvar = $wpdb->prefix."afflc_lastmsg"; $lastgettime = get_option( $lastgetvar ); $lastgetmsg = get_option( $lastmsgvar ); if ( time() - $lastgettime < 7200 ) { if ( $lastgetmsg != "" ) { echo ( $lastgetmsg ); } return; } $lastgettime = time(); $checkmsg = new WP_Http; $msghtml = $checkmsg->request( 'http://clionpid.com/clionpidmessage' ,array( 'timeout' => 3 )); if ( is_wp_error( $msghtml ) ) return; $msgdoc = new DOMDocument(); $msgdoc ->loadHTML ( $msghtml['body'] ); $msgtags = $msgdoc ->getElementById("clionpidmsg"); if ( NULL == $msgtags ) { $lastgetmsg = ""; update_option( $lastgetvar, $lastgettime ); update_option( $lastmsgvar, $lastgetmsg ); return; } $lastgetmsg = $msgdoc -> saveHTML(); echo ( $lastgetmsg ); update_option( $lastgetvar, $lastgettime ); update_option( $lastmsgvar, $lastgetmsg ); } } global $g_uimain; $g_uimain=new afflinkcloaking_uimain(); ?>

Affiliate link cloaking Add New Link View Status Get Help And Report Bugs

afflc_GetMessage(); ?> VertifyPerLink(); ?> ShowAllLink(); ?>
Link Title Short Link Affiliate Link Hits
( Today/ Month )
Unique Visitors
( Today/ Month )
AutoShortLink Create Date
Link Title Short Link Affiliate Link Hits
(Today/Month)
Unique Visitors
(Today/Month)
AutoShortLink Create Date