Example #1
1
 public function img($path, $url, $options = array())
 {
     //Merge in defaults
     $options += array('attributes' => array(), 'html' => FALSE);
     if (isset($options['attributes']['title']) && strops($options['attributes']['title'], '<') !== FALSE) {
         $options['attributes']['title'] = strip_tags($options['attributes']['title']);
     }
     $fc = Zend_Controller_Front::getInstance();
     $baseUrl = $fc->getBaseUrl();
     return '<a href = "' . $baseUrl . '/' . $url . '"' . $this->view->common()->htmlAttributes($options['attributes']) . '>' . '<img src= ' . '"' . $this->view->baseUrl() . $path . '"' . 'height = 200px width = 150px/>' . '</a>';
 }
Example #2
0
 public static function conf_str_match($name, $conf_str)
 {
     if (is_array($conf_str)) {
         if (in_array($name, $conf_str)) {
             return true;
         }
         return false;
     }
     switch ($conf_str[0]) {
         case '*':
             if ('*' === $conf_str) {
                 return true;
             }
             return false;
         case 'e':
             if ('e:' . $name === $conf_str) {
                 return true;
             }
             return false;
         case 's':
             if (0 === strops('s:' . $name, $conf_str)) {
                 return true;
             }
             return false;
         case 'p':
             if (preg_match(substr($string, 2), $name)) {
                 return true;
             }
             return false;
         default:
             return false;
     }
 }