🛒 scripte-pay.de

Webverzeichnis – Websitescrawl German

Webverzeichnis – Websitescrawl German

# 🌐 Webverzeichnis – PHP Link Directory

Ein vollständiges, modernes Webverzeichnis-System mit PayPal-Integration, 2-Faktor-Authentifizierung und umfangreichem Admin-Panel.

---

## 🚀 Features

### Frontend
- Modernes, responsives Design (Plus Jakarta Sans + DM Mono)
- Öffentliches Verzeichnis mit Suche, Filterung & Sortierung
- Kategorien mit Icons und Website-Anzahl
- VIP/Premium Spotlight-Bereich
- Click-Tracking mit automatischer Weiterleitung

### Benutzer
- Registrierung & Login mit **2-Faktor-Authentifizierung** (E-Mail Code)
- Dashboard mit Statistiken (Websites, Aufrufe, Zahlungen)
- Website einreichen mit Screenshot-Upload (WebP-Konvertierung)
- Plan-Auswahl & PayPal-Zahlung
- Konto-Verwaltung (Passwort, 2FA)

### Admin-Panel
- Übersicht mit Echtzeit-Statistiken & Umsatzzahlen
- **Website freigeben / ablehnen** (mit E-Mail-Benachrichtigung)
- Nutzerverwaltung (sperren, entsperren, 2FA zurücksetzen)
- Einstellungen: PayPal Sandbox ↔ Live umschalten, SMTP, etc.
- Website als "Featured" markieren

### Zahlungen & E-Mails
- **PayPal IPN** (Instant Payment Notification) – vollautomatisch
- Automatische Rechnung per E-Mail nach Zahlung
- E-Mail bei Freischaltung / Ablehnung
- Alle E-Mails als HTML-Templates

### Sicherheit
- PDO Prepared Statements (SQL-Injection-Schutz)
- CSRF-Token-Schutz auf allen Formularen
- bcrypt Passwort-Hashing (Cost 12)
- Session-Sicherheit (HttpOnly, SameSite, Secure)
- Upload-Schutz (index.php in allen Upload-Ordnern)
- 2FA mit Zeitbegrenzung (10 Minuten)

---

## 📋 Pakete / Pläne

| Plan | Preis | Laufzeit | Backlinks | Do-Follow | Featured |
|------|-------|----------|-----------|-----------|---------|
| Free | 0 € | 10 Jahre | 1 | ❌ | ❌ |
| Basic | 20 € | 10 Jahre | 1 | ✅ | ❌ |
| Premium | 15 € | 1 Jahr | 2 | ✅ | ✅ |
| VIP | 12 € | 1 Jahr | 5 | ✅ | ✅ |

*Preise & Laufzeiten im Admin-Panel anpassbar*

---

## 🛠️ Installation

### Voraussetzungen
- PHP 8.0+ (empfohlen: 8.4)
- MySQL 5.7+ / MariaDB 10.3+
- GD-Extension (für WebP-Konvertierung)
- cURL-Extension (für PayPal IPN)
- SMTP-Zugang (für E-Mail-Versand)

### Schritt-für-Schritt

**1. Dateien hochladen**
```
Alle Dateien in das gewünschte Webroot-Verzeichnis hochladen.
z.B. /var/www/html/verzeichnis/
```

**2. Berechtigungen setzen**
```bash
chmod 755 uploads/
chmod 755 uploads/screenshots/
chmod 755 uploads/avatars/
chmod 644 *.php
```

**3. Installation starten**
```
Browser öffnen: https://ihredomain.de/install.php
```

**4. Installation Schritt 1: Datenbank**
- Datenbankhost (meist: `localhost`)
- Datenbankname (vorher in phpMyAdmin anlegen)
- Tabellen-Prefix (Standard: `wv_`)
- Datenbankbenutzer & Passwort

**5. Installation Schritt 2: Konfiguration**
- Website-Name und URL
- Admin-Benutzername, E-Mail & Passwort
- PayPal-E-Mail (Empfänger der Zahlungen)
- SMTP-Zugangsdaten für E-Mail-Versand

**6. Fertig!**
- Die `install.php` löscht sich selbst
- Admin-Panel: `https://ihredomain.de/admin/`
- Frontend: `https://ihredomain.de/`

---

## ⚙️ PayPal einrichten

### Sandbox (Test-Modus)
1. PayPal Developer Account: https://developer.paypal.com
2. Sandbox-Konto erstellen
3. In `config.php`: `PAYPAL_SANDBOX = true`
4. Im Admin-Panel → Einstellungen → PayPal → Sandbox

