* @package WEP-CMS */ session_start(); require_once $_SERVER['DOCUMENT_ROOT'].'/admin/scripts-includes/universal.php'; require_once $_SERVER['DOCUMENT_ROOT'].'/admin/scripts-includes/display.php'; $connID = connect_to_db(); /** * define variables to be passed to header function * @var string $current section of site for navigation menu highlighting * @var string $title page title for browser * @var string $keywords meta keywords * @var string $keywords meta description */ $current = 'customers'; $title = 'Administration Panel'; $keywords = ''; $description = ''; /** * buffer then output page */ ob_start(); head($current,$title,$keywords,$description); this_page(); footer(); ob_end_flush(); /** * clean up and exit script */ exit; /** * function to display content specific to this page */ function this_page() { /** * @var int $dpp number of members per page * @var int $start record to start at for paging * @var resource $members mysql recordset containing members * @var int $num_members total number of members for paging */ $dpp = 25; if(!$start = is_numeric_id($_GET['start'],false)) { $start=0; } /** * searching, sorting * @var string $append query variables to pass to paging function * @var bool search flag for which version of the query to use * @var string $where1 where statement append for searching by name * @var string $where2 where statement append for filtering by customer type * @var string $filter collate search options for text output * @var string $order order statement append * @var string $sorted text output for sort option */ $search = false; $append = $where1 = $where2 = $filter = $order = $sorted = ''; if($w = clean_plain_data($_GET['searchname'])) { $search = true; $where1 = "and (full_name LIKE '%$w%' OR email LIKE '%$w%')"; $append .= '&searchname='.urlencode($w); $filter .= "Name: $w; "; } /* if($filter != '') { $filter = 'Results for '.$filter; } if($sorted != '') { $sorted = 'Ordered by '.$sorted; } */ if(!$search) { $customers = mysql_query("select * from users order by $order full_name, email limit $start, $dpp"); } else { $customers = mysql_query("select * from users where 1=1 $where1 $where2 order by full_name, email limit $start, $dpp"); // echo 'search',$where1,$where2; } echo mysql_error(),$order; $all = mysql_query("select * from users where 1=1 $where1 $where2"); $num_customers = mysql_num_rows($all); mysql_free_result($all); ?>

Customers

No customers found.

 

  Name Delivery Address Contacts Edit Delete  
  [suspended]' : ''; ?> '.substr($c['email'],0,13).'...'; echo ($c['phone'] != '') ? '
P: '.$c['phone'] : ''; ?>
Edit Delete