修改了页面的布局,把green_house页面也做了相应的修改

This commit is contained in:
chang 2023-10-26 17:00:37 +08:00
parent daea54f40f
commit e559f8926e
6 changed files with 215 additions and 54 deletions

11
cgi-bin/hello.c Normal file
View File

@ -0,0 +1,11 @@
#include <stdio.h>
int main(int argc, char const* argv[]) {
for (int i = 1; i < 3; i++) {
for (int j = 1; j <= i; j++) {
twoNumAdd(i, j); // help.c的外部函数
// _show_sum(i, j, i + j);
// 不能调用它是static函数是help.c的内部函数
}
}
return 0;
}

View File

@ -13,7 +13,7 @@
<input name="name" placeholder="请输入账号">
</div>
<div class="row">
<input name="password" type="password" placeholder="请输入密码">
<input name="password" placeholder="请输入密码">
</div>
<div class="row center">
<button>确认</button>
@ -23,9 +23,22 @@
</body>
<script>
function login(form) {
// let login_data = {
// name: form.name.value.trim(),
// password: form.password.value.trim()
let name = form.name.value.trim();
let password = form.password.value.trim();
if (name == "" || password == "") {
alert("账号或密码不能为空");
return false;
}
let login_data = {
name: form.name.value.trim(),
password: form.password.value.trim()
name: name,
password: password
};
fetch("../cgi-bin/sqlite_cgi_insert_base.cgi", {
method: "POST",

View File

@ -6,9 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
/* * {
margin: 0;
padding: 0;
} */
iframe {
border: none;
}
html,
@ -21,16 +25,51 @@
width: 100%;
height: 100%;
}
#main {
height: 100%;
display: flex;
flex-direction: column;
background-color: lightcyan;
}
#menu {
text-align: center;
width: 100%;
/* border-right: 5px solid lightgray; */
border-width: 10px;
padding: 30px;
}
#menu>a:hover {
/* color: blue; */
color: white;
/* background-color: aquamarine; */
background-color: dimgray;
border-radius: 5px;
border-top-right-radius: 30px;
border-bottom-right-radius: 30px;
border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
}
</style>
</head>
<body>
<div id="main">
<div id="menu">
<a href="hemp_hum_first_info.html" target="content_frame1" class="menu_item">大棚1</a>
<a href="hemp_hum_second2_info.html" target="content_frame1" class="menu_item">大棚2</a>
<a href="hemp_hum_first_info.html" target="content_frame" class="menu_item">大棚一号</a>
<a href="hemp_hum_second2_info.html" target="content_frame" class="menu_item">大棚二号</a>
</div>
<div id="content" style="width: 100%;">
<iframe name="content_frame" width="100%" height="100%"></iframe>
</div>
</div>
<div class="content">
<iframe name="content_frame1" width="100%" height="100%"></iframe>
<iframe name="content_frame1" width="100%" height="100%" scrolling="No" border="none "></iframe>
</div>
</body>

View File

