# RR SHOP 19FEB26 LAST WORKING CODES - REPOSITORY ================================================================================ Project Name: RR shop 19Feb26 Last Working Codes Created: 2026-02-19 02:55:11 Last Updated: 2026-02-19 02:55:24 Source ZIP: RelevantReflexShop.zip Total Files: 43 Total Folders: 7 ================================================================================ ## FILE STRUCTURE ================================================================================ RR shop 19Feb26 Last Working Codes/ ├── affiliate_create.php ├── finance.php ├── demand.php ├── login.php ├── support.php ├── member_view.php ├── supply.php ├── logout.php ├── affiliate_edit.php ├── users.php ├── settings.php ├── client_create.php ├── members.php ├── index.php ├── error-404.html ├── affiliate_view.php ├── client_edit.php ├── clients.php ├── admin-invoice-pdf.php ├── config.php ├── robots.txt ├── maintenance.html ├── generate_hash.php ├── assets/ │ ├── images/ │ │ └── logo.svg │ ├── css/ │ │ ├── member-enhancements.css │ │ ├── dashboard.css │ │ ├── main.css │ │ └── responsive.css │ └── js/ │ ├── dashboard.js │ └── main.js ├── error-500.html ├── README.md ├── member_edit.php ├── panel.php ├── sitemap.xml ├── uploads/ │ └── clients/ │ ├── BD0B267D_1769770697_0.pdf │ ├── A6FB1FDC_1770453927_0.pdf │ ├── BD0B267D_1769743328_0.png │ └── EA89781D_1769740517_0.pdf ├── client_view.php └── includes/ ├── footer.php ├── navigation.php └── header.php ================================================================================ ## FILE CONTENTS ================================================================================ ### FILE 1: admin-invoice-pdf.php - Type: PHP - Size: 13.48 KB - Path: . - Name: admin-invoice-pdf.php ------------------------------------------------------------ prepare(" SELECT i.*, p.project_name, p.eloi, p.sample_size, p.industry, p.closed_at FROM invoices i INNER JOIN projects p ON i.project_id = p.id WHERE i.id = ? "); $stmt->execute([$invoiceId]); $inv = $stmt->fetch(PDO::FETCH_ASSOC); if (!$inv) { header('Location: finance.php'); exit; } // Load company settings for bank details & footer $settings = []; try { $result = $pdo->query("SELECT setting_key, setting_value FROM company_settings"); while ($row = $result->fetch()) $settings[$row['setting_key']] = $row['setting_value']; } catch (Exception $e) {} $sym = $inv['currency_symbol'] ?? '₹'; $currLabel = ['INR'=>'Indian Rupees','USD'=>'US Dollars','EUR'=>'Euros'][$inv['currency']] ?? $inv['currency']; ?>
☎
✉
🌐
| # | Description | Qty | Rate | Amount |
|---|---|---|---|---|
| 1 | Sample Cost Online survey fielding & data collection (Avg LOI: min) |
completes | ||
| 2 | Respondent Incentive Panel member incentive payments |
completes |
Update affiliate information for
Complete information for
No signups yet
| Clicked At | Signed Up | Verified | Reward | Status | |
|---|---|---|---|---|---|
| Not completed'; ?> | ✅ Pending | ✅ Not verified | ₹ Pending | Complete Awaiting Verification Clicked Only |
View and manage client information
No documents uploaded yet
Manage client accounts and projects
| ID | Client Code | Company Name | Industry | Contact Person | Location | Email & Phone | Projects | Revenue | Status | Actions |
|---|---|---|---|---|---|---|---|---|---|---|
| No clients found. Click "Add New Client" to create one. | ||||||||||
| # |
|
₹ | ||||||||
Market insights and demand forecasting for strategic decisions
Recommended Action:
Our technical team is available 24/7 to help resolve system issues.
Manage pricing, invoices & financial settings
Test your pricing by entering an LOI. Uses the saved rates above and live exchange rates.
No invoices found. Invoices are auto-generated when projects are closed.
| Invoice # | Client | Project | Curr | N | Total | Invoiced | Due | Status | Actions |
|---|---|---|---|---|---|---|---|---|---|
| 📄 |
* All amounts are inclusive of applicable taxes
-------------------- END OF FILE -------------------- ### FILE 14: generate_hash.php - Type: PHP - Size: 184 B - Path: . - Name: generate_hash.php ------------------------------------------------------------ php -------------------- END OF FILE -------------------- ### FILE 15: index.php - Type: PHP - Size: 23.24 KB - Path: . - Name: index.php ------------------------------------------------------------ prepare("SELECT * FROM admin_users WHERE username = ? AND status = 'active'"); $stmt->execute([$username]); $user = $stmt->fetch(); if ($user && password_verify($password, $user['password'])) { $_SESSION['admin_id'] = $user['id']; $_SESSION['admin_username'] = $user['username']; $_SESSION['admin_email'] = $user['email']; $_SESSION['admin_role'] = $user['role']; $_SESSION['admin_name'] = $user['full_name']; $updateStmt = $pdo->prepare("UPDATE admin_users SET last_login = NOW() WHERE id = ?"); $updateStmt->execute([$user['id']]); logActivity($user['id'], 'login', 'User logged in successfully'); header('Location: index.php'); exit; } else { $error = 'Invalid username or password'; } } catch (Exception $e) { error_log("Login error: " . $e->getMessage()); $error = 'An error occurred. Please try again.'; } } } // ============ SHOW LOGIN FORM ============ ?>Sign in to your admin account
Sign in to your admin account
Update information for member
Complete information for member
| Request ID | Points | Amount (₹) | UPI ID | Status | Requested | Processed |
|---|---|---|---|---|---|---|
| ₹ | Pending'; ?> |
View and manage all registered survey panel members
| Member ID | Gender | Date of Birth | Postcode | Points | Status | Joined | Actions | |
|---|---|---|---|---|---|---|---|---|
|
No panel members found
|
||||||||
|
Verified
|
diff($dob)->y;
?>
format('M j, Y'); ?>
years old
|
|||||||
Manage all registered survey panel members
| Member ID | Gender | Date of Birth | Postcode | Points | Status | Joined | Actions | |
|---|---|---|---|---|---|---|---|---|
|
No panel members found
|
||||||||
|
Verified
|
diff($dob)->y;
?>
format('M j, Y'); ?>
years old
|
|||||||
`
2. **Update favicon**:
- Add your `favicon.ico` to the root directory
- Update the reference in `includes/header.php`
### Custom Styling
- **Main styles**: `assets/css/main.css`
- **Mobile styles**: `assets/css/responsive.css`
- **Dashboard styles**: `assets/css/dashboard.css`
## 📱 Mobile Optimization
The system is built mobile-first with:
- **Responsive Grid System**: Adapts to all screen sizes
- **Touch-Friendly Interface**: 44px minimum touch targets
- **Optimized Navigation**: Hamburger menu on mobile
- **Fast Loading**: Optimized assets and caching
- **Progressive Enhancement**: Works without JavaScript
## 🔧 Maintenance
### Regular Tasks
1. **Database Backups**: Weekly automated backups recommended
2. **Update Dependencies**: Keep PHP and MySQL updated
3. **Monitor Performance**: Check load times and optimize
4. **Security Updates**: Regular security audits
5. **Content Updates**: Keep information current
### Performance Optimization
1. **Enable Gzip Compression** (included in .htaccess)
2. **Optimize Images**: Use WebP format when possible
3. **Monitor Database**: Run `OPTIMIZE TABLE` monthly
4. **Cache Headers**: Properly configured in .htaccess
5. **CDN Integration**: Consider using a CDN for static assets
## 🔐 Security Features
- **SQL Injection Protection**: PDO prepared statements
- **XSS Prevention**: Input sanitization and CSP headers
- **CSRF Protection**: Session-based token validation
- **Secure Headers**: Comprehensive security headers
- **File Upload Security**: Restricted file types and locations
- **Access Control**: Role-based permissions
## 🆘 Troubleshooting
### Common Issues
**1. Database Connection Error**
```
Solution: Check config.php credentials and database server status
```
**2. Page Not Found (404)**
```
Solution: Verify .htaccess file is uploaded and mod_rewrite is enabled
```
**3. Slow Loading**
```
Solution: Enable compression, check hosting performance, optimize images
```
**4. Mobile Display Issues**
```
Solution: Clear browser cache, check responsive.css is loaded
```
**5. JavaScript Not Working**
```
Solution: Check browser console for errors, verify JS files are accessible
```
### Getting Help
1. **Check Error Logs**: In your hosting control panel
2. **Browser Console**: F12 to check for JavaScript errors
3. **PHP Error Display**: Temporarily enable in config.php for debugging
4. **Hosting Support**: Contact your hosting provider for server issues
## 📞 Support
For technical support and customization services:
- **Email**: support@relevantreflex.com
- **Documentation**: Check inline comments in code files
- **Updates**: Monitor for system updates and security patches
## 📝 License
This system is proprietary software developed for Relevant Reflex. All rights reserved.
## 🚀 Quick Start Checklist
- [ ] Create database in phpMyAdmin
- [ ] Import database_schema.sql
- [ ] Update config.php with database credentials
- [ ] Upload all files to web server
- [ ] Set correct file permissions
- [ ] Test login with admin/admin123
- [ ] Change default admin password
- [ ] Customize colors and branding
- [ ] Enable SSL and HTTPS redirect
- [ ] Test all functionality
- [ ] Setup regular backups
## Version Information
- **Version**: 1.0.0
- **Release Date**: September 2025
- **PHP Compatibility**: 7.4+
- **MySQL Compatibility**: 5.7+
- **Browser Support**: All modern browsers, IE11+
---
**Important**: Always backup your database and files before making changes or updates.
-------------------- END OF FILE --------------------
### FILE 24: robots.txt
- Type: TXT
- Size: 2.16 KB
- Path: .
- Name: robots.txt
------------------------------------------------------------
# Relevant Reflex Panel Management System
# Robots.txt file for search engine optimization
User-agent: *
# Allow access to main pages
Allow: /
Allow: /index.php
Allow: /users.php
Allow: /panel.php
Allow: /supply.php
Allow: /demand.php
Allow: /finance.php
Allow: /support.php
Allow: /settings.php
# Allow access to static assets
Allow: /assets/css/
Allow: /assets/js/
Allow: /assets/images/
# Disallow sensitive files and directories
Disallow: /config.php
Disallow: /database_schema.sql
Disallow: /.htaccess
Disallow: /includes/
Disallow: /logs/
Disallow: /backups/
Disallow: /temp/
Disallow: /cache/
Disallow: /admin/
Disallow: /api/
Disallow: /private/
# Disallow URL parameters that might create duplicate content
Disallow: /*?*
Disallow: /*&*
Disallow: /*/search?*
Disallow: /*/filter?*
# Disallow error pages
Disallow: /error-*
Disallow: /404.html
Disallow: /500.html
Disallow: /maintenance.html
# Block access to development and testing files
Disallow: /test/
Disallow: /dev/
Disallow: /staging/
Disallow: /*.bak
Disallow: /*.tmp
Disallow: /*.log
# Block common exploits and security probes
Disallow: /wp-admin/
Disallow: /wordpress/
Disallow: /wp-content/
Disallow: /admin.php
Disallow: /administrator/
Disallow: /phpmyadmin/
Disallow: /phpMyAdmin/
# Block unwanted file types
Disallow: /*.sql$
Disallow: /*.zip$
Disallow: /*.tar.gz$
Disallow: /*.bak$
Disallow: /*.conf$
Disallow: /*.ini$
# Sitemap location
Sitemap: https://yourdomain.com/sitemap.xml
# Crawl delay for respectful crawling (optional)
# Crawl-delay: 1
# Specific rules for different bots (optional)
# Google Bot - allow everything we want indexed
User-agent: Googlebot
Allow: /
Disallow: /config.php
Disallow: /includes/
Disallow: /*?*
# Bing Bot
User-agent: Bingbot
Allow: /
Disallow: /config.php
Disallow: /includes/
# Block aggressive bots that might overload the server
User-agent: AhrefsBot
Disallow: /
User-agent: MJ12bot
Disallow: /
User-agent: SemrushBot
Disallow: /
User-agent: DotBot
Disallow: /
# Allow social media bots for link previews
User-agent: facebookexternalhit
Allow: /
User-agent: Twitterbot
Allow: /
User-agent: LinkedInBot
Allow: /
# Note: Update "yourdomain.com" with your actual domain name
-------------------- END OF FILE --------------------
### FILE 25: settings.php
- Type: PHP
- Size: 28.4 KB
- Path: .
- Name: settings.php
------------------------------------------------------------
exec("
CREATE TABLE IF NOT EXISTS company_settings (
id INT AUTO_INCREMENT PRIMARY KEY,
setting_key VARCHAR(100) UNIQUE NOT NULL,
setting_value TEXT,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)
");
} catch (Exception $e) {
// Table might already exist
}
// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['save_settings'])) {
try {
$fields = [
'company_name', 'company_address', 'company_city', 'company_state',
'company_country', 'company_pincode', 'company_phone', 'company_email',
'company_website',
'tax_gst', 'tax_pan', 'tax_cin', 'tax_sac_code',
'bank_name', 'bank_account_name', 'bank_account_number', 'bank_ifsc',
'bank_branch', 'bank_swift',
'invoice_prefix', 'invoice_terms', 'invoice_notes', 'invoice_footer'
];
$stmt = $pdo->prepare("
INSERT INTO company_settings (setting_key, setting_value, updated_at)
VALUES (?, ?, NOW())
ON DUPLICATE KEY UPDATE setting_value = VALUES(setting_value), updated_at = NOW()
");
foreach ($fields as $field) {
$value = trim($_POST[$field] ?? '');
$stmt->execute([$field, $value]);
}
$success = 'Company settings saved successfully!';
$mode = 'view';
logActivity($_SESSION['admin_id'], 'update', 'Updated company invoicing settings', 'settings', null);
} catch (Exception $e) {
$error = 'Error saving settings: ' . $e->getMessage();
$mode = 'edit';
}
}
// Load current settings
$settings = [];
try {
$result = $pdo->query("SELECT setting_key, setting_value FROM company_settings");
while ($row = $result->fetch()) {
$settings[$row['setting_key']] = $row['setting_value'];
}
} catch (Exception $e) {}
function getSetting($key, $default = '') {
global $settings;
return $settings[$key] ?? $default;
}
$hasData = !empty(array_filter($settings));
include 'includes/header.php';
?>
Add your company information for invoicing by switching to Edit mode.
✏ Add Company DetailsBasic company details that appear on invoices and official documents.
Tax identification numbers and registration details.
Banking information displayed on invoices for client payments.
Default text and formatting for generated invoices.
Manage affiliate partners and track signups
| ID | Affiliate Code | Company/Name | Type | In-charge | Location | Contact | Hits | Verified | Status | Actions |
|---|---|---|---|---|---|---|---|---|---|---|
| No affiliates found. Click "Add New Affiliate" to create one. | ||||||||||
| # |
-
|
|||||||||
Our support portal is available on the main Relevant Reflex website. Submit tickets, track requests, and access help resources all in one place.
Open Support Portal →Opens in a new window at relevantreflex.com
Manage admin users and their access roles
| ID | User Details | Role | Status | Last Login | Actions | |
|---|---|---|---|---|---|---|
| # |
|
Never | Current User |