This repository was archived by the owner on Jun 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.php
138 lines (111 loc) · 3.65 KB
/
account.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
require($_SERVER['DOCUMENT_ROOT'] . "/athome/product/link.php");
//require_once("/product/objects/user.php");
//Faux current user
//userModel::connectUser("[email protected]","coucou1bebe");
//echo('User session = ');
//var_dump($_SESSION['user']);
$current = unserialize($_SESSION['user']);
//Check
$error = false;
if(
empty($current->user_mail) ||
empty($current->user_firstname) ||
empty($current->user_name)
) {
$error = true;
header('Location: error.php');
//var_dump($current);
} else {
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ATHome - Compte</title>
<link rel="stylesheet" href="css/style.css"/>
<link rel="icon" type="image/png" href="res/icons/logo.ico" />
<script type="text/javascript" src="res/vendors/jquery.min.js"></script>
</head>
<body class="page-account">
<?php include('res/parts/nav.php'); ?>
<div class="profile">
<div class="preview" style="background-image: url(product/res/user/banner/<?php echo($current->img_banner); ?>);"></div>
<div class="customer" style="background-image: url(product/res/user/profil/<?php echo($current->img_present); ?>);">
</div>
</div>
<main class="block-main">
<div class="inner">
<div class="row">
<div class="box-info">
<h1><?php echo(ucfirst($current->user_firstname)); ?></h1>
<h2><?php echo(ucfirst($current->user_name)); ?></h2>
<div class="separator"></div>
<div class="inscription">
<img src="res/icons/ic_account_circle_green_24px.svg"/>
<p>Inscrite depuis le <?php echo($current->date_registration); ?></p>
</div>
<div class="livraison">
<img src="res/icons/ic_pin_drop_green_24px.svg"/>
<?php
if (!empty($current->adresse)){
echo('<p>1 adresse de livraison</p>');
} else {
echo('<p>aucune adresse de livraison</p>');
}
?>
</div>
<div class="cart">
<img src="res/icons/ic_shopping_cart_green_24px.svg"/>
<p>14 articles dans le panier</p>
</div>
</div>
<?php
$adresses = new Box('Adresse', "res/img/japan-2014618_1920.jpg" , Box::BOX_TYPE_LARGE);
$adresses->subtitle = 'Livraisons & cadeaux';
$adresses->link = '/adresses';
$adresses->setBackground(0,0,0);
echo($adresses->getOutput());
?>
</div>
<div class="row">
<?php
$command = new Box('Commandes', "res/img/truck-2591007_1920.jpg", Box::BOX_TYPE_LARGE);
$command->subtitle = 'Suivi & Historique';
$command->link = '/commands';
$command->setBackground(0,0,0);
echo($command->getOutput());
$paid = new Box('Paiement', "res/img/queen-937501_1920.jpg" , Box::BOX_TYPE_LARGE);
$paid->subtitle = 'Carte bancaire & Codes';
$paid->link = '/paid';
$paid->setBackground(0,0,0);
echo($paid->getOutput());
?>
</div>
<div class="row">
<?php
$cart = new Box('Panier', "res/img/basket-2246734_1920.jpg", Box::BOX_TYPE_LARGE);
$cart->subtitle = 'Promotions & Disponibilité';
$cart->link = '/cart';
$cart->setBackground(0,0,0);
echo($cart->getOutput());
$settings = new Box('Paramètres', "res/img/cup-of-coffee-1280537_1920.jpg" , Box::BOX_TYPE_LARGE);
$settings->subtitle = 'Compte & Confidentialité';
$settings->link = '/settings';
$settings->setBackground(0,0,0);
echo($settings->getOutput());
?>
</div>
<div class="row">
<?php
$disconnect = new Button('Deconnexion', 'disconnect.php');
echo($disconnect->getOutput());
?>
</div>
</div>
</main>
<?php include('res/parts/footer.php'); ?>
<script type="text/javascript" src="script/script.js"></script>
</body>
</html>