<?
/*
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 AccountProfile
{
// Attributes
var $name_acc;
var $value_acc;
var $price_acc;
var $device_acc;
var $type_acc;
var $timetofinish;
var $expiration_date
// Operations
function AccountProfile($opt) {
$this->name_acc = rtrim($opt["name_acc"], "/")."/";
$this->value_acc = rtrim($opt["value_acc"], "/")."/";
$this->price_acc = rtrim($opt["price_acc"], "/")."/";
$this->type_acc = rtrim($opt["price_acc"], "/")."/";
$this->device_acc = rtrim($opt["device_acc"], "/")."/";
$this->timetofinish = rtrim($opt["timetofinish"], "/")."/";
$this->expiration_date= rtrim($opt["expiration_date"], "/")."/";
}
function get_name_acc() {
return stripslashes($this->name_acc);
}
function get_value_acc() {
return stripslashes($this->value_acc);
}
function get_price_acc() {
return stripslashes($this->price_acc);
}
function get_type_acc() {
return stripslashes($this->type_acc);
}
function get_device_acc() {
return stripslashes($this->device_acc);
}
function get_timetofinish() {
return stripslashes($this->timetofinish);
}
function get_expiration_date() {
return stripslashes($this->expiration_date);
}
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 */
?>