123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- <?php
-
-
-
- class model
- {
- public $username = '';
- public $email = '';
- public $email_local = '';
- public $email_domain = '';
- public $addressed_to = null;
- public $send_from = null;
- public $vacation_enable = false;
- public $vacation_start = 0;
- public $vacation_starttime = 12;
- public $vacation_end = 0;
- public $vacation_endtime = 12;
- public $append_subject = true;
- public $vacation_subject = 'Out of office';
- public $vacation_message = 'I am in Holidays...';
- public $every = 1;
-
-
-
- public function __construct()
- {
- $this->init();
- }
-
-
-
- private function init()
- {
- $this->username = rcmail::get_instance()->user->get_username();
-
- $parts = explode('@', $this->username);
- if (count($parts) >= 2)
- {
- $this->email = $this->username;
- $this->email_local = $parts[0];
- $this->email_domain = $parts[1] ;
- }
- }
-
-
-
- public function get_username()
- {
- return $this->username;
- }
-
-
-
- public function get_email()
- {
- return $this->email;
- }
-
-
-
- public function get_email_local()
- {
- return $this->email_local;
- }
-
-
-
- public function get_email_domain()
- {
- return $this->email_domain;
- }
-
-
-
- public function get_addressed_to()
- {
- return $this->addressed_to;
- }
-
-
-
- public function get_send_from()
- {
- return $this->send_from;
- }
-
-
-
- public function is_vacation_enable ()
- {
- return $this->vacation_enable;
- }
-
-
-
- public function get_vacation_start()
- {
- if ( !$this->vacation_start )
- $this->vacation_start = time();
-
- return $this->vacation_start;
- }
-
-
-
- public function get_vacation_starttime()
- {
- return $this->vacation_starttime;
- }
-
-
-
- public function get_vacation_end()
- {
- if ( !$this->vacation_end )
- $this->vacation_end = 86400 + time();
-
- return $this->vacation_end;
- }
-
-
-
- public function get_vacation_endtime()
- {
- return $this->vacation_endtime;
- }
-
-
-
- public function get_vacation_subject()
- {
- return $this->vacation_subject;
- }
-
-
-
- public function get_append_subject()
- {
- return $this->append_subject;
- }
-
-
-
- public function get_vacation_message()
- {
- return $this->vacation_message;
- }
-
-
-
- public function is_vacation_keep_copy_in_inbox()
- {
- return $this->vacation_keepcopyininbox;
- }
-
-
-
- public function get_every()
- {
- return $this->every;
- }
-
-
-
- public function set_email($email)
- {
- $this->email = $email;
- }
-
-
-
- public function set_email_local($local)
- {
- $this->email_local = $local;
- }
-
-
-
- public function set_email_domain($domain)
- {
- $this->email_domain = $domain;
- }
-
-
-
- public function set_addressed_to($email)
- {
- $this->addressed_to = $email;
- }
-
-
-
- public function set_send_from($email)
- {
- $this->send_from = $email;
- }
-
-
-
- public function set_vacation_enable($flag)
- {
- $this->vacation_enable = $flag;
- }
-
-
-
- public function set_vacation_start ($date)
- {
- $this->vacation_start = $date;
- }
-
-
-
- public function set_vacation_starttime ($time)
- {
- $this->vacation_starttime = $time;
- }
-
-
-
- public function set_vacation_end ($date)
- {
- $this->vacation_end = $date;
- }
-
-
-
- public function set_vacation_endtime ($time)
- {
- $this->vacation_endtime = $time;
- }
-
-
-
- public function set_vacation_subject($subject)
- {
- $this->vacation_subject = $subject;
- }
-
-
-
- public function set_append_subject($append)
- {
- $this->append_subject = $append;
- }
-
-
-
- public function set_vacation_message($message)
- {
- $this->vacation_message = $message;
- }
-
-
-
- public function set_vacation_keep_copy_in_inbox($flag)
- {
- $this->vacation_keepcopyininbox = $flag;
- }
-
-
-
- public function set_every($period)
- {
- $this->every = $period;
- }
- }
|