Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…eam6 into dev
  • Loading branch information
cqsg committed Mar 27, 2021
2 parents c6b5d7f + 68c3b3e commit 37885af
Show file tree
Hide file tree
Showing 7 changed files with 337 additions and 3 deletions.
48 changes: 48 additions & 0 deletions src/Message.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
class Message {
int user_id;
int sub_id;
String users;
Message(int user_id,int sub_id,String users) {
this.sub_id=sub_id;
this.user_id=user_id;
this.users=users;
}

public int getSub_id() {
return sub_id;
}

public int getUser_id() {
return user_id;
}

public void setSub_id(int sub_id) {
this.sub_id = sub_id;
}

public void setUser_id(int user_id) {
this.user_id = user_id;
}

public String getUsers() {
return users;
}

public void setUsers(String users) {
this.users = users;
}

public void handleMsg(int id) {
String temp="";
String[]ss = users.split(",");
for(int i=0;i<ss.length;i++)
{
if(!Integer.valueOf(id).toString().equals(ss[i])) {
temp += ss[i];
temp+=",";
}
}
temp=temp.substring(0,temp.length()-1);
users=temp;
}
}
51 changes: 51 additions & 0 deletions src/Subform.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Subform {
int id;
String title;
Date date;
List<Integer> user_list;
Subform(int id,String title,Date date,List user_list) {
this.id=id;
this.title=title;
this.date=date;
this.user_list=user_list;
}
Subform() {
this.user_list=new ArrayList<Integer>();
}

public void setId(int id) {
this.id = id;
}

public int getId() {
return id;
}

public List<Integer> getUser_list() {
return user_list;
}

public Date getDate() {
return date;
}

public String getTitle() {
return title;
}

public void setDate(Date date) {
this.date = date;
}

public void setTitle(String title) {
this.title = title;
}

public void setUser_list(List<Integer> user_list) {
this.user_list = user_list;
}
}
64 changes: 64 additions & 0 deletions src/User.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.Random;
public class User {
int id;
String user_name;
String password;
String role;
List<Integer> subform_list;
User(int id,String user_name,String password, String role,List list) {
this.id=id;
this.user_name=user_name;
this.password=password;
this.role=role;
this.subform_list=list;
}
User() {
subform_list=new ArrayList<Integer>();
}
public int getId() {
return id;
}

public List getSubform_list() {
return subform_list;
}

public String getPassword() {
return password;
}

public String getRole() {
return role;
}

public String getUser_name() {
return user_name;
}

public void setId(int id) {
this.id = id;
}

public void setSubform_list(List subform_list) {
this.subform_list = subform_list;
}

public void setPassword(String password) {
this.password = password;
}

public void setRole(String role) {
this.role = role;
}

public void setUser_name(String user_name) {
this.user_name = user_name;
}
public void addSubform(int id) {
this.subform_list.add(id);
}
}

65 changes: 65 additions & 0 deletions 原生html代码/login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
body {
text-align: center;
background-image: url(6.jpg);
}
.login{
width: 350px;
height: 370px;
background-color: white;
margin: 150px auto;
font-weight: 900;
border:1px #eee solid;
}
.top{
width:100%;
height: 50px;
background-color: white;
float: left;;
color: black;
text-align: center;
line-height: 50px;
}
.ref{
width: 280px;
height: 40px;
margin-top: 30px;
margin-left: 20px;
float: left;
text-align: center;
line-height: 40px;
}
#lg{
width: 100px;
height: 40px;
font-size: 12pt;
border:1px #eee solid;
}
#res{
width: 100px;
height: 40px;
font-size: 12pt;
margin-left: 30px;
border:1px #eee solid;
}
.button{
margin-top: 150px;
margin-left: 10px;
}
#input{
border: 1px solid #ccc;
padding: 7px 0px;
border-radius: 3px;
padding-left:5px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
}
#input:focus{
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
}

6 changes: 3 additions & 3 deletions 原生html代码/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
    <head>
        <meta charset="UTF-8">
        <title>登录</title>

        <link rel="stylesheet" type="text/css" href="login.css"/>
    </head>
    <body>
        <div class="login">
Expand All @@ -12,8 +12,8 @@
<div class="ref">密&nbsp;&nbsp;&nbsp;码:<input type="password" id="input"></div>
&nbsp;
<div class="button"><button id="lg">登&nbsp;&nbsp;&nbsp;录</button>
<button id="res">注&nbsp;&nbsp;&nbsp;册</button>

<a href="register.html"><button id="res">注&nbsp;&nbsp;&nbsp;册</button>
</a>
</div>
</div>
    </body>
Expand Down
88 changes: 88 additions & 0 deletions 原生html代码/register.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
body {
text-align: center;
background-image: url(6.jpg);
}
.login{
width: 350px;
height: 370px;
background-color: white;
margin: 150px auto;
font-weight: 900;
border:1px #eee solid;
}
.top{
width:100%;
height: 50px;
background-color: white;
float: left;;
color: black;
text-align: center;
line-height: 50px;
}
.ref{
width: 280px;
height: 40px;
margin-top: 20px;
margin-left: 25px;
float: left;
text-align: center;
line-height: 40px;
}
.refp{
width: 280px;
height: 40px;
margin-top: 20px;
margin-left: 25px;
letter-spacing: 5px;
float: left;
text-align: center;
line-height: 40px;
}
.re{
width: 280px;
height: 40px;
margin-top: 20px;
margin-left: 45px;
float: left;
text-align: center;
line-height: 40px;
}
#lg{
width: 100px;
height: 40px;
font-size: 12pt;
border:1px #eee solid;
}

.button{
margin-top: 300px;
margin-left: 10px;
}
#input{
border: 1px solid #ccc;
padding: 7px 0px;
border-radius: 3px;
padding-left:5px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
}
#input:focus{
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
}

.shortselect{
background:#fafdfe;
height:60px;
width:180px;
line-height:28px;
border:1px solid #9bc0dd;
-moz-border-radius:2px;
-webkit-border-radius:2px;
border-radius:2px;
}
18 changes: 18 additions & 0 deletions 原生html代码/register.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>注册</title>
        <link rel="stylesheet" type="text/css" href="register.css"/>
    </head>

    <body>
        <div class="login">
<div class="top"><p>注册</p></div>
<div class="ref"><p>用户名:<input type="text" id="input"></p></div>
<div class="refp"><p>密码:<input type="password" id="input"></p></div>

<div class="button"><button id="lg">确认注册</button></div>
</div>
    </body>
</html>

0 comments on commit 37885af

Please sign in to comment.