Esempio n. 1
0
 /**
  * Get the messages belonging to a group. The messages are placed into an
  * unsorted list wrapped in a DIV element with the "messageStack" style sheet
  * class.
  *
  * @param string $group The name of the group to get the messages from
  * @access public
  */
 public function output($group, $imgLoc = '', $ext = '')
 {
     $result = false;
     if ($this->exists($group)) {
         $result = '<p class="big-message white-gradient">';
         foreach ($this->_data[$group] as $message) {
             switch ($message['type']) {
                 case 'error':
                     $bullet = '<span class="icon-size3 icon-cross icon-red small-margin-right"></span>';
                     break;
                 case 'warning':
                     $bullet = '<span class="icon-size3 icon-warning icon-orange small-margin-right"></span>';
                     break;
                 case 'success':
                     $bullet = '<span class="icon-size3 icon-tick icon-green small-margin-right"></span>';
                     break;
                 default:
                     $bullet = '<span class="icon-size3 icon-thumbs small-margin-right"></span>';
             }
             $result .= $bullet . ' ' . lc_output_string($message['text']) . '<br />';
         }
         $result .= '</p>';
         unset($this->_data[$group]);
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * Get the messages belonging to a group. The messages are separated by a new
  * line character.
  *
  * @param string $group The name of the group to get the messages from
  * @access public
  */
 public function getRaw($group)
 {
     $result = false;
     if ($this->exists($group)) {
         $result = '';
         foreach ($this->_data[$group] as $message) {
             $result .= lc_output_string($message['text']) . "\n";
         }
         unset($this->_data[$group]);
     }
     return $result;
 }
Esempio n. 3
0
 function lc_draw_label($text, $for, $access_key = null, $required = false)
 {
     if (!is_bool($required)) {
         $required = false;
     }
     return '<label for="' . lc_output_string($for) . '"' . (!empty($access_key) ? ' accesskey="' . lc_output_string($access_key) . '"' : '') . '>' . lc_output_string($text) . ($required === true ? '<em>*</em>' : '') . '</label>';
 }