实验三-电子公文传输系统1-个人贡献

实验三-电子公文传输系统1-个人贡献

任务详情

  • 1 简述你完成的工作
  • 2 你们小组总共的代码行数,你贡献的代码行数?相关代码链接?
  • 3 你们小组总共的文档数?你贡献的文档数?相关链接?

主要处理完成的工作

  • 系统架构设计:整个系统的架构设计。需要确保系统架构满足项目需求。

  • 技术选型:项目需求和团队技术背景,选择合适的开发语言、框架、数据库等技术。考虑这些技术的成熟度、社区支持、学习曲线等因素。

  • 代码审查和优化:参与代码的编写,同时也需要进行代码审查,确保代码质量。对代码进行优化,提高代码的性能和可读性。

代码

index.php

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>登录</title>
  <style>
    body {
      background: url('https://www.besti.edu.cn/images/2023/10/20231020093646351_s.jpg') no-repeat;
       background-size: 103% auto;
  background-position: center center;
  background-repeat: no-repeat;
    }

    #login_box {
      width: 20%;
      height: 400px;
      background-color: #00000060;
      margin: auto;
      margin-top: 10%;
      text-align: center;
      border-radius: 10px;
      padding: 50px 50px;
    }

    h2 {
      color: #ffffff90;
      margin-top: 5%;
    }

    #input-box {
      margin-top: 5%;
    }

    span {
      color: #fff;
    }

    input {
      border: 0;
      width: 60%;
      font-size: 15px;
      color: #fff;
      background: transparent;
      border-bottom: 2px solid #fff;
      padding: 5px 10px;
      outline: none;
      margin-top: 10px;
    }

    button {
      margin-top: 50px;
      width: 60%;
      height: 30px;
      border-radius: 10px;
      border: 0;
      color: #fff;
      text-align: center;
      line-height: 30px;
      font-size: 15px;
      background-image: linear-gradient(to right, #30cfd0, #330867);
    }

    #sign_up {
      margin-top: 45%;
      margin-left: 60%;
    }

    a {
      color: #b94648;
    }
  </style>
</head>
<?php
if($_SERVER["HTTPS"] != "on") {
  header("HTTP/1.1 301 Moved Permanently");
  header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
  exit();
}
?>
<form action="compare.php" method="post"> 
	<div id="login_box"> 
		<h2>LOGIN</h2> 
		<div id="input_box"> <input type="text" name="username" placeholder="请输入用户名"> </div> 
		<div class="input_box"> <input type="password" name="password" placeholder="请输入密码"> </div> 
		<button type="submit">登录</button><br> </div> 
	</form>
</body>
</html>

document_exam.php

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>欢迎!</title>
    <!-- 引入字体图标 -->
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div class="navbar">
        <input type="checkbox" id="checkbox">
        <label for="checkbox">
            <i class="fa fa-bars" aria-hidden="true"></i>
        </label>
        <ul>
            <li>
                <img src="login.jpg" alt="">
                <span>欢迎您!<?php
					session_start(); 
if (isset($_SESSION['realname'])) {
    $realname = $_SESSION['realname'];
	$role=$_SESSION['role'];
    echo  $realname;
} else {
    echo "请先登录";
}
	?></span>
            </li>
            <li>
                <a href="welcome.php">
                    <i class="fa fa-home" aria-hidden="true"></i>
                    <span>后台首页</span>
                </a>
            </li>
            <li>
                <a href="Department_management.php">
                    <i class="fa fa-sitemap" aria-hidden="true"></i>
                    <span>部门管理</span>
                </a>
            </li>
            <li>
                <a href="user_management.php">
                    <i class="fa fa-user-circle-o" aria-hidden="true"></i>
                    <span>用户管理</span>
                </a>
            </li>
            <li>
                <a href="Document_mine.php">
                    <i class="fa fa-shopping-bag" aria-hidden="true"></i>
                    <span>公文处理</span>
                </a>
            </li>
            <li>
                <a href="index.php">
                    <i class="fa fa-shopping-bag" aria-hidden="true"></i>
                    <span>退出登录</span>
                </a>
            </li>
        </ul>
        <div class="main">
           <nav class="horizontal-nav">
			<a href="Document_mine.php" class="nav-link">我的&nbsp&nbsp&nbsp&nbsp</a>
			<a href="Document_exam.php" class="nav-link">审批&nbsp&nbsp&nbsp&nbsp</a>
			<a href="Document_write.php" class="nav-link">草拟&nbsp&nbsp&nbsp&nbsp</a>
			<a href="#" class="nav-link">归档</a>
		</nav>
        </div>
    </div>
	<nav class="under-horizontal-nav">
			<?php
