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 `Transactions` INNER JOIN aff_members ON (idProfile = Profile) WHERE idAff = $affID ORDER BY Date DESC" ); else $p_num = db_arr( "SELECT COUN(*) FROM `Transactions`, `aff` INNER JOIN aff_members ON (idProfile = Profile) WHERE aff.email = '$affID' AND aff_members.idAff = aff.ID ORDER BY Date DESC" ); //$p_num = db_arr( "SELECT COUNT(*) FROM Transactions" ); $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 `Transactions` $part_addon INNER JOIN aff_members ON (idProfile = Profile) WHERE idAff = $affID ORDER BY Date DESC LIMIT $real_first_p, $p_per_page" ); else $result = db_res( "SELECT * FROM `Transactions` $part_addon, `aff` INNER JOIN aff_members ON (idProfile = Profile) 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 Transactions $part_addon ORDER BY Date DESC LIMIT $real_first_p, $p_per_page" ); $page_p_num = mysql_num_rows( $result ); $_page[header] = "Contact sales transactions"; $_page[header_text] = "Contact information sales - dates, members, sums"; if ( $logged[admin] ) TopCodeAdmin(); else TopCodeAff(); echo $status_text; ?>
No transactions available"; else { ?>
 ID   Date   Member/Email   Profile   Sum paid, $ 
       $p_arr[Member]"; else echo $p_arr[Email]; ?>   $p_arr[Profile]"; ?>