. */ require_once("./include/SendMailPage.php"); class CandEmail extends Cand { public function __construct($candidate_id) { $this->candidate_id = $candidate_id; $this->name = "Email"; $this->compulsory = true; } public function get_print_name() { return "E-mail"; } public function get_print_name_short() { return "E-mail"; } public function get_print_value($readonly=false) { $r = "name."\" value=\"".$this->value."\" size=\"40\" maxlength=\"70\""; if( $readonly ) $r .= " disabled=\"disabled\""; $r .= ">
Please enter only one e-mail address without additional remarks!"; return $r; } public function getpublic() { return SendMailPage::getLink("candidate_".$this->candidate_id, "Send an e-mail"); } public function set($value) { if( !check_email($value) ) { // Error $this->error = true; $this->error_txt = "The e-mail address is invalid"; return false; }elseif( strpos($value, "@aegee.org")>0 ) { // Error $this->error = true; $this->error_txt = "The e-mail address cannot be in the domain @aegee.org. Please specify a real mailbox, not a forward"; return false; }else { $this->value = $value; return true; } } } ?>