joermd commited on
Commit
8cfb97d
·
verified ·
1 Parent(s): d939025

Update reg.html

Browse files
Files changed (1) hide show
  1. reg.html +183 -248
reg.html CHANGED
@@ -3,341 +3,276 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>إنشاء حساب جديد | نظام الذكاء الاصطناعي</title>
 
7
  <style>
8
- @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
9
-
10
  * {
11
  margin: 0;
12
  padding: 0;
13
  box-sizing: border-box;
14
- font-family: 'Tajawal', sans-serif;
15
  }
16
 
17
  body {
18
  min-height: 100vh;
19
  display: flex;
20
- justify-content: center;
21
  align-items: center;
22
- background: #0f172a;
23
  position: relative;
24
- overflow: hidden;
 
 
 
 
25
  }
26
 
27
- .background-animation {
28
- position: fixed;
29
- top: 0;
30
- left: 0;
31
- width: 100%;
32
- height: 100%;
33
- z-index: 0;
34
- }
35
-
36
- .circle {
37
  position: absolute;
 
 
 
 
 
 
38
  border-radius: 50%;
39
- background: linear-gradient(45deg, #3b82f6, #6366f1);
40
- animation: float 15s infinite;
41
- opacity: 0.1;
42
- }
43
-
44
- .circle:nth-child(1) {
45
- width: 300px;
46
- height: 300px;
47
- top: -150px;
48
- left: -150px;
49
- animation-delay: 0s;
50
- }
51
-
52
- .circle:nth-child(2) {
53
- width: 400px;
54
- height: 400px;
55
- bottom: -200px;
56
- right: -200px;
57
- animation-delay: -5s;
58
- background: linear-gradient(45deg, #6366f1, #8b5cf6);
59
- }
60
-
61
- @keyframes float {
62
- 0%, 100% {
63
- transform: translateY(0) scale(1);
64
- }
65
- 50% {
66
- transform: translateY(-20px) scale(1.1);
67
- }
68
  }
69
 
70
  .container {
71
  position: relative;
72
- width: 100%;
73
- max-width: 450px;
74
- padding: 2rem;
75
  z-index: 1;
76
  }
77
 
78
- .signup-card {
79
- background: rgba(255, 255, 255, 0.05);
80
- backdrop-filter: blur(10px);
81
- border: 1px solid rgba(255, 255, 255, 0.1);
82
  border-radius: 24px;
83
- padding: 2.5rem;
 
 
84
  }
85
 
86
- .logo {
87
  text-align: center;
88
- margin-bottom: 2rem;
89
- }
90
-
91
- .logo h1 {
92
- color: white;
93
- font-size: 2rem;
94
- margin-bottom: 0.5rem;
95
- background: linear-gradient(45deg, #3b82f6, #6366f1);
96
- -webkit-background-clip: text;
97
- -webkit-text-fill-color: transparent;
98
  }
99
 
100
- .logo p {
101
- color: #94a3b8;
102
- font-size: 1.1rem;
 
 
 
 
 
 
 
103
  }
104
 
105
- .form-group {
106
- margin-bottom: 1.5rem;
 
107
  }
108
 
109
- .form-label {
110
  display: block;
111
- color: #e2e8f0;
112
- margin-bottom: 0.5rem;
113
- font-size: 0.95rem;
114
  }
115
 
116
- .form-input {
117
  width: 100%;
118
- padding: 1rem;
119
- background: rgba(255, 255, 255, 0.05);
120
- border: 1px solid rgba(255, 255, 255, 0.1);
121
  border-radius: 12px;
122
- color: white;
123
- font-size: 1rem;
124
  transition: all 0.3s ease;
 
 
125
  }
126
 
127
- .form-input:focus {
 
 
128
  outline: none;
129
- border-color: #3b82f6;
130
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
131
  }
132
 
133
- .form-input::placeholder {
134
- color: #64748b;
 
 
 
 
135
  }
136
 
137
- .submit-btn {
138
  width: 100%;
139
- padding: 1rem;
140
- background: linear-gradient(45deg, #3b82f6, #6366f1);
141
  border: none;
142
- border-radius: 12px;
143
- color: white;
144
- font-size: 1.1rem;
145
- font-weight: 500;
146
  cursor: pointer;
147
  transition: all 0.3s ease;
148
- margin-top: 1rem;
149
  }
150
 
151
- .submit-btn:hover {
152
  transform: translateY(-2px);
153
- box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
154
  }
155
 
156
- .login-link {
157
  text-align: center;
158
- margin-top: 1.5rem;
159
- color: #94a3b8;
160
- }
161
-
162
- .login-link a {
163
- color: #3b82f6;
164
- text-decoration: none;
165
- margin-right: 0.25rem;
166
- }
167
-
168
- .login-link a:hover {
169
- text-decoration: underline;
170
- }
171
-
172
- .message {
173
- padding: 1rem;
174
- border-radius: 8px;
175
- margin-bottom: 1rem;
176
- display: none;
177
- }
178
-
179
- .success {
180
- background: rgba(52, 211, 153, 0.1);
181
- border: 1px solid rgba(52, 211, 153, 0.2);
182
- color: #34d399;
183
- }
184
-
185
- .error {
186
- background: rgba(239, 68, 68, 0.1);
187
- border: 1px solid rgba(239, 68, 68, 0.2);
188
- color: #ef4444;
189
- }
190
-
191
- .loading {
192
- pointer-events: none;
193
- opacity: 0.7;
194
  }
195
 
196
- .loading .submit-btn {
197
- position: relative;
198
- color: transparent;
199
  }
200
 
201
- .loading .submit-btn::after {
202
- content: "";
203
- position: absolute;
204
- left: 50%;
205
- top: 50%;
206
- transform: translate(-50%, -50%);
207
- width: 20px;
208
- height: 20px;
209
- border: 2px solid white;
210
- border-radius: 50%;
211
- border-top-color: transparent;
212
- animation: spin 1s linear infinite;
213
- }
214
 
215
- @keyframes spin {
216
- to {
217
- transform: translate(-50%, -50%) rotate(360deg);
218
  }
219
  }
220
  </style>
221
  </head>
222
  <body>
223
- <div class="background-animation">
224
- <div class="circle"></div>
225
- <div class="circle"></div>
226
  </div>
227
-
228
  <div class="container">
229
- <div class="signup-card">
230
- <div class="logo">
231
- <h1>إنشاء حساب جديد</h1>
232
- <p>انضم إلى نظام الذكاء الاصطناعي</p>
233
- </div>
234
-
235
- <div id="message" class="message"></div>
236
-
237
- <form id="signupForm">
238
- <div class="form-group">
239
- <label class="form-label">الاسم الكامل</label>
240
- <input
241
- type="text"
242
- class="form-input"
243
- name="full_name"
244
- placeholder="أدخل اسمك الكامل"
245
- required
246
- >
247
  </div>
248
 
249
- <div class="form-group">
250
- <label class="form-label">البريد الإلكتروني</label>
251
- <input
252
- type="email"
253
- class="form-input"
254
- name="email"
255
- placeholder="أدخل بريدك الإلكتروني"
256
- required
257
- >
258
  </div>
259
 
260
- <div class="form-group">
261
- <label class="form-label">اسم المستخدم</label>
262
- <input
263
- type="text"
264
- class="form-input"
265
- name="username"
266
- placeholder="اختر اسم مستخدم"
267
- required
268
- >
269
  </div>
270
 
271
- <div class="form-group">
272
- <label class="form-label">كلمة المرور</label>
273
- <input
274
- type="password"
275
- class="form-input"
276
- name="password"
277
- placeholder="اختر كلمة مرور قوية"
278
- required
279
- >
280
  </div>
281
 
282
- <button type="submit" class="submit-btn">إنشاء حساب</button>
 
283
  </form>
284
-
285
- <div class="login-link">
286
- <p>لديك حساب بالفعل؟ <a href="login.html">تسجيل الدخول</a></p>
287
  </div>
288
  </div>
289
  </div>
290
 
291
  <script>
292
- const API_URL = 'https://j8fp9mu44k547j-7777.proxy.runpod.net/proxy/6000';
293
- const form = document.getElementById('signupForm');
294
- const messageDiv = document.getElementById('message');
295
-
296
- function showMessage(type, text) {
297
- messageDiv.className = `message ${type}`;
298
- messageDiv.textContent = text;
299
- messageDiv.style.display = 'block';
300
- }
301
-
302
- form.addEventListener('submit', async (e) => {
303
- e.preventDefault();
304
-
305
- // تفعيل حالة التحميل
306
- form.classList.add('loading');
307
 
308
- const formData = {
309
- full_name: form.full_name.value,
310
- email: form.email.value,
311
- username: form.username.value,
312
- password: form.password.value
313
- };
 
 
 
 
 
314
 
315
- try {
316
- const response = await fetch(`${API_URL}/register`, {
317
- method: 'POST',
318
- headers: {
319
- 'Content-Type': 'application/json'
320
- },
321
- body: JSON.stringify(formData)
322
- });
323
 
324
- const data = await response.json();
 
 
 
325
 
326
- if (response.ok) {
327
- showMessage('success', 'تم إنشاء الحساب بنجاح! جاري تحويلك لصفحة تسجيل الدخول...');
328
- setTimeout(() => {
329
- window.location.href = 'login.html';
330
- }, 2000);
331
- } else {
332
- showMessage('error', data.detail || 'حدث خطأ أثناء إنشاء الحساب');
333
- }
334
- } catch (error) {
335
- showMessage('error', 'حدث خطأ في الاتصال بالخادم');
336
- } finally {
337
- // إلغاء حالة التحميل
338
- form.classList.remove('loading');
339
  }
340
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  </script>
342
  </body>
343
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>منصة الذكاء الاصطناعي القانوني</title>
7
+ <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Tajawal:wght@400;500;700&display=swap" rel="stylesheet">
8
  <style>
 
 
9
  * {
10
  margin: 0;
11
  padding: 0;
12
  box-sizing: border-box;
13
+ font-family: 'Cairo', 'Tajawal', sans-serif;
14
  }
15
 
16
  body {
17
  min-height: 100vh;
18
  display: flex;
 
19
  align-items: center;
20
+ justify-content: center;
21
  position: relative;
22
+ padding: 20px;
23
+ background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6)),
24
+ url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') no-repeat center center fixed;
25
+ background-size: cover;
26
+ color: #333;
27
  }
28
 
29
+ .logo-container {
 
 
 
 
 
 
 
 
 
30
  position: absolute;
31
+ top: 40px;
32
+ left: 50%;
33
+ transform: translateX(-50%);
34
+ width: 160px;
35
+ height: 160px;
36
+ background: rgba(255, 255, 255, 0.97);
37
  border-radius: 50%;
38
+ padding: 12px;
39
+ box-shadow: 0 4px 35px rgba(218, 165, 32, 0.35);
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ z-index: 2;
44
+ animation: float 6s ease-in-out infinite;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
  .container {
48
  position: relative;
49
+ width: 480px;
50
+ margin-top: 100px;
 
51
  z-index: 1;
52
  }
53
 
54
+ .form-box {
55
+ background: rgba(255, 255, 255, 0.98);
56
+ padding: 40px;
 
57
  border-radius: 24px;
58
+ box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
59
+ border: 1px solid rgba(218, 165, 32, 0.35);
60
+ backdrop-filter: blur(12px);
61
  }
62
 
63
+ h2 {
64
  text-align: center;
65
+ color: #000;
66
+ margin-bottom: 30px;
67
+ font-size: 32px;
68
+ font-weight: 700;
69
+ position: relative;
70
+ padding-bottom: 15px;
 
 
 
 
71
  }
72
 
73
+ h2::after {
74
+ content: '';
75
+ position: absolute;
76
+ bottom: 0;
77
+ left: 50%;
78
+ transform: translateX(-50%);
79
+ width: 80px;
80
+ height: 4px;
81
+ background: linear-gradient(90deg, #DAA520, #FFD700);
82
+ border-radius: 4px;
83
  }
84
 
85
+ .input-group {
86
+ margin-bottom: 20px;
87
+ position: relative;
88
  }
89
 
90
+ .input-group label {
91
  display: block;
92
+ margin-bottom: 8px;
93
+ color: #555;
94
+ font-weight: 500;
95
  }
96
 
97
+ input, select {
98
  width: 100%;
99
+ padding: 14px 20px;
100
+ border: 2px solid rgba(218, 165, 32, 0.35);
 
101
  border-radius: 12px;
102
+ font-size: 15px;
 
103
  transition: all 0.3s ease;
104
+ background: rgba(255, 255, 255, 0.95);
105
+ color: #333;
106
  }
107
 
108
+ input:focus, select:focus {
109
+ border-color: #DAA520;
110
+ box-shadow: 0 0 20px rgba(218, 165, 32, 0.2);
111
  outline: none;
 
 
112
  }
113
 
114
+ select {
115
+ appearance: none;
116
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-6-6h12z'/%3E%3C/svg%3E");
117
+ background-repeat: no-repeat;
118
+ background-position: left 20px center;
119
+ padding-left: 40px;
120
  }
121
 
122
+ button {
123
  width: 100%;
124
+ padding: 16px;
125
+ background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
126
  border: none;
127
+ border-radius: 14px;
128
+ color: #000;
129
+ font-size: 18px;
130
+ font-weight: 600;
131
  cursor: pointer;
132
  transition: all 0.3s ease;
133
+ margin-top: 10px;
134
  }
135
 
136
+ button:hover {
137
  transform: translateY(-2px);
138
+ box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
139
  }
140
 
141
+ .form-footer {
142
  text-align: center;
143
+ margin-top: 25px;
144
+ padding-top: 20px;
145
+ border-top: 1px solid rgba(218, 165, 32, 0.25);
146
+ color: #666;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  }
148
 
149
+ @keyframes float {
150
+ 0%, 100% { transform: translateX(-50%) translateY(0px); }
151
+ 50% { transform: translateX(-50%) translateY(-10px); }
152
  }
153
 
154
+ @media (max-width: 520px) {
155
+ .container {
156
+ width: 100%;
157
+ padding: 0 15px;
158
+ }
159
+
160
+ .form-box {
161
+ padding: 30px 20px;
162
+ }
 
 
 
 
163
 
164
+ h2 {
165
+ font-size: 26px;
 
166
  }
167
  }
168
  </style>
169
  </head>
170
  <body>
171
+ <div class="logo-container">
172
+ <img src="https://ufastpro.com/wp-content/uploads/2024/11/تصميم-بدون-عنوان-3.png" alt="Logo" class="logo" style="width: 100%; height: 100%; object-fit: contain; border-radius: 50%;">
 
173
  </div>
174
+
175
  <div class="container">
176
+ <div class="form-box">
177
+ <h2>إنشاء حساب جديد</h2>
178
+ <form id="registerForm" onsubmit="return handleRegister(event)">
179
+ <div class="input-group">
180
+ <label>اسم المكتب/الشركة</label>
181
+ <input type="text" id="officeName" required placeholder="أدخل اسم المكتب أو الشركة">
182
+ </div>
183
+
184
+ <div class="input-group">
185
+ <label>صفة المسجل</label>
186
+ <select id="userRole" required>
187
+ <option value="">اختر صفتك</option>
188
+ <option value="owner">مالك المكتب</option>
189
+ <option value="lawyer">محامي</option>
190
+ <option value="employee">موظف في المكتب</option>
191
+ </select>
 
 
192
  </div>
193
 
194
+ <div class="input-group">
195
+ <label>رقم الهاتف</label>
196
+ <input type="tel" id="phone" required placeholder="05xxxxxxxx" pattern="[0-9]{10}">
 
 
 
 
 
 
197
  </div>
198
 
199
+ <div class="input-group">
200
+ <label>البريد الإلكتروني</label>
201
+ <input type="email" id="email" required placeholder="[email protected]">
 
 
 
 
 
 
202
  </div>
203
 
204
+ <div class="input-group">
205
+ <label>كلمة المرور</label>
206
+ <input type="password" id="password" required placeholder="8 أحرف على الأقل" minlength="8">
 
 
 
 
 
 
207
  </div>
208
 
209
+ <button type="submit">إنشاء الحساب</button>
210
+ <div id="registerMessage" class="message"></div>
211
  </form>
212
+
213
+ <div class="form-footer">
214
+ لديك حساب بالفعل؟ <a href="#" onclick="window.location.reload()" style="color: #DAA520; text-decoration: none;">تسجيل الدخول</a>
215
  </div>
216
  </div>
217
  </div>
218
 
219
  <script>
220
+ function handleRegister(event) {
221
+ event.preventDefault();
 
 
 
 
 
 
 
 
 
 
 
 
 
222
 
223
+ const officeName = document.getElementById('officeName').value;
224
+ const userRole = document.getElementById('userRole').value;
225
+ const phone = document.getElementById('phone').value;
226
+ const email = document.getElementById('email').value;
227
+ const password = document.getElementById('password').value;
228
+
229
+ // التحقق من صحة البيانات
230
+ if (!officeName || !userRole || !phone || !email || !password) {
231
+ showMessage('registerMessage', 'الرجاء إكمال جميع الحقول المطلوبة', true);
232
+ return false;
233
+ }
234
 
235
+ if (!isValidEmail(email)) {
236
+ showMessage('registerMessage', 'الرجاء إدخال بريد إلكتروني صحيح', true);
237
+ return false;
238
+ }
 
 
 
 
239
 
240
+ if (password.length < 8) {
241
+ showMessage('registerMessage', 'كلمة المرور يجب أن تكون 8 أحرف على الأقل', true);
242
+ return false;
243
+ }
244
 
245
+ if (phone.length !== 10 || !phone.match(/^[0-9]{10}$/)) {
246
+ showMessage('registerMessage', 'الرجاء إدخال رقم هاتف صحيح', true);
247
+ return false;
 
 
 
 
 
 
 
 
 
 
248
  }
249
+
250
+ // هنا يمكنك إضافة كود إرسال البيانات إلى الخادم
251
+ showMessage('registerMessage', 'جاري إنشاء الحساب...', false);
252
+
253
+ return false; // منع إرسال النموذج تلقائياً
254
+ }
255
+
256
+ function showMessage(elementId, message, isError = false) {
257
+ const element = document.getElementById(elementId);
258
+ element.textContent = message;
259
+ element.style.padding = '10px';
260
+ element.style.marginTop = '15px';
261
+ element.style.borderRadius = '8px';
262
+ element.style.backgroundColor = isError ? '#ffebee' : '#e8f5e9';
263
+ element.style.color = isError ? '#d32f2f' : '#388e3c';
264
+ element.style.textAlign = 'center';
265
+
266
+ setTimeout(() => {
267
+ element.textContent = '';
268
+ element.style.padding = '0';
269
+ element.style.backgroundColor = 'transparent';
270
+ }, 3000);
271
+ }
272
+
273
+ function isValidEmail(email) {
274
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
275
+ }
276
  </script>
277
  </body>
278
  </html>