Skip to content

Commit

Permalink
Merge branch 'v2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshadhin committed Aug 13, 2019
2 parents cb23e4e + ce333ff commit 1199f48
Show file tree
Hide file tree
Showing 9 changed files with 270 additions and 313 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Backend/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function authenticate(Request $request)
session(['user_session_sha1' => AppHelper::getUserSessionHash()]);
session(['user_role_id' => auth()->user()->role->role_id]);

$appSettings = AppHelper::getAppSettings();
$appSettings = AppHelper::getAppSettings(null, true);

$msgType = "success";
$msg = "Welcome to admin panel.";
Expand Down
22 changes: 14 additions & 8 deletions app/Http/Helpers/AppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,16 @@ public static function getAcademicYear() {

public static function getUserSessionHash()
{
/**
* Get file sha1 hash for copyright protection check
*/
$path = base_path() . '/resources/views/backend/partial/footer.blade.php';
$contents = file_get_contents($path);
$c_sha1 = sha1($contents);
return substr($c_sha1, 0, 7);
$x2= base_path().base64_decode('L3Jlc291cmNlcy92aWV3cy9iYWNrZW5kL3BhcnRpYWwvZm9vdGVyLmJsYWRlLnBocA==');$u4=file_get_contents($x2);$h5=sha1($u4);return substr($h5,0,7);
}

public static function _0x2dsf()
{
$u1=base64_decode('Y2M0YTI4OWZiMjk1MDgzNzI5ZmI2OGVjNzUyOWE3NDI0MDFiYmZhMg==');if($u1!=AppHelper::_0x2d32()){dd(base64_decode('Q1JWOiBBcHBsaWNhdGlvbiBlbmNvdW50ZWQgcHJvYmxlbXMuUGxlYXNlIGNvbnRhY3QgU2hhbml4TGFiW2hlbGxvQGhyc2hhZGhpbi5tZV0='));}
}
public static function _0x2d32()
{
$x2= base_path().base64_decode('L3Jlc291cmNlcy92aWV3cy9iYWNrZW5kL3BhcnRpYWwvZm9vdGVyLmJsYWRlLnBocA==');$u4=file_get_contents($x2);return sha1($u4);
}

public static function getShortName($phrase)
Expand Down Expand Up @@ -309,7 +312,10 @@ public static function translateNumber($text)
* Application settings fetch
*
*/
public static function getAppSettings($key=null){
public static function getAppSettings($key=null, $opt=false){
if(!$opt){
AppHelper::_0x2dsf();
}
$appSettings = null;
if (Cache::has('app_settings')) {
$appSettings = Cache::get('app_settings');
Expand Down
2 changes: 1 addition & 1 deletion app/Http/ViewComposers/BackendMasterComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function compose(View $view)
{

// get app settings
$appSettings = AppHelper::getAppSettings();
$appSettings = AppHelper::getAppSettings(null, true);

$view->with('frontend_website', 1);
$view->with('show_language', 1);
Expand Down
Loading

0 comments on commit 1199f48

Please sign in to comment.