### Live-Modus aktivieren
1. Admin-Panel → Einstellungen → PayPal → **Live**
2. PayPal IPN-URL eintragen: `https://ihredomain.de/paypal-ipn.php`
3. PayPal-Account → Profil → Benachrichtigungen → IPN aktivieren

### IPN-URL
```
https://ihredomain.de/paypal-ipn.php
```

---

## 📧 E-Mail / SMTP einrichten

### Konfiguration
```
SMTP-Host: mail.ihredomain.de
SMTP-Port: 587 (STARTTLS) oder 465 (SSL)
SMTP-User: noreply@ihredomain.de
SMTP-Pass: ihr-passwort
```

### E-Mail-Templates
Alle Templates in `/emails/`:
- `twofa.php` – 2FA-Code
- `invoice.php` – Rechnung nach Zahlung
- `site_approved.php` – Website freigeschaltet
- `site_rejected.php` – Website abgelehnt
- `welcome.php` – Willkommen nach Registrierung
- `admin_payment.php` – Admin: neue Zahlung
- `admin_new_site.php` – Admin: neuer Eintrag

---

## 📁 Dateistruktur

```
webverzeichnis/
├── install.php ← Installation (löscht sich selbst)
├── config.php ← Konfiguration (auto-generiert)
├── functions.php ← Hilfsfunktionen
├── index.php ← Startseite
├── verzeichnis.php ← Öffentliches Verzeichnis
├── neu-eintragen.php ← Website einreichen
├── paypal-zahlung.php ← PayPal-Weiterleitung
├── paypal-ipn.php ← PayPal IPN Handler
├── zahlung-erfolg.php ← Danke-Seite
├── zahlung-abbruch.php ← Abbruch-Seite
├── dashboard.php ← User Dashboard
├── meine-websites.php ← User: eigene Websites
├── konto.php ← Kontoeinstellungen + 2FA
├── login.php ← Login + 2FA
├── register.php ← Registrierung
├── logout.php ← Abmelden
├── click.php ← Click-Tracker
├── includes/
│ ├── header.php ← Header/Navigation
│ └── footer.php ← Footer
├── emails/ ← E-Mail-Templates
│ ├── twofa.php
│ ├── invoice.php
│ ├── site_approved.php
│ ├── site_rejected.php
│ ├── welcome.php
│ ├── admin_payment.php
│ └── admin_new_site.php
├── admin/
│ ├── index.php ← Admin Dashboard
│ ├── websites.php ← Websites verwalten
│ ├── users.php ← Nutzer verwalten
│ ├── settings.php ← Einstellungen
│ └── index.php ← Zugriffsschutz
├── uploads/
│ ├── screenshots/ ← Website-Screenshots
│ └── avatars/ ← User-Avatare
└── logs/
└── ipn.log ← PayPal IPN-Log
```

---

## 🔧 Troubleshooting

### Problem: E-Mails werden nicht gesendet
- SMTP-Zugangsdaten im Admin-Panel prüfen
- Port 587 (STARTTLS) oder 465 (SSL) testen
- Fallback: Wenn SMTP leer, wird `mail()` verwendet
- IPN-Log prüfen: `/logs/ipn.log`

### Problem: Bilder werden nicht zu WebP konvertiert
- PHP GD-Extension prüfen: `php -m | grep gd`
- WebP-Support prüfen: `php -r "phpinfo();" | grep webp`
- Schreibrechte auf `/uploads/screenshots/` prüfen

### Problem: PayPal IPN kommt nicht an
- IPN-URL muss öffentlich erreichbar sein (kein localhost!)
- PayPal-Account → Profil → IPN aktivieren
- SSL/HTTPS erforderlich für Live-Modus
- IPN-Log prüfen: `/logs/ipn.log`

### Problem: 2FA-Code kommt nicht
- SMTP-Einstellungen prüfen
- Spam-Ordner des Empfängers prüfen
- SMTP-Log auf Serverebene prüfen

### Problem: install.php existiert noch
- install.php wurde nach erfolgreicher Installation automatisch gelöscht
- Falls nicht: manuell löschen!

### Fehler: "Ungültiges CSRF-Token"
- Browser-Cache leeren
- Session-Cookie löschen und neu anmelden

---

## 🔒 Sicherheitsempfehlungen

1. **HTTPS** immer aktivieren (Let's Encrypt)
2. `logs/` Verzeichnis nicht über Web erreichbar machen:
```apache
# .htaccess
RewriteRule ^logs/ - [F,L]
```
3. PayPal auf **Live-Modus** stellen nach Tests
4. **2FA** für Admin-Account aktivieren
5. Regelmäßige **Datenbankbackups**

---

## 📄 Lizenz

Privat / Eigennutzung. Alle Rechte vorbehalten.

🔗 Unsere Partner

Scriptworld.de Zahnzusatzversicherung_Fullsize