-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserpage.php
More file actions
84 lines (72 loc) · 3.31 KB
/
userpage.php
File metadata and controls
84 lines (72 loc) · 3.31 KB
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
<?php
// セッション
session_start();
// データベースマネージャの読込
require_once "./php/DBManager.php";
$db = new DBManager();
$db->OutPutlog();
$result = $db->getUser($_GET['id']);
if (!$result) {
http_response_code(404);
include("./404.php");
exit;
}
$prjlist = $db->getProjectsByUserid($_GET['id']);
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="./img/favicon.ico">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/trix@2.0.4/dist/trix.css">
<link rel="stylesheet" href="css/trix_overwrite.css">
<title>プチコン3号作品倉庫 - <?php echo $result['user_name'] ?>のページ</title>
</head>
<body>
<?php require './php/nav.php'; ?>
<div class="container-fluid">
<div class="row p-1">
<div class="col-sm-12 col-md-8">
<div class="section">
<h1><?php echo $result['user_name'] ?>のページ</h1>
<h2>概要</h2>
<div class="trix-content">
<?php echo htmlspecialchars_decode($result['user_description'], ENT_QUOTES) ?>
</div>
<h2>投稿記事</h2>
<div class="row row-cols-1 row-cols-md-3 g-1">
<?php
foreach ($prjlist as $key) {
echo "<div class='col'>";
echo "<a class='cardtext' href='./project.php?id=".$key["project_id"]."'>";
echo '<div class="card">';
if (file_exists("./img/projectimg/".(int)$key['project_id']."/img0.png")) {
echo '<img src="./img/projectimg/'.(int)$key['project_id'].'/img0.png" class="card-img-top" alt="image">';
} else {
echo '<img src="./img/noimg.png" class="card-img-top" alt="No IMG">';
}
echo '<div class="card-body">';
echo '<h5 class="card-title">'.$key['project_name'].'</h5>';
echo "<p class='card-text cardlinelimit'>".strip_tags($key['project_description'])."</p>";
echo '</div>';
echo '</div>';
echo "</a>";
echo '</div>';
}
?>
</div>
</div>
</div>
<?php require './php/prjlist.php'; ?>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</body>
</html>