1
This commit is contained in:
@@ -47,6 +47,20 @@ Options -Indexes
|
|||||||
php_value error_reporting E_ALL & ~E_DEPRECATED & ~E_STRICT
|
php_value error_reporting E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
# Handle PHP files if mod_php is not available
|
||||||
|
<Files "*.php">
|
||||||
|
SetHandler application/x-httpd-php
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
# Alternative PHP handler for different server configurations
|
||||||
|
<IfModule mod_fcgid.c>
|
||||||
|
AddHandler fcgid-script .php
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule mod_cgi.c>
|
||||||
|
AddHandler cgi-script .php
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
# Force HTTPS (uncomment if you have SSL certificate)
|
# Force HTTPS (uncomment if you have SSL certificate)
|
||||||
# RewriteEngine On
|
# RewriteEngine On
|
||||||
# RewriteCond %{HTTPS} off
|
# RewriteCond %{HTTPS} off
|
||||||
|
|||||||
130
Profice WebSite/backup-form.html
Normal file
130
Profice WebSite/backup-form.html
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Kontaktformular - Profice</title>
|
||||||
|
<style>
|
||||||
|
body { font-family: Arial, sans-serif; margin: 20px; background: #f5f5f5; }
|
||||||
|
.form-container { max-width: 600px; margin: 0 auto; background: white; padding: 30px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
|
||||||
|
.form-group { margin-bottom: 20px; }
|
||||||
|
label { display: block; margin-bottom: 5px; font-weight: bold; }
|
||||||
|
input, textarea, select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; font-size: 16px; }
|
||||||
|
textarea { height: 100px; resize: vertical; }
|
||||||
|
button { background: #007bff; color: white; padding: 12px 24px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
|
||||||
|
button:hover { background: #0056b3; }
|
||||||
|
.success { color: green; text-align: center; padding: 20px; }
|
||||||
|
.error { color: red; text-align: center; padding: 20px; }
|
||||||
|
.backup-info { background: #fff3cd; border: 1px solid #ffeaa7; padding: 15px; border-radius: 5px; margin-bottom: 20px; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="form-container">
|
||||||
|
<h2>Kontaktformular (Backup)</h2>
|
||||||
|
|
||||||
|
<div class="backup-info">
|
||||||
|
<strong>Hinweis:</strong> Dies ist eine Backup-Version des Kontaktformulars. Wenn das Hauptformular nicht funktioniert, können Sie dieses verwenden.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form id="backupForm">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name">Name *</label>
|
||||||
|
<input type="text" id="name" name="name" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="organisation">Organisation</label>
|
||||||
|
<input type="text" id="organisation" name="organisation">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="contact">E-Mail oder Telefonnummer *</label>
|
||||||
|
<input type="text" id="contact" name="contact" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="service">Gewünschte Dienstleistung *</label>
|
||||||
|
<select id="service" name="service" required>
|
||||||
|
<option value="">Bitte wählen...</option>
|
||||||
|
<option value="website">Website</option>
|
||||||
|
<option value="ki-integration">KI Integration</option>
|
||||||
|
<option value="automatisation">Automatisation</option>
|
||||||
|
<option value="unabhaengige-wahl">Unabhängige Wahl</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="budget">Budget (€)</label>
|
||||||
|
<input type="text" id="budget" name="budget" placeholder="z.B. 5000 - 10000">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="description">Beschreibung *</label>
|
||||||
|
<textarea id="description" name="description" required placeholder="Beschreiben Sie Ihr Projekt oder Ihre Anfrage..."></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit">Anfrage senden</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id="result"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.getElementById('backupForm').addEventListener('submit', async function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
const formData = new FormData(this);
|
||||||
|
const data = Object.fromEntries(formData);
|
||||||
|
data.type = 'contact';
|
||||||
|
|
||||||
|
const resultDiv = document.getElementById('result');
|
||||||
|
resultDiv.innerHTML = '<p style="text-align: center;">Sende Anfrage...</p>';
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Try main PHP endpoint first
|
||||||
|
const response = await fetch('scripts/add/send.php', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify(data)
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.ok) {
|
||||||
|
const result = await response.json();
|
||||||
|
if (result.success) {
|
||||||
|
resultDiv.innerHTML = '<div class="success">Vielen Dank! Ihre Anfrage wurde erfolgreich gesendet. Wir melden uns bald bei Ihnen.</div>';
|
||||||
|
this.reset();
|
||||||
|
} else {
|
||||||
|
throw new Error(result.message || 'Unknown error');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new Error(`HTTP ${response.status}`);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// Fallback: Create mailto link
|
||||||
|
const subject = encodeURIComponent('Kontaktanfrage von Profice Website');
|
||||||
|
const body = encodeURIComponent(
|
||||||
|
`Name: ${data.name}\n` +
|
||||||
|
`Organisation: ${data.organisation || ''}\n` +
|
||||||
|
`Kontakt: ${data.contact}\n` +
|
||||||
|
`Dienstleistung: ${data.service}\n` +
|
||||||
|
`Budget: ${data.budget || ''}\n` +
|
||||||
|
`Beschreibung: ${data.description}`
|
||||||
|
);
|
||||||
|
|
||||||
|
const mailtoLink = `mailto:info@profice.de?subject=${subject}&body=${body}`;
|
||||||
|
|
||||||
|
resultDiv.innerHTML = `
|
||||||
|
<div class="error">
|
||||||
|
<p>Leider konnte die Anfrage nicht automatisch gesendet werden.</p>
|
||||||
|
<p>Bitte klicken Sie auf den untenstehenden Link, um Ihre E-Mail zu öffnen:</p>
|
||||||
|
<p><a href="${mailtoLink}" style="color: #007bff; text-decoration: underline;">E-Mail öffnen</a></p>
|
||||||
|
<p>Oder senden Sie eine E-Mail an: <strong>info@profice.de</strong></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -520,11 +520,103 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<!-- Debug Section (remove for production) -->
|
||||||
|
<div id="debug-panel" style="position: fixed; bottom: 20px; right: 20px; background: rgba(0,0,0,0.9); color: white; padding: 15px; border-radius: 8px; font-family: monospace; font-size: 12px; z-index: 9999; max-width: 300px; display: none;">
|
||||||
|
<h4 style="margin: 0 0 10px 0;">Debug Panel</h4>
|
||||||
|
<button onclick="testPHP()" style="background: #007bff; color: white; border: none; padding: 5px 10px; margin: 2px; cursor: pointer;">Test PHP</button>
|
||||||
|
<button onclick="testForm()" style="background: #28a745; color: white; border: none; padding: 5px 10px; margin: 2px; cursor: pointer;">Test Form</button>
|
||||||
|
<button onclick="toggleDebug()" style="background: #dc3545; color: white; border: none; padding: 5px 10px; margin: 2px; cursor: pointer;">Hide</button>
|
||||||
|
<div id="debug-output" style="margin-top: 10px; max-height: 200px; overflow-y: auto;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Debug Toggle Button -->
|
||||||
|
<button id="debug-toggle" onclick="toggleDebug()" style="position: fixed; bottom: 20px; right: 20px; background: #007bff; color: white; border: none; padding: 10px; border-radius: 50%; cursor: pointer; z-index: 9998; width: 40px; height: 40px; font-weight: bold;">?</button>
|
||||||
|
|
||||||
<!-- Optimized script loading -->
|
<!-- Optimized script loading -->
|
||||||
<script src="scripts/script.js" defer></script>
|
<script src="scripts/script.js" defer></script>
|
||||||
<script src="scripts/tech-onepager.js" defer></script>
|
<script src="scripts/tech-onepager.js" defer></script>
|
||||||
<script src="scripts/cursor.js" defer></script>
|
<script src="scripts/cursor.js" defer></script>
|
||||||
<script src="scripts/scroll-header.min.js" defer></script>
|
<script src="scripts/scroll-header.min.js" defer></script>
|
||||||
<script src="scripts/chat.js" defer></script>
|
<script src="scripts/chat.js" defer></script>
|
||||||
|
|
||||||
|
<!-- Debug Script -->
|
||||||
|
<script>
|
||||||
|
function toggleDebug() {
|
||||||
|
const panel = document.getElementById('debug-panel');
|
||||||
|
const toggle = document.getElementById('debug-toggle');
|
||||||
|
if (panel.style.display === 'none') {
|
||||||
|
panel.style.display = 'block';
|
||||||
|
toggle.style.display = 'none';
|
||||||
|
} else {
|
||||||
|
panel.style.display = 'none';
|
||||||
|
toggle.style.display = 'block';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function logDebug(message, isError = false) {
|
||||||
|
const output = document.getElementById('debug-output');
|
||||||
|
const timestamp = new Date().toLocaleTimeString();
|
||||||
|
const color = isError ? '#ff6b6b' : '#51cf66';
|
||||||
|
output.innerHTML += `<div style="color: ${color};">[${timestamp}] ${message}</div>`;
|
||||||
|
output.scrollTop = output.scrollHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function testPHP() {
|
||||||
|
logDebug('Testing PHP connection...');
|
||||||
|
try {
|
||||||
|
const response = await fetch('scripts/add/test.php');
|
||||||
|
if (response.ok) {
|
||||||
|
const result = await response.json();
|
||||||
|
logDebug(`✓ PHP OK: ${result.message}`);
|
||||||
|
logDebug(`PHP Version: ${result.server_info?.php_version || 'Unknown'}`);
|
||||||
|
} else {
|
||||||
|
logDebug(`✗ PHP Error: HTTP ${response.status}`, true);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logDebug(`✗ PHP Failed: ${error.message}`, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function testForm() {
|
||||||
|
logDebug('Testing contact form...');
|
||||||
|
try {
|
||||||
|
const response = await fetch('scripts/add/send.php', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
type: 'contact',
|
||||||
|
name: 'Debug Test',
|
||||||
|
contact: 'test@example.com',
|
||||||
|
service: 'website',
|
||||||
|
description: 'Debug test submission'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.ok) {
|
||||||
|
const result = await response.json();
|
||||||
|
if (result.success) {
|
||||||
|
logDebug('✓ Form submission successful');
|
||||||
|
logDebug(`Webhook: ${result.data?.webhook_result?.success ? 'OK' : 'Failed'}`);
|
||||||
|
} else {
|
||||||
|
logDebug(`✗ Form failed: ${result.message}`, true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
logDebug(`✗ Form Error: HTTP ${response.status}`, true);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logDebug(`✗ Form Failed: ${error.message}`, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auto-test on load
|
||||||
|
window.addEventListener('load', () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
logDebug('Debug panel ready - Click ? button to show');
|
||||||
|
testPHP();
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
2
Profice WebSite/scripts/scroll-header.min.js
vendored
2
Profice WebSite/scripts/scroll-header.min.js
vendored
@@ -1 +1 @@
|
|||||||
document.addEventListener("DOMContentLoaded",function(){const topBanner=document.querySelector('.top-banner');const slideMenu=document.querySelector('.slide-menu');if(!topBanner)return;const scrollThreshold=50;let isScrolled=false;let lastScrollY=0;let rafId=null;function updateHeaderState(scrolled){if(scrolled===isScrolled)return;requestAnimationFrame(()=>{if(scrolled){topBanner.classList.add('scrolled');if(slideMenu){slideMenu.style.transition='top 0.3s cubic-bezier(0.4, 0, 0.2, 1)';slideMenu.style.top='80px';}}else{topBanner.classList.remove('scrolled');if(slideMenu){slideMenu.style.transition='top 0.3s cubic-bezier(0.4, 0, 0.2, 1)';slideMenu.style.top='110px';}}});isScrolled=scrolled;}function handleScroll(){const currentScrollY=window.pageYOffset||document.documentElement.scrollTop;const shouldScroll=currentScrollY>scrollThreshold;updateHeaderState(shouldScroll);lastScrollY=currentScrollY;rafId=null;}function onScroll(){if(!rafId){rafId=requestAnimationFrame(handleScroll);}}window.addEventListener('scroll',onScroll,{passive:true});updateHeaderState(window.pageYOffset>scrollThreshold);});
|
document.addEventListener("DOMContentLoaded",function(){const topBanner=document.querySelector('.top-banner');const slideMenu=document.querySelector('.slide-menu');if(!topBanner)return;const scrollThreshold=50;const rafDelay=8;let isScrolled=false;let lastScrollY=0;let scrollDirection='down';let rafId=null;let lastUpdateTime=0;let scrollVelocity=0;let lastScrollTime=0;function calculateVelocity(currentScrollY,currentTime){if(lastScrollTime===0){lastScrollTime=currentTime;return 0;}const timeDelta=currentTime-lastScrollTime;const scrollDelta=Math.abs(currentScrollY-lastScrollY);const velocity=scrollDelta/timeDelta;lastScrollTime=currentTime;return velocity;}function updateHeaderState(scrolled,velocity=0){if(scrolled===isScrolled)return;if(velocity>5){topBanner.classList.add('fast-scroll');}else{topBanner.classList.remove('fast-scroll');}requestAnimationFrame(()=>{if(scrolled){topBanner.classList.add('scrolled');if(slideMenu){slideMenu.style.transition='top 0.3s cubic-bezier(0.4, 0, 0.2, 1)';slideMenu.style.top='80px';}}else{topBanner.classList.remove('scrolled');if(slideMenu){slideMenu.style.transition='top 0.3s cubic-bezier(0.4, 0, 0.2, 1)';slideMenu.style.top='110px';}}});isScrolled=scrolled;}function handleScroll(currentTime){if(currentTime-lastUpdateTime<rafDelay){rafId=requestAnimationFrame(handleScroll);return;}const currentScrollY=window.pageYOffset||document.documentElement.scrollTop;const velocity=calculateVelocity(currentScrollY,currentTime);const scrollDelta=currentScrollY-lastScrollY;if(Math.abs(scrollDelta)>1){scrollDirection=scrollDelta>0?'down':'up';}let shouldScroll;if(scrollDirection==='down'){shouldScroll=currentScrollY>scrollThreshold+10;}else{shouldScroll=currentScrollY>scrollThreshold-10;}updateHeaderState(shouldScroll,velocity);lastScrollY=currentScrollY;lastUpdateTime=currentTime;rafId=null;}function onScroll(){if(!rafId){rafId=requestAnimationFrame(handleScroll);}}window.addEventListener('scroll',onScroll,{passive:true,capture:false});let resizeTimeout;function onResize(){clearTimeout(resizeTimeout);resizeTimeout=setTimeout(()=>{lastScrollY=window.pageYOffset||document.documentElement.scrollTop;updateHeaderState(lastScrollY>scrollThreshold);},100);}window.addEventListener('resize',onResize,{passive:true});function onVisibilityChange(){if(document.hidden){if(rafId){cancelAnimationFrame(rafId);rafId=null;}}else{lastScrollY=window.pageYOffset||document.documentElement.scrollTop;updateHeaderState(lastScrollY>scrollThreshold);}}document.addEventListener('visibilitychange',onVisibilityChange);requestAnimationFrame(()=>{updateHeaderState(window.pageYOffset>scrollThreshold);});document.querySelectorAll('a[href^="#"]').forEach(link=>{link.addEventListener('click',function(e){const targetId=this.getAttribute('href');if(targetId==='#')return;const targetElement=document.querySelector(targetId);if(targetElement){e.preventDefault();const headerHeight=topBanner.offsetHeight;const targetPosition=targetElement.offsetTop-headerHeight-20;window.scrollTo({top:targetPosition,behavior:'smooth'});}});});});
|
||||||
|
|||||||
Reference in New Issue
Block a user