. */ include_once("./include/Fee.php"); class PersonsFee extends Persons { private $showshort = false; private $fee; public function __construct($dummy=0) { $this->name = "Fee"; $this->fee = new Fee(); } public function get_print_name() { return "Fee"; } public function get_print_name_short() { $this->showshort = true; return "Fee"; } public function get_access($dummy=0) { if( isset($_SESSION['sess_functions']) && in_array("application_editfee", $_SESSION['sess_functions']) ) return self::ACCESS_RW; elseif( isset($_SESSION['sess_functions']) && in_array("application_viewfee", $_SESSION['sess_functions']) ) return self::ACCESS_R; else return self::ACCESS_NO; } public function display($value, $applicationID=0, &$allvalues="") { if( $this->get_access()==self::ACCESS_RW ) { return "".$this->displaytext($value, $applicationID, $allvalues).""; }else { return $this->displaytext($value, $applicationID, $allvalues); } } public function displaytext($value, $applicationID=0, &$allvalues="") { if( $matches = preg_split("/;/", $value) ) { if( $matches[0]>=0 ) { return "€ ".$matches[0].",--"; }else { if( ($a=$this->fee->get_fee($matches[1], $matches[2], $matches[0]))===false ) return "-- unknown --"; else return "€ ".$a.",--"; } }else { return "-- unknown --"; } } public function displayoptions($applicationID=0) { return " align=\"right\" id=\"Fee_".$applicationID."\""; } public function sql_columnname() { return "CONCAT(`applications`.`Fee`, ';', `applications`.`BodyCode`, ';', `applications`.`ParticipantType`) AS `Fee`"; } } ?>