-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.php
More file actions
84 lines (76 loc) · 3.46 KB
/
Copy pathedit.php
File metadata and controls
84 lines (76 loc) · 3.46 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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Николай Стрижаченко: Редактор</title>
<meta name="description" content="Николай Стрижаченко, Личная страничка">
<meta name="Keywords" content="Николай Стрижаченко, Личная страничка">
<link rel="shortcut icon" href="./img/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1><a href="." title="Личная страница" alt="Личная страница">Личная страница</a></h1>
<h2><a href="." title="Личная страница" alt="Личная страница">Николая Стрижаченко</a></h2>
<nav>
</nav>
</header>
<content>
<main>
<aside>
<ul>
<li><a href=".">Главная</a></li>
<li><a href="about.php">Обо мне</a></li>
<li><a href="guestbook.php">Гостевая книга</a></li>
<li><a href="interests.php">Мои интересы</a></li>
<li><a href="information.php">Полезное</a></li>
<li><a href="contacts.php">Почта</a></li>
</ul>
</aside>
<h3>Редактор</h3>
<?php
include 'inc.php';
$isConn = MyIsConnDB();
if ($isConn != '') {
echo $isConn;
} else {
// блок записи в БД
if (isset($_POST["password"])) {
if ($_POST["password"] == MyPW()) {
MySaveBDSQL();
} else {
echo "<p style=\"margin-left:250px;color:red;\">У Вас нет прав доступа на редактирование записей.<br /><br />"
."Возможно, Вы ошиблись при вводе пароля.<br />"
."Пожалуйста, повторите ввод пароля.</p>";
}
}
?>
<FORM ACTION="edit.php" METHOD="POST">
<table style="font-size:14px;margin:10px;padding:10px;border:1px gray solid;margin-left:230px;">
<tr style="font-size:12px;margin:10px;padding:10px;"><td>Обо мне:</td>
<td><?php echo '<textarea class="ViewEdit" name="msg1" cols=50 rows=10>'.trim(MyReadBDSQL(2), "\x00..\x1F"); ?></textarea></td></tr>
<tr style="font-size:12px;margin:10px;padding:10px;"><td>Мои интересы:</td>
<td><?php echo '<textarea class="ViewEdit" name="msg2" cols=50 rows=10>'.trim(MyReadBDSQL(3), "\x00..\x1F"); ?></textarea></td></tr>
<tr style="font-size:12px;margin:10px;padding:10px;"><td>Полезное:</td>
<td><?php echo '<textarea class="ViewEdit" name="msg3" cols=50 rows=10>'.trim(MyReadBDSQL(4), "\x00..\x1F"); ?></textarea></td></tr>
<tr style="font-size:12px;margin:10px;padding:10px;"><td>Почта:</td>
<td><?php echo '<textarea class="ViewEdit" name="msg4" cols=50 rows=10>'.trim(MyReadBDSQL(5), "\x00..\x1F"); ?></textarea></td></tr>
<tr style="font-size:12px;margin:10px;padding:10px;"><td> </td>
<td style="text-align:right;">Пароль:
<input style="width:30px;" type="password" name="password" value="Пароль" title="Укажите пароль" />
<input style="cursor:pointer;" type="submit" value=" Отредактировать " title="Отредактируйте записи" />
</td>
</tr>
</table>
</FORM>
<br /><br /><br /><br /><br />
<?php } ?>
</main>
</content>
<footer>
<a href="edit.php">Редактор</a>
<h6>© 2022 Saint-Petersburg, Alexey Subbotin<br />
alesu1543@gmail.com</h6>
</footer>
</body>
</html>