| | |
| | | fopen($path, 'r'); |
| | | $message.= ob_get_contents(); |
| | | ob_end_clean(); |
| | | rcube_error::raise(array( |
| | | raise_error(array( |
| | | 'code' => 501, |
| | | 'type' => 'php', |
| | | 'line' => __LINE__, |
| | |
| | | } |
| | | return $matches[0] . $this->parse_conditions($result); |
| | | } |
| | | rcube_error::raise(array( |
| | | raise_error(array( |
| | | 'code' => 500, |
| | | 'type' => 'php', |
| | | 'line' => __LINE__, |
| | |
| | | switch ($command) { |
| | | // return a button |
| | | case 'button': |
| | | if ($attrib['command']) { |
| | | if ($attrib['name'] || $attrib['command']) { |
| | | return $this->button($attrib); |
| | | } |
| | | break; |
| | |
| | | return $out; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Create and register a button |
| | | * |
| | |
| | | // these commands can be called directly via url |
| | | $a_static_commands = array('compose', 'list'); |
| | | |
| | | $browser = new rcube_browser(); |
| | | $skin_path = $this->config['skin_path']; |
| | | |
| | | if (!($attrib['command'] || $attrib['name'])) { |
| | | return ''; |
| | | } |
| | | |
| | | $browser = new rcube_browser(); |
| | | |
| | | // try to find out the button type |
| | | if ($attrib['type']) { |
| | | $attrib['type'] = strtolower($attrib['type']); |
| | |
| | | $command, |
| | | $attrib['id'], |
| | | $attrib['type'], |
| | | $attrib['imageact'] ? $skin_path.$attrib['imageact'] : $attrib['classact'], |
| | | $attrib['imagesel'] ? $skin_path.$attrib['imagesel'] : $attrib['classsel'], |
| | | $attrib['imageover'] ? $skin_path.$attrib['imageover'] : '' |
| | | $attrib['imageact'] ? $this->abs_url($attrib['imageact']) : $attrib['classact'], |
| | | $attrib['imagesel'] ? $this->abs_url($attrib['imagesel']) : $attrib['classsel'], |
| | | $attrib['imageover'] ? $this->abs_url($attrib['imageover']) : '' |
| | | )); |
| | | |
| | | // make valid href to specific buttons |
| | |
| | | 'vspace', 'align', 'alt', |
| | | ) |
| | | ); |
| | | $img_tag = sprintf('<img src="%%s"%s />', $attrib_str); |
| | | $btn_content = sprintf($img_tag, $skin_path.$attrib['image']); |
| | | $btn_content = sprintf('<img src="%s"%s />', $this->abs_url($attrib['image']), $attrib_str); |
| | | if ($attrib['label']) { |
| | | $btn_content .= ' '.$attrib['label']; |
| | | } |