Hi! Thank you for your purchase. Follow these 3 simple steps to install the P2P Credit Network module on your FastCore website (no AJAX files or Cron jobs required):
Step 1: Run the SQL Queries (phpMyAdmin → SQL)
Open your database in phpMyAdmin, go to the
SQL tab, paste the following queries, and click
Go:
sql
ALTER TABLE `db_users`
ADD COLUMN `loan_balance` decimal(14,4) NOT NULL DEFAULT 0.0000,
ADD COLUMN `loan_pool` decimal(14,4) NOT NULL DEFAULT 0.0000,
ADD COLUMN `loan_profit` decimal(14,4) NOT NULL DEFAULT 0.0000,
ADD COLUMN `loan_deals` int(11) NOT NULL DEFAULT 0;
CREATE TABLE `db_loan_orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`type` varchar(10) NOT NULL,
`source` varchar(10) NOT NULL DEFAULT 'balance',
`amount` decimal(14,4) NOT NULL,
`daily_rate` decimal(6,2) NOT NULL,
`days` int(11) NOT NULL,
`status` varchar(15) NOT NULL DEFAULT 'open',
`created_at` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `db_loan_contracts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL,
`lender_id` int(11) NOT NULL,
`lender_name` varchar(50) NOT NULL,
`lender_source` varchar(10) NOT NULL DEFAULT 'balance',
`borrower_id` int(11) NOT NULL,
`borrower_name` varchar(50) NOT NULL,
`amount` decimal(14,4) NOT NULL,
`daily_rate` decimal(6,2) NOT NULL,
`days` int(11) NOT NULL,
`days_paid` int(11) NOT NULL DEFAULT 0,
`next_payout` int(11) NOT NULL,
`end_time` int(11) NOT NULL,
`status` varchar(15) NOT NULL DEFAULT 'active',
`created_at` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Используйте код с осторожностью.
Step 2: Upload the 3 Module Files
Upload the files from the archive into the matching folders on your server:
- inc/loans_engine.php → into /inc/
- pages/user/loans.php → into /pages/user/
- pages/user/loans_create.php → into /pages/user/
Step 3: Add Routes & Menu Link
- Open your router file (where /user/... routes are defined) and add these 2 lines:
php
'/user/loans' => 'loans.php',
'/user/loans_create' => 'loans_create.php',
Используйте код с осторожностью.
- Add a link to /user/loans in your user sidebar menu.
Done! Everything works automatically (daily interest payouts and contract settlements run automatically when users open the exchange). Let me know if you need any help!