44 return !strncmp($haystack, $needle, strlen($needle)); |
44 return !strncmp($haystack, $needle, strlen($needle)); |
45 } |
45 } |
46 |
46 |
47 |
47 |
48 |
48 |
49 function build_header() |
49 function build_header($heading) |
50 { |
50 { |
51 $outstr = '<!DOCTYPE html>'.PHP_EOL; |
51 $outstr = '<!DOCTYPE html>'.PHP_EOL; |
52 $outstr .= '<html>'.PHP_EOL; |
52 $outstr .= '<html>'.PHP_EOL; |
53 $outstr .= ' <head>'.PHP_EOL; |
53 $outstr .= ' <head>'.PHP_EOL; |
54 $outstr .= ' <meta http-equiv="content-type" content="text/html; charset=utf-8" />'.PHP_EOL; |
54 $outstr .= ' <meta http-equiv="content-type" content="text/html; charset=utf-8" />'.PHP_EOL; |
55 $outstr .= ' <title>ThermFerm monitor</title>'.PHP_EOL; |
55 $outstr .= ' <title>'.$heading.'</title>'.PHP_EOL; |
56 $outstr .= ' <link type="text/css" href="css/style.css" rel="stylesheet" media="all" />'.PHP_EOL; |
56 $outstr .= ' <link type="text/css" href="css/style.css" rel="stylesheet" media="all" />'.PHP_EOL; |
57 $outstr .= ' </head>'.PHP_EOL; |
57 $outstr .= ' </head>'.PHP_EOL; |
58 $outstr .= ' <body class="default">'.PHP_EOL; |
58 $outstr .= ' <body class="default">'.PHP_EOL; |
59 $outstr .= ' <div id="jqxWidget">'.PHP_EOL; |
59 $outstr .= ' <div id="jqxWidget">'.PHP_EOL; |
60 $outstr .= ' <div id="header">'.PHP_EOL; |
60 $outstr .= ' <div id="header">'.PHP_EOL; |