Deploy on 2026-06-05 15:23:02

This commit is contained in:
Hamza-Ayed
2026-06-05 15:23:02 +03:00
parent 5bf5e95c8b
commit e7281a53a8
8 changed files with 489 additions and 6 deletions

74
resources/lang/ar.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
return [
'dashboard' => 'لوحة التحكم',
'organizations' => 'المنظمات',
'contacts' => 'جهات الاتصال',
'opportunities' => 'الفرص',
'sources' => 'مصادر البيانات',
'settings' => 'الإعدادات',
'logout' => 'تسجيل خروج',
'welcome' => 'مرحباً',
'add' => 'إضافة',
'edit' => 'تعديل',
'delete' => 'حذف',
'save' => 'حفظ',
'cancel' => 'إلغاء',
'search' => 'بحث',
'filter' => 'تصفية',
'name' => 'الاسم',
'type' => 'النوع',
'status' => 'الحالة',
'country' => 'الدولة',
'city' => 'المدينة',
'url' => 'الرابط',
'description' => 'الوصف',
'score' => 'النتيجة',
'created' => 'تاريخ الإنشاء',
'updated' => 'آخر تحديث',
'actions' => 'إجراءات',
'no_data' => 'لا توجد بيانات',
'total_organizations' => 'إجمالي المنظمات',
'total_opportunities' => 'إجمالي الفرص',
'total_contacts' => 'إجمالي جهات الاتصال',
'active_sources' => 'المصادر النشطة',
'today_opportunities' => 'فرص اليوم',
'vc_funds' => 'صناديق استثمار',
'accelerators' => 'مسرعات',
'recent_opportunities' => 'آخر الفرص',
'recent_activities' => 'آخر النشاطات',
'view_all' => 'عرض الكل',
'run_collector' => 'تشغيل الجمع',
'last_collected' => 'آخر جمع',
'platform_mode' => 'نمط المنصة',
'local' => 'محلي',
'production' => 'إنتاج',
'email' => 'البريد الإلكتروني',
'phone' => 'رقم الهاتف',
'position' => 'المسمى الوظيفي',
'notes' => 'ملاحظات',
'interactions' => 'التفاعلات',
'add_interaction' => 'إضافة تفاعل',
'log_interaction' => 'تسجيل تفاعل',
'call' => 'مكالمة',
'meeting' => 'اجتماع',
'applications' => 'الطلبات',
'tags' => 'الوسوم',
'deadline' => 'الموعد النهائي',
'amount' => 'المبلغ',
'funding_stage' => 'مرحلة التمويل',
'crm_status' => 'حالة CRM',
'domain' => 'النطاق',
'website' => 'الموقع الإلكتروني',
'run' => 'تشغيل',
'save_source' => 'حفظ المصدر',
'add_source' => 'إضافة مصدر',
'telegram_notifications' => 'إشعارات تيليجرام',
'telegram_bot_token' => 'رمز البوت',
'telegram_chat_id' => 'معرف المحادثة',
'telegram_enabled' => 'تفعيل الإشعارات',
'test_notification' => 'إرسال تجربة',
'language' => 'اللغة',
'arabic' => 'العربية',
'english' => 'English',
];

