본문 바로가기
JSP

JSP(지역구의원투표소프로그램)_2024-09-12

by 앵보몬 2024. 9. 13.
728x90
반응형

voting.zip
4.65MB

 

DB

--1.투표이력테이블 명세서
CREATE TABLE TBL_VOTE_202005 (
    V_JUMIN CHAR(13) PRIMARY KEY,
    V_NAME VARCHAR2(20),
    M_NO CHAR(1),
    V_TIME CHAR(4),
    V_AREA CHAR(20),
    V_CONFIRM CHAR(1)
    );
   
--2.후보자테이블 명세서
CREATE TABLE TBL_MEMBER_202005 (
    M_NO CHAR(1) PRIMARY KEY,
    M_NAME VARCHAR2(20),
    P_CODE CHAR(2),
    P_SCHOOL CHAR(1),
    M_JUMIN CHAR(13),
    M_CITY VARCHAR2(20)
    );
   
   
--3.정당코드테이블 명세서
CREATE TABLE TBL_PARTY_202005 (
    P_CODE CHAR(2) PRIMARY KEY,
    P_NAME VARCHAR2(20),
    P_INDATE DATE,
    P_READER VARCHAR2(20),
    P_TEL1 CHAR(3),
    P_TEL2 CHAR(4),
    P_TEL3 CHAR(4)
    );
   

--1.투표이력테이블(TBL_VOTE_202005)
insert into TBL_VOTE_202005 values('99010110001', '김유권', '1', '0930', '제1투표장', 'N');
insert into TBL_VOTE_202005 values('89010120002', '이유권', '2', '0930', '제1투표장', 'N');
insert into TBL_VOTE_202005 values('69010110003', '박유권', '3', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('59010120004', '홍유권', '4', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('79010110005', '조유권', '5', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('89010120006', '최유권', '1', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('59010110007', '지유권', '1', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('49010120008', '장유권', '3', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('79010110009', '정유권', '3', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('89010120010', '강유권', '4', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('99010110011', '신유권', '5', '0930', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('79010120012', '오유권', '1', '1330', '제1투표장', 'Y');
insert into TBL_VOTE_202005 values('69010110013', '현유권', '4', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('89010110014', '왕유권', '2', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('99010110015', '유유권', '3', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('79010110016', '한유권', '2', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('89010110017', '문유권', '4', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('99010110018', '양유권', '2', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('99010110019', '구유권', '4', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('79010110020', '황유권', '5', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('69010110021', '배유권', '3', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('79010110022', '전유권', '3', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('99010110023', '고유권', '1', '1330', '제2투표장', 'Y');
insert into TBL_VOTE_202005 values('59010110024', '권유권', '3', '1330', '제2투표장', 'Y');



--2.후보자테이블(TBL_MEMBER_202005)
insert into TBL_MEMBER_202005 values('1', '김후보', 'P1', '1', '6603011999991', '수선화동');
insert into TBL_MEMBER_202005 values('2', '이후보', 'P2', '3', '5503011999992', '민들래동');
insert into TBL_MEMBER_202005 values('3', '박후보', 'P3', '2', '7703011999993', '나팔꽃동');
insert into TBL_MEMBER_202005 values('4', '조후보', 'P4', '2', '8803011999994', '진달래동');
insert into TBL_MEMBER_202005 values('5', '최후보', 'P5', '3', '9903011999995', '개나리동');


--3.정당코드테이블(TBL_PARTY_202005)
insert into TBL_PARTY_202005 values('P1', 'A정당', '2010-01-01', '위대표', '02', '1111', '0001');
insert into TBL_PARTY_202005 values('P2', 'B정당', '2010-02-01', '명대표', '02', '1111', '0002');
insert into TBL_PARTY_202005 values('P3', 'C정당', '2010-03-01', '기대표', '02', '1111', '0003');
insert into TBL_PARTY_202005 values('P4', 'D정당', '2010-04-01', '옥대표', '02', '1111', '0004');
insert into TBL_PARTY_202005 values('P5', 'E정당', '2010-05-01', '임대표', '02', '1111', '0005');


SELECT * FROM TBL_VOTE_202005;
SELECT * FROM TBL_MEMBER_202005;
SELECT * FROM TBL_PARTY_202005;


--drop table TBL_VOTE_202005;
--drop table TBL_MEMBER_202005;
--drop table TBL_PARTY_202005;
commit;

 

vote.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>지역구의원투표 프로그램</title>
 <link rel="stylesheet" href="style.css" />
</head>
<body>

  <header>지역구의원투표 프로그램 ver 2020-05</header>

  <nav>
    <a href="index.jsp">Home</a>
    <a href="search.jsp">후보조회</a>
    <a href="voteMember.jsp">투표하기</a>
    <a href="member.jsp">투표검수조회</a>
    <a href="list.jsp">후보자등수</a>
  </nav>

  <section class="main-section">
    <h2>과정평가형 자격 CBQ</h2>
    <p>무언가의 내용이 들어 있음<br>
    내용<br>
    내용<br>
    내용<br>
    내용<br>
    </p>
  </section>

  <footer>HRDKOREAⓒopyright 2023 All rights reserved. Human Resources Development Service of Korea</footer>

</body>
</html>

 

styles.css

@charset "UTF-8";
  body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f4f4f4;
    }
   
    h2 {
    text-align: center;
    font-weight: bolder;
        text-shadow: 1px 1px darkgray;
  }

    /* Header styling */
    header {
      position: fixed;
      top: 0;
      width: 100%;
      height: 80px;
      background-color: dimgray;
      color: white;
      line-height: 80px;
      text-align: center;
      font-size: 28px;
      font-weight: bolder;
      text-shadow: 1px 1px darkgray;
    }

    /* Navigation styling */
    nav {
      position: fixed;
      top: 80px;
      width: 100%;
      height: 40px;
      background-color: #333;
      color: white;
      line-height: 40px;
      padding: 0 20px;
      display: flex;
      align-items: stretch;
      font-weight: bolder;
    }

    nav a {
      text-decoration: none;
      color: inherit;
      padding: 0 15px;
      transition: background-color 0.3s ease;
    }

    nav a:hover {
      background-color: darkgray;
    }

    .main-section {
      padding-top: 120px;
      padding: 20px;
      background-color: white;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }
   
    .main-section {
    margin:0 auto;
    margin-top:150px;
      width: 50%;
  }

    /* Footer styling */
    footer {
      position: fixed;
      bottom: 0;
      width: 100%;
      height: 50px;
      background-color: #333;
      color: white;
      text-align: center;
      line-height: 50px;
      font-size: 15px;
      font-weight: bolder;
    }
   
    table {
    width: 70%;
    text-align: center;
    margin: 0 auto;
  }
 
  table, th, td {
    border: 1px solid black;
  }
 
  footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 50px;
  }

 

728x90
반응형