-
Notifications
You must be signed in to change notification settings - Fork 0
/
mypage.php
97 lines (87 loc) · 4.05 KB
/
mypage.php
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
session_start();
include "db.php";
if(!isset($_SESSION['user_name'])) echo("<script>location.href='login.html';</script>");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>다모임</title>
<link rel='icon' type='images/png'href='img/logo.png'>
<link href="css/mypage_new.css" rel="stylesheet" type="text/css" />
<link href="css/all.css" rel="stylesheet" type="text/css" />
</head>
<body style="overflow-x:hidden;">
<div class="container2" style="float: left;">
<?php
$sql = "SELECT * FROM user WHERE id ='".$_SESSION['user_id']."'";
$result=mysqli_query($conn, $sql)or die(mysqli_error($conn));
$row=mysqli_fetch_array($result);
?>
<div class="box" style="background: #BDBDBD;"><img id="profile_img" src="<?php echo $row['img_path']?>"></div>
<h3 id="mypage_name" style="width: 100%;"><?php echo $row['name'];?></h3>
<div class="layout">
<img src="img/building.png" style="width: 10%; float: left; margin-right: 4%;">
<h3 id="mypage_school">미림여자정보과학고등학교</h3>
</div>
<div class="layout">
<img src="img/major.png" style="width: 10%; float: left; margin-right: 4%;">
<h3 id="mypage_hakgwa"><?php echo $row['major'];?></h3>
</div>
<div class="layout" style="margin-bottom: 10%;">
<img src="img/email.png" style="width: 10%; float: left; margin-right: 4%;">
<h3 id="mypage_email"><?php echo $row['email'];?></h3><br>
</div>
<div class="mypage_about_box">
<img src="img/quote02.png" style="width: 5%; float: left; margin-right: 4%;">
<p id="mypage_about"><?php echo $row['intro']?></p>
<img src="img/quote01.png" style="width: 5%; float: right; margin-left: 4%;">
</div>
<a href="mypage_edit.php" style="text-decoration: none;"><div class="edit" style="margin-top: 10%;">수정</div></a>
<div class="delete" onclick="location.href='profile_delete.php'">탈퇴</div>
</div>
<div class="group_list" style="float: left;">
<?php
$sql1 = "select COUNT(*) FROM study where member like'%|".$_SESSION['user_id']."|%'";
$sql = "select * FROM study where member like '%|".$_SESSION['user_id']."|%'";
$result1=mysqli_query($conn, $sql);
$cnt=mysqli_num_rows($result1);
if($cnt == 0){
?>
<img id="not_moim" src="img/not_moim.png">
<?php
}else{
while($row2 = mysqli_fetch_array($result1)){
?>
<figure class="group_about_box">
<img id="group_img" src="<?php echo $row2['img_path']; ?>">
<figcaption>
<br>
<h3 id="group_title"><?php echo $row2['title'];?></h3><br>
<p id="group_about"><?php echo $row2['intro'];?></p>
</figcaption>
<a href="group.php?title=<?php echo $row2['title'];?>"></a>
</figure>
<?php
}
}
?>
</div>
<!--하단 빈공간-->
<div class="footer"></div>
<!--상단메뉴-->
<div class="menu">
<a href="main.php"><img id="logo" src="img/logo.png"></a>
<h2>" 미림인이라면 다 모여라! "</h2>
<a href="mypage.php"><h3 id="mypage">마이페이지</h3></a>
<h3>|</h3>
<a href="group_lookup.php"><h3 id="lookup">그룹조회</h3></a>
<h3>|</h3>
<a href="group_create.php"><h3 id="create">그룹생성</h3></a>
<h3>|</h3>
<a href="stop.html"><h3 id="recommand">추천받기</h3></a>
</div>
<script type="text/javascript" src="js/mypage.js"></script>
</body>
</html>