74
resources/lang/en.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
return [
'dashboard' => 'Dashboard',
'organizations' => 'Organizations',
'contacts' => 'Contacts',
'opportunities' => 'Opportunities',
'sources' => 'Data Sources',
'settings' => 'Settings',
'logout' => 'Logout',
'welcome' => 'Welcome',
'add' => 'Add',
'edit' => 'Edit',
'delete' => 'Delete',
'save' => 'Save',
'cancel' => 'Cancel',
'search' => 'Search',
'filter' => 'Filter',
'name' => 'Name',
'type' => 'Type',
'status' => 'Status',
'country' => 'Country',
'city' => 'City',
'url' => 'URL',
'description' => 'Description',
'score' => 'Score',
'created' => 'Created',
'updated' => 'Updated',
'actions' => 'Actions',
'no_data' => 'No data',
'total_organizations' => 'Total Organizations',
'total_opportunities' => 'Total Opportunities',
'total_contacts' => 'Total Contacts',
'active_sources' => 'Active Sources',
'today_opportunities' => "Today's Opportunities",
'vc_funds' => 'VC Funds',
'accelerators' => 'Accelerators',
'recent_opportunities' => 'Recent Opportunities',
'recent_activities' => 'Recent Activities',
'view_all' => 'View All',
'run_collector' => 'Run Collector',
'last_collected' => 'Last Collected',
'platform_mode' => 'Platform Mode',
'local' => 'Local',
'production' => 'Production',
'email' => 'Email',
'phone' => 'Phone',
'position' => 'Position',
'notes' => 'Notes',
'interactions' => 'Interactions',
'add_interaction' => 'Add Interaction',
'log_interaction' => 'Log Interaction',
'call' => 'Call',
'meeting' => 'Meeting',
'applications' => 'Applications',
'tags' => 'Tags',
'deadline' => 'Deadline',
'amount' => 'Amount',
'funding_stage' => 'Funding Stage',
'crm_status' => 'CRM Status',
'domain' => 'Domain',
'website' => 'Website',
'run' => 'Run',
'save_source' => 'Save Source',
'add_source' => 'Add Source',
'telegram_notifications' => 'Telegram Notifications',
'telegram_bot_token' => 'Bot Token',
'telegram_chat_id' => 'Chat ID',
'telegram_enabled' => 'Enable Notifications',
'test_notification' => 'Send Test',
'language' => 'Language',
'arabic' => 'العربية',
'english' => 'English',
];

View File

@@ -0,0 +1,60 @@
<div class="page-header">
<h1><?= $t['settings'] ?? 'Settings' ?></h1>
</div>
<?php if ($flashSuccess = $this->session->getFlash('success')): ?>
<div class="alert alert-success"><span><?= $this->escape($flashSuccess) ?></span></div>
<?php endif; ?>
<?php if ($flashError = $this->session->getFlash('error')): ?>
<div class="alert alert-error"><span><?= $this->escape($flashError) ?></span></div>
<?php endif; ?>
<div class="detail-grid">
<!-- Telegram Settings -->
<div class="glass-panel">
<h3 style="margin-bottom: 20px;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" style="vertical-align: middle; margin-right: 8px; color: #229ED9;"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg>
<?= $t['telegram_notifications'] ?? 'Telegram Notifications' ?>
</h3>
<form action="/admin/settings/save" method="POST" class="form-stacked">
<input type="hidden" name="_csrf" value="<?= $this->session->getCsrfToken() ?>">
<div class="form-group">
<label class="form-label"><?= $t['telegram_bot_token'] ?? 'Bot Token' ?></label>
<input type="text" name="telegram_bot_token" class="form-control" value="<?= $this->escape($tg_token) ?>" placeholder="123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11">
</div>
<div class="form-group">
<label class="form-label"><?= $t['telegram_chat_id'] ?? 'Chat ID' ?></label>
<input type="text" name="telegram_chat_id" class="form-control" value="<?= $this->escape($tg_chat_id) ?>" placeholder="-1001234567890">
</div>
<div class="form-group" style="display: flex; align-items: center; gap: 10px;">
<label class="form-label" style="margin: 0;"><?= $t['telegram_enabled'] ?? 'Enable' ?></label>
<input type="checkbox" name="telegram_enabled" value="1" <?= $tg_enabled === '1' ? 'checked' : '' ?> style="width: 20px; height: 20px;">
</div>
<div style="display: flex; gap: 12px; margin-top: 16px;">
<button type="submit" name="action" value="save" class="btn btn-primary"><?= $t['save'] ?? 'Save' ?></button>
<button type="submit" name="action" value="test" class="btn btn-secondary"><?= $t['test_notification'] ?? 'Send Test' ?></button>
</div>
</form>
</div>
<!-- Help Info -->
<div class="glass-panel">
<h3 style="margin-bottom: 16px;">How to set up Telegram</h3>
<ol style="line-height: 2; padding-left: 20px; color: var(--text-muted);">
<li>Create a bot via <a href="https://t.me/BotFather" target="_blank">@BotFather</a> on Telegram</li>
<li>Copy the bot token (e.g., <code>123456:ABC-DEF1234ghIkl</code>)</li>
<li>Add the bot to your group/channel</li>
<li>Send any message in the group</li>
<li>Visit <code>https://api.telegram.org/bot<TOKEN>/getUpdates</code></li>
<li>Copy your Chat ID from the response</li>
<li>Click "Send Test" to verify</li>
</ol>
</div>
</div>
<style>
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form-stacked { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
</style>