wip del err
This commit is contained in:
1 parent
812736ca9a
commit
9bcd4432c6
1210 files changed
-220941
No files matched your search
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Utilities;
|
||||
|
||||
class Html
|
||||
{
|
||||
public static function table_header_90($_row)
|
||||
{
|
||||
$html = '<thead><tr text-rotate="90deg">';
|
||||
$mm = 190 / \count($_row);
|
||||
foreach ($_row as $value) {
|
||||
$html .= '<td class="head right bl bt br bb" style="background-color:#d1d1d1; width: '.$mm.'mm;">'.$value.'</td>';
|
||||
}
|
||||
$html .= '</tr></thead>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public static function make_table($str)
|
||||
{
|
||||
$array = explode('<br />', $str);
|
||||
$html = '<table class="table-striped bt bl">';
|
||||
foreach ($array as $value) {
|
||||
$tmp = explode('|', $value);
|
||||
$html .= '<tr>';
|
||||
$html .= self::td($tmp[0], 'br bb');
|
||||
$html .= self::td($tmp[1], 'br bb');
|
||||
$html .= '</tr>';
|
||||
}
|
||||
$html .= '</table>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public static function td($value = '', $classname = '', $colspan = 0)
|
||||
{
|
||||
$cls = $classname != '' ? ' class="'.$classname.'"' : '';
|
||||
$spn = $colspan != '' ? ' colspan="'.$colspan.'"' : '';
|
||||
|
||||
return "<td $cls $spn>".$value.'</td>';
|
||||
}
|
||||
|
||||
public static function tag($tag = 'div', $value = '', $class = '', $style = '')
|
||||
{
|
||||
$str1 = $class != '' ? ' class="'.$class.'"' : '';
|
||||
$str2 = $style != '' ? ' style="'.$style.'"' : '';
|
||||
|
||||
return "<$tag $str1 $str2>".$value."</$tag>";
|
||||
}
|
||||
|
||||
public static function end($value = 'div')
|
||||
{
|
||||
return "</$value>";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user