2017-02-23 15:21:34 +08:00
|
|
|
<?php
|
2016-08-21 23:06:17 +04:00
|
|
|
|
2016-08-31 15:18:34 +04:00
|
|
|
function include_jquery()
|
|
|
|
{
|
2023-07-07 18:30:57 +08:00
|
|
|
echo '<script src="cm/3rdpty/jquery-3.7.0.min.js"></script>';
|
2016-08-31 15:18:34 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
function include_font_awesome()
|
|
|
|
{
|
2023-07-07 18:30:57 +08:00
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/fontawesome-free-6.4.0-web/css/fontawesome.min.css">';
|
2016-08-31 15:18:34 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
function include_bootstrap()
|
|
|
|
{
|
2023-07-07 18:30:57 +08:00
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/bootstrap-5.3.0-dist/css/bootstrap.min.css">';
|
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/bootstrap-5.3.0-dist/css/bootstrap.rtl.min.css">';
|
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/bootstrap-5.3.0-dist/css/bootstrap-grid.min.css">';
|
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/bootstrap-5.3.0-dist/css/bootstrap-grid.rtl.min.css">';
|
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/bootstrap-5.3.0-dist/css/bootstrap-reboot.min.css">';
|
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/bootstrap-5.3.0-dist/css/bootstrap-reboot.rtl.min.css">';
|
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/bootstrap-5.3.0-dist/css/bootstrap-utilities.min.css">';
|
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/bootstrap-5.3.0-dist/css/bootstrap-utilities.rtl.min.css">';
|
|
|
|
|
|
|
|
echo '<link rel="stylesheet" href="cm/3rdpty/startbootstrap-sb-admin-2-gh-pages/css/sb-admin-2.min.css">';
|
|
|
|
echo '<script src="cm/3rdpty/startbootstrap-sb-admin-2-gh-pages/js/sb-admin-2.min.js"></script>';
|
|
|
|
|
|
|
|
echo '<script src="cm/3rdpty/bootstrap-5.3.0-dist/js/bootstrap.min.js"></script>';
|
|
|
|
echo '<script src="cm/3rdpty/bootstrap-5.3.0-dist/js/bootstrap.bundle.min.js"></script>';
|
2016-08-31 15:18:34 +04:00
|
|
|
}
|
|
|
|
|
2016-12-15 10:07:22 +04:00
|
|
|
function include_echarts()
|
|
|
|
{
|
2023-07-07 18:30:57 +08:00
|
|
|
echo '<script src="cm/chart/echarts.min.js"></script>';
|
2016-12-15 10:07:22 +04:00
|
|
|
}
|
|
|
|
|
2016-08-21 23:06:17 +04:00
|
|
|
function echo_html_header($title)
|
|
|
|
{
|
2023-07-07 18:30:57 +08:00
|
|
|
echo '<!DOCTYPE html>
|
|
|
|
<html lang="zh-CN">
|
2016-08-21 23:06:17 +04:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2023-07-07 18:30:57 +08:00
|
|
|
<title>'.$title.'</title>
|
2016-08-21 23:06:17 +04:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
2016-09-01 03:26:27 +04:00
|
|
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, maximum-scale=5.0, width=device-width" />';
|
2016-08-30 02:28:42 +04:00
|
|
|
|
2016-08-31 15:18:34 +04:00
|
|
|
include_jquery();
|
|
|
|
include_font_awesome();
|
|
|
|
include_bootstrap();
|
2016-12-15 10:07:22 +04:00
|
|
|
include_echarts();
|
2016-08-30 02:28:42 +04:00
|
|
|
|
2016-09-01 03:26:27 +04:00
|
|
|
echo '</head><body>';
|
2016-08-21 23:06:17 +04:00
|
|
|
}
|
|
|
|
|
2016-08-27 14:34:34 +04:00
|
|
|
function echo_page_header($header,$subtext)
|
|
|
|
{
|
2016-09-11 21:22:02 +04:00
|
|
|
echo '<div class="page-header" style="margin-bottom: 10px; padding-bottom: 0px; margin-top: 0px;"><h1 style="margin-top: 10px;">'.$header.'<small> '.$subtext.'</small></h1></div>';
|
2016-08-27 14:34:34 +04:00
|
|
|
}
|
|
|
|
|
2016-08-21 23:06:17 +04:00
|
|
|
function echo_html_end()
|
|
|
|
{
|
2016-09-01 03:26:27 +04:00
|
|
|
echo '</body></html>';
|
2016-08-21 23:06:17 +04:00
|
|
|
}
|
|
|
|
|
2016-08-31 01:30:50 +04:00
|
|
|
function echo_div($id)
|
|
|
|
{
|
|
|
|
echo '<div id="'.$id.'"></div>';
|
|
|
|
}
|
|
|
|
|
2016-08-21 23:06:17 +04:00
|
|
|
function echo_hr()
|
|
|
|
{
|
|
|
|
echo '<hr size="1"/>';
|
|
|
|
}
|
|
|
|
|
|
|
|
function echo_include_script($filename)
|
|
|
|
{
|
|
|
|
echo '<script src="'.$filename.'"></script>';
|
|
|
|
}
|
|
|
|
|
|
|
|
function echo_autogoto($time,$page)
|
|
|
|
{
|
|
|
|
echo '<meta http-equiv="refresh" content="'.$time.';url='.$page.'">';
|
|
|
|
}
|
|
|
|
|
2017-02-16 10:42:18 +08:00
|
|
|
function echo_link($text,$link)
|
|
|
|
{
|
|
|
|
echo '<a href="'.$link.'">'.$text.'</a>';
|
|
|
|
}
|
|
|
|
|
2016-08-21 23:06:17 +04:00
|
|
|
function echo_span_glyph($glyph)
|
|
|
|
{
|
|
|
|
echo '<span class="glyphicon glyphicon-'.$glyph.'"></span>';
|
|
|
|
}
|
|
|
|
|
2016-09-08 22:26:34 +04:00
|
|
|
function echo_span_hint_link($glyph,$text,$hint,$link)
|
|
|
|
{
|
|
|
|
echo '<a href="'.$link.'" data-toggle="tooltip" data-placement="top" title="'.$hint.'">'.'<span class="glyphicon glyphicon-'.$glyph.'"></span>'.$text.'</a>';
|
|
|
|
}
|
|
|
|
|
2017-02-16 11:50:42 +08:00
|
|
|
function echo_icon_hint_link($icon,$text,$hint,$link)
|
|
|
|
{
|
|
|
|
echo '<a href="'.$link.'" data-toggle="tooltip" data-placement="top" title="'.$hint.'">';
|
|
|
|
echo_icon($icon);
|
|
|
|
echo $text.'</a>';
|
|
|
|
}
|
|
|
|
|
2017-03-14 20:45:31 +08:00
|
|
|
function echo_icon_link($icon,$text,$link)
|
|
|
|
{
|
|
|
|
echo '<a href="'.$link.'" data-placement="top">';
|
|
|
|
echo_icon($icon);
|
|
|
|
echo $text.'</a>';
|
|
|
|
}
|
|
|
|
|
2017-02-23 19:01:16 +08:00
|
|
|
function get_span_label_html($style,$text)
|
|
|
|
{
|
|
|
|
return '<span class="label label-'.$style.'">'.$text.'</span>';
|
|
|
|
}
|
|
|
|
|
2016-08-21 23:06:17 +04:00
|
|
|
function echo_span_label($style,$text)
|
|
|
|
{
|
2017-02-23 19:01:16 +08:00
|
|
|
echo get_span_label_html($style,$text);
|
2016-08-21 23:06:17 +04:00
|
|
|
}
|
|
|
|
|
2017-03-22 17:47:30 +08:00
|
|
|
function get_icon_html()
|
2016-08-31 01:30:50 +04:00
|
|
|
{
|
2017-03-22 17:47:30 +08:00
|
|
|
$name=func_get_arg(0);
|
|
|
|
|
|
|
|
if(func_num_args()>1)
|
|
|
|
{
|
|
|
|
$style=func_get_arg(1);
|
|
|
|
|
|
|
|
return '<i class="fa fa-'.$name.' '.$style.'" aria-hidden="true"></i>';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return '<i class="fa fa-'.$name.'" aria-hidden="true"></i>';
|
|
|
|
}
|
2016-08-31 01:30:50 +04:00
|
|
|
}
|
|
|
|
|
2017-03-22 17:47:30 +08:00
|
|
|
function echo_icon()
|
2016-08-31 01:30:50 +04:00
|
|
|
{
|
2017-03-22 17:47:30 +08:00
|
|
|
$name=func_get_arg(0);
|
|
|
|
|
|
|
|
if(func_num_args()>1)
|
|
|
|
{
|
|
|
|
$style=func_get_arg(1);
|
|
|
|
|
|
|
|
echo get_icon_html($name,$style);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
echo get_icon_html($name);
|
|
|
|
}
|
2016-08-31 01:30:50 +04:00
|
|
|
}
|
|
|
|
|
2017-02-23 19:01:16 +08:00
|
|
|
function get_badge_html()
|
2016-09-01 02:41:50 +04:00
|
|
|
{
|
2017-02-23 19:01:16 +08:00
|
|
|
$text=func_get_arg(0);
|
|
|
|
|
|
|
|
if(func_num_args()>1)
|
|
|
|
$style="badge badge-".func_get_arg(1);
|
|
|
|
else
|
|
|
|
$style="badge";
|
|
|
|
|
|
|
|
return '<span class="'.$style.'">'.$text.'</span>';
|
2016-09-01 02:41:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
function echo_badge($text)
|
|
|
|
{
|
|
|
|
echo get_badge_html($text);
|
|
|
|
}
|
|
|
|
|
2016-08-21 23:06:17 +04:00
|
|
|
function echo_alert($style,$text)
|
|
|
|
{
|
|
|
|
echo '<div class="alert alert-'.$style.'" role="alert">'.$text.'</div>';
|
|
|
|
}
|
2017-03-15 17:46:35 +08:00
|
|
|
|
2017-03-20 18:47:00 +08:00
|
|
|
function get_button_link($text,$style,$link)
|
|
|
|
{
|
|
|
|
return '<a href="'.$link.'" class="btn btn-'.$style.'" role="button">'.$text.'</a>';
|
|
|
|
}
|
|
|
|
|
2017-03-15 17:46:35 +08:00
|
|
|
function echo_button_link($text,$style,$link)
|
|
|
|
{
|
2017-03-20 18:47:00 +08:00
|
|
|
echo get_button_link($text,$style,$link);
|
2017-03-15 17:46:35 +08:00
|
|
|
}
|
2016-08-21 23:06:17 +04:00
|
|
|
?>
|