ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: /home/u435929562/domains/butanking.com/public_html/app/Http/Controllers/CronController.php
<?php

namespace App\Http\Controllers;

use App\Models\Draw;
use App\Models\PriceList;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use DateInterval;
use DateTime;
use Exception;
use FurtherInformationTable;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Facades\DB;


class CronController extends Controller
{
    public function newData()
    {
        $today = Carbon::today();
        Draw::increment('draw_number');
        $draws = Draw::get();
        foreach ($draws as $d) {
            $price = new PriceList();
            $price->draw_id = $d->id;
            $price->draw_number = $d->draw_number;
            $price->draw_date = $today;
            $price->draw_time = $d->draw_time;
            $price->save();
        }
        return true;
    }

    public function fakeData()
    {

        $from = date('2021-11-01');
        $to = date('2021-12-15');
        $draws = Draw::get();
        $begin = new DateTime("2022-01-01");
        $end   = new DateTime("2022-04-19");
        for ($i = $begin; $i <= $end; $i->modify('+1 day')) {
            $today = $i->format("Y-m-d") . "<br/>";
            foreach ($draws as $d) {
                $random_no = rand(0, 999);
                $price = new PriceList();
                $price->draw_id = $d->id;
                $price->draw_number = $random_no;
                $price->draw_date = $today;
                $price->draw_time = $d->draw_time;
                $price->first_price = rand(100, 999);
                $price->save();
            }
        }
        return true;
    }
}