Example #1
0
 function tag($tag, $vals, $attrs = array())
 {
     $str = '';
     if (is_array($vals)) {
         foreach ($vals as $val) {
             $str .= '<' . $tag . html_attrs($attrs) . '>';
             $str .= $val;
             $str .= '</' . $tag . '>';
             $str .= "\n";
         }
     } else {
         $str .= '<' . $tag . html_attrs($attrs) . '>';
         $str .= $vals;
         $str .= '</' . $tag . '>';
     }
     return $str;
 }
 function get_avatar_img_tag($attrs = array())
 {
     $CI =& get_instance();
     $CI->load->helper('html');
     $src = $this->get_avatar_image_path();
     $attrs = html_attrs($attrs);
     if (!empty($this->avatar_image)) {
         return '<img src="' . $src . '"' . $attrs . ' />';
     }
     return '';
 }
 function get_avatar_img_tag($attrs = array())
 {
     $CI =& get_instance();
     $CI->load->module_library(BLOG_FOLDER, 'fuel_blog');
     $CI->load->helper('html');
     $image_path = $CI->fuel_blog->settings('asset_upload_path');
     $src = assets_path($image_path . $this->avatar_image);
     $attrs = html_attrs($attrs);
     if (!empty($this->avatar_image)) {
         return '<img src="' . $src . '"' . $attrs . ' />';
     }
     return '';
 }
Example #4
0
 /**
  * Создать пустой html тег
  *
  * @param string $tag имя тега
  * @param array $attr аттрибуты которые необходимод обавить к тегу $tag
  * @return string
  */
 function empty_tag($tag, $attr = array())
 {
     $attribs = html_attrs($attr);
     return "<{$tag}{$attribs}/>";
 }
Example #5
0
            ?>
"><?php 
            echo $name;
            ?>
</label>
					<?php 
        }
        ?>
				<?php 
    } else {
        ?>
				<input type="<?php 
        echo $opts['html_type'];
        ?>
" <?php 
        echo html_attrs($opts, $exclude_attrs);
        ?>
 />
				<?php 
    }
    ?>
			</td>
		</tr>
		<?php 
}
?>

		<tr class="submit">
			<td colspan="2">
				<?php 
echo $hidden_inputs;
Example #6
0
<h1>Processsing...</h1>
<form action="<?php 
echo $action;
?>
" method="<?php 
echo $method;
?>
" id="<?php 
echo $id ? $id : 'hidden-form';
?>
" class="hidden-form">
	<?php 
$hidden_inputs = '';
foreach ($inputs as $title => $opts) {
    if ($opts['html_type'] == 'hidden') {
        echo '<input type="' . $opts['html_type'] . '" ' . html_attrs($opts, $exclude_attrs) . " />\n";
        continue;
    }
}
?>

	<p>If you are not redirected in a few seconds, <button type="submit">click here</button>.</p>
</form>
<script type="text/javascript">
/* <![CDATA[ */
jQuery(function($) { $('#<?php 
echo $id ? $id : 'hidden-form';
?>
').submit(); });
/* ]]> */
</script>
Example #7
0
 public function input($name)
 {
     $input = $this->inputs[$name];
     return '<input type="' . $input['html']['type'] . '" ' . html_attrs($input['html']) . ' />';
 }