안효원 안효원 2021-07-31
로그인 문구 추가
@35c42dfa42d9e4046d4d7a10965ad167c549e567
config/select.php
--- config/select.php
+++ config/select.php
@@ -52,3 +52,5 @@
 }
 $total_block = ceil($total_page / $block_cnt);          //총 블록 수
 
+//$querySelectID = "select "
+
main.php
--- main.php
+++ main.php
@@ -19,7 +19,7 @@
 if (!isset($_SESSION['is_login'])){
     echo "<script>alert('Need Login')</script>";
     header('Location:index.php');
-}
+}else{
 ?>
 <!doctype html>
 <html lang="ko">
@@ -39,6 +39,7 @@
         #title {text-align: center;}
         #refresh {text-decoration:none; color: black;}
         #logoutSector {text-align: right;}
+        #welcome {color: green; float: left; font-weight: bolder;}
         #btnLogout {height: 30px; font-weight: bolder; background-color: darkslategrey; border-style: none; color: white;}
         #btnLogout:hover {background-color: black;}
         #hr {border-style: solid;}
@@ -66,6 +67,7 @@
 <div id="page">
     <div id="title" title="Refresh"><h1><a href="main.php" id="refresh">Notice Board</a></h1></div>
     <div id="logoutSector">
+        <span id="welcome"><?php echo "Welcome, " . "<em>" . $_SESSION['id'] . "</em>" . " !"; ?></span>
         <button id="btnLogout" onclick="location.href='config/logout.php'">Logout</button>
     </div>
     <hr id="hr">
@@ -200,4 +202,6 @@
     </div>
 </div>
 </body>
-</html>
(No newline at end of file)
+</html>
+<?php
+}
(No newline at end of file)
Add a comment
List