0 ? $_COOKIE[affID] : ( $_GET[affID] > 0 ? $_GET[affID] : $_POST[affID] ); if ( !strstr($affID,"@") ) { $aff_arr = db_arr("SELECT Percent FROM aff WHERE ID=$affID"); } else { $aff_arr = db_arr("SELECT Percent FROM aff WHERE email='$affID'"); } $percent = $aff_arr[Percent]; // - GET variables -------------- $page = (int)$_GET[page]; $p_per_page = (int)$_GET[p_per_page]; $profiles = (int)$_GET[profiles]; $sex = (int)$_GET[sex]; $featured = $_GET[featured]; if ( !$page ) $page = 1; if ( !$p_per_page ) $p_per_page = 30; // ------------------------------ if ( !strstr($affID,"@") ) $p_num = db_arr( "SELECT COUNT(*) FROM `TransactionsMembership` INNER JOIN aff_members ON (idProfile = Member) WHERE idAff = $affID ORDER BY Date DESC" ); else $p_num = db_arr( "SELECT COUNT(*) FROM `TransactionsMembership`, `aff` INNER JOIN aff_members ON (idProfile = Member) WHERE aff.email = '$affID' AND aff_members.idAff = aff.ID ORDER BY Date DESC" ); //$p_num = db_arr( "SELECT COUNT(*) FROM `TransactionsMembership`" ); $p_num = $p_num[0]; $pages_num = ceil( $p_num / $p_per_page ); $real_first_p = (int)($page - 1) * $p_per_page; $page_first_p = $real_first_p + 1; if ( !strstr($affID,"@") ) $result = db_res( "SELECT * FROM `TransactionsMembership` INNER JOIN aff_members ON (idProfile = Member) WHERE idAff = $affID ORDER BY Date DESC LIMIT $real_first_p, $p_per_page" ); else $result = db_res( "SELECT * FROM `TransactionsMembership`, `aff` INNER JOIN aff_members ON (idProfile = Member) WHERE aff.email = '$affID' AND aff_members.idAff = aff.ID ORDER BY Date DESC LIMIT $real_first_p, $p_per_page" ); //$result = db_res( "SELECT * FROM `TransactionsMembership` ORDER BY Date DESC LIMIT $real_first_p, $p_per_page" ); $page_p_num = mysql_num_rows( $result ); $_page[header] = "Premier Membership Transactions"; $_page[header_text] = "Premier membership subscriptions: dates, members, sums "; if ( $logged[admin] ) TopCodeAdmin(); else TopCodeAff(); ?>
No transactions available"; else { ?>
 ID   Date   Membership type   Member   Sum Earned, $ 
          $p_arr[Member]"; ?>