* * @version $Id: affiliate.affiliate_details.php 1095 2007-12-19 20:19:16Z soeren_nb $ * @package VirtueMart * @subpackage html * @copyright Copyright (C) 2004-2007 soeren - All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details. * * http://virtuemart.net */ mm_showMyFileName(__FILE__); search_header($VM_LANG->_('PHPSHOP_AFFILIATE_LIST_LBL'), 'affiliate', "affiliate_list"); // Enable the multi-page search result display $limitstart = vmGet($_REQUEST, 'limitstart', 0); if ($keyword) { $list = "SELECT * FROM #__{vm}_vendor WHERE "; $count = "SELECT count(*) as num_rows FROM v#__{vm}_endor WHERE "; $q = "(vendor_name LIKE '%{$keyword}%' OR "; $q .= "vendor_store_desc LIKE '%{$keyword}%'"; $q .= ") "; $q .= "ORDER BY vendor_name ASC "; $list .= $q . " LIMIT {$limitstart}, " . $limit; $count .= $q; } elseif ($vendor_category_id) { $q = ""; $list = "SELECT * FROM #__{vm}_vendor, #__{vm}_vendor_category WHERE "; $count = "SELECT count(*) as num_rows FROM #__{vm}_vendor,#__{vm}_vendor_category WHERE ";
* to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details. * * http://virtuemart.net */ mm_showMyFileName(__FILE__); ?> <h2><?php echo $VM_LANG->_('PHPSHOP_AFFILIATE_MOD'); ?> </h2> <?php search_header($VM_LANG->_('PHPSHOP_SHOPPER_LIST_LBL'), $modulename, "shopper_list"); // Enable the multi-page search result display $limitstart = vmGet($_REQUEST, 'limitstart', 0); if (isset($keyword)) { $list = "SELECT DISTINCT * FROM #__{vm}_shopper_vendor_xref,#__users, #__{vm}_shopper_group WHERE "; $count = "SELECT DISTINCT count(*) as num_rows FROM "; $count .= "#__{vm}_shopper_vendor_xref,#__users, #__{vm}_shopper_group WHERE "; $q = "#__users.id=#__{vm}_shopper_vendor_xref.user_id "; $q .= "AND #__{vm}_shopper_vendor_xref.vendor_id='{$ps_vendor_id}' "; $q .= "AND (#__users.perms = 'shopper' "; $q .= "OR #__users.perms = 'anonymous') "; $q .= "AND (#__users.last_name LIKE '%{$keyword}%' "; $q .= "OR #__users.first_name LIKE '%{$keyword}%' "; $q .= "OR #__users.middle_name LIKE '%{$keyword}%' "; $q .= "OR #__users.phone_1 LIKE '%{$keyword}%' "; $q .= "OR #__{vm}_shopper_group.shopper_group_name LIKE '%{$keyword}%' ";