session_start(); // 启动会话

// 替换以下变量为你的数据库连接信息
$servername = "localhost";
$username = "root";
$password = "liu12345";
$dbname = "csv_db";

// 创建数据库连接
$conn = new mysqli($servername, $username, $password, $dbname);

// 检查连接是否成功
if ($conn->connect_error) {
    die("数据库连接失败: " . $conn->connect_error);
}

// 获取当前用户
if (isset($_SESSION['realname'])) {
    $currentUser = $_SESSION['realname'];

    // 查询数据库以获取接收者为当前用户、文件状态为未读的文件
    $sql = "SELECT * FROM t_files WHERE 接受者 = '$currentUser' AND 文件状态 = '未读'";
    $result = $conn->query($sql);

    if ($result->num_rows > 0) {
        // 输出表头
        echo "<table border='1'>
                <tr>
                    <th>文件名</th>
                    <th>发送者</th>
                    <th>状态</th>
					<th>密级</th>
                    <th>操作</th>
					<th>时间</th>
                </tr>";

        // 输出数据
        while ($row = $result->fetch_assoc()) {
			$file=$row["文件名"];
            echo "<tr>
                    <td>" . $row["文件名"] . "</td>
                    <td>" . $row["发送者"] . "</td>
                    <td>" . $row["文件状态"] . "</td>
					<td>" . $row["密级"] . "</td>
                    <td><a href='upload/$file' download>下载</a>
					<a href='update_status.php?file=$file&status=已读'>已读</a> |
                                <a href='update_status.php?file=$file&status=退回'>退回</a>
					</td>
					<td>" . $row["时间"] . "</td>
                  </tr>";
        }

        // 输出表尾
        echo "</table>";
    } else {
        echo "没有未读文件";
    }
} else {
    echo "请先登录";
}

// 关闭数据库连接
$conn->close();
?>

		</nav>
</body>

</html>

小组代码总行数:1384行。个人代码总行数233行,占比16.83%

个人文档

小组代码文档(26)

C:.
|   mycert.crt
|   mycert.pem
|   mycsr.csr
|   mykey.key
|
+---数据库
|       csv_db.sql
|
+---网站
|   \---JR
|       |   compare.php
|       |   Department_management.php
|       |   Document_exam.php
|       |   Document_mine.php
|       |   Document_write.php
|       |   index.php
|       |   login.jpg
|       |   lose.html
|       |   style.css
|       |   update_status.php
|       |   upload.php
|       |   user_management.php
|       |   welcome.php
|       |
|       \---upload
|               20211120刘钟徽函.docx
|               20231027.pdf
|               twofish-analysis-shiho.pdf
|               vulkan-1.dll
|
\---证书
        mycert.crt
        mycert.pem
        mycsr.csr
        mykey.key

我的代码文档:
document_exam.php
index.php

小组前期设计文档: (10)
https://gitee.com/diana_sugar/electronic-document-system
在这里插入图片描述

贡献文档:

规格需求说明书.pdf
规格需求说明书(2).md

小组博客总数 12

贡献博客:

https://www.cnblogs.com/bjdzkjxy/articles/17810895.html
https://www.cnblogs.com/bjdzkjxy/articles/17780783.html
https://www.cnblogs.com/bjdzkjxy/articles/17827393.html
https://www.cnblogs.com/bjdzkjxy/articles/17857668.html
https://www.cnblogs.com/bjdzkjxy/articles/17861936.html

小组文档总数:48 个人贡献:14

posted @ 2023-12-17 11:57  20211106隋吉达  阅读(27)  评论(0)    收藏  举报