Clients Listing

From PhpCOIN Documentation

Jump to: navigation, search

The clients listing can be viewed only by a logged-in admin. It allows you to see a listing of all your clients in one place.

You can specify how may clients should be listed per page via [Admin] -> [Parameters] -> [layout]-> [clients] -> [List: Items Per Page]

You can also specify the "two-out-of-six" columns that you wish displayed when viewing a list of clients. The two-out-of-six are 'Full Name and UserName' OR 'Full Name and Email Address' OR 'UserName and Email Address' OR 'Company Name and UserName' OR 'Company Name and Ful Name' OR 'Company Name and Email Address'. The option is chosen via [Admin] -> [Parameters] -> [layout]-> [clients] -> [List: Optional Data Displayed]

The default listing sort is by Last Name then First Name in ASCending order. You can edit the source code to change what the sort is, as well as the order. In file /coin_modules/clients/clients_admin.php find the function do_select_listing_clients(). Within that function is the following code block:

# Set Order ASC / DESC part of sort
	IF (!$adata['so'])		{$adata['so'] = 'A';}
	IF ($adata['so'] == 'A')	{$order_AD = ' ASC';}
	IF ($adata['so'] == 'D')	{$order_AD = ' DESC';}

Set the first line to A or D, depending on whether you want ASCending or DESCending sort

Immediately below that block is:

# Set Sort orders
	IF (!$adata['sb'])		{$adata['sb'] = '4';}
	IF ($adata['sb'] == '1')	{$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_id'.$order_AD;}
	IF ($adata['sb'] == '2')	{$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_status'.$order_AD;}
	IF ($adata['sb'] == '3')	{$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_join_ts'.$order_AD;}
	IF ($adata['sb'] == '4')	{
		IF ($_CCFG['CLIENT_LIST_DISPLAY'] < 3) {
			$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_name_last'.$order_AD.',
                       '.$_DBCFG['clients'].".cl_name_first".$order_AD;
		} ELSEIF ($_CCFG['CLIENT_LIST_DISPLAY'] == 3) {
			$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_user_name'.$order_AD;
		} ELSE {
			$_order  = ' ORDER BY '.$_DBCFG['clients'].'.cl_company'.$order_AD;
			$_order .= ', '.$_DBCFG['clients'].'.cl_name_last'.$order_AD.',
                       '.$_DBCFG['clients'].".cl_name_first".$order_AD;
		}
	}
	IF ($adata['sb'] == '5')	{
		IF ($_CCFG['CLIENT_LIST_DISPLAY'] == 1 || $_CCFG['CLIENT_LIST_DISPLAY'] == 4) {
			$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_user_name'.$order_AD;
		} ELSEIF ($_CCFG['CLIENT_LIST_DISPLAY'] == 5) {
			$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_name_last'.$order_AD.',
                       '.$_DBCFG['clients'].".cl_name_first".$order_AD;
		} ELSE {
			$_order = ' ORDER BY '.$_DBCFG['clients'].'.cl_email'.$order_AD;
		}
	}

Set the first line to the number of the ORDER BY fields that you want.

Personal tools

Inscrita el Registro Mercantil de Mallorca Tomo 2140, Hoja No. PM-51034, Folio 135
This website owned and operated by: Technology Services RPVW S.L. CIF# B57345084
Avda Constitucion 48 Bajos Alaro 07340 Baleares SPAIN
Tel:+34 971518362    Fax: +34 971518368    eMail: support@phpcoin.com