コード例 #1
0
ファイル: MY_html_helper.php プロジェクト: huayuxian/FUEL-CMS
 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;
 }
コード例 #2
0
 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 '';
 }
コード例 #3
0
 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 '';
 }
コード例 #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}/>";
 }
コード例 #5
0
ファイル: _table_form.php プロジェクト: nanotech/webcore
            ?>
"><?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;
コード例 #6
0
ファイル: _hidden_form.php プロジェクト: nanotech/webcore
<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>
コード例 #7
0
ファイル: Form.php プロジェクト: nanotech/webcore
 public function input($name)
 {
     $input = $this->inputs[$name];
     return '<input type="' . $input['html']['type'] . '" ' . html_attrs($input['html']) . ' />';
 }