Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/class/Phpmyprepaid.class.php
<?
/*
phpRADmin is developped with GPL Licence 2.0 :
http://www.gnu.org/licenses/gpl.txt
Developped by : Toni de la Fuente (blyx)

For information : hide@address.com
*/class Phpmyprepaid
{

  // Attributes

  	var $client_name;
  	var $banner_path;
	var $logo_path;
	var $main_text;
	var $default_timetofinish;
	var $default_simultanous_use;
	var $use_domain_name;
	var $use_disconnect_feature;
	var $display_date_format;
	var $gateway_type;
	var $default_idle_timeout;
	var $default_accounting_interval;
	var $max_month_old;
	var $maximun_cards;
	var $minimun_time_sold;
	var $maximun_time_sold;
	var $minimun_moctet_sold;
	var $maximun_moctet_sold;
	var $default_name_length;
	var $default_passwd_length;
	var $uname_prefix;
	var $redirection_url;
	var $logoff_url;
	var $reply_message;
	var $uam_allowed;
	var $mac_allowed;
	var $locationid;


  // Operations

  function Phpmyprepaid($opt)  {
	$this->client_name = rtrim($opt["client_name"], "/")."/";
	$this->banner_path = rtrim($opt["banner_path"], "/")."/";
	$this->logo_path = rtrim($opt["logo_path"], "/")."/";
	$this->main_text= rtrim($opt["main_text"], "/")."/";
	$this->default_timetofinish = rtrim($opt["default_timetofinish"], "/")."/";
	$this->default_simultanous_use = rtrim($opt["default_simultanous_use"], "/")."/";
	$this->use_domain_name= rtrim($opt["use_domain_name"], "/")."/";
	$this->use_disconnect_feature= rtrim($opt["use_disconnect_feature"], "/")."/";
	$this->display_date_format= rtrim($opt["display_date_format"], "/")."/";
	$this->gateway_type= rtrim($opt["gateway_type"], "/")."/";
	$this->default_idle_timeout= rtrim($opt["default_idle_timeout"], "/")."/";
	$this->default_accounting_interval= rtrim($opt["default_accounting_interval"], "/")."/";
	$this->max_month_old= rtrim($opt["max_month_old"], "/")."/";
	$this->maximun_cards= rtrim($opt["maximun_cards"], "/")."/";
	$this->minimun_time_sold= rtrim($opt["minimun_time_sold"], "/")."/";
	$this->maximun_time_sold= rtrim($opt["maximun_time_sold"], "/")."/";
	$this->maximun_moctet_sold= rtrim($opt["maximun_moctet_sold"], "/")."/";
	$this->minimun_moctet_sold= rtrim($opt["minimun_moctet_sold"], "/")."/";
	$this->default_name_length= rtrim($opt["default_name_length"], "/")."/";
	$this->default_passwd_length= rtrim($opt["default_passwd_length"], "/")."/";
	$this->uname_prefix= rtrim($opt["uname_prefix"], "/")."/";
	$this->redirection_url= rtrim($opt["redirection_url"], "/")."/";
	$this->logoff_url= rtrim($opt["logoff_url"], "/")."/";
	$this->reply_message= rtrim($opt["reply_message"], "/")."/";
	$this->uam_allowed= rtrim($opt["uam_allowed"], "/")."/";
	$this->mac_allowed= rtrim($opt["mac_allowed"], "/")."/";
}

  function get_client_name()	{
	return stripslashes($this->client_name);
  }
  function get_banner_path()	{
	return stripslashes($this->banner_path);
  }
  function get_logo_path()	{
	return stripslashes($this->logo_path);
  }
  function get_main_text()	{
	return stripslashes($this->main_text);
  }
  function get_default_timetofinish()	{
	return stripslashes($this->default_timetofinish);
  }
  function get_default_simultanous_use()	{
	return stripslashes($this->default_simultanous_use);
  }
  function get_use_domain_name()	{
	return stripslashes($this->use_domain_name);
  }
  function get_use_disconnect_feature()	{
	return stripslashes($this->use_disconnect_feature);
  }
  function get_display_date_format()	{
	return stripslashes($this->display_date_format);
  }
  function get_gateway_type()	{
	return stripslashes($this->gateway_type);
  }
  function get_default_idle_timeout()	{
	return stripslashes($this->default_idle_timeout);
  }
  function get_default_accounting_interval()	{
	return stripslashes($this->default_accounting_interval);
  }
  function get_max_month_old()	{
	return stripslashes($this->max_month_old);
  }
  function get_maximun_cards()	{
	return stripslashes($this->maximun_cards);
  }
  function get_minimun_time_sold()	{
	return stripslashes($this->minimun_time_sold);
  }
  function get_minimun_moctet_sold()	{
	return stripslashes($this->minimun_moctet_sold);
  }
  function get_maximun_moctet_sold()	{
	return stripslashes($this->maximun_moctet_sold);
  }
  function get_maximun_time_sold()	{
	return stripslashes($this->maximun_time_sold);
  }
  function get_default_name_length()	{
	return stripslashes($this->default_name_length);
  }
  function get_default_passwd_length()	{
	return stripslashes($this->default_passwd_length);
  }
  function get_prefix()	{
	return stripslashes($this->uname_prefix);
  }
  function get_redirection_url()	{
	return stripslashes($this->redirection_url);
  }
  function get_logoff_url()	{
	return stripslashes($this->logoff_url);
  }
  function get_reply_message()	{
	return stripslashes($this->reply_message);
  }
  function get_uam_allowed()	{
	return stripslashes($this->uam_allowed);
  }
  function get_mac_allowed()	{
	return stripslashes($this->mac_allowed);
  }

  function is_valid_path($path)	{
	if (is_dir($path) )  {
	    $style = '';
	} else {
	    $style = 'class="invalid_path"';
	}
	return $style;
  }
  function is_readable_directory($path)	{
	$style = $this->is_valid_path($path);
	if ($style == '') {
	    if (is_readable($path) )  {
		$style = '';
	    } else {
		$style = 'class="unreadable_path"';
	    }
	} else {
	    $style = 'class="invalid_path"';
	}
	return $style;
  }
  function is_executable_binary($path)	{
	if (is_file($path)) {
	    if (is_executable($path) )  {
		$style = '';
	    } else {
		$style = 'class="unexecutable_binary"';
	    }
	} else {
	    $style = 'class="invalid_path"';
	}
	return $style;
  }
  function is_writable_path($path)	{
	$style = $this->is_valid_path($path);
	if ($style == '') {
	    if (is_writable($path) )  {
		$style = '';
	    } else {
		$style = 'class="unwritable_path"';
	    }
	}
	return $style;
  }
  function is_writable_file($path)	{
	if (is_file($path)) {
	    if (is_writable($path) )  {
		$style = '';
	    } else {
		$style = 'class="unwritable_path"';
	    }
	} else {
	    $style = 'class="invalid_path"';
	}
	return $style;
  }

} /* end class optGen */
?>
Return current item: phpMyPrepaid