-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.php
90 lines (76 loc) · 3.26 KB
/
user.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
<?php//uSING SESSION
session_start(); ?>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>TumarShop(Client)</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<header>
<nav style="background-color: yellowgreen" class="site-header sticky-top py-1">
<div class="container d-flex flex-column flex-md-row justify-content-between">
<a class="py-2" href="#">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="d-block mx-auto"><circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line></svg>
</a>
<a class="py-2 d-none d-md-inline-block" href="#">TumarShop</a>
<line x1="9.69" y1="8" x2="21.17" y2="8"></line><a class="py-2 d-none d-md-inline-block" href="">Корзина</a>
<a class="py-2 d-none d-md-inline-block" href="#">Аккаунт</a>
<a class="py-2 d-none d-md-inline-block" href="out.php">Выход</a>
<?php
//SESSION
session_start();
if(isset($_SESSION['name'])) {
echo '<a class="btn btn" style="background-color:red;color:white" >'.$_SESSION["name"].'</a>';}
else{header("Location:in.php");}
?>
</div>
</nav>
</header>
<main role="main">
<section class="jumbotron text-center">
<div class="container">
<h1 class="jumbotron-heading">Tumar Football Shop</h1>
<p class="lead text-muted"></p>
<p>
<a href="#" class="btn btn-primary my-2">Let's Start</a>
</p>
</div>
</section>
<div class="album py-5 bg-light">
<nav class="nav flex-column">
<a class="nav-link active" href="balls.php">Balls</a>
<a class="nav-link" href="kits.php">Kits</a>
<a class="nav-link" href="tss.php">Training Suit</a>
</nav>
<div class="container-fluid" >
<?php
require_once "pdo.php";
$stmt = $pdo->query("SELECT * FROM shop limit 3");
?>
<div class="col-sm-4">
<?php
while ($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
echo '<div class="col-md-4">';
echo '<p class="datenews">' . $row['name'] . '<br /></p>'; ?>
<img src="<?= $row['img'] ?>" width="135"> <br><br>
<h4><?= $row['price'] ?> TG</h4>
<p><?= $row['comment'] ?></p>
<a type="submit" href="korzina.php"><i>Send to</i></a>
<?php
echo '</div>';
}
?>
</div></div></main>
<footer class="text-muted" style="background-color: yellowgreen">
<div class="container">
<p class="float-right">
<a href="#">Back to top</a></p>
<p>TumarShop©The best football shop!</p>
<p>Be ONE of the BESTS <a href="#"></a></p>
</div>
</footer>
</body>
</html>