<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

/*
  -------------------- Name conventions --------------------
  Function names (except methods):

  ff_DescriptionOfFunction


  Constant names:

  cc_DescriptionOfConstant


  Variable names:

  $ST_DescriptionOfVariable

  where S is a scope, T is a type.

  The following scopes should be used:
  g - global
  s - static
  l - local
  m - member of class
  p - parameter

  The following types should be used:
  s - scalar
  a - array
  r - resource
  o - object
  m - mixed

  -------------------- end Name conventions --------------------
*/





include_once ( dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "class.ArrayValuesSource.php");





class ResellerValuesSource extends ArrayValuesSource
{
    /* -------------------- Members -------------------- */
    /* -------------------- end Members -------------------- */





    /* -------------------- Constructor -------------------- */
    function ResellerValuesSource ( $pa_Domains=array(), $pa_IdnDomains=array(), $pa_DNS=array(), $pa_DNR=array(),
	    $pa_Search=array(), $ps_IDName=0, $ps_PageNumber = NULL, $ps_ItemsPerPage = NULL )
    {
	$la_Data = array();
	if ( is_array($pa_Domains) )
	    foreach ( $pa_Domains as $ls_ID=>$ls_Domain )
		$la_Data[] = array( 
			$ps_IDName=>$ls_ID, 
			"domain"=>$ls_Domain, 
			"idndomain"=>$pa_IdnDomains[$ls_ID], 
			"domdns"=>$pa_DNS[$ls_ID],
			"domdnr"=>$pa_DNR[$ls_ID] 
		);
	$this->ArrayValuesSource ( $la_Data, $pa_Search, $ps_IDName, $ps_PageNumber, $ps_ItemsPerPage );
    }
    /* -------------------- end Constructor -------------------- */





    /* -------------------- DeleteElements -------------------- */
    function DeleteElements (  &$pa_IDs )
    {
	if ( ArrayValuesSource::DeleteElements ( $pa_IDs ) )
	{
	    for ( $i=0; $i<count($this->ma_Data); $i++ )
		$this->ma_Data[$i][$this->GetIDName()] = $i+1;
	}
    }
    /* -------------------- end DeleteElements -------------------- */

}
?>
