/home/awneajlw/.trash/shop-registration-form.php
<?php
session_start();
// Handle OTP verification from verify-otp.php
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['otp'])) {
$otp = $_POST['otp'];
// For demo purposes, accept any 6-digit OTP
if ($otp !== '123456') {
// Invalid OTP, redirect back to verify-otp.php
header('Location: verify-otp.php?error=invalid_otp');
exit();
}
// If OTP is correct, continue to show the form
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shop Registration - OPTI SLIP</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #2563eb 100%);
min-height: 100vh;
padding: 0;
margin: 0;
position: relative;
overflow-x: hidden;
}
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
opacity: 0.3;
pointer-events: none;
}
.container {
max-width: 100%;
margin: 0;
padding: 0;
position: relative;
z-index: 1;
}
.forms-container {
display: flex;
justify-content: center;
margin-top: 20px;
}
.form-card {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(20px);
border-radius: 24px;
padding: 60px 50px;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
position: relative;
min-height: 600px;
max-width: 100%;
width: 100%;
margin: 20px;
border: 1px solid rgba(255, 255, 255, 0.3);
}
.form-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #4f46e5, #7c3aed, #2563eb);
border-radius: 24px 24px 0 0;
}
.form-header {
display: flex;
align-items: center;
margin-bottom: 40px;
}
.back-btn {
color: #6b7280;
font-size: 24px;
text-decoration: none;
margin-right: 20px;
transition: all 0.3s ease;
}
.back-btn:hover {
color: #10b981;
transform: translateX(-5px);
}
.logo-container {
display: flex;
align-items: center;
gap: 15px;
}
.logo {
width: 50px;
height: 50px;
background: #10b981;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.logo-icon {
font-size: 24px;
color: white;
}
.logo-text {
color: #1f2937;
font-size: 20px;
font-weight: bold;
letter-spacing: 1px;
}
.form-title {
color: #1f2937;
font-size: 32px;
font-weight: 700;
margin-bottom: 40px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
letter-spacing: 0.5px;
}
.form-group {
margin-bottom: 30px;
position: relative;
}
.form-label {
color: #374151;
font-weight: 600;
margin-bottom: 12px;
display: block;
font-size: 16px;
letter-spacing: 0.5px;
}
.form-control {
width: 100%;
padding: 16px 20px;
border: 2px solid #e5e7eb;
border-radius: 12px;
font-size: 16px;
transition: all 0.4s ease;
background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}
.form-control:focus {
outline: none;
border-color: #4f46e5;
background: white;
box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.05);
transform: translateY(-2px);
}
.upload-section {
display: flex;
gap: 15px;
align-items: end;
}
.file-input-wrapper {
flex: 1;
position: relative;
}
.file-input {
width: 100%;
padding: 15px 20px;
border: 2px solid #e5e7eb;
border-radius: 12px;
font-size: 16px;
background: #f9fafb;
cursor: pointer;
}
.file-input:focus {
outline: none;
border-color: #10b981;
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.btn-upload {
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
color: white;
border: none;
padding: 16px 30px;
border-radius: 12px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.4s ease;
white-space: nowrap;
position: relative;
overflow: hidden;
}
.btn-upload::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s;
}
.btn-upload:hover::before {
left: 100%;
}
.btn-upload:hover {
background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
transform: translateY(-3px);
box-shadow: 0 15px 35px rgba(79, 70, 229, 0.4);
}
.pagination-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid #e5e7eb;
}
.pagination-btn {
color: #10b981;
text-decoration: none;
font-weight: 600;
font-size: 16px;
transition: all 0.3s ease;
}
.pagination-btn:hover {
color: #059669;
text-decoration: underline;
}
.pagination-steps {
display: flex;
align-items: center;
gap: 10px;
}
.step-number {
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 14px;
}
.step-active {
background: #10b981;
color: white;
}
.step-inactive {
background: #e5e7eb;
color: #6b7280;
}
.step-dots {
color: #9ca3af;
font-weight: bold;
}
.btn-submit {
width: 100%;
background: #10b981;
color: white;
border: none;
padding: 15px;
border-radius: 12px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 20px;
}
.btn-submit:hover {
background: #059669;
transform: translateY(-2px);
}
@media (max-width: 1024px) {
.container {
max-width: 95%;
}
.form-card {
max-width: 100%;
}
}
@media (max-width: 768px) {
.forms-container {
grid-template-columns: 1fr;
gap: 20px;
}
.form-card {
padding: 30px 20px;
max-width: 100%;
}
.upload-section {
flex-direction: column;
gap: 10px;
}
.btn-upload {
width: 100%;
}
.pagination-footer {
flex-direction: column;
gap: 15px;
text-align: center;
}
.pagination-steps {
order: -1;
}
}
@media (max-width: 480px) {
.form-card {
padding: 20px 15px;
}
.form-title {
font-size: 20px;
}
.pagination-steps {
flex-wrap: wrap;
gap: 5px;
}
.step-number {
width: 25px;
height: 25px;
font-size: 12px;
}
}
/* Responsive Design */
@media (max-width: 768px) {
.form-card {
padding: 30px 20px;
margin: 10px;
}
.form-header h2 {
font-size: 24px;
}
.form-group {
margin-bottom: 20px;
}
.form-control {
padding: 12px 15px;
}
.btn-primary {
padding: 12px 30px;
font-size: 16px;
}
}
@media (max-width: 480px) {
.form-card {
padding: 20px 15px;
margin: 5px;
}
.form-header h2 {
font-size: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-control {
padding: 10px 12px;
}
.btn-primary {
padding: 10px 25px;
font-size: 14px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="forms-container">
<!-- Shop Registration Form -->
<div class="form-card">
<div class="form-header">
<a href="verify-otp.php" class="back-btn">
<i class="fas fa-arrow-left"></i>
</a>
<div class="logo-container">
<div class="logo">
<i class="fas fa-glasses logo-icon"></i>
</div>
<div class="logo-text">OPTI SLIP</div>
</div>
</div>
<h2 class="form-title">shop regirati</h2>
<form method="POST" action="save-shop-basic.php" enctype="multipart/form-data">
<div class="form-group">
<label class="form-label">Shop Name</label>
<input type="text" name="shop_name" class="form-control" placeholder="XXXXXXXXXX" required>
</div>
<div class="form-group">
<label class="form-label">Phone Number</label>
<input type="tel" name="phone" class="form-control" placeholder="XXXXXXXXXX" required>
</div>
<div class="form-group">
<label class="form-label">User Name</label>
<input type="text" name="username" class="form-control" placeholder="admin" required>
</div>
<div class="form-group">
<label class="form-label">Password</label>
<input type="password" name="password" class="form-control" placeholder="....." required>
</div>
<div class="form-group">
<label class="form-label">Upload Logo</label>
<div class="upload-section">
<div class="file-input-wrapper">
<input type="file" name="logo" class="file-input" accept="image/*" onchange="updateFileName(this)">
</div>
<button type="button" class="btn-upload" onclick="document.querySelector('input[type=file]').click()">
UPLOAD
</button>
</div>
</div>
<button type="submit" class="btn-submit">Continue to Social Media</button>
</form>
<div class="pagination-footer">
<a href="verify-otp.php" class="pagination-btn">PREVIOUS</a>
<div class="pagination-steps">
<span class="step-number step-inactive">1</span>
<span class="step-number step-inactive">2</span>
<span class="step-number step-inactive">3</span>
<span class="step-number step-inactive">4</span>
<span class="step-number step-inactive">5</span>
<span class="step-number step-inactive">6</span>
<span class="step-dots">. . .</span>
<span class="step-number step-inactive">10</span>
</div>
<a href="social-media-reg.php" class="pagination-btn">NEXT</a>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
function updateFileName(input) {
if (input.files && input.files[0]) {
const fileName = input.files[0].name;
input.value = fileName;
}
}
// Form validation
document.querySelectorAll('form').forEach(form => {
form.addEventListener('submit', function(e) {
const requiredFields = this.querySelectorAll('input[required]');
let isValid = true;
requiredFields.forEach(field => {
if (!field.value.trim()) {
field.style.borderColor = '#ef4444';
isValid = false;
} else {
field.style.borderColor = '#e5e7eb';
}
});
if (!isValid) {
e.preventDefault();
alert('Please fill in all required fields');
}
});
});
// File upload preview
document.querySelector('input[type="file"]').addEventListener('change', function(e) {
const file = e.target.files[0];
if (file) {
// Show file name
this.style.color = '#10b981';
this.style.fontWeight = '500';
}
});
</script>
</body>
</html>