-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
executable file
·127 lines (114 loc) · 3.01 KB
/
profile.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
<?php
$html = file_get_contents('profile.html');
if (!isset($_POST['submit']))
{
$html = str_replace("{FORM}", "", $html);
$html = str_replace("{PROFILE}", "hidden", $html);
}
else
{
$html = str_replace("{FORM}", "hidden", $html);
$html = str_replace("{PROFILE}", "", $html);
// Login
if (!empty($login = $_POST['login']))
{
$html = str_replace("{LOGIN}", $login, $html);
$html = str_replace("{NAME}", ", ".$login, $html);
$html = str_replace("{PRINT_LOGIN}", "", $html);
}
else
{
$html = str_replace("{LOGIN}", "", $html);
$html = str_replace("{NAME}", "", $html);
$html = str_replace("{PRINT_LOGIN}", "hidden", $html);
}
// Age
if (!empty($age = $_POST['age']))
{
$html = str_replace("{AGE}", $age, $html);
$html = str_replace("{PRINT_AGE}", "", $html);
}
else
{
$html = str_replace("{AGE}", "", $html);
$html = str_replace("{PRINT_AGE}", "hidden", $html);
}
// Address
if (!empty($address = $_POST['address']))
{
$html = str_replace("{ADDRESS}", $address, $html);
$html = str_replace("{PRINT_ADDRESS}", "", $html);
}
else
{
$html = str_replace("{ADDRESS}", "", $html);
$html = str_replace("{PRINT_ADDRESS}", "hidden", $html);
}
// Phone
if (!empty($phone = $_POST['phone']))
{
$html = str_replace("{PHONE}", $phone, $html);
$html = str_replace("{PRINT_PHONE}", "", $html);
}
else
{
$html = str_replace("{PHONE}", "", $html);
$html = str_replace("{PRINT_PHONE}", "hidden", $html);
}
// Email
if (!empty($email = $_POST['email']))
{
$html = str_replace("{EMAIL}", $email, $html);
$html = str_replace("{PRINT_EMAIL}", "", $html);
}
else
{
$html = str_replace("{EMAIL}", "", $html);
$html = str_replace("{PRINT_EMAIL}", "hidden", $html);
}
// Genres
if (!empty($genres = $_POST['genres']))
{
$html = str_replace("{GENRES}", $genres, $html);
$html = str_replace("{PRINT_GENRES}", "", $html);
}
else
{
$html = str_replace("{GENRES}", "", $html);
$html = str_replace("{PRINT_GENRES}", "hidden", $html);
}
// Authors
if (!empty($authors = $_POST['authors']))
{
$html = str_replace("{AUTHORS}", $authors, $html);
$html = str_replace("{PRINT_AUTHORS}", "", $html);
}
else
{
$html = str_replace("{AUTHORS}", "", $html);
$html = str_replace("{PRINT_AUTHORS}", "hidden", $html);
}
// Books
if (!empty($books = $_POST['books']))
{
$html = str_replace("{BOOKS}", $books, $html);
$html = str_replace("{PRINT_BOOKS}", "", $html);
}
else
{
$html = str_replace("{BOOKS}", "", $html);
$html = str_replace("{PRINT_BOOKS}", "hidden", $html);
}
// News
if (!empty($news = $_POST['news']))
{
$html = str_replace("{NEWS}", $news, $html);
$html = str_replace("{PRINT_NEWS}", "", $html);
}
else
{
$html = str_replace("{NEWS}", "", $html);
$html = str_replace("{PRINT_NEWS}", "hidden", $html);
}
}
echo $html;