/
home
/
u764571690
/
domains
/
savitrfoundation.com
/
public_html
/
/home/u764571690/domains/savitrfoundation.com/public_html
mkdir
upload
Name
Size
Mode
Actions
admin/
-
0755
rm
ajax/
-
0755
rm
api/
-
0755
rm
assets/
-
0755
rm
cache/
-
0755
rm
certificate_view/
-
0755
rm
css/
-
0755
rm
documents_upload/
-
0755
rm
F2/
-
0755
rm
finger data/
-
0755
rm
functions/
-
0755
rm
hts-cache/
-
0755
rm
js/
-
0755
rm
logs/
-
0755
rm
pages/
-
0755
rm
privacy policy/
-
0755
rm
savitrfoundation/
-
0755
rm
scholar/
-
0755
rm
terms and conditions/
-
0755
rm
tmp/
-
0755
rm
uploads/
-
0755
rm
.htaccess
3583
0644
edit
dl
rm
.htaccess.htaccess
9223
0644
edit
dl
rm
.user.ini
623
0644
edit
dl
rm
ads.txt
58
0644
edit
dl
rm
application.php
41647
0644
edit
dl
rm
backblue.gif
4243
0644
edit
dl
rm
careers.php
18402
0644
edit
dl
rm
fade.gif
828
0644
edit
dl
rm
how to apply.php
44852
0644
edit
dl
rm
hts-log.txt
2738
0644
edit
dl
rm
index.php
50
0644
edit
dl
rm
ngo_account_open.php
27984
0644
edit
dl
rm
our_scholars.php
11882
0644
edit
dl
rm
php.ini
617
0644
edit
dl
rm
reupload_document.php
6038
0644
edit
dl
rm
robots.txt
291
0644
edit
dl
rm
scholarshipapply.php
219769
0644
edit
dl
rm
scholarshipportal.php
89993
0644
edit
dl
rm
sendmail.php
2720
0644
edit
dl
rm
sitemap.xml
3743
0644
edit
dl
rm
submit-internship-application.php
8856
0644
edit
dl
rm
sw.js
156
0644
edit
dl
rm
upload_document_main.php
6121
0644
edit
dl
rm
Edit:
/home/u764571690/domains/savitrfoundation.com/public_html/ngo_account_open.php
(27984B)
<?php // Include database and helper files require_once 'scholar/db.php'; require_once 'scholar/base_links_helper.php'; // Handle form submission $firstName = ''; $lastName = ''; $aadhaar = ''; $mobile = ''; $email = ''; $pincode = ''; $address = ''; $generatedLink = ''; $showResult = false; $errors = []; if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Get form data $firstName = isset($_POST['firstName']) ? trim($_POST['firstName']) : ''; $lastName = isset($_POST['lastName']) ? trim($_POST['lastName']) : ''; $aadhaar = isset($_POST['aadhaar']) ? preg_replace('/\s+/', '', trim($_POST['aadhaar'])) : ''; $mobile = isset($_POST['mobile']) ? preg_replace('/\D/', '', trim($_POST['mobile'])) : ''; $email = isset($_POST['email']) ? trim($_POST['email']) : ''; $pincode = isset($_POST['pincode']) ? preg_replace('/\D/', '', trim($_POST['pincode'])) : ''; $address = isset($_POST['address']) ? trim($_POST['address']) : ''; // Validation if (empty($firstName)) { $errors['firstName'] = 'Please enter your first name'; } if (empty($lastName)) { $errors['lastName'] = 'Please enter your last name'; } if (empty($aadhaar) || strlen($aadhaar) !== 12 || !ctype_digit($aadhaar)) { $errors['aadhaar'] = 'Please enter valid 12 digit Aadhaar number'; } if (empty($mobile) || strlen($mobile) !== 10 || !ctype_digit($mobile)) { $errors['mobile'] = 'Please enter valid 10 digit mobile number'; } if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) { $errors['email'] = 'Please enter valid email address'; } if (empty($pincode) || strlen($pincode) !== 6 || !ctype_digit($pincode)) { $errors['pincode'] = 'Please enter valid 6 digit PIN code'; } // Check if pincode is eligible (validate against eligible pincodes) if (empty($errors['pincode']) && !empty($pincode)) { // Include eligible pincodes $pincodeFile = __DIR__ . '/js/kotak811_eligible_pincodes.php'; if (file_exists($pincodeFile)) { require_once $pincodeFile; if (!isPincodeEligible($pincode)) { $errors['pincode'] = 'not_eligible'; } } } // If no errors, generate link if (empty($errors)) { // Generate unique ID: _name_mobilenumber (last 5 digits) $fullName = strtolower(trim($firstName . ' ' . $lastName)); $fullName = preg_replace('/\s+/', '', $fullName); // Remove spaces $lastFiveDigits = substr($mobile, -5); $uniqueId = '_' . $fullName . '_' . $lastFiveDigits; // Get base link from database (first link) - try direct query first $baseUrl = ''; try { // Direct database query to get link (no status check - just get first link) global $pdo; if (isset($pdo) && $pdo !== null) { // Check if table exists $tableCheck = $pdo->query("SHOW TABLES LIKE 'base_links'"); if ($tableCheck && $tableCheck->rowCount() > 0) { // Get first link from database (no status check) $stmt = $pdo->query(" SELECT link FROM base_links WHERE link IS NOT NULL AND link != '' ORDER BY id ASC LIMIT 1 "); if ($stmt) { $result = $stmt->fetch(PDO::FETCH_ASSOC); if ($result && !empty($result['link'])) { $baseUrl = trim($result['link']); } } } } } catch(Exception $e) { error_log("Direct database query error: " . $e->getMessage()); } // If direct query didn't work, try helper method if (empty($baseUrl)) { $allLinks = BaseLinksHelper::getAllLinks(); if (!empty($allLinks) && is_array($allLinks) && isset($allLinks[0])) { $dbLink = isset($allLinks[0]['link']) ? trim($allLinks[0]['link']) : ''; if (!empty($dbLink)) { $baseUrl = $dbLink; } } } // Only use database link - no fallback // If no link found in database, show error if (empty($baseUrl)) { $errors['database'] = 'Database में कोई active link नहीं मिली। कृपया technical officer से संपर्क करें: 7772056856'; $showResult = false; $generatedLink = ''; } else { // Complete URL with unique ID appended // Append unique ID directly to the end of URL (format: _name_mobilenumber) $generatedLink = $baseUrl . $uniqueId; $showResult = true; } // Optional: Save data to file or database // You can uncomment and modify this section if needed /* $data = [ 'first_name' => $firstName, 'last_name' => $lastName, 'aadhaar' => $aadhaar, 'mobile' => $mobile, 'email' => $email, 'pincode' => $pincode, 'address' => $address, 'unique_id' => $uniqueId, 'generated_link' => $generatedLink, 'created_at' => date('Y-m-d H:i:s') ]; file_put_contents('ngo_accounts.txt', json_encode($data) . "\n", FILE_APPEND); */ } } ?> <!DOCTYPE html> <html lang="hi"> <head> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-KTVNKDJ6');</script> <!-- End Google Tag Manager --> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-MQLM1LM5MZ"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-MQLM1LM5MZ'); </script> <script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>NGO Account Open - Kotak 811 | Savitr Foundation</title> <link rel="stylesheet" href="scholar/assets/vendor/googlefonts/poppins.css"> <link rel="stylesheet" href="scholar/assets/vendor/fontawesome/css/all.min.css"> <script src="js/kotak811_eligible_pincodes.js"></script> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; background-color: #f5f5f5; color: #333; min-height: 100vh; padding: 20px; line-height: 1.6; } .container { max-width: 600px; margin: 40px auto; background: white; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); padding: 40px; border: 1px solid #e0e0e0; } .header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 3px solid #f57c00; } .header h1 { color: #13386c; font-size: 24px; margin-bottom: 8px; font-weight: 600; } .header p { color: #666; font-size: 14px; } .form-group { margin-bottom: 20px; } label { display: block; margin-bottom: 6px; color: #333; font-weight: 500; font-size: 14px; } .required { color: #e74c3c; } input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea { width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 6px; font-size: 14px; transition: all 0.3s ease; font-family: 'Poppins', sans-serif; } input:focus, select:focus, textarea:focus { outline: none; border-color: #1a75ff; box-shadow: 0 0 0 3px rgba(26, 117, 255, 0.1); } input.error { border-color: #e74c3c; } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; } @media (max-width: 600px) { .container { padding: 25px; margin: 20px auto; } .form-row { grid-template-columns: 1fr; } } .submit-btn { width: 100%; padding: 12px 20px; background-color: #1a75ff; color: white; border: none; border-radius: 6px; font-size: 16px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; margin-top: 10px; font-family: 'Poppins', sans-serif; } .submit-btn:hover { background-color: #0052cc; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .submit-btn:active { transform: translateY(0); } .result-section { margin-top: 30px; padding: 20px; background: #f8f9fa; border-radius: 8px; border: 1px solid #e0e0e0; <?php if ($showResult): ?>display: block;<?php else: ?>display: none;<?php endif; ?> } .result-section h3 { color: #13386c; margin-bottom: 15px; font-size: 18px; font-weight: 600; } .generated-link { background: white; padding: 12px; border-radius: 6px; border: 1px solid #e0e0e0; word-break: break-all; font-size: 13px; color: #1a75ff; margin-bottom: 15px; font-family: monospace; } .open-btn { width: 100%; padding: 12px 20px; background-color: #28a745; color: white; border: none; border-radius: 6px; font-size: 16px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: block; text-align: center; font-family: 'Poppins', sans-serif; } .open-btn:hover { background-color: #218838; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .info-box { background: #e7f3ff; border-left: 4px solid #1a75ff; padding: 15px; border-radius: 6px; margin-bottom: 20px; font-size: 13px; color: #333; } .error-message { color: #e74c3c; font-size: 12px; margin-top: 5px; display: block; } .success-message { background: #d4edda; border-left: 4px solid #28a745; padding: 15px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; color: #155724; } /* Popup Modal Styles */ .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1000; justify-content: center; align-items: center; } .modal-overlay.show { display: flex; } .modal-content { background: white; padding: 30px; border-radius: 10px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); position: relative; } .modal-header { text-align: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f57c00; } .modal-header h2 { color: #13386c; font-size: 22px; margin-bottom: 8px; } .modal-body { line-height: 1.8; color: #333; } .modal-body .help-info { background: #e7f3ff; border-left: 4px solid #1a75ff; padding: 15px; border-radius: 6px; margin: 15px 0; } .modal-body .help-info strong { color: #13386c; display: block; margin-bottom: 8px; } .modal-body .help-info a { color: #1a75ff; text-decoration: none; font-weight: 600; } .modal-body .help-info a:hover { text-decoration: underline; } .modal-footer { text-align: center; margin-top: 25px; padding-top: 20px; border-top: 1px solid #e0e0e0; } .modal-btn { padding: 12px 30px; background-color: #1a75ff; color: white; border: none; border-radius: 6px; font-size: 16px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; font-family: 'Poppins', sans-serif; } .modal-btn:hover { background-color: #0052cc; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .result-section { display: none; } .result-section.show { display: block; } </style> </head> <body> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KTVNKDJ6" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <div class="container"> <div class="header"> <h1><i class="fas fa-university"></i> NGO Account Open</h1> <p>Kotak 811 Zero Balance Savings Account</p> </div> <div class="info-box"> कृपया अपनी सभी जानकारी सही से भरें। Form submit करने के बाद आपको unique link मिलेगी जिससे आप account open कर सकेंगे। <br><br> <strong>📞 सहायता के लिए:</strong> Account open करते समय कोई समस्या या दिक्कत आने पर <strong>7748995133</strong> या <strong>7772056856</strong> पर call करें। Call attend न करने पर WhatsApp पर संपर्क करके मदद ले सकते हैं। </div> <form method="POST" action="" id="accountForm"> <div class="form-group"> <label for="firstName">First Name <span class="required">*</span></label> <input type="text" id="firstName" name="firstName" required placeholder="Enter your first name" value="<?php echo htmlspecialchars($firstName); ?>" class="<?php echo isset($errors['firstName']) ? 'error' : ''; ?>"> <?php if (isset($errors['firstName'])): ?> <div class="error-message"><?php echo htmlspecialchars($errors['firstName']); ?></div> <?php endif; ?> </div> <div class="form-group"> <label for="lastName">Last Name <span class="required">*</span></label> <input type="text" id="lastName" name="lastName" required placeholder="Enter your last name" value="<?php echo htmlspecialchars($lastName); ?>" class="<?php echo isset($errors['lastName']) ? 'error' : ''; ?>"> <?php if (isset($errors['lastName'])): ?> <div class="error-message"><?php echo htmlspecialchars($errors['lastName']); ?></div> <?php endif; ?> </div> <div class="form-row"> <div class="form-group"> <label for="aadhaar">Aadhaar Number <span class="required">*</span></label> <input type="text" id="aadhaar" name="aadhaar" required placeholder="XXXX XXXX XXXX" maxlength="14" value="<?php echo htmlspecialchars($aadhaar); ?>" class="<?php echo isset($errors['aadhaar']) ? 'error' : ''; ?>"> <?php if (isset($errors['aadhaar'])): ?> <div class="error-message"><?php echo htmlspecialchars($errors['aadhaar']); ?></div> <?php endif; ?> </div> <div class="form-group"> <label for="mobile">Mobile Number <span class="required">*</span></label> <input type="tel" id="mobile" name="mobile" required placeholder="10 digit mobile number" maxlength="10" value="<?php echo htmlspecialchars($mobile); ?>" class="<?php echo isset($errors['mobile']) ? 'error' : ''; ?>"> <?php if (isset($errors['mobile'])): ?> <div class="error-message"><?php echo htmlspecialchars($errors['mobile']); ?></div> <?php endif; ?> </div> </div> <div class="form-group"> <label for="email">Email ID <span class="required">*</span></label> <input type="email" id="email" name="email" required placeholder="your.email@example.com" value="<?php echo htmlspecialchars($email); ?>" class="<?php echo isset($errors['email']) ? 'error' : ''; ?>"> <?php if (isset($errors['email'])): ?> <div class="error-message"><?php echo htmlspecialchars($errors['email']); ?></div> <?php endif; ?> </div> <div class="form-group"> <label for="pincode">PIN Code <span class="required">*</span></label> <input type="text" id="pincode" name="pincode" required placeholder="6 digit PIN code" maxlength="6" value="<?php echo htmlspecialchars($pincode); ?>" class="<?php echo isset($errors['pincode']) ? 'error' : ''; ?>"> <?php if (isset($errors['pincode'])): ?> <?php if ($errors['pincode'] === 'not_eligible'): ?> <div class="error-message" style="background: #fff3cd; border-left: 4px solid #ffc107; padding: 12px; border-radius: 6px; margin-top: 8px;"> <strong>You are not eligible to open NGO account.</strong><br> Please contact technical officer: <strong>7772056856</strong><br> If can't pickup call, drop message on WhatsApp. </div> <?php else: ?> <div class="error-message"><?php echo htmlspecialchars($errors['pincode']); ?></div> <?php endif; ?> <?php endif; ?> </div> <div class="form-group"> <label for="city">City <span class="required">*</span></label> <input type="text" id="city" name="city" readonly placeholder="City will be auto-filled from PIN code" value="<?php if (!empty($pincode)) { $pincodeFile = __DIR__ . '/js/kotak811_eligible_pincodes.php'; if (file_exists($pincodeFile)) { require_once $pincodeFile; $cityData = getCityByPincode($pincode); echo $cityData ? htmlspecialchars($cityData['city']) : ''; } } ?>" style="background-color: #f5f5f5; cursor: not-allowed;"> <small style="color: #666; font-size: 12px;">City is automatically detected from your PIN code</small> </div> <div class="form-group"> <label for="address">Current Address</label> <textarea id="address" name="address" rows="3" placeholder="Enter your current address"><?php echo htmlspecialchars($address); ?></textarea> </div> <?php if (isset($errors['database'])): ?> <div class="error-message" style="background: #f8d7da; border-left: 4px solid #dc3545; padding: 15px; border-radius: 6px; margin-bottom: 20px;"> <strong>⚠️ Database Error:</strong><br> <?php echo htmlspecialchars($errors['database']); ?> </div> <?php endif; ?> <button type="submit" class="submit-btn">Generate Account Link</button> </form> <?php if ($showResult): ?> <!-- Help Information Popup --> <div class="modal-overlay" id="helpModal"> <div class="modal-content"> <div class="modal-header"> <h2><i class="fas fa-info-circle"></i> Important Information</h2> </div> <div class="modal-body"> <p>आपका Account Link तैयार है! नीचे दिए गए button पर click करके account open करें।</p> <div class="help-info"> <strong>📞 सहायता के लिए संपर्क करें:</strong> <p>Account open करते समय कोई समस्या या दिक्कत आने पर:</p> <ul style="margin: 10px 0; padding-left: 20px;"> <li><strong>Call करें:</strong> <a href="tel:7748995133">7748995133</a> या <a href="tel:7772056856">7772056856</a></li> <li><strong>Call attend न करने पर:</strong> WhatsApp पर संपर्क करके मदद ले सकते हैं</li> </ul> </div> <div class="help-info" style="background: #fff3cd; border-left: 4px solid #ffc107; margin-top: 15px;"> <strong>⚠️ महत्वपूर्ण नोट:</strong> <p style="margin: 8px 0;">Account open होने के बाद आपकी account detail (आपके नाम और mobile number के साथ) technical officer को WhatsApp करें: <strong><a href="https://wa.me/7772056856" target="_blank" style="color: #13386c;">7772056856</a></strong></p> </div> </div> <div class="modal-footer"> <button class="modal-btn" onclick="closeHelpModal()">Open Account Now</button> </div> </div> </div> <!-- Result Section (Hidden from user) --> <div class="result-section" id="resultSection" style="display: none;"> <input type="hidden" id="generatedLink" value="<?php echo htmlspecialchars($generatedLink); ?>"> </div> <?php endif; ?> </div> <script> // Format Aadhaar number document.getElementById('aadhaar').addEventListener('input', function(e) { let value = e.target.value.replace(/\s/g, '').replace(/\D/g, ''); if (value.length > 0) { value = value.match(/.{1,4}/g).join(' '); e.target.value = value; } }); // Format mobile number (only digits) document.getElementById('mobile').addEventListener('input', function(e) { e.target.value = e.target.value.replace(/\D/g, ''); }); // Format PIN code (only digits) and auto-populate city const pincodeInput = document.getElementById('pincode'); const cityInput = document.getElementById('city'); pincodeInput.addEventListener('input', function(e) { e.target.value = e.target.value.replace(/\D/g, ''); const pincode = e.target.value; // Clear city if pincode is incomplete if (pincode.length < 6) { cityInput.value = ''; cityInput.style.borderColor = '#e0e0e0'; pincodeInput.style.borderColor = '#e0e0e0'; return; } // Check if pincode is eligible and get city if (pincode.length === 6) { const cityData = getCityByPincode(pincode); if (cityData) { cityInput.value = cityData.city; cityInput.style.borderColor = '#28a745'; pincodeInput.style.borderColor = '#28a745'; } else { cityInput.value = ''; cityInput.style.borderColor = '#e74c3c'; pincodeInput.style.borderColor = '#e74c3c'; } } }); // Validate pincode before form submission document.getElementById('accountForm').addEventListener('submit', function(e) { const pincode = pincodeInput.value; if (pincode.length === 6 && !isPincodeEligible(pincode)) { e.preventDefault(); alert('You are not eligible to open NGO account.\n\nPlease contact technical officer: 7772056856\nIf can\'t pickup call, drop message on WhatsApp.'); pincodeInput.focus(); return false; } }); // Show help modal after form submission <?php if ($showResult): ?> const helpModal = document.getElementById('helpModal'); const generatedLink = '<?php echo htmlspecialchars($generatedLink); ?>'; // Show modal immediately helpModal.classList.add('show'); // Function to close modal and open account function closeHelpModal() { helpModal.classList.remove('show'); // Open account link in new tab window.open(generatedLink, '_blank'); } // Close modal on overlay click helpModal.addEventListener('click', function(e) { if (e.target === helpModal) { closeHelpModal(); } }); <?php endif; ?> </script> </body> </html>
Save
cmd:
run