| | |
| | | return Q($name); |
| | | } |
| | | if ($object=='version') { |
| | | return (string)RCMAIL_VERSION; |
| | | $ver = (string)RCMAIL_VERSION; |
| | | if (is_file(INSTALL_PATH . '.svn/entries')) { |
| | | if (preg_match('/Revision:\s(\d+)/', @shell_exec('svn info'), $regs)) |
| | | $ver .= ' [SVN r'.$regs[1].']'; |
| | | } |
| | | return $ver; |
| | | } |
| | | if ($object=='pagetitle') { |
| | | $task = $this->task; |
| | |
| | | array( |
| | | 'style', 'class', 'id', 'width', |
| | | 'height', 'border', 'hspace', |
| | | 'vspace', 'align', 'alt', |
| | | 'vspace', 'align', 'alt', 'tabindex' |
| | | ) |
| | | ); |
| | | $btn_content = sprintf('<img src="%s"%s />', $this->abs_url($attrib['image']), $attrib_str); |
| | |
| | | } |
| | | else if ($attrib['type']=='link') { |
| | | $btn_content = $attrib['label'] ? $attrib['label'] : $attrib['command']; |
| | | $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style'); |
| | | $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex'); |
| | | } |
| | | else if ($attrib['type']=='input') { |
| | | $attrib['type'] = 'button'; |
| | |
| | | $attrib, |
| | | array( |
| | | 'type', 'value', 'onclick', |
| | | 'id', 'class', 'style' |
| | | 'id', 'class', 'style', 'tabindex' |
| | | ) |
| | | ); |
| | | $out = sprintf('<input%s disabled="disabled" />', $attrib_str); |
| | |
| | | */ |
| | | public function current_username($attrib) |
| | | { |
| | | global $USER; |
| | | static $username; |
| | | |
| | | // alread fetched |
| | |
| | | } |
| | | |
| | | // get e-mail address form default identity |
| | | if ($sql_arr = $USER->get_identity()) { |
| | | $s_username = $sql_arr['email']; |
| | | } |
| | | else if (strstr($_SESSION['username'], '@')) { |
| | | $username = $_SESSION['username']; |
| | | if ($sql_arr = $this->app->user->get_identity()) { |
| | | $username = $sql_arr['email']; |
| | | } |
| | | else { |
| | | $username = $_SESSION['username'].'@'.$_SESSION['imap_host']; |
| | | $username = $this->app->user->get_username(); |
| | | } |
| | | |
| | | return $username; |