?
| Current Path : /home/webyoo/www/hanessiim/site/admin/ |
| Current File : /home/webyoo/www/hanessiim/site/admin/payment_page_new.php |
<?php
include_once "start.php";
$err = 0;
if(isset($_GET['id']) && strlen($_GET['id']) >= 17){
$id = substr($_GET['id'], 8, strlen($_GET['id']) - 16);
if($id == 26){
$name = "转讜专诐 讗谞讜谞讬诪讬";
$balance = 0;
}else if($id == 52){
$name = "诪谞讛诇";
$balance = 0;
}else{
$sqlusers = mysqli_query($link,"SELECT * FROM syna_users WHERE id = ".$id);
$rowusers = mysqli_fetch_array($sqlusers, MYSQLI_ASSOC);
$name = $rowusers['first_name'].' '.$rowusers['last_name'];
$balance = $rowusers['balance'];
}
$show_payment_choice = ($id == 52);
}else{
$err = 1;
}
if($err == 0){
?>
<!DOCTYPE html>
<html lang="he" dir="rtl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>讚祝 转专讜诪讛 注讘讜专 讘讬转 讛讻谞住转 讛谞砖讬讗讬诐</title>
<!-- Bootstrap 5 CDN -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.rtl.min.css" rel="stylesheet">
<!-- Bootstrap Icons -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Alef:wght@400;700&display=swap" rel="stylesheet">
<style>
* { box-sizing: border-box; }
body {
font-family: 'Alef', sans-serif;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.form-card {
background: #fff;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0,0,0,0.1);
max-width: 520px;
width: 100%;
overflow: hidden;
}
.form-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 30px 20px 20px;
text-align: center;
color: #fff;
}
.form-header img.logo {
width: 120px;
border-radius: 50%;
margin-bottom: 10px;
border: 3px solid rgba(255,255,255,0.3);
}
.form-header img.pelecard {
width: 70px;
margin-top: 5px;
opacity: 0.85;
}
.form-header h5 {
margin: 10px 0 0;
font-weight: 700;
font-size: 1.1rem;
}
/* Step Indicator */
.step-indicator {
display: flex;
align-items: center;
justify-content: center;
padding: 25px 40px 10px;
gap: 0;
}
.step-circle {
width: 44px;
height: 44px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 1rem;
background: #e9ecef;
color: #adb5bd;
transition: all 0.4s ease;
position: relative;
z-index: 1;
flex-shrink: 0;
}
.step-circle.active {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
transform: scale(1.1);
}
.step-circle.done {
background: #28a745;
color: #fff;
}
.step-line {
flex: 1;
height: 4px;
background: #e9ecef;
border-radius: 2px;
margin: 0 8px;
position: relative;
overflow: hidden;
}
.step-line .fill {
height: 100%;
width: 0%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 2px;
transition: width 0.5s ease;
}
.step-labels {
display: flex;
justify-content: space-between;
padding: 5px 30px 15px;
font-size: 0.85rem;
color: #6c757d;
}
.step-labels span {
transition: color 0.3s;
}
.step-labels span.active {
color: #667eea;
font-weight: 700;
}
/* Form Body */
.form-body {
padding: 10px 30px 30px;
position: relative;
overflow: hidden;
min-height: 280px;
}
.step-content {
display: none;
animation: fadeSlideIn 0.45s ease forwards;
}
.step-content.active {
display: block;
}
@keyframes fadeSlideIn {
from { opacity: 0; transform: translateX(-20px); }
to { opacity: 1; transform: translateX(0); }
}
.form-floating {
margin-bottom: 18px;
}
.form-floating .form-control {
border-radius: 12px;
border: 2px solid #e9ecef;
padding-right: 45px;
font-size: 1rem;
transition: border-color 0.3s;
}
.form-floating .form-control:focus {
border-color: #667eea;
box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.25);
}
.form-floating label {
right: 45px;
left: auto;
color: #adb5bd;
}
.input-icon {
position: absolute;
top: 50%;
right: 14px;
transform: translateY(-50%);
color: #667eea;
font-size: 1.2rem;
z-index: 5;
pointer-events: none;
}
.field-wrapper {
position: relative;
}
/* Payment Method Selector */
.payment-methods {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 20px;
}
.payment-method {
flex: 1 1 calc(33.333% - 10px);
min-width: 110px;
text-align: center;
padding: 12px 8px;
border: 2px solid #e9ecef;
border-radius: 14px;
cursor: pointer;
transition: all 0.3s;
background: #fff;
}
.payment-method:hover:not(.disabled) {
border-color: #667eea;
}
.payment-method.selected {
border-color: #667eea;
background: #f0f0ff;
box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}
.payment-method.disabled {
opacity: 0.4;
cursor: not-allowed;
}
.payment-method i {
font-size: 1.5rem;
display: block;
margin-bottom: 5px;
color: #667eea;
}
.payment-method .pm-label {
font-size: 0.75rem;
font-weight: 700;
color: #333;
}
.payment-method.disabled i,
.payment-method.disabled .pm-label {
color: #adb5bd;
}
/* Amount special */
.amount-display {
text-align: center;
padding: 10px 0;
}
.amount-display .bi-cash-coin {
font-size: 3rem;
color: #667eea;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.1); }
}
.amount-input-wrap {
position: relative;
max-width: 300px;
margin: 15px auto 0;
}
.amount-input-wrap .form-control {
text-align: center;
font-size: 1.5rem;
font-weight: 700;
border: 3px solid #667eea;
border-radius: 16px;
padding: 15px;
color: #333;
}
.amount-input-wrap .form-control:focus {
border-color: #764ba2;
box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}
.currency-label {
font-size: 1rem;
color: #6c757d;
margin-top: 8px;
}
/* Buttons */
.btn-next, .btn-pay {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
color: #fff;
border-radius: 14px;
padding: 14px;
font-size: 1.1rem;
font-weight: 700;
width: 100%;
transition: transform 0.2s, box-shadow 0.2s;
}
.btn-next:hover, .btn-pay:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
color: #fff;
}
.btn-back {
background: transparent;
border: 2px solid #e9ecef;
color: #6c757d;
border-radius: 14px;
padding: 14px;
font-size: 1rem;
width: 100%;
transition: all 0.2s;
}
.btn-back:hover {
border-color: #667eea;
color: #667eea;
}
.invalid-feedback-custom {
color: #dc3545;
font-size: 0.85rem;
margin-top: 4px;
display: none;
}
.form-control.is-invalid {
border-color: #dc3545 !important;
}
.form-control.is-invalid + .invalid-feedback-custom {
display: block;
}
</style>
</head>
<body>
<div class="form-card">
<!-- Header -->
<div class="form-header">
<img src="images/hanesiim.com.png" class="logo" alt="讛谞砖讬讗讬诐">
<h5>讘专讜讱 讛讘讗 诇讚祝 讛转专讜诪讜转</h5>
<div style="font-size:0.9rem; opacity:0.85; margin-top:4px;">讘讬转 讛讻谞住转 讛谞砖讬讗讬诐</div>
<img src="images/logo_pelecard.png" class="pelecard" alt="Pelecard">
</div>
<!-- Step Indicator -->
<div class="step-indicator">
<div class="step-circle active" id="circle1">1</div>
<div class="step-line"><div class="fill" id="lineFill"></div></div>
<div class="step-circle" id="circle2">2</div>
</div>
<div class="step-labels">
<span class="active" id="label1">讛讝讛讜转</span>
<span id="label2">转砖诇讜诐</span>
</div>
<!-- Form -->
<div class="form-body">
<form method="post" action="payment_pelecard_new.php" id="paymentForm" novalidate>
<input type="hidden" name="id_user" value="<?=$id?>">
<input type="hidden" name="type_payment" id="type_payment" value="1">
<!-- STEP 1 : 讝讛讜转 -->
<div class="step-content active" id="step1">
<div class="field-wrapper">
<i class="bi bi-person-fill input-icon" style="top:28px;"></i>
<div class="form-floating">
<input type="text" class="form-control" id="fullname" name="fullname" placeholder="砖诐 诪诇讗" required>
<label for="fullname">砖诐 讜砖诐 诪砖驻讞讛</label>
</div>
<div class="invalid-feedback-custom" id="err-fullname">谞讗 诇诪诇讗 砖诐 诪诇讗</div>
</div>
<div class="field-wrapper">
<i class="bi bi-envelope-fill input-icon" style="top:28px;"></i>
<div class="form-floating">
<input type="email" class="form-control" id="email" name="email" placeholder="讗讬诪讬讬诇" required>
<label for="email">讻转讜讘转 讗讬诪讬讬诇</label>
</div>
<div class="invalid-feedback-custom" id="err-email">谞讗 诇诪诇讗 讻转讜讘转 讗讬诪讬讬诇 转拽讬谞讛</div>
</div>
<div class="field-wrapper">
<i class="bi bi-telephone-fill input-icon" style="top:28px;"></i>
<div class="form-floating">
<input type="tel" class="form-control" id="tel" name="tel" placeholder="讟诇驻讜谉" required>
<label for="tel">诪住驻专 讟诇驻讜谉</label>
</div>
<div class="invalid-feedback-custom" id="err-tel">谞讗 诇诪诇讗 诪住驻专 讟诇驻讜谉</div>
</div>
<button type="button" class="btn btn-next mt-2" onclick="goToStep(2)">
讛诪砖讱 <i class="bi bi-arrow-left"></i>
</button>
</div>
<!-- STEP 2 : 住讻讜诐 + 讗诪爪注讬 转砖诇讜诐 -->
<div class="step-content" id="step2">
<!-- Payment Method Selector -->
<div style="text-align:center; font-size:0.95rem; font-weight:700; color:#333; margin-bottom:10px;">讘讞专 讗诪爪注讬 转砖诇讜诐</div>
<div class="payment-methods">
<div class="payment-method selected" data-value="1" onclick="selectPayment(this, 1)">
<i class="bi bi-credit-card"></i>
<div class="pm-label">讻专讟讬住 讗砖专讗讬</div>
</div>
<div class="payment-method <?= $show_payment_choice ? '' : 'disabled' ?>" data-value="2" <?= $show_payment_choice ? 'onclick="selectPayment(this, 2)"' : '' ?>>
<i class="bi bi-bank"></i>
<div class="pm-label">讛注讘专讛 讘谞拽讗讬转</div>
</div>
<div class="payment-method <?= $show_payment_choice ? '' : 'disabled' ?>" data-value="3" <?= $show_payment_choice ? 'onclick="selectPayment(this, 3)"' : '' ?>>
<i class="bi bi-cash-stack"></i>
<div class="pm-label">诪讝讜诪谉</div>
</div>
<div class="payment-method <?= $show_payment_choice ? '' : 'disabled' ?>" data-value="4" <?= $show_payment_choice ? 'onclick="selectPayment(this, 4)"' : '' ?>>
<i class="bi bi-phone"></i>
<div class="pm-label">讘讬讟</div>
</div>
<div class="payment-method <?= $show_payment_choice ? '' : 'disabled' ?>" data-value="5" <?= $show_payment_choice ? 'onclick="selectPayment(this, 5)"' : '' ?>>
<i class="bi bi-wallet2"></i>
<div class="pm-label">驻讬讬讘讜拽住</div>
</div>
<div class="payment-method <?= $show_payment_choice ? '' : 'disabled' ?>" data-value="6" <?= $show_payment_choice ? 'onclick="selectPayment(this, 6)"' : '' ?>>
<i class="bi bi-journal-check"></i>
<div class="pm-label">爪'拽</div>
</div>
</div>
<!-- Bank Info Box (visible only when 讛注讘专讛 讘谞拽讗讬转 is selected) -->
<div id="bankInfoBox" style="display:none; background:#f8f9ff; border-radius:14px; padding:20px; border:2px dashed #667eea; text-align:center; margin-bottom:15px;">
<div style="font-size:1.5rem; color:#667eea; margin-bottom:6px;"><i class="bi bi-bank2"></i></div>
<div style="font-weight:700; font-size:1rem; color:#333; margin-bottom:3px;">诪讜住讚讜转 砖诪讞转 讗讘专讛诐</div>
<div style="color:#28a745; font-weight:700; font-size:0.85rem; margin-bottom:12px;">
<i class="bi bi-check-circle-fill" style="margin-left:5px;"></i>讗讬砖讜专 诪住 讛讻谞住讛 诇驻讬 住注讬祝 46
</div>
<div style="display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px solid #eee;">
<span style="color:#6c757d; font-size:0.85rem;"><i class="bi bi-bank"></i> 讘谞拽</span>
<span style="font-weight:700; color:#333;">讛驻讜注诇讬诐 (12)</span>
</div>
<div style="display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px solid #eee;">
<span style="color:#6c757d; font-size:0.85rem;"><i class="bi bi-geo-alt"></i> 住谞讬祝</span>
<span style="font-weight:700; color:#333;">661</span>
</div>
<div style="display:flex; justify-content:space-between; padding:6px 0;">
<span style="color:#6c757d; font-size:0.85rem;"><i class="bi bi-hash"></i> 讞砖讘讜谉</span>
<span style="font-weight:700; color:#333;">221662</span>
</div>
<a href="oraatkevahanesiim.pdf" style="display:inline-flex; align-items:center; gap:8px; background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:#fff; padding:8px 20px; border-radius:12px; font-size:0.9rem; font-weight:700; text-decoration:none; margin-top:12px;">
<i class="bi bi-file-earmark-pdf"></i> 诇讛讜专讚转 讛讜专讗转 拽讘注 讘PDF
</a>
</div>
<!-- Cheque Details (visible only when 爪'拽 is selected) -->
<div id="chequeInfoBox" style="display:none; background:#f8f9ff; border-radius:14px; padding:15px; border:2px dashed #667eea; margin-bottom:15px;">
<div style="text-align:center; font-size:0.95rem; font-weight:700; color:#333; margin-bottom:12px;">驻专讟讬 爪'拽</div>
<div class="field-wrapper">
<i class="bi bi-123 input-icon" style="top:22px;"></i>
<div class="form-floating" style="margin-bottom:12px;">
<input type="text" class="form-control cheque-field" id="check_number" name="check_number" placeholder="诪住驻专 爪'拽" autocomplete="off">
<label for="check_number">诪住驻专 爪'拽</label>
</div>
</div>
<div class="field-wrapper">
<i class="bi bi-bank input-icon" style="top:22px;"></i>
<div class="form-floating" style="margin-bottom:12px;">
<input type="text" class="form-control cheque-field" id="check_bank" name="check_bank" placeholder="讘谞拽" autocomplete="off">
<label for="check_bank">讘谞拽</label>
</div>
</div>
<div class="field-wrapper">
<i class="bi bi-hash input-icon" style="top:22px;"></i>
<div class="form-floating" style="margin-bottom:0;">
<input type="text" class="form-control cheque-field" id="check_account" name="check_account" placeholder="诪住驻专 讞砖讘讜谉" autocomplete="off">
<label for="check_account">诪住驻专 讞砖讘讜谉</label>
</div>
</div>
</div>
<div class="amount-display">
<i class="bi bi-cash-coin"></i>
<div style="margin-top:10px; font-size:1.1rem; color:#333; font-weight:700;">讻诪讛 转专爪讛 诇转专讜诐?</div>
</div>
<div class="amount-input-wrap">
<input type="number" class="form-control" id="amount" name="amount" placeholder="0" min="1" value="<?php echo $balance > 0 ? $balance : '' ?>" required>
<div class="currency-label">鈧 砖拽诇讬诐 讞讚砖讬诐</div>
<div class="invalid-feedback-custom" id="err-amount" style="text-align:center;">谞讗 诇诪诇讗 住讻讜诐 转拽讬谉</div>
</div>
<div class="row g-2 mt-4">
<div class="col-4">
<button type="button" class="btn btn-back" onclick="goToStep(1)">
<i class="bi bi-arrow-right"></i> 讞讝讜专
</button>
</div>
<div class="col-8">
<button type="submit" class="btn btn-pay" id="btnSubmit">
<i class="bi bi-credit-card" id="btnIcon"></i> <span id="btnText">砖诇诐 注讻砖讬讜</span>
</button>
</div>
</div>
</div>
</form>
</div>
</div>
<script>
function selectPayment(el, value) {
// Remove selected from all
document.querySelectorAll('.payment-method').forEach(function(pm) {
pm.classList.remove('selected');
});
el.classList.add('selected');
document.getElementById('type_payment').value = value;
// Show/hide bank info box
var bankBox = document.getElementById('bankInfoBox');
bankBox.style.display = (value === 2) ? 'block' : 'none';
// Show/hide cheque info box and required state
var chequeBox = document.getElementById('chequeInfoBox');
var chequeFields = document.querySelectorAll('.cheque-field');
var isCheque = (value === 6);
chequeBox.style.display = isCheque ? 'block' : 'none';
chequeFields.forEach(function(field) {
field.required = isCheque;
if (!isCheque) {
field.classList.remove('is-invalid');
}
});
// Update button text and icon
var btnIcon = document.getElementById('btnIcon');
var btnText = document.getElementById('btnText');
if (value === 1) {
btnIcon.className = 'bi bi-credit-card';
btnText.textContent = '砖诇诐 注讻砖讬讜';
} else if (value === 2) {
btnIcon.className = 'bi bi-bank';
btnText.textContent = '讗砖专 讛注讘专讛 讘谞拽讗讬转';
} else if (value === 3) {
btnIcon.className = 'bi bi-cash-stack';
btnText.textContent = '讗砖专 转砖诇讜诐 讘诪讝讜诪谉';
} else if (value === 4) {
btnIcon.className = 'bi bi-phone';
btnText.textContent = '讗砖专 转砖诇讜诐 讘讘讬讟';
} else if (value === 5) {
btnIcon.className = 'bi bi-wallet2';
btnText.textContent = '讗砖专 转砖诇讜诐 讘驻讬讬讘讜拽住';
} else if (value === 6) {
btnIcon.className = 'bi bi-journal-check';
btnText.textContent = "讗砖专 转砖诇讜诐 讘爪'拽";
}
}
function goToStep(step) {
if (step === 2) {
// Validate step 1
let valid = true;
const fullname = document.getElementById('fullname');
const email = document.getElementById('email');
const tel = document.getElementById('tel');
// Reset
[fullname, email, tel].forEach(f => f.classList.remove('is-invalid'));
if (!fullname.value.trim()) { fullname.classList.add('is-invalid'); valid = false; }
if (!email.value.trim() || !email.validity.valid) { email.classList.add('is-invalid'); valid = false; }
if (!tel.value.trim()) { tel.classList.add('is-invalid'); valid = false; }
if (!valid) return;
}
// Switch steps
document.getElementById('step1').classList.remove('active');
document.getElementById('step2').classList.remove('active');
document.getElementById('step' + step).classList.add('active');
// Update indicator
const c1 = document.getElementById('circle1');
const c2 = document.getElementById('circle2');
const fill = document.getElementById('lineFill');
const l1 = document.getElementById('label1');
const l2 = document.getElementById('label2');
if (step === 1) {
c1.className = 'step-circle active';
c1.innerHTML = '1';
c2.className = 'step-circle';
fill.style.width = '0%';
l1.className = 'active';
l2.className = '';
} else {
c1.className = 'step-circle done';
c1.innerHTML = '<i class="bi bi-check-lg"></i>';
c2.className = 'step-circle active';
fill.style.width = '100%';
l1.className = '';
l2.className = 'active';
}
}
// Handle form submission 鈥 change action based on payment type
document.getElementById('paymentForm').addEventListener('submit', function(e) {
var amount = document.getElementById('amount');
amount.classList.remove('is-invalid');
if (!amount.value || parseFloat(amount.value) <= 0) {
e.preventDefault();
amount.classList.add('is-invalid');
return;
}
var typePayment = document.getElementById('type_payment').value;
if (typePayment === '6') {
var checkNumber = document.getElementById('check_number');
var checkBank = document.getElementById('check_bank');
var checkAccount = document.getElementById('check_account');
[checkNumber, checkBank, checkAccount].forEach(function(field) {
field.classList.remove('is-invalid');
});
var chequeValid = true;
if (!checkNumber.value.trim()) { checkNumber.classList.add('is-invalid'); chequeValid = false; }
if (!checkBank.value.trim()) { checkBank.classList.add('is-invalid'); chequeValid = false; }
if (!checkAccount.value.trim()) { checkAccount.classList.add('is-invalid'); chequeValid = false; }
if (!chequeValid) {
e.preventDefault();
return;
}
}
if (typePayment === '1') {
this.action = 'payment_pelecard_new.php';
} else {
this.action = 'payment_direct.php';
}
});
// Remove invalid state on input
document.querySelectorAll('.form-control').forEach(function(el) {
el.addEventListener('input', function() {
this.classList.remove('is-invalid');
});
});
</script>
</body>
</html>
<?php
}else{
echo "砖讙讬讗讛 讘拽讬砖讜专 讝讛. 讚祝 讛转专讜诪讛 讗讬谞讜 讝诪讬谉.";
}?>