| | |
| | | } |
| | | else if ($object == 'logo') { |
| | | $attrib += array('alt' => $this->xml_command(array('', 'object', 'name="productname"'))); |
| | | if ($logo = $this->config->get('skin_logo')) |
| | | $attrib['src'] = $logo; |
| | | |
| | | if ($logo = $this->config->get('skin_logo')) { |
| | | if (is_array($logo)) { |
| | | if ($template_logo = $logo[$this->template_name]) { |
| | | $attrib['src'] = $template_logo; |
| | | } |
| | | elseif ($template_logo = $logo['*']) { |
| | | $attrib['src'] = $template_logo; |
| | | } |
| | | } |
| | | else { |
| | | $attrib['src'] = $logo; |
| | | } |
| | | } |
| | | |
| | | $content = html::img($attrib); |
| | | } |
| | | else if ($object == 'productname') { |
| | |
| | | } |
| | | |
| | | return html::quote($value); |
| | | break; |
| | | |
| | | case 'form': |
| | | return $this->form_tag($attrib); |
| | | } |
| | | return ''; |
| | | } |
| | |
| | | // these commands can be called directly via url |
| | | $a_static_commands = array('compose', 'list', 'preferences', 'folders', 'identities'); |
| | | |
| | | if (!($attrib['command'] || $attrib['name'])) { |
| | | if (!($attrib['command'] || $attrib['name'] || $attrib['href'])) { |
| | | return ''; |
| | | } |
| | | |
| | |
| | | } |
| | | else if ($attrib['type'] == 'link') { |
| | | $btn_content = isset($attrib['content']) ? $attrib['content'] : ($attrib['label'] ? $attrib['label'] : $attrib['command']); |
| | | $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex', 'target'); |
| | | $link_attrib = array_merge(html::$common_attrib, array('href', 'onclick', 'tabindex', 'target')); |
| | | if ($attrib['innerclass']) |
| | | $btn_content = html::span($attrib['innerclass'], $btn_content); |
| | | } |
| | |
| | | */ |
| | | public function _write($templ = '', $base_path = '') |
| | | { |
| | | $output = empty($templ) ? $this->default_template : trim($templ); |
| | | $output = trim($templ); |
| | | |
| | | if (empty($output)) { |
| | | $output = $this->default_template; |
| | | $is_empty = true; |
| | | } |
| | | |
| | | // set default page title |
| | | if (empty($this->pagetitle)) { |
| | |
| | | } |
| | | |
| | | // add css files in head, before scripts, for speed up with parallel downloads |
| | | if (!empty($this->css_files) && |
| | | (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>'))) |
| | | if (!empty($this->css_files) && !$is_empty |
| | | && (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>'))) |
| | | ) { |
| | | $css = ''; |
| | | foreach ($this->css_files as $file) { |
| | |
| | | $attrib['noclose'] = true; |
| | | |
| | | return html::tag('form', |
| | | $attrib + array('action' => "./", 'method' => "get"), |
| | | $attrib + array('action' => $this->app->comm_path, 'method' => "get"), |
| | | $hidden . $content, |
| | | array('id','class','style','name','method','action','enctype','onsubmit')); |
| | | } |
| | |
| | | $input_action = new html_hiddenfield(array('name' => '_action', 'value' => 'login')); |
| | | $input_tzone = new html_hiddenfield(array('name' => '_timezone', 'id' => 'rcmlogintz', 'value' => '_default_')); |
| | | $input_url = new html_hiddenfield(array('name' => '_url', 'id' => 'rcmloginurl', 'value' => $url)); |
| | | $input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser') |
| | | $input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser', 'required' => 'required') |
| | | + $attrib + $user_attrib); |
| | | $input_pass = new html_passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd') |
| | | $input_pass = new html_passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd', 'required' => 'required') |
| | | + $attrib + $pass_attrib); |
| | | $input_host = null; |
| | | |