'.PHP_EOL; } } else { $tmp = ''.PHP_EOL; } return $tmp; } public static function js($filename) { if (is_array($filename)) { $tmp = ''; foreach ($filename as $file) { $tmp .= ''.PHP_EOL; } } else { $tmp = ''.PHP_EOL; } return $tmp; } public static function link($args) { $options = 'href="'.$args['href'].'"'; if (isset($args['class'])) { $options .= ' class="'.$args['class'].'"'; } if (isset($args['target'])) { $options .= ' target="'.$args['target'].'"'; } if (isset($args['icon'])) { return ' '.$args['title'].''; } return ''.$args['title'].''; } public static function pageTitle($args) { return '

'.$args['title'].'

'; } public static function formOpen($args) { $class = empty($args['class']) ? '' : ' '.$args['class']; $id = empty($args['id']) ? '' : ' id="'.$args['id'].'" '; $enctype = empty($args['enctype']) ? '' : ' enctype="'.$args['enctype'].'" '; $html = '
'; return $html; } public static function formClose() { $html = '
'; $script = ''; return $html.$script; } public static function formTitle($args) { return '

'.$args['title'].'

'; } public static function formInputTextBlock($args) { $id = 'js'.$args['name']; if (isset($args['id'])) { $id = $args['id']; } $class = 'form-control'; if (isset($args['class'])) { $class = $class.' '.$args['class']; } $html = '
'; if (isset($args['label'])) { $html .= ''; } $html .= ''; if (isset($args['tip'])) { $html .= ''.$args['tip'].''; } $html .= '
'; return $html; } public static function formInputFile($args) { $id = 'js'.$args['name']; if (isset($args['id'])) { $id = $args['id']; } $class = 'custom-file'; if (isset($args['class'])) { $class = $class.' '.$args['class']; } $html = '
'; $html .= ''; $html .= ''; $html .= '
'; return $html; } public static function formTextarea($args) { $id = 'js'.$args['name']; if (isset($args['id'])) { $id = $args['id']; } $class = 'form-control'; if (isset($args['class'])) { $class = $class.' '.$args['class']; } $html = '
'; if (isset($args['label'])) { $html .= ''; } $html .= '
'; $html .= ''; if (isset($args['tip'])) { $html .= ''.$args['tip'].''; } $html .= '
'; $html .= '
'; return $html; } public static function formInputGroupText($args) { $label = $args['label']; $labelInside = $args['labelInside']; $tip = $args['tip']; $value = $args['value']; $name = $args['name']; $id = 'js'.$name; if (isset($args['id'])) { $id = $args['id']; } $disabled = isset($args['disabled'])?'disabled':''; return <<
$labelInside
$tip EOF; } public static function formInputText($args) { $id = 'js'.$args['name']; if (isset($args['id'])) { $id = $args['id']; } $class = 'form-control'; if (isset($args['class'])) { $class = $class.' '.$args['class']; } $html = '
'; if (isset($args['label'])) { $html .= ''; } $html .= '
'; $html .= ''; if (isset($args['tip'])) { $html .= ''.$args['tip'].''; } $html .= '
'; $html .= '
'; return $html; } public static function formSelect($args) { $id = 'js'.$args['name']; if (isset($args['id'])) { $id = $args['id']; } $class = 'custom-select'; if (isset($args['class'])) { $class = $class.' '.$args['class']; } $html = '
'; if (isset($args['label'])) { $html .= ''; } $html .= '
'; $html .= ''; if (isset($args['tip'])) { $html .= ''.$args['tip'].''; } $html .= '
'; $html .= '
'; return $html; } public static function formInputHidden($args) { return ''; } }