code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!doctype html>
<html>
<head>
<title>Victim</title>
<meta charset="utf-8">
<link href="./style.css?after" rel="stylesheet" type="text/css">

</head>
<body>
<div class="header">
<?php
if($_SESSION['is_signin'] != 'y')
{
//$_SESSION['is_signin'] = 'n';
echo "로그인 해주세요.<br>";
echo "Unknown님 로그인이 되어 있지 않습니다.";
$_SESSION['member_idx'] = 0;
}
else
{
echo $_SESSION["user_id"]."님, 로그인 되었습니다.";
echo "<br>";
}
?>
</div>
<div class="content">
<div class=IndexDivStyle>
<a href="signin.php" class="btn">Login</a>
</div>

<?php
if($_SESSION['is_signin'] == 'y')
{
echo '
<div class=IndexDivStyle>
<a href="http://'.$_SERVER['HTTP_HOST'].'/logout.php" class="btn">Logout</a>
</div>
';
}
?>

<div class=IndexDivStyle>
<a href="signup.php" class="btn">Register</a>
</div>

<div class=IndexDivStyle>
<a href="write.php" class="btn">Write</a>
</div>

<div class=IndexDivStyle>
<a href="list.php" class="btn">List</a>
</div>

<br><br><br><br>