@ -61,7 +61,11 @@
border-radius: .3em;
text-align: center;
margin: 5px 10px;
float: right
float: left
}
.active_2 {
float: right;
}
.active_1 {
@ -73,9 +77,12 @@
border-radius: .3em;
text-align: center;
margin: 5px 10px;
float: center
}
.main {
height: 280px;
display: flex;
@ -86,7 +93,7 @@
width: 180px;
height: 280px;
border: 1px solid #ccc;
border-radius: 1.5em
border-radius: 10%
}
.wrap input {
@ -147,26 +154,25 @@
<script type="text/javascript" src="Arg_data.js"></script>
<body onload="init_getdata()">
<div class="schmenu">
<!-- <div class="schmenu">
<ul>
<li><a href="#top">返回首页</a></li>
<li><a onclick="on_button_show()">刷新</a></li>
<li><a onclick="historical_data()" target="_self">历史数据</a></li>
<!-- <li><a id="Refresh_auto" onclick="on_button_auto()">无刷新</a></li> -->
<li><a href="" target="_self">请打赏</a></li>
</ul>
</div>
<br><br><br>
<li><a id="Refresh_auto" onclick="on_button_auto()">无刷新</a></li> -->
<!-- <li><a href="" target="_self">请打赏</a></li> -->
<!-- </ul> -->
<!-- </div> -->
<!-- <br><br><br> -->
<h1 style="text-align:center;">智能大棚控制系统111
</h1>
<style type="text/css">
.schmenu {
height: 33px;
line-height: 33px;
background: #2c56a3;
opacity: 0.8;
width: 100%;
width: auto;
margin: 0 auto;
overflow: hidden;
cursor: pointer;
@ -208,7 +214,7 @@
}
</style>
<input type="button" class="active" value="注销" onclick="cancellation()" />
<div class="container">
<p class="title">
<input type="button" class="data1" value="历史数据" onclick="historical_data()" />
@ -277,9 +283,12 @@
<br>
<br>
<br>
<th align="center">
<th style="display: inline-block;">
<input type="button" class="active_1" value="保存配置" onclick="on_button_seve()" />
<!-- <input type="button" class="active" value="注销" onclick="cancellation()" /> -->
</th>
</div>
<div class="right">
<h6>
@ -330,6 +339,16 @@
</th>
</p>
<!-- <br>
<br>
<br>
<br>
<br> -->
<!-- <th style="display: inline-block;">
<input type="button" class="active_1" value="保存配置" onclick="on_button_seve()" /> -->
<!-- <input type="button" class="active active_2" value="注销" onclick="cancellation()" /> -->
<!-- </th> -->
</div>

View File

@ -1,24 +1,103 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="UTF-8">
<title>主页面</title>
<meta charset="utf-8">
<meta name="author" content="zifan">
<meta name="keywords" content="物联网">
<title>主页</title>
<style>
* {
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.container {
width: 100%;
#top {
height: 50px;
background-color: lightblue;
}
#foot {
height: 40px;
background-color: lightblue;
}
#main {
height: 100%;
display: flex;
flex-direction: row;
background-color: lightcyan;
}
#top {
display: flex;
flex-direction: row;
justify-content: space-between;
justify-items: center;
align-items: center;
padding: 5px;
border-bottom: 1px solid lightgray;
}
#logo>img {
width: 180px;
height: 45px;
}
#foot {
border-top: 1px solid lightgray;
padding: 10px 0;
}
#menu {
width: 300px;
border-right: 1px solid lightgray;
padding: 20px;
}
iframe {
outline: none;
border: none;
}
#menu,
.menu_item {
list-style: none;
margin: 0;
}
.menu_item {
margin: 10px;
}
#menu>a {
display: block;
text-decoration: none;
color: black;
padding: 10px 20px;
width: 80%;
}
#menu>a:hover {
/* color: blue; */
color: white;
/* background-color: aquamarine; */
background-color: dimgray;
border-radius: 5px;
border-top-right-radius: 30px;
border-bottom-right-radius: 30px;
border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
}
</style>
</head>
@ -32,20 +111,19 @@
<span class="logout" onclick="logout()">[登出]</span>
</div>
</div>
</div>
<div id="main">
<div id="menu">
<h3>功能</h3>
<a href="green_house_info.html" target="content_frame" class="menu_item">大棚</a>
<a href="record_of_operations_history.html" target="content_frame" class="menu_item">历史操作</a>
</div>
<div class="container">
<iframe name="content_frame" id="info-frame" width="100%" height="100%"></iframe>
<div id="content" style="width: 100%;">
<iframe name="content_frame" width="100%" height="100%" scrolling="No"></iframe>
</div>
</div>
<div id="foot" style="text-align: botton;">
<div id="foot" style="text-align: center;">
<b>版本所有@FLY-NOOB</b>
</div>
</body>
<script>
window.onload = function () {
if (localStorage.getItem("login_user") == null) {
@ -61,5 +139,6 @@
open("/login.html", "_self");
}
</script>
</body>
</html>

Binary file not shown.