diff --git a/app/Functions/pelinom.php b/app/Functions/pelinom.php index 050221e..84d7c19 100644 --- a/app/Functions/pelinom.php +++ b/app/Functions/pelinom.php @@ -1,4 +1,4 @@ - - $data = explode( ',', $base64_string ); + $data = explode(',', $base64_string); // we could add validation here with ensuring count( $data ) > 1 - fwrite( $ifp, base64_decode( $data[ 1 ] ) ); + fwrite($ifp, base64_decode($data[1])); // clean up the file resource - fclose( $ifp ); + fclose($ifp); - return $output_file; + return $output_file; } -function admin_delete($id) { +function admin_delete($id) +{ ?> - level=="Admin") { - ?> - - level == "Admin") { + ?> + + - - - + + - - - - - - + + + + + where("slug",$slug)->first("title"); - if($sorgu) { +function slug_to_title($slug) +{ + $sorgu = db("contents")->where("slug", $slug)->first("title"); + if ($sorgu) { return $sorgu->title; } else { return $slug; } - + } -function encoder($icerik) { - // $icerik = utf8_encode($icerik); +function encoder($icerik) +{ + // $icerik = utf8_encode($icerik); $icerik = strtr($icerik, array( - '•' => '•', - '“' => '“', - '”' => '”', - '‘' => '‘', - '’' => '’', - 'ݾ' => 'İ', - 'Ý' => 'İ', - 'İ' => 'İ', - 'Ý' => 'İ', - '‹' => 'İ', - 'Ý' => 'İ', - 'ý' => 'ı', - 'ı' => 'ı', - '±' => 'ı', - 'ý' => 'ı', - 'Û' => 'ı', - '›' => 'ı', - 'ý' => 'ı', - 'Þ' => 'Ş', - 'Åž' => 'Ş', - 'ÅŸ' => 'Ş', - 'åÿ' => 'Ş', - 'Þ' => 'Ş', - 'þ' => 'ş', - 'Å?' => 'ş', - 'ÅŸ' => 'ş', - 'þ' => 'ş', - 'Ð' => 'Ğ', - 'Äž' => 'Ğ', - 'ð' => 'ğ', - 'Ä?' => 'ğ', - 'ÄŸ' => 'ğ', - 'ð' => 'ğ', - 'Ç' => 'Ç', - 'Ã?' => 'Ç', - 'Ç' => 'Ç', + '•' => '•', + '“' => '“', + '”' => '”', + '‘' => '‘', + '’' => '’', + 'ݾ' => 'İ', + 'Ý' => 'İ', + 'İ' => 'İ', + 'Ý' => 'İ', + '‹' => 'İ', + 'Ý' => 'İ', + 'ý' => 'ı', + 'ı' => 'ı', + '±' => 'ı', + 'ý' => 'ı', + 'Û' => 'ı', + '›' => 'ı', + 'ý' => 'ı', + 'Þ' => 'Ş', + 'Åž' => 'Ş', + 'ÅŸ' => 'Ş', + 'åÿ' => 'Ş', + 'Þ' => 'Ş', + 'þ' => 'ş', + 'Å?' => 'ş', + 'ÅŸ' => 'ş', + 'þ' => 'ş', + 'Ð' => 'Ğ', + 'Äž' => 'Ğ', + 'ð' => 'ğ', + 'Ä?' => 'ğ', + 'ÄŸ' => 'ğ', + 'ð' => 'ğ', + 'Ç' => 'Ç', + 'Ã?' => 'Ç', + 'Ç' => 'Ç', 'ç' => 'ç', - 'ç' => 'ç', - 'Ö' => 'Ö', - 'Ö' => 'Ö', - 'ö' => 'ö', - 'ö' => 'ö', - 'Ü' => 'Ü', - 'Ü' => 'Ü', - 'ü' => 'ü', - 'ã¼' => 'ü', - 'ü' => 'ü', + 'ç' => 'ç', + 'Ö' => 'Ö', + 'Ö' => 'Ö', + 'ö' => 'ö', + 'ö' => 'ö', + 'Ü' => 'Ü', + 'Ü' => 'Ü', + 'ü' => 'ü', + 'ã¼' => 'ü', + 'ü' => 'ü', 'ü' => 'ü', - )); + )); return $icerik; } -function trk($icerik) { -// $icerik = iconv("ISO-8859-1", "UTF-8//TRANSLIT", $icerik); - $encode = mb_detect_encoding($icerik); - //echo $encode; - // $icerik = mb_convert_encoding($icerik, "windows-1254", $encode); - $icerik = @iconv('windows-1254','UTF-8',$icerik); - $icerik = encoder($icerik); +function trk($icerik) +{ + // $icerik = iconv("ISO-8859-1", "UTF-8//TRANSLIT", $icerik); + $encode = mb_detect_encoding($icerik); + //echo $encode; + // $icerik = mb_convert_encoding($icerik, "windows-1254", $encode); + $icerik = @iconv('windows-1254', 'UTF-8', $icerik); + $icerik = encoder($icerik); return $icerik; } -function zf($d2){ -$d1 = date('Y-m-d H:i:s'); -//$d1= date('Y-m-d H:i:s', strtotime($d1. "$zaman_dilimi hour")); +function zf($d2) +{ + $d1 = date('Y-m-d H:i:s'); + //$d1= date('Y-m-d H:i:s', strtotime($d1. "$zaman_dilimi hour")); //e($d1); - if(!is_int($d1)) $d1=strtotime($d1); - if(!is_int($d2)) $d2=strtotime($d2); - $d=abs($d1-$d2); -if ($d1-$d2<0) { -$ifade = "sonra"; -} else { -$ifade = "önce"; -} + if (!is_int($d1)) + $d1 = strtotime($d1); + if (!is_int($d2)) + $d2 = strtotime($d2); + $d = abs($d1 - $d2); + if ($d1 - $d2 < 0) { + $ifade = "sonra"; + } else { + $ifade = "önce"; + } -$once = " "; - if($d>=(60*60*24*365)) $sonuc = $once . floor($d/(60*60*24*365)) . " yıl $ifade"; - else if($d>=(60*60*24*30)) $sonuc = $once . floor($d/(60*60*24*30)) . " ay $ifade"; - else if($d>=(60*60*24*7)) $sonuc = $once . floor($d/(60*60*24*7)) . " hafta $ifade"; - else if($d>=(60*60*24)) $sonuc = $once . floor($d/(60*60*24)) . " gün $ifade"; - else if($d>=(60*60)) $sonuc = $once . floor($d/(60*60)) . " saat $ifade"; - else if($d>=60) $sonuc = $once . floor($d/60) . " dakika $ifade"; - else $sonuc = "Az $ifade"; + $once = " "; + if ($d >= (60 * 60 * 24 * 365)) + $sonuc = $once . floor($d / (60 * 60 * 24 * 365)) . " yıl $ifade"; + else if ($d >= (60 * 60 * 24 * 30)) + $sonuc = $once . floor($d / (60 * 60 * 24 * 30)) . " ay $ifade"; + else if ($d >= (60 * 60 * 24 * 7)) + $sonuc = $once . floor($d / (60 * 60 * 24 * 7)) . " hafta $ifade"; + else if ($d >= (60 * 60 * 24)) + $sonuc = $once . floor($d / (60 * 60 * 24)) . " gün $ifade"; + else if ($d >= (60 * 60)) + $sonuc = $once . floor($d / (60 * 60)) . " saat $ifade"; + else if ($d >= 60) + $sonuc = $once . floor($d / 60) . " dakika $ifade"; + else + $sonuc = "Az $ifade"; return $sonuc; } -function cfg($slug) { +function cfg($slug) +{ $c = db("contents") - ->Where("kid","configuration-".$slug) - ->get(); + ->Where("kid", "configuration-" . $slug) + ->get(); $cikti = array(); - foreach($c AS $s) { - array_push($cikti,$s->title); + foreach ($c as $s) { + array_push($cikti, $s->title); } return $cikti; } -function logo($size="128",$style="") { - ?> - " width="" style=" width: px;" alt=""> - + " width="" + style=" width: px;" alt=""> + - -
- +
{{ Auth::user()->name }} {{ Auth::user()->surname }}
{{ Auth::user()->level }} diff --git a/resources/views/admin/master.blade.php b/resources/views/admin/master.blade.php index 8bec5d8..33627e8 100644 --- a/resources/views/admin/master.blade.php +++ b/resources/views/admin/master.blade.php @@ -2,34 +2,34 @@ -if(getisset("ajax")) { +if (getisset("ajax")) { ?> - @include("admin-ajax.{$_GET['ajax']}") - - - @if(getisset("cache")) - @includeCache("{$_GET['ajax2']}") - @else - @include("{$_GET['ajax2']}") - @endif - - @php - $permissions = userPermissions(); + $permissions = userPermissions(); @endphp - + - {!! strip_tags($__env->yieldContent('title','')) !!} + {!! strip_tags($__env->yieldContent('title', '')) !!} @@ -38,429 +38,433 @@ if(getisset("ajax")) { -
- - - - - +
+ + + + + - - - - @include("admin.inc.plugins") + - @yield('scripts') - -
+ @include("admin.inc.plugins") + + @yield('scripts') + +
- -@guest - @yield("content") -@else - + @endguest - @if(isset($contents)) - - - - @include("admin.inc.header") - @endif - -
-
- - @if (View::hasSection('title')) -
-
-
-

@yield("title")

-
@yield("desc")
- -
-
-
- @endif -
- @yield("content") -
-
-
-
- @include('admin.inc.feedback-modal') -
- -
-
- @endguest - - -@include("admin.inc.script") + @include("admin.inc.script") - -