Spaces:
Running
Running
Update reg.html
Browse files
reg.html
CHANGED
@@ -1,381 +1,835 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
-
<html
|
3 |
<head>
|
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 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
display: block;
|
191 |
-
}
|
192 |
-
|
193 |
-
.message.error {
|
194 |
-
background-color: #ffebee;
|
195 |
-
color: #d32f2f;
|
196 |
-
}
|
197 |
-
|
198 |
-
.message.success {
|
199 |
-
background-color: #e8f5e9;
|
200 |
-
color: #388e3c;
|
201 |
-
}
|
202 |
-
|
203 |
-
@media (max-width: 520px) {
|
204 |
-
.container {
|
205 |
-
width: 100%;
|
206 |
-
padding: 0 15px;
|
207 |
-
}
|
208 |
-
|
209 |
-
.form-box {
|
210 |
-
padding: 30px 20px;
|
211 |
-
}
|
212 |
-
|
213 |
-
h2 {
|
214 |
-
font-size: 26px;
|
215 |
-
}
|
216 |
-
}
|
217 |
-
</style>
|
218 |
</head>
|
219 |
<body>
|
220 |
-
|
221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
</div>
|
223 |
-
|
224 |
-
<div class="container">
|
225 |
-
<div class="forms-container">
|
226 |
-
<!-- نموذج تسجيل الدخول -->
|
227 |
-
<div class="form-box login-form">
|
228 |
-
<h2>تسجيل الدخول</h2>
|
229 |
-
<form id="loginForm" onsubmit="return handleLogin(event)">
|
230 |
-
<div class="input-group">
|
231 |
-
<label>البريد الإلكتروني</label>
|
232 |
-
<input type="email" id="loginEmail" required placeholder="أدخل بريدك الإلكتروني">
|
233 |
-
</div>
|
234 |
-
|
235 |
-
<div class="input-group">
|
236 |
-
<label>كلمة المرور</label>
|
237 |
-
<input type="password" id="loginPassword" required placeholder="أدخل كلمة المرور">
|
238 |
-
</div>
|
239 |
-
|
240 |
-
<button type="submit">تسجيل الدخول</button>
|
241 |
-
<div id="loginMessage" class="message"></div>
|
242 |
-
</form>
|
243 |
-
|
244 |
-
<button class="toggle-btn" onclick="toggleForm()">إنشاء حساب جديد</button>
|
245 |
-
|
246 |
-
<div class="form-footer">
|
247 |
-
منصة ذكاء اصطناعي قانوني موثوقة ومرخصة
|
248 |
-
</div>
|
249 |
-
</div>
|
250 |
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
</div>
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
</body>
|
381 |
-
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
+
<html dir="rtl" lang="ar">
|
3 |
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
+
<title>المنصة القانونية الذكية - وإنشاء العقود</title>
|
7 |
+
<!-- ربط مكتبات Tailwind وFont Awesome -->
|
8 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet" />
|
9 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet" />
|
10 |
+
<!-- ربط مكتبة jsPDF لتحويل النص إلى PDF -->
|
11 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
|
12 |
+
<style>
|
13 |
+
@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap");
|
14 |
+
|
15 |
+
:root {
|
16 |
+
--primary-color: #2563eb;
|
17 |
+
--primary-hover: #1d4ed8;
|
18 |
+
--background-light: #f8fafc;
|
19 |
+
--card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
20 |
+
}
|
21 |
+
|
22 |
+
body {
|
23 |
+
font-family: "Tajawal", sans-serif;
|
24 |
+
background: var(--background-light);
|
25 |
+
}
|
26 |
+
|
27 |
+
/* الشريط الجانبي */
|
28 |
+
.sidebar {
|
29 |
+
background: white;
|
30 |
+
width: 280px;
|
31 |
+
position: fixed;
|
32 |
+
right: 0;
|
33 |
+
top: 0;
|
34 |
+
height: 100vh;
|
35 |
+
z-index: 40;
|
36 |
+
transition: transform 0.3s ease;
|
37 |
+
box-shadow: var(--card-shadow);
|
38 |
+
}
|
39 |
+
.main-content {
|
40 |
+
margin-right: 280px;
|
41 |
+
transition: margin 0.3s ease;
|
42 |
+
min-height: 100vh;
|
43 |
+
padding: 2rem;
|
44 |
+
background: var(--background-light);
|
45 |
+
}
|
46 |
+
.nav-link {
|
47 |
+
display: flex;
|
48 |
+
align-items: center;
|
49 |
+
padding: 1rem 1.5rem;
|
50 |
+
color: #374151;
|
51 |
+
transition: all 0.3s ease;
|
52 |
+
border-radius: 0.5rem;
|
53 |
+
margin: 0.25rem 0.5rem;
|
54 |
+
}
|
55 |
+
.nav-link:hover {
|
56 |
+
background: #f3f4f6;
|
57 |
+
color: var(--primary-color);
|
58 |
+
}
|
59 |
+
.nav-link.active {
|
60 |
+
background: var(--primary-color);
|
61 |
+
color: white;
|
62 |
+
}
|
63 |
+
.feature-card {
|
64 |
+
background: white;
|
65 |
+
border-radius: 1rem;
|
66 |
+
box-shadow: var(--card-shadow);
|
67 |
+
transition: all 0.3s ease;
|
68 |
+
overflow: hidden;
|
69 |
+
height: 100%;
|
70 |
+
}
|
71 |
+
.feature-card:hover {
|
72 |
+
transform: translateY(-4px);
|
73 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
74 |
+
}
|
75 |
+
.action-button {
|
76 |
+
background: var(--primary-color);
|
77 |
+
color: white;
|
78 |
+
padding: 0.75rem 1.5rem;
|
79 |
+
border-radius: 0.5rem;
|
80 |
+
transition: all 0.3s ease;
|
81 |
+
border: none;
|
82 |
+
font-weight: 500;
|
83 |
+
width: 100%;
|
84 |
+
text-align: center;
|
85 |
+
}
|
86 |
+
.action-button:hover {
|
87 |
+
background: var(--primary-hover);
|
88 |
+
transform: translateY(-1px);
|
89 |
+
}
|
90 |
+
.input-group {
|
91 |
+
position: relative;
|
92 |
+
}
|
93 |
+
.input-group.focused input,
|
94 |
+
.input-group.focused textarea {
|
95 |
+
border-color: var(--primary-color);
|
96 |
+
transform: translateY(-2px);
|
97 |
+
}
|
98 |
+
.loading-spinner {
|
99 |
+
border: 3px solid #f3f3f3;
|
100 |
+
border-radius: 50%;
|
101 |
+
border-top: 3px solid var(--primary-color);
|
102 |
+
width: 24px;
|
103 |
+
height: 24px;
|
104 |
+
animation: spin 1s linear infinite;
|
105 |
+
margin: 0 auto;
|
106 |
+
}
|
107 |
+
@keyframes spin {
|
108 |
+
0% { transform: rotate(0deg); }
|
109 |
+
100% { transform: rotate(360deg); }
|
110 |
+
}
|
111 |
+
.response-container {
|
112 |
+
white-space: pre-wrap;
|
113 |
+
font-family: "Tajawal", sans-serif;
|
114 |
+
line-height: 1.6;
|
115 |
+
max-height: 400px;
|
116 |
+
overflow-y: auto;
|
117 |
+
}
|
118 |
+
/* تنسيق قسم إنشاء العقود */
|
119 |
+
.split-screen {
|
120 |
+
display: grid;
|
121 |
+
grid-template-columns: 1fr 1fr;
|
122 |
+
gap: 2rem;
|
123 |
+
margin-top: 1rem;
|
124 |
+
}
|
125 |
+
.contract-card {
|
126 |
+
background: white;
|
127 |
+
border-radius: 1.5rem;
|
128 |
+
box-shadow: var(--card-shadow);
|
129 |
+
padding: 2rem;
|
130 |
+
border: 1px solid #f3f4f6;
|
131 |
+
}
|
132 |
+
.contract-output {
|
133 |
+
background: #fafafa;
|
134 |
+
border-radius: 1rem;
|
135 |
+
padding: 2rem;
|
136 |
+
min-height: 300px;
|
137 |
+
line-height: 1.8;
|
138 |
+
font-size: 1.1rem;
|
139 |
+
border: 1px solid #f3f4f6;
|
140 |
+
white-space: pre-wrap;
|
141 |
+
}
|
142 |
+
.copy-btn {
|
143 |
+
position: absolute;
|
144 |
+
top: 1rem;
|
145 |
+
left: 1rem;
|
146 |
+
padding: 0.5rem 1rem;
|
147 |
+
background: #f3f4f6;
|
148 |
+
border-radius: 0.75rem;
|
149 |
+
cursor: pointer;
|
150 |
+
transition: all 0.3s ease;
|
151 |
+
display: flex;
|
152 |
+
align-items: center;
|
153 |
+
gap: 0.5rem;
|
154 |
+
font-size: 0.9rem;
|
155 |
+
color: #4b5563;
|
156 |
+
}
|
157 |
+
.copy-btn:hover {
|
158 |
+
background: #e5e7eb;
|
159 |
+
}
|
160 |
+
.success-message {
|
161 |
+
position: fixed;
|
162 |
+
bottom: 2rem;
|
163 |
+
right: 2rem;
|
164 |
+
background: #10b981;
|
165 |
+
color: white;
|
166 |
+
padding: 1rem 2rem;
|
167 |
+
border-radius: 1rem;
|
168 |
+
animation: slideIn 0.3s ease;
|
169 |
+
}
|
170 |
+
@keyframes slideIn {
|
171 |
+
from { transform: translateX(100%); opacity: 0; }
|
172 |
+
to { transform: translateX(0); opacity: 1; }
|
173 |
+
}
|
174 |
+
.section-title {
|
175 |
+
font-size: 1.25rem;
|
176 |
+
color: #1f2937;
|
177 |
+
margin-bottom: 1.5rem;
|
178 |
+
padding-bottom: 0.75rem;
|
179 |
+
border-bottom: 2px solid #e5e7eb;
|
180 |
+
font-weight: 600;
|
181 |
+
}
|
182 |
+
/* تحسين التنسيق على الأجهزة المحمولة */
|
183 |
+
@media (max-width: 768px) {
|
184 |
+
.sidebar { transform: translateX(100%); }
|
185 |
+
.sidebar.open { transform: translateX(0); }
|
186 |
+
.main-content { margin-right: 0; }
|
187 |
+
.split-screen { grid-template-columns: 1fr; }
|
188 |
+
}
|
189 |
+
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
</head>
|
191 |
<body>
|
192 |
+
<!-- زر إظهار/إخفاء الشريط الجانبي -->
|
193 |
+
<button id="sidebarToggle" class="fixed top-4 right-4 z-50 p-2 rounded-lg bg-white shadow-lg md:hidden">
|
194 |
+
<i class="fas fa-bars text-xl"></i>
|
195 |
+
</button>
|
196 |
+
|
197 |
+
<!-- الشريط الجانبي -->
|
198 |
+
<aside class="sidebar">
|
199 |
+
<div class="p-6">
|
200 |
+
<div class="flex items-center gap-4 mb-8">
|
201 |
+
<!-- استخدام الصورة المطلوبة كشعار -->
|
202 |
+
<img src="https://ufastpro.com/wp-content/uploads/2025/02/تصميم-بدون-عنوان.png" alt="شعار المنصة" class="w-12 h-12 rounded-full" />
|
203 |
+
<div>
|
204 |
+
<h1 class="text-xl font-bold text-gray-800">المنصة القانونية</h1>
|
205 |
+
<p class="text-sm text-gray-500">خدمات قانونية ذكية</p>
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
+
<nav class="space-y-1">
|
209 |
+
<a href="#" class="nav-link active" data-section="home">
|
210 |
+
<i class="fas fa-home ml-3"></i>
|
211 |
+
<span>الرئيسية</span>
|
212 |
+
</a>
|
213 |
+
<a href="#" class="nav-link" data-section="analysis">
|
214 |
+
<i class="fas fa-balance-scale ml-3"></i>
|
215 |
+
<span>التحليل القانوني</span>
|
216 |
+
</a>
|
217 |
+
<a href="#" class="nav-link" data-section="mindMap">
|
218 |
+
<i class="fas fa-project-diagram ml-3"></i>
|
219 |
+
<span>خريطة التفكير</span>
|
220 |
+
</a>
|
221 |
+
<a href="#" class="nav-link" data-section="search">
|
222 |
+
<i class="fas fa-search ml-3"></i>
|
223 |
+
<span>البحث القانوني</span>
|
224 |
+
</a>
|
225 |
+
<a href="#" class="nav-link" data-section="documents">
|
226 |
+
<i class="fas fa-file-alt ml-3"></i>
|
227 |
+
<span>المستندات</span>
|
228 |
+
</a>
|
229 |
+
<a href="#" class="nav-link" data-section="translation">
|
230 |
+
<i class="fas fa-language ml-3"></i>
|
231 |
+
<span>الترجمة القانونية</span>
|
232 |
+
</a>
|
233 |
+
<a href="#" class="nav-link" data-section="consultation">
|
234 |
+
<i class="fas fa-comments ml-3"></i>
|
235 |
+
<span>استشارة قانونية</span>
|
236 |
+
</a>
|
237 |
+
<a href="admin.html" class="nav-link">
|
238 |
+
<i class="fas fa-cogs ml-3"></i>
|
239 |
+
<span>الأعمال الإدارية</span>
|
240 |
+
</a>
|
241 |
+
<a href="#" class="nav-link" data-section="precedents">
|
242 |
+
<i class="fas fa-gavel ml-3"></i>
|
243 |
+
<span>الأحكام والسوابق</span>
|
244 |
+
</a>
|
245 |
+
<!-- إضافة رابط قسم نشر فاست برو -->
|
246 |
+
<a href="#" class="nav-link" data-section="fastpro">
|
247 |
+
<i class="fas fa-newspaper ml-3"></i>
|
248 |
+
<span>نشر فاست برو</span>
|
249 |
+
</a>
|
250 |
+
</nav>
|
251 |
+
</div>
|
252 |
+
</aside>
|
253 |
+
|
254 |
+
<!-- المحتوى الرئيسي -->
|
255 |
+
<main class="main-content">
|
256 |
+
<!-- بحث عالمي -->
|
257 |
+
<div class="search-container mb-6 relative">
|
258 |
+
<input type="text" class="search-input w-full p-3 rounded border" placeholder="ابحث في المنصة..." id="globalSearch" />
|
259 |
+
<i class="fas fa-search absolute top-1/2 right-4 transform -translate-y-1/2 text-gray-400"></i>
|
260 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
262 |
+
<!-- قسم الرئيسية -->
|
263 |
+
<section id="home" class="section">
|
264 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">الخدمات القانونية</h2>
|
265 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
266 |
+
<!-- بطاقات الخدمة -->
|
267 |
+
<div class="feature-card p-6">
|
268 |
+
<div class="text-center">
|
269 |
+
<i class="fas fa-balance-scale text-3xl mb-4 text-blue-600"></i>
|
270 |
+
<h3 class="text-xl font-bold text-gray-800 mb-3">التحليل القانوني</h3>
|
271 |
+
<p class="text-gray-600 mb-4">
|
272 |
+
تحليل متكامل للقضايا والمستندات القانونية باستخدام الذكاء الاصطناعي
|
273 |
+
</p>
|
274 |
+
<!-- تغيير الزر لتوجيه المستخدم للقسم -->
|
275 |
+
<button class="action-button" onclick="showSection('analysis')">ابدأ التحليل</button>
|
276 |
+
</div>
|
277 |
+
</div>
|
278 |
+
<div class="feature-card p-6">
|
279 |
+
<div class="text-center">
|
280 |
+
<i class="fas fa-project-diagram text-3xl mb-4 text-blue-600"></i>
|
281 |
+
<h3 class="text-xl font-bold text-gray-800 mb-3">خريطة التفكير</h3>
|
282 |
+
<p class="text-gray-600 mb-4">
|
283 |
+
إنشاء خرائط ذهنية للقضايا القانونية وتحليل العلاقات
|
284 |
+
</p>
|
285 |
+
<button class="action-button" onclick="showSection('mindMap')">إنشاء خريطة</button>
|
286 |
+
</div>
|
287 |
+
</div>
|
288 |
+
<div class="feature-card p-6">
|
289 |
+
<div class="text-center">
|
290 |
+
<i class="fas fa-search text-3xl mb-4 text-blue-600"></i>
|
291 |
+
<h3 class="text-xl font-bold text-gray-800 mb-3">البحث القانوني</h3>
|
292 |
+
<p class="text-gray-600 mb-4">
|
293 |
+
بحث متقدم في السوابق والقضايا المشابهة
|
294 |
+
</p>
|
295 |
+
<button class="action-button" onclick="showSection('search')">ابدأ البح��</button>
|
296 |
+
</div>
|
297 |
+
</div>
|
298 |
+
<div class="feature-card p-6">
|
299 |
+
<div class="text-center">
|
300 |
+
<i class="fas fa-file-alt text-3xl mb-4 text-blue-600"></i>
|
301 |
+
<h3 class="text-xl font-bold text-gray-800 mb-3">المستندات</h3>
|
302 |
+
<p class="text-gray-600 mb-4">
|
303 |
+
إنشاء وتحرير المستندات القانونية بمساعدة الذكاء الاصطناعي
|
304 |
+
</p>
|
305 |
+
<button class="action-button" onclick="showSection('documents')">إنشاء مستند</button>
|
306 |
+
</div>
|
307 |
+
</div>
|
308 |
+
<div class="feature-card p-6">
|
309 |
+
<div class="text-center">
|
310 |
+
<i class="fas fa-language text-3xl mb-4 text-blue-600"></i>
|
311 |
+
<h3 class="text-xl font-bold text-gray-800 mb-3">الترجمة القانونية</h3>
|
312 |
+
<p class="text-gray-600 mb-4">
|
313 |
+
ترجمة احترافية للوثائق القانونية بدقة عالية مع إمكانية تنزيلها كملف PDF
|
314 |
+
</p>
|
315 |
+
<button class="action-button" onclick="showSection('translation')">ترجمة</button>
|
316 |
+
</div>
|
317 |
+
</div>
|
318 |
+
<div class="feature-card p-6">
|
319 |
+
<div class="text-center">
|
320 |
+
<i class="fas fa-comments text-3xl mb-4 text-blue-600"></i>
|
321 |
+
<h3 class="text-xl font-bold text-gray-800 mb-3">استشارة قانونية</h3>
|
322 |
+
<p class="text-gray-600 mb-4">
|
323 |
+
احصل على استشارة قانونية فورية من خبرائنا
|
324 |
+
</p>
|
325 |
+
<button class="action-button" onclick="showSection('consultation')">استشر الآن</button>
|
326 |
+
</div>
|
327 |
+
</div>
|
328 |
+
</div>
|
329 |
+
</section>
|
330 |
+
|
331 |
+
<!-- قسم التحليل القانوني -->
|
332 |
+
<section id="analysis" class="section hidden">
|
333 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">التحليل القانوني</h2>
|
334 |
+
<div class="input-group bg-white rounded p-6 shadow">
|
335 |
+
<textarea class="w-full p-3 border rounded" placeholder="اكتب وصف القضية أو المستند الذي تريد تحليله..."></textarea>
|
336 |
+
<label class="block text-gray-700 mb-2 mt-4">أو قم بإرفاق ملف PDF:</label>
|
337 |
+
<input type="file" accept=".pdf" class="w-full p-3 border rounded" id="analysisPDF" />
|
338 |
+
<div class="flex gap-4 mt-4">
|
339 |
+
<button class="action-button" onclick="handleSubmit('analysis')">تحليل</button>
|
340 |
+
<button id="downloadAnalysisPDFButton" class="action-button">تنزيل التحليل كملف PDF</button>
|
341 |
+
</div>
|
342 |
+
<div id="analysisResult" class="mt-4 response-container"></div>
|
343 |
+
</div>
|
344 |
+
</section>
|
345 |
+
|
346 |
+
<!-- قسم إنشاء المستندات القانونية -->
|
347 |
+
<section id="documents" class="section hidden">
|
348 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">إنشاء مستند قانوني</h2>
|
349 |
+
<div class="input-group bg-white rounded p-6 shadow">
|
350 |
+
<textarea class="w-full p-3 border rounded" placeholder="اكتب وصف المستند المطلوب إنشاؤه..."></textarea>
|
351 |
+
<label class="block text-gray-700 mb-2 mt-4">أو قم بإرفاق ملف PDF:</label>
|
352 |
+
<input type="file" accept=".pdf" class="w-full p-3 border rounded" id="documentsPDF" />
|
353 |
+
<button class="action-button mt-4" onclick="handleSubmit('documents')">إنشاء مستند</button>
|
354 |
+
<div id="documentsResult" class="mt-4 response-container"></div>
|
355 |
+
</div>
|
356 |
+
</section>
|
357 |
+
|
358 |
+
<!-- قسم خريطة التفكير القانونية -->
|
359 |
+
<section id="mindMap" class="section hidden">
|
360 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">خريطة التفكير القانونية</h2>
|
361 |
+
<div class="input-group bg-white rounded p-6 shadow">
|
362 |
+
<textarea class="w-full p-3 border rounded" placeholder="اكتب وصف الموضوع الذي تريد إنشاء خريطة ذهنية له..."></textarea>
|
363 |
+
<button class="action-button mt-4" onclick="handleSubmit('mindMap')">إنشاء خريطة التفكير</button>
|
364 |
+
<div id="mindMapResult" class="mt-4 response-container"></div>
|
365 |
+
</div>
|
366 |
+
</section>
|
367 |
+
|
368 |
+
<!-- قسم البحث القانوني -->
|
369 |
+
<section id="search" class="section hidden">
|
370 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">البحث القانوني</h2>
|
371 |
+
<div class="input-group bg-white rounded p-6 shadow">
|
372 |
+
<textarea class="w-full p-3 border rounded" placeholder="اكتب استعلام البحث القانوني..."></textarea>
|
373 |
+
<button class="action-button mt-4" onclick="handleSubmit('search')">بحث</button>
|
374 |
+
<div id="searchResult" class="mt-4 response-container"></div>
|
375 |
+
</div>
|
376 |
+
</section>
|
377 |
+
|
378 |
+
<!-- قسم الترجمة القانونية -->
|
379 |
+
<section id="translation" class="section hidden">
|
380 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">الترجمة القانونية</h2>
|
381 |
+
<div class="input-group bg-white rounded p-6 shadow">
|
382 |
+
<textarea class="w-full p-3 border rounded" placeholder="اكتب النص المراد ترجمته..."></textarea>
|
383 |
+
<label class="block text-gray-700 mb-2 mt-4">أو قم بإرفاق ملف PDF:</label>
|
384 |
+
<input type="file" accept=".pdf" class="w-full p-3 border rounded" id="translationPDF" />
|
385 |
+
<div class="flex gap-4 my-4">
|
386 |
+
<select class="p-3 rounded border w-full" id="fromLang">
|
387 |
+
<option value="ar">العربية</option>
|
388 |
+
<option value="en">الإنجليزية</option>
|
389 |
+
</select>
|
390 |
+
<select class="p-3 rounded border w-full" id="toLang">
|
391 |
+
<option value="en">الإنجليزية</option>
|
392 |
+
<option value="ar">العربية</option>
|
393 |
+
</select>
|
394 |
+
</div>
|
395 |
+
<div class="flex gap-4">
|
396 |
+
<button class="action-button" onclick="handleSubmit('translation')">ترجمة</button>
|
397 |
+
<button id="downloadPDFButton" class="action-button">تنزيل الترجمة كملف PDF</button>
|
398 |
+
</div>
|
399 |
+
<div id="translationResult" class="mt-4 response-container"></div>
|
400 |
+
</div>
|
401 |
+
</section>
|
402 |
+
|
403 |
+
<!-- قسم الاستشارة القانونية -->
|
404 |
+
<section id="consultation" class="section hidden">
|
405 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">استشارة قانونية</h2>
|
406 |
+
<div class="input-group bg-white rounded p-6 shadow">
|
407 |
+
<textarea class="w-full p-3 border rounded" placeholder="اكتب سؤالك القانوني هنا..."></textarea>
|
408 |
+
<button class="action-button mt-4" onclick="handleSubmit('consultation')">احصل على استشارة</button>
|
409 |
+
<div id="consultationResult" class="mt-4 response-container"></div>
|
410 |
+
</div>
|
411 |
+
</section>
|
412 |
+
|
413 |
+
<!-- قسم إنشاء العقود -->
|
414 |
+
<section id="contracts" class="section hidden">
|
415 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">منشئ العقود المصري الذكي</h2>
|
416 |
+
<div class="split-screen">
|
417 |
+
<!-- نموذج بيانات العقد -->
|
418 |
+
<div class="contract-card">
|
419 |
+
<div class="space-y-6">
|
420 |
+
<div class="mb-4 input-group">
|
421 |
+
<label class="block text-gray-700 font-bold mb-2">عنوان العقد:</label>
|
422 |
+
<input type="text" id="contractTitle" placeholder="عنوان العقد" class="w-full p-2 border rounded" />
|
423 |
+
</div>
|
424 |
+
<div class="mb-4 input-group">
|
425 |
+
<label class="block text-gray-700 font-bold mb-2">تاريخ تحرير العقد:</label>
|
426 |
+
<input type="date" id="contractDate" class="w-full p-2 border rounded" />
|
427 |
+
</div>
|
428 |
+
<h3 class="section-title">بيانات الطرف الأول</h3>
|
429 |
+
<div class="mb-4 input-group">
|
430 |
+
<label class="block text-gray-700 font-bold mb-2">اسم الطرف الأول:</label>
|
431 |
+
<input type="text" id="firstPartyName" placeholder="الاسم الكامل" class="w-full p-2 border rounded" />
|
432 |
+
</div>
|
433 |
+
<div class="mb-4 input-group">
|
434 |
+
<label class="block text-gray-700 font-bold mb-2">الرقم القومي للطرف الأول:</label>
|
435 |
+
<input type="text" id="firstPartyID" placeholder="14 رقم" maxlength="14" class="w-full p-2 border rounded" />
|
436 |
+
</div>
|
437 |
+
<div class="mb-4 input-group">
|
438 |
+
<label class="block text-gray-700 font-bold mb-2">الصفة:</label>
|
439 |
+
<input type="text" id="firstPartyTitle" placeholder="مثال: مالك، مدير شركة" class="w-full p-2 border rounded" />
|
440 |
+
</div>
|
441 |
+
<div class="mb-4 input-group">
|
442 |
+
<label class="block text-gray-700 font-bold mb-2">جنسية الطرف الأول:</label>
|
443 |
+
<input type="text" id="firstPartyNationality" placeholder="الجنسية" value="مصري" class="w-full p-2 border rounded" />
|
444 |
+
</div>
|
445 |
+
<div class="mb-4 input-group">
|
446 |
+
<label class="block text-gray-700 font-bold mb-2">عنوان الطرف الأول:</label>
|
447 |
+
<input type="text" id="firstPartyAddress" placeholder="العنوان التفصيلي" class="w-full p-2 border rounded" />
|
448 |
</div>
|
449 |
+
<h3 class="section-title">بيانات الطرف الثاني</h3>
|
450 |
+
<div class="mb-4 input-group">
|
451 |
+
<label class="block text-gray-700 font-bold mb-2">اسم الطرف الثاني:</label>
|
452 |
+
<input type="text" id="secondPartyName" placeholder="الاسم الكامل" class="w-full p-2 border rounded" />
|
453 |
+
</div>
|
454 |
+
<div class="mb-4 input-group">
|
455 |
+
<label class="block text-gray-700 font-bold mb-2">الرقم القومي للطرف الثاني:</label>
|
456 |
+
<input type="text" id="secondPartyID" placeholder="14 رقم" maxlength="14" class="w-full p-2 border rounded" />
|
457 |
+
</div>
|
458 |
+
<div class="mb-4 input-group">
|
459 |
+
<label class="block text-gray-700 font-bold mb-2">الصفة:</label>
|
460 |
+
<input type="text" id="secondPartyTitle" placeholder="مثال: مستأجر، مشتري" class="w-full p-2 border rounded" />
|
461 |
+
</div>
|
462 |
+
<div class="mb-4 input-group">
|
463 |
+
<label class="block text-gray-700 font-bold mb-2">جنسية الطرف الثاني:</label>
|
464 |
+
<input type="text" id="secondPartyNationality" placeholder="الجنسية" value="مصري" class="w-full p-2 border rounded" />
|
465 |
+
</div>
|
466 |
+
<div class="mb-4 input-group">
|
467 |
+
<label class="block text-gray-700 font-bold mb-2">عنوان الطرف الثاني:</label>
|
468 |
+
<input type="text" id="secondPartyAddress" placeholder="العنوان التفصيلي" class="w-full p-2 border rounded" />
|
469 |
+
</div>
|
470 |
+
<h3 class="section-title">تفاصيل العقد</h3>
|
471 |
+
<div class="mb-4 input-group">
|
472 |
+
<label class="block text-gray-700 font-bold mb-2">البند التمهيدي:</label>
|
473 |
+
<textarea id="contractPreamble" placeholder="اكتب مضمون العقد والغرض منه" class="w-full p-2 border rounded h-24"></textarea>
|
474 |
+
</div>
|
475 |
+
<div class="mb-4 input-group">
|
476 |
+
<label class="block text-gray-700 font-bold mb-2">بنود العقد:</label>
|
477 |
+
<textarea id="contractTerms" placeholder="اكتب بنود العقد الأساسية" class="w-full p-2 border rounded h-48"></textarea>
|
478 |
+
</div>
|
479 |
+
</div>
|
480 |
+
<div class="mt-4 text-center">
|
481 |
+
<button id="generateButton" class="action-button">إنشاء العقد</button>
|
482 |
+
</div>
|
483 |
</div>
|
484 |
+
<!-- عرض العقد ��لمنشأ مع إمكانية النسخ -->
|
485 |
+
<div class="contract-card relative">
|
486 |
+
<h3 class="text-2xl font-bold text-gray-800 mb-4">العقد المنشأ</h3>
|
487 |
+
<button class="copy-btn" id="copyButton">
|
488 |
+
<i class="fas fa-copy"></i> نسخ العقد
|
489 |
+
</button>
|
490 |
+
<div id="contractOutput" class="contract-output"></div>
|
491 |
+
</div>
|
492 |
+
</div>
|
493 |
+
</section>
|
494 |
+
|
495 |
+
<!-- قسم نشر فاست برو -->
|
496 |
+
<section id="fastpro" class="section hidden">
|
497 |
+
<h2 class="text-3xl font-bold text-gray-800 mb-8">نشر من شركة فاست برو</h2>
|
498 |
+
<div class="input-group bg-white rounded p-6 shadow">
|
499 |
+
<input type="text" id="postTitle" class="w-full p-3 border rounded mb-4" placeholder="عنوان المنشور" />
|
500 |
+
<textarea id="postContent" class="w-full p-3 border rounded" placeholder="محتوى المنشور..."></textarea>
|
501 |
+
<button class="action-button mt-4" onclick="handlePost()">نشر المنشور</button>
|
502 |
+
</div>
|
503 |
+
<div id="postResult" class="mt-4 response-container"></div>
|
504 |
+
</section>
|
505 |
+
</main>
|
506 |
+
|
507 |
+
<!-- سكربتات الموقع -->
|
508 |
+
<script>
|
509 |
+
// استخدام API كما كان سابقاً
|
510 |
+
const API_URL = 'https://g2mgow5tgbxsjy-7777.proxy.runpod.net/proxy/8000/chat';
|
511 |
+
|
512 |
+
// دالة للحصول على البادئة (prompt prefix) بناءً على القسم
|
513 |
+
function getPromptPrefix(section) {
|
514 |
+
switch(section) {
|
515 |
+
case 'analysis':
|
516 |
+
return 'قم بتحليل هذه القضية: ';
|
517 |
+
case 'documents':
|
518 |
+
return 'قم بإنشاء مستند قانوني بناءً على الوصف التالي: ';
|
519 |
+
case 'mindMap':
|
520 |
+
return 'قم بإنشاء خريطة ذهنية قانونية للموضوع التالي: ';
|
521 |
+
case 'search':
|
522 |
+
return 'ابحث عن معلومات قانونية حول: ';
|
523 |
+
case 'translation':
|
524 |
+
return 'قم بترجمة هذا النص القانوني: ';
|
525 |
+
case 'consultation':
|
526 |
+
return 'أحتاج استشارة قانونية في الموضوع التالي: ';
|
527 |
+
default:
|
528 |
+
return '';
|
529 |
+
}
|
530 |
+
}
|
531 |
+
|
532 |
+
// تفعيل التنقل بين الأقسام
|
533 |
+
document.querySelectorAll(".nav-link").forEach(link => {
|
534 |
+
link.addEventListener("click", (e) => {
|
535 |
+
e.preventDefault();
|
536 |
+
const section = e.currentTarget.getAttribute("data-section");
|
537 |
+
if(section) showSection(section);
|
538 |
+
});
|
539 |
+
});
|
540 |
+
|
541 |
+
function showSection(sectionId) {
|
542 |
+
document.querySelectorAll(".section").forEach(section => {
|
543 |
+
section.classList.add("hidden");
|
544 |
+
});
|
545 |
+
document.getElementById(sectionId).classList.remove("hidden");
|
546 |
+
document.querySelectorAll(".nav-link").forEach(link => {
|
547 |
+
link.classList.remove("active");
|
548 |
+
if (link.getAttribute("data-section") === sectionId) {
|
549 |
+
link.classList.add("active");
|
550 |
+
}
|
551 |
+
});
|
552 |
+
}
|
553 |
+
|
554 |
+
// زر القائمة على الهاتف
|
555 |
+
document.getElementById("sidebarToggle").addEventListener("click", () => {
|
556 |
+
document.querySelector(".sidebar").classList.toggle("open");
|
557 |
+
});
|
558 |
+
|
559 |
+
// تحسين تأثير التركيز على حقول الإدخال
|
560 |
+
document.querySelectorAll("input, textarea").forEach(element => {
|
561 |
+
element.addEventListener("focus", function() {
|
562 |
+
const group = this.closest(".input-group");
|
563 |
+
if(group) group.classList.add("focused");
|
564 |
+
this.style.transform = 'translateY(-2px)';
|
565 |
+
});
|
566 |
+
|
567 |
+
element.addEventListener("blur", function() {
|
568 |
+
const group = this.closest(".input-group");
|
569 |
+
if(group) group.classList.remove("focused");
|
570 |
+
this.style.transform = 'translateY(0)';
|
571 |
+
});
|
572 |
+
});
|
573 |
+
|
574 |
+
// دالة إرسال الطلبات العامة لجميع الأقسام باستخدام API الموحد
|
575 |
+
async function handleSubmit(section) {
|
576 |
+
const container = document.getElementById(section);
|
577 |
+
const textarea = container.querySelector("textarea");
|
578 |
+
const resultDiv = container.querySelector(".response-container");
|
579 |
+
const text = textarea.value.trim();
|
580 |
+
if (!text) {
|
581 |
+
alert("الرجاء إدخال نص");
|
582 |
+
return;
|
583 |
+
}
|
584 |
+
const payload = {
|
585 |
+
message: getPromptPrefix(section) + text,
|
586 |
+
history: []
|
587 |
+
};
|
588 |
+
try {
|
589 |
+
resultDiv.innerHTML = '<div class="loading-spinner"></div>';
|
590 |
+
const response = await fetch(API_URL, {
|
591 |
+
method: "POST",
|
592 |
+
headers: { "Content-Type": "application/json" },
|
593 |
+
body: JSON.stringify(payload)
|
594 |
+
});
|
595 |
+
if (!response.ok) {
|
596 |
+
throw new Error("Network response was not ok");
|
597 |
+
}
|
598 |
+
const data = await response.json();
|
599 |
+
resultDiv.innerHTML = data.response || "";
|
600 |
+
} catch (error) {
|
601 |
+
console.error("Error:", error);
|
602 |
+
resultDiv.innerHTML = '<div class="text-red-500">حدث خطأ. يرجى المحاولة مرة أخرى.</div>';
|
603 |
+
}
|
604 |
+
}
|
605 |
+
|
606 |
+
// وظيفة زر النسخ في قسم إنشاء العقود
|
607 |
+
document.getElementById("copyButton").addEventListener("click", async function() {
|
608 |
+
const contractText = document.getElementById("contractOutput").innerText;
|
609 |
+
try {
|
610 |
+
await navigator.clipboard.writeText(contractText);
|
611 |
+
showSuccessMessage("تم نسخ العقد بنجاح!");
|
612 |
+
} catch (err) {
|
613 |
+
console.error("فشل نسخ النص:", err);
|
614 |
+
}
|
615 |
+
});
|
616 |
+
|
617 |
+
// وظيفة إظهار رسالة النجاح عند النسخ
|
618 |
+
function showSuccessMessage(message) {
|
619 |
+
const successMessage = document.createElement("div");
|
620 |
+
successMessage.className = "success-message";
|
621 |
+
successMessage.textContent = message;
|
622 |
+
document.body.appendChild(successMessage);
|
623 |
+
setTimeout(() => {
|
624 |
+
successMessage.style.opacity = "0";
|
625 |
+
setTimeout(() => successMessage.remove(), 300);
|
626 |
+
}, 2000);
|
627 |
+
}
|
628 |
+
|
629 |
+
// التحقق من صحة الرقم القومي للطرف الأول والثاني
|
630 |
+
document.querySelectorAll("#firstPartyID, #secondPartyID").forEach(input => {
|
631 |
+
input.addEventListener("input", function() {
|
632 |
+
this.value = this.value.replace(/[^0-9]/g, '');
|
633 |
+
if (this.value.length > 14) {
|
634 |
+
this.value = this.value.slice(0, 14);
|
635 |
+
}
|
636 |
+
});
|
637 |
+
});
|
638 |
+
|
639 |
+
// دالة الحصول على تسمية الحقل لعرضها في رسائل الخطأ
|
640 |
+
function getFieldLabel(field) {
|
641 |
+
const labels = {
|
642 |
+
contractTitle: 'عنوان العقد',
|
643 |
+
contractDate: 'تاريخ العقد',
|
644 |
+
firstPartyName: 'اسم الطرف الأول',
|
645 |
+
firstPartyID: 'الرقم القومي للطرف الأول',
|
646 |
+
firstPartyTitle: 'صفة الطرف الأول',
|
647 |
+
firstPartyNationality: 'جنسية الطرف الأول',
|
648 |
+
firstPartyAddress: 'عنوان الطرف الأول',
|
649 |
+
secondPartyName: 'اسم الطرف الثاني',
|
650 |
+
secondPartyID: 'الرقم القومي للطرف الثاني',
|
651 |
+
secondPartyTitle: 'صفة الطرف الثاني',
|
652 |
+
secondPartyNationality: 'جنسية الطرف الثاني',
|
653 |
+
secondPartyAddress: 'عنوان الطرف الثاني',
|
654 |
+
contractPreamble: 'البند التمهيدي',
|
655 |
+
contractTerms: 'بنود العقد'
|
656 |
+
};
|
657 |
+
return labels[field] || field;
|
658 |
+
}
|
659 |
+
|
660 |
+
// وظيفة زر إنشاء العقد
|
661 |
+
document.getElementById("generateButton").addEventListener("click", async function() {
|
662 |
+
const button = this;
|
663 |
+
const outputDiv = document.getElementById("contractOutput");
|
664 |
+
|
665 |
+
// جمع بيانات النموذج
|
666 |
+
const formData = {
|
667 |
+
contractTitle: document.getElementById("contractTitle").value.trim(),
|
668 |
+
contractDate: document.getElementById("contractDate").value,
|
669 |
+
firstPartyName: document.getElementById("firstPartyName").value.trim(),
|
670 |
+
firstPartyID: document.getElementById("firstPartyID").value.trim(),
|
671 |
+
firstPartyTitle: document.getElementById("firstPartyTitle").value.trim(),
|
672 |
+
firstPartyNationality: document.getElementById("firstPartyNationality").value.trim(),
|
673 |
+
firstPartyAddress: document.getElementById("firstPartyAddress").value.trim(),
|
674 |
+
secondPartyName: document.getElementById("secondPartyName").value.trim(),
|
675 |
+
secondPartyID: document.getElementById("secondPartyID").value.trim(),
|
676 |
+
secondPartyTitle: document.getElementById("secondPartyTitle").value.trim(),
|
677 |
+
secondPartyNationality: document.getElementById("secondPartyNationality").value.trim(),
|
678 |
+
secondPartyAddress: document.getElementById("secondPartyAddress").value.trim(),
|
679 |
+
contractPreamble: document.getElementById("contractPreamble").value.trim(),
|
680 |
+
contractTerms: document.getElementById("contractTerms").value.trim()
|
681 |
+
};
|
682 |
+
|
683 |
+
// التحقق من البيانات المطلوبة
|
684 |
+
const requiredFields = Object.keys(formData);
|
685 |
+
const missingFields = requiredFields.filter(field => !formData[field]);
|
686 |
+
|
687 |
+
if (missingFields.length > 0) {
|
688 |
+
outputDiv.innerHTML = `
|
689 |
+
<div class="text-red-500 font-bold mb-4">يرجى ملء جميع الحقول المطلوبة</div>
|
690 |
+
<ul class="list-disc list-inside text-red-500">
|
691 |
+
${missingFields.map(field => `<li>${getFieldLabel(field)}</li>`).join('')}
|
692 |
+
</ul>
|
693 |
+
`;
|
694 |
+
return;
|
695 |
+
}
|
696 |
+
|
697 |
+
// تحديث واجهة المستخدم لحالة التحميل
|
698 |
+
button.textContent = 'جاري إنشاء العقد...';
|
699 |
+
button.disabled = true;
|
700 |
+
outputDiv.innerHTML = `
|
701 |
+
<div class="flex items-center justify-center space-x-4 text-gray-600">
|
702 |
+
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"></div>
|
703 |
+
<span>جاري إنشاء العقد باستخدام الذكاء الاصطناعي...</span>
|
704 |
+
</div>
|
705 |
+
`;
|
706 |
+
|
707 |
+
try {
|
708 |
+
// تحويل التاريخ إلى التنسيق العربي
|
709 |
+
const dateObj = new Date(formData.contractDate);
|
710 |
+
const arabicDate = new Intl.DateTimeFormat('ar-EG', {
|
711 |
+
year: 'numeric',
|
712 |
+
month: 'long',
|
713 |
+
day: 'numeric'
|
714 |
+
}).format(dateObj);
|
715 |
+
|
716 |
+
// إنشاء نص الطلب
|
717 |
+
const prompt = `قم بإنشاء عقد قانوني مصري رسمي باللغة العربية يتضمن البيانات التالية:
|
718 |
+
|
719 |
+
عنوان العقد: ${formData.contractTitle}
|
720 |
+
تاريخ العقد: ${arabicDate}
|
721 |
+
|
722 |
+
الطرف الأول:
|
723 |
+
- الاسم: ${formData.firstPartyName}
|
724 |
+
- الرقم القومي: ${formData.firstPartyID}
|
725 |
+
- الصفة: ${formData.firstPartyTitle}
|
726 |
+
- الجنسية: ${formData.firstPartyNationality}
|
727 |
+
- العنوان: ${formData.firstPartyAddress}
|
728 |
+
|
729 |
+
الطرف الثاني:
|
730 |
+
- الاسم: ${formData.secondPartyName}
|
731 |
+
- الرقم القومي: ${formData.secondPartyID}
|
732 |
+
- الصفة: ${formData.secondPartyTitle}
|
733 |
+
- الجنسية: ${formData.secondPartyNationality}
|
734 |
+
- العنوان: ${formData.secondPartyAddress}
|
735 |
+
|
736 |
+
التمهيد:
|
737 |
+
${formData.contractPreamble}
|
738 |
+
|
739 |
+
بنود العقد:
|
740 |
+
${formData.contractTerms}
|
741 |
+
|
742 |
+
يجب أن يتضمن العقد:
|
743 |
+
1. النص القانوني: "وبعد أن أقر طرفي هذا العقد بكامل أهليتهما المعتبرة قانوناً وشرعاً وبخلو إرادتهما من أي عيب من عيوب الإرادة وبأنهما غير ممنوعين من التصرف وغير محجور عليهما لأي سبب من الأسباب وعدم خضوعهم لقانون الحراسات أو الكسب غير المشروع وبخلوهما من كافة الموانع القانونية والشرعية اللازمة للتعاقد اتفقوا على الآتي"
|
744 |
+
2. بند حكم التمهيد يوضح أن التمهيد جزء لا يتجزأ من العقد
|
745 |
+
3. تنسيق قانوني رسمي
|
746 |
+
4. مكان للتوقيع في النهاية مع كتابة "طرف أول" و "طرف ثاني"`;
|
747 |
+
|
748 |
+
// إرسال الطلب إلى API الخاص بالعقود
|
749 |
+
const response = await fetch(API_URL, {
|
750 |
+
method: 'POST',
|
751 |
+
headers: {
|
752 |
+
'Content-Type': 'application/json'
|
753 |
+
},
|
754 |
+
body: JSON.stringify({
|
755 |
+
message: prompt,
|
756 |
+
history: []
|
757 |
+
})
|
758 |
+
});
|
759 |
+
|
760 |
+
if (!response.ok) {
|
761 |
+
throw new Error(`HTTP error! status: ${response.status}`);
|
762 |
+
}
|
763 |
+
|
764 |
+
const data = await response.json();
|
765 |
+
outputDiv.innerHTML = `<div dir="rtl" style="white-space: pre-wrap;">${data.response}</div>`;
|
766 |
+
|
767 |
+
} catch (error) {
|
768 |
+
outputDiv.innerHTML = `
|
769 |
+
<div class="text-red-600 font-bold">
|
770 |
+
عذراً، حدث خطأ في إنشاء العقد. يرجى المحاولة مرة أخرى.
|
771 |
+
<br>
|
772 |
+
تفاصيل الخطأ: ${error.message}
|
773 |
+
</div>
|
774 |
+
`;
|
775 |
+
console.error('Error:', error);
|
776 |
+
} finally {
|
777 |
+
button.textContent = 'إنشاء العقد';
|
778 |
+
button.disabled = false;
|
779 |
+
}
|
780 |
+
});
|
781 |
+
|
782 |
+
// وظيفة تنزيل الترجمة كملف PDF (باستخدام مكتبة jsPDF)
|
783 |
+
document.getElementById("downloadPDFButton").addEventListener("click", function() {
|
784 |
+
const { jsPDF } = window.jspdf;
|
785 |
+
const doc = new jsPDF({ orientation: "portrait", unit: "pt", format: "a4" });
|
786 |
+
const content = document.getElementById("translationResult").innerText;
|
787 |
+
if (!content.trim()) {
|
788 |
+
alert("لا يوجد نص للترجمة لتنزيله");
|
789 |
+
return;
|
790 |
+
}
|
791 |
+
doc.setFont("Tajawal", "normal");
|
792 |
+
doc.text(content, 40, 60, { maxWidth: 515 });
|
793 |
+
doc.save("translation.pdf");
|
794 |
+
});
|
795 |
+
|
796 |
+
// وظيفة تنزيل التحليل كملف PDF (باستخدام مكتبة jsPDF)
|
797 |
+
document.getElementById("downloadAnalysisPDFButton").addEventListener("click", function() {
|
798 |
+
const { jsPDF } = window.jspdf;
|
799 |
+
const doc = new jsPDF({ orientation: "portrait", unit: "pt", format: "a4" });
|
800 |
+
const content = document.getElementById("analysisResult").innerText;
|
801 |
+
if (!content.trim()) {
|
802 |
+
alert("لا يوجد نص للتحليل لتنزيله");
|
803 |
+
return;
|
804 |
+
}
|
805 |
+
doc.setFont("Tajawal", "normal");
|
806 |
+
doc.text(content, 40, 60, { maxWidth: 515 });
|
807 |
+
doc.save("analysis.pdf");
|
808 |
+
});
|
809 |
+
|
810 |
+
// وظيفة نشر منشور فاست برو
|
811 |
+
function handlePost() {
|
812 |
+
const title = document.getElementById("postTitle").value.trim();
|
813 |
+
const content = document.getElementById("postContent").value.trim();
|
814 |
+
const resultDiv = document.getElementById("postResult");
|
815 |
+
if(!title || !content) {
|
816 |
+
resultDiv.innerHTML = '<div class="text-red-500">يرجى ملء عنوان المنشور والمحتوى</div>';
|
817 |
+
return;
|
818 |
+
}
|
819 |
+
// هنا يمكن إضافة منطق إرسال البيانات إلى الخادم
|
820 |
+
resultDiv.innerHTML = `
|
821 |
+
<div class="text-green-600 font-bold">
|
822 |
+
تم نشر المنشور بنجاح!
|
823 |
+
<br>
|
824 |
+
<a href="https://ufastpro.com" class="text-blue-600 underline" target="_blank">زيارة موقع فاست برو</a>
|
825 |
+
</div>
|
826 |
+
`;
|
827 |
+
}
|
828 |
+
|
829 |
+
// تهيئة الصفحة بالعرض الافتراضي للقسم "home"
|
830 |
+
document.addEventListener("DOMContentLoaded", () => {
|
831 |
+
showSection("home");
|
832 |
+
});
|
833 |
+
</script>
|
834 |
</body>
|
835 |
+
</html>
|