65 lines
3.5 KiB
Plaintext
65 lines
3.5 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Nubes | Личный кабинет (Демо)</title>
|
|
<link rel="icon" href="https://nubes.ru/themes/custom/nubes/images/nubes-ico.svg" type="image/svg+xml">
|
|
<style>
|
|
body { font-family: 'Segoe UI', Tahoma, sans-serif; margin: 0; padding: 40px; background: #f4f6f9; }
|
|
.box { background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); max-width: 850px; margin: auto; }
|
|
.header { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #005bff; padding-bottom: 20px; margin-bottom: 30px; }
|
|
.logo { height: 45px; }
|
|
table { width: 100%; border-collapse: collapse; }
|
|
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #edf0f2; }
|
|
th { background: #fafbfc; color: #7f8c8d; font-size: 0.85em; text-transform: uppercase; }
|
|
.btn { cursor: pointer; padding: 8px 16px; border: none; border-radius: 6px; color: #fff; font-weight: 500; }
|
|
.btn-add { background: #005bff; }
|
|
.btn-upd { background: #27ae60; }
|
|
.btn-del { background: #e74c3c; }
|
|
.input-main { padding: 12px; border: 1px solid #d1d9e0; border-radius: 6px; width: 100%; box-sizing: border-box; }
|
|
.input-inline { padding: 8px; border: 1px solid #eee; border-radius: 4px; width: 85%; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="box">
|
|
<div class="header">
|
|
<img src="https://nubes.ru/themes/custom/nubes_2025/logo.svg" alt="Nubes Logo" class="logo">
|
|
<h2 style="margin:0; color: #005bff;">Демонстрация CRUD</h2>
|
|
</div>
|
|
|
|
<form method="post" style="display: flex; gap: 10px; margin-bottom: 40px;">
|
|
<input type="hidden" name="crud_action" value="insert">
|
|
<input type="text" name="txt_content" placeholder="Введите текст для сохранения в PostgreSQL..." required class="input-main">
|
|
<button type="submit" class="btn btn-add" style="white-space: nowrap;">Создать запись</button>
|
|
</form>
|
|
|
|
<cfquery name="qGet" datasource="#request.DS#">SELECT * FROM nubes_test_table ORDER BY id DESC LIMIT 10</cfquery>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr><th>ID</th><th>Данные</th><th>Управление</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<cfoutput query="qGet">
|
|
<tr>
|
|
<td>#id#</td>
|
|
<td>
|
|
<form method="post" id="upd_#id#" style="margin:0">
|
|
<input type="hidden" name="crud_action" value="update"><input type="hidden" name="id" value="#id#">
|
|
<input type="text" name="txt_content" value="#HTMLEditFormat(test_data)#" class="input-inline">
|
|
</form>
|
|
</td>
|
|
<td style="display: flex; gap: 8px;">
|
|
<button type="submit" form="upd_#id#" class="btn btn-upd" title="Сохранить">💾</button>
|
|
<form method="post" style="margin:0" onsubmit="return confirm('Удалить?')">
|
|
<input type="hidden" name="crud_action" value="delete"><input type="hidden" name="id" value="#id#">
|
|
<button type="submit" class="btn btn-del" title="Удалить">🗑</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</cfoutput>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html> |