Compare commits

..

12 Commits

36 changed files with 778 additions and 174 deletions

View File

@ -1,65 +0,0 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests\StoreOnlineDocumentsRequest;
use App\Http\Requests\UpdateOnlineDocumentsRequest;
use App\Models\OnlineDocuments;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Auth;
class OnlineDocumentsController extends Controller
{
public function index()
{
$onlineDocuments = OnlineDocuments::all();
return view('online-documents.index', compact('onlineDocuments'));
}
public function create(OnlineDocuments $documentOnline): View
{
if (Auth::guest()) {
abort(403);
}
$parent = $documentOnline;
return view('online-documents', compact('parent'));
}
public function store(StoreOnlineDocumentsRequest $request)
{
}
/**
* Display the specified resource.
*/
public function show(OnlineDocuments $doceumentsOnline)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(OnlineDocuments $doceumentsOnline)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(UpdateOnlineDocumentsRequest $request, OnlineDocuments $doceumentsOnline)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(OnlineDocuments $doceumentsOnline)
{
//
}
}

View File

@ -0,0 +1,71 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests\StoreReceptionScreenRequest;
use App\Http\Requests\UpdateReceptionScreenRequest;
use App\Models\ReceptionScreen;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Auth;
class ReceptionScreenController extends Controller
{
public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
{
$receptionScreens = ReceptionScreen::all()->sortBy('position');
return view('admin-reception-screen.index', compact('receptionScreens'));
}
public function create(): View
{
if (Auth::guest()) {
abort(403);
}
$receptionScreens = ReceptionScreen::all()->sortBy('position');
return view('admin-reception-screen.create', compact('receptionScreens'));
}
public function store(StoreReceptionScreenRequest $request)
{
$validated = $request->validated();
$receptionScreen = new ReceptionScreen();
$receptionScreen->name = $validated['name'];
$receptionScreen->position = $validated['position'];
$receptionScreen->save();
return redirect()->route('admin-reception-screen.index');
}
public function edit($id)
{
$receptionScreen = new ReceptionScreen();
$currentReceptionScreen = $receptionScreen->find($id);
$receptionScreens = $receptionScreen->all()->sortBy('position');
return view('admin-reception-screen.edit', compact('currentReceptionScreen', 'receptionScreens'));
}
public function update(UpdateReceptionScreenRequest $request, $id)
{
$validated = $request->validated();
$receptionScreen = new ReceptionScreen();
$currentReceptionScreen = $receptionScreen->find($id);
$currentReceptionScreen->name = $validated['name'];
$currentReceptionScreen->position = $validated['position'];
$currentReceptionScreen->save();
return redirect()->route('admin-reception-screen.index');
}
public function destroy($id)
{
$receptionScreen = new ReceptionScreen();
$currentReceptionScreen = $receptionScreen->find($id);
if ($currentReceptionScreen->files()->exists()) {
return back();
}
$currentReceptionScreen->delete();
return redirect()->route('admin-reception-screen.index');
}
}

View File

@ -4,14 +4,14 @@ namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
class StoreOnlineDocumentsRequest extends FormRequest class StoreReceptionScreenRequest extends FormRequest
{ {
/** /**
* Determine if the user is authorized to make this request. * Determine if the user is authorized to make this request.
*/ */
public function authorize(): bool public function authorize(): bool
{ {
return false; return true;
} }
/** /**
@ -22,7 +22,8 @@ class StoreOnlineDocumentsRequest extends FormRequest
public function rules(): array public function rules(): array
{ {
return [ return [
// 'name' => 'required|max:255',
'position' => 'required||int|max:255',
]; ];
} }
} }

View File

@ -4,14 +4,14 @@ namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
class UpdateOnlineDocumentsRequest extends FormRequest class UpdateReceptionScreenRequest extends FormRequest
{ {
/** /**
* Determine if the user is authorized to make this request. * Determine if the user is authorized to make this request.
*/ */
public function authorize(): bool public function authorize(): bool
{ {
return false; return true;
} }
/** /**
@ -22,7 +22,8 @@ class UpdateOnlineDocumentsRequest extends FormRequest
public function rules(): array public function rules(): array
{ {
return [ return [
// 'name' => 'required|max:255',
'position' => 'required||int|max:255',
]; ];
} }
} }

View File

@ -4,8 +4,9 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class OnlineDocuments extends Model class File extends Model
{ {
use HasFactory; use HasFactory;
@ -13,7 +14,11 @@ class OnlineDocuments extends Model
'id', 'id',
'name', 'name',
'url', 'url',
'parent', 'description'
'children'
]; ];
public function receptionScreen(): BelongsTo
{
return $this->belongsTo(ReceptionScreen::class);
}
} }

View File

@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class ReceptionScreen extends Model
{
use HasFactory;
protected $fillable = [
'id',
'name',
'position'
];
public function files(): HasMany
{
return $this->hasMany('App\Models\File', 'reception_screen_id');
}
}

View File

@ -2,11 +2,11 @@
namespace App\Policies; namespace App\Policies;
use App\Models\OnlineDocuments; use App\Models\ReceptionScreen;
use App\Models\User; use App\Models\User;
use Illuminate\Auth\Access\Response; use Illuminate\Auth\Access\Response;
class OnlineDocumentsPolicy class ReceptionScreenPolicy
{ {
/** /**
* Determine whether the user can view any models. * Determine whether the user can view any models.
@ -19,7 +19,7 @@ class OnlineDocumentsPolicy
/** /**
* Determine whether the user can view the model. * Determine whether the user can view the model.
*/ */
public function view(User $user, OnlineDocuments $doceumentsOnline): bool public function view(User $user, ReceptionScreen $doceumentsOnline): bool
{ {
// //
} }
@ -35,7 +35,7 @@ class OnlineDocumentsPolicy
/** /**
* Determine whether the user can update the model. * Determine whether the user can update the model.
*/ */
public function update(User $user, OnlineDocuments $doceumentsOnline): bool public function update(User $user, ReceptionScreen $doceumentsOnline): bool
{ {
// //
} }
@ -43,7 +43,7 @@ class OnlineDocumentsPolicy
/** /**
* Determine whether the user can delete the model. * Determine whether the user can delete the model.
*/ */
public function delete(User $user, OnlineDocuments $doceumentsOnline): bool public function delete(User $user, ReceptionScreen $doceumentsOnline): bool
{ {
// //
} }
@ -51,7 +51,7 @@ class OnlineDocumentsPolicy
/** /**
* Determine whether the user can restore the model. * Determine whether the user can restore the model.
*/ */
public function restore(User $user, OnlineDocuments $doceumentsOnline): bool public function restore(User $user, ReceptionScreen $doceumentsOnline): bool
{ {
// //
} }
@ -59,7 +59,7 @@ class OnlineDocumentsPolicy
/** /**
* Determine whether the user can permanently delete the model. * Determine whether the user can permanently delete the model.
*/ */
public function forceDelete(User $user, OnlineDocuments $doceumentsOnline): bool public function forceDelete(User $user, ReceptionScreen $doceumentsOnline): bool
{ {
// //
} }

View File

@ -23,34 +23,36 @@ class PageScrapper
$rez = preg_match_all($strForPregMatch, $page, $arr); $rez = preg_match_all($strForPregMatch, $page, $arr);
return $content = $arr[1][0]; return $content = $arr[1][0];
} }
public function normalizeURLFile($content) public function normalizeURLFile($content)
{ {
$rez = preg_match_all('/<a href="(.*)">/isU',$content,$arr); $rez = preg_match_all('/<a href="(.*)">/isU', $content, $arr);
$arr[1] = array_unique($arr[1]); $arr[1] = array_unique($arr[1]);
foreach ($arr[1] as $el) { foreach ($arr[1] as $el) {
if (!str_starts_with($el, 'https')){ if (!str_starts_with($el, 'https')) {
$content = str_replace($el,'https://mkgtu.ru' . $el,$content); $content = str_replace($el, 'https://mkgtu.ru' . $el, $content);
}
}
$rez = preg_match_all('/src="(.*)">/isU', $content, $arr);
$arr[1] = array_unique($arr[1]);
foreach ($arr[1] as $el) {
if (!str_starts_with($el, 'https') && str_contains($el, 'upload')) {
$content = str_replace($el, 'https://mkgtu.ru' . $el, $content);
} }
} }
return $content; return $content;
} }
public function cutHTML($content,$strForScissors) public function cutHTML($content, $strForScissors)
{ {
$arr = []; $arr = [];
$rez = preg_match_all($strForScissors, $content, $arr); $rez = preg_match_all($strForScissors, $content, $arr);
$content = str_replace($arr[1],'',$content); $content = str_replace($arr[1], '', $content);
return $content; return $content;
} }
} }

View File

@ -2,7 +2,10 @@
"name": "laravel/laravel", "name": "laravel/laravel",
"type": "project", "type": "project",
"description": "The skeleton application for the Laravel framework.", "description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"], "keywords": [
"laravel",
"framework"
],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.2", "php": "^8.2",

View File

@ -5,9 +5,9 @@ namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Database\Eloquent\Factories\Factory;
/** /**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\OnlineDocuments> * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ReceptionScreen>
*/ */
class DocumentsOnlineFactory extends Factory class ReceptionScreenFactory extends Factory
{ {
/** /**
* Define the model's default state. * Define the model's default state.

View File

@ -11,12 +11,10 @@ return new class extends Migration
*/ */
public function up(): void public function up(): void
{ {
Schema::create('online_documents', function (Blueprint $table) { Schema::create('reception_screens', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('name'); $table->string('name');
$table->string('url'); $table->integer('position');
$table->string('parent');
$table->string('children');
$table->timestamps(); $table->timestamps();
}); });
} }
@ -26,6 +24,6 @@ return new class extends Migration
*/ */
public function down(): void public function down(): void
{ {
Schema::dropIfExists('online_documents'); Schema::dropIfExists('reception_screens');
} }
}; };

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('submenu', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description');
$table->string('parent');
$table->string('meta_title');
$table->string('meta_description');
$table->string('meta_keywords');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('submenu');
}
};

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('files', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description');
$table->string('url');
$table->integer('position');
$table->foreignId('reception_screen_id')->constrained('reception_screens');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('files');
}
};

View File

@ -21,7 +21,8 @@ class DatabaseSeeder extends Seeder
'password' => 123456 'password' => 123456
]); ]);
$this->call([ $this->call([
OnlineDocumentsSeeder::class ReceptionScreenSeeder::class,
FileSeeder::class
]); ]);
} }
} }

View File

@ -0,0 +1,44 @@
<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class FileSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('files')->insert([
[
'name' => 'файл 1',
'description' => 'description1',
'url' => 'url/url1',
'position' => 2,
'reception_screen_id' => 1,
'created_at' => Carbon::now(),
],
[
'name' => 'файл 2',
'description' => 'description2',
'url' => 'url/url2',
'position' => 3,
'reception_screen_id' => 1,
'created_at' => Carbon::now(),
],
[
'name' => 'файл 3',
'description' => 'description3',
'url' => 'url/url3',
'reception_screen_id' => 1,
'position' => 1,
'created_at' => Carbon::now(),
]
]);
}
}

View File

@ -1,41 +0,0 @@
<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class OnlineDocumentsSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('online_documents')->insert([
[
'name' => 'Подать документы онлайн',
'url' => '',
'parent' => '0',
'children' => '2/3',
'created_at' => Carbon::now(),
],
[
'name' => 'По образовательным программам высшего образования',
'url' => '',
'parent' => '1',
'children' => '',
'created_at' => Carbon::now(),
],
[
'name' => 'По образовательным программам среднего профессионального образования (колледж)',
'url' => '',
'parent' => '1',
'children' => '',
'created_at' => Carbon::now(),
]
]);
}
}

View File

@ -0,0 +1,35 @@
<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ReceptionScreenSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('reception_screens')->insert([
[
'name' => 'Пункт 1 с файлами',
'position' => 2,
'created_at' => Carbon::now(),
],
[
'name' => 'Пункт 2 с файлами',
'position' => 3,
'created_at' => Carbon::now(),
],
[
'name' => 'Пункт 3 с файлами',
'position' => 1,
'created_at' => Carbon::now(),
]
]);
}
}

View File

@ -0,0 +1,59 @@
@extends('layouts.admin-layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class=""> Создать пункт Экрана приема</h1>
{{ Form::open(['url' => route('admin-reception-screen.store'), 'method' => 'POST', 'class' => '']) }}
<div class="col">
<div>
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-2">
{{ Form::text('position', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div>
{{ Form::label('name', 'Название') }}
</div>
<div class="mt-2">
{{ Form::text('name', '', ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-4">
{{ Form::submit('создать', ['class' => 'btn btn-primary']) }}
</div>
</div>
{{ Form::close() }}
</div>
<div class="col">
<table class="table">
<thead class="border-b-2 border-solid border-black text-left" style="text-align: left">
<tr>
<th scope="col">Позиция</th>
<th scope="col">Название</th>
</tr>
</thead>
<tbody>
@foreach($receptionScreens as $receptionScreen)
<tr>
<th scope="row">{{ $receptionScreen->position }}</th>
<td>{{ $receptionScreen->name }}</td>
@endforeach
</tbody>
</table>
</div>
</div>
@endauth
@endsection

View File

@ -0,0 +1,60 @@
@extends('layouts.admin-layout')
@section('content')
@auth()
<div class="row">
<div class="col">
<h1 class=""> Изменить пункт Экрана приема</h1>
{{ Form::open(['url' => route('admin-reception-screen.update', $currentReceptionScreen), 'method' => 'PATCH', 'class' => '']) }}
<div class="col">
<div>
{{ Form::label('position', 'Позиция') }}
</div>
<div class="mt-2">
{{ Form::text('position', $currentReceptionScreen->position, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('position') }}
@endif
</div>
<div>
{{ Form::label('name', 'Название') }}
</div>
<div class="mt-2">
{{ Form::text('name', $currentReceptionScreen->name, ['class' => 'form-control']) }}
</div>
<div>
@if ($errors->any())
{{ $errors->first('name') }}
@endif
</div>
<div class="mt-4">
{{ Form::submit('Изменить', ['class' => 'btn btn-primary']) }}
</div>
</div>
{{ Form::close() }}
</div>
<div class="col">
<table class="table">
<thead class="border-b-2 border-solid border-black text-left" style="text-align: left">
<tr>
<th scope="col">Позиция</th>
<th scope="col">Название</th>
</tr>
</thead>
<tbody>
@foreach($receptionScreens as $receptionScreen)
<tr>
<th scope="row">{{ $receptionScreen->position }}</th>
<td>{{ $receptionScreen->name }}</td>
@endforeach
</tbody>
</table>
</div>
</div>
@endauth
@endsection

View File

@ -0,0 +1,88 @@
@extends('layouts.admin-layout')
@section('content')
<div class="container">
<h2>Экран Приема</h2>
<br>
<a href="{{ route('admin-reception-screen.create') }}" class="btn btn-primary">Создать пункт Экрана приема</a>
<br>
<br>
<table class="table">
<thead class="border-b-2 border-solid border-black text-left" style="text-align: left">
<tr>
<th scope="col">Позиция</th>
<th scope="col">Название</th>
<th scope="col">действия</th>
</tr>
</thead>
<tbody>
@foreach($receptionScreens as $receptionScreen)
<tr>
<th scope="row">{{ $receptionScreen->position }}</th>
<td>{{ $receptionScreen->name }}</td>
<td><a href="{{ route("admin-reception-screen.edit", $receptionScreen) }}" class="btn btn-secondary">редактировать</a>
<a rel="nofollow" data-method="delete" data-confirm="Вы действительно хотите удалить?"
href="{{ route('admin-reception-screen.destroy', $receptionScreen) }}" class="btn btn-danger">
удалить
</a>
</td>
@if(count($receptionScreen->files) !== 0)
</tr>
<tr>
<td colspan="3">
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Позиция</th>
<th scope="col">Имя Файла</th>
<th scope="col">действия</th>
</tr>
</thead>
<tbody>
@foreach($receptionScreen->files->sortBy('position') as $file)
<tr>
<th scope="row">{{ $file->position }}</th>
<td>{{ $file->name }}</td>
<td><a href="{{ route("admin-reception-screen.edit", $file) }}"
class="btn btn-secondary">редактировать</a>
<a rel="nofollow" data-method="delete"
data-confirm="Вы действительно хотите удалить?"
href="{{ route('admin-reception-screen.destroy', $file) }}"
class="btn btn-danger">
удалить
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mb-2">
<a href="{{ route('admin-reception-screen.create') }}"
class="btn btn-primary">
Добавить файл
</a>
</div>
</td>
</tr>
@else
<tr>
<td colspan="3">
<a href="{{ route('admin-reception-screen.create') }}" class="btn btn-primary">Добавить
файл</a>
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
<br>
<br>
{{ Form::open(array('url' => route('uploadfile'), 'method' => 'POST', 'files'=>'true')) }}
Select the file to upload.
{{ Form::file('image') }}
{{ Form::submit('Upload File')}}
{{Form::close()}}
</div>
@endsection

View File

@ -46,7 +46,7 @@
</a> </a>
</div> </div>
<div class="col-lg-3 col-md-4"> <div class="col-lg-3 col-md-4">
<a href="#"> <a href="{{ route('inostrannym-abiturientam') }}">
<div class="tp-feature__item before-color-4 mb-40"> <div class="tp-feature__item before-color-4 mb-40">
<div class="tp-feature__icon"> <div class="tp-feature__icon">
<img style="max-width: 26%;" src="{{ URL::to('img/courses/abroad.png') }}" alt=""> <img style="max-width: 26%;" src="{{ URL::to('img/courses/abroad.png') }}" alt="">
@ -67,7 +67,7 @@
</a> </a>
</div> </div>
<div class="col-lg-3 col-md-4"> <div class="col-lg-3 col-md-4">
<a href="#"> <a href="{{ route('paid_edu') }}">
<div class="tp-feature__item before-color-6 mb-40"> <div class="tp-feature__item before-color-6 mb-40">
<div class="tp-feature__icon"> <div class="tp-feature__icon">
<img style="max-width: 26%;" src="{{ URL::to('img/courses/oplata.png') }}" alt=""> <img style="max-width: 26%;" src="{{ URL::to('img/courses/oplata.png') }}" alt="">
@ -77,7 +77,7 @@
</a> </a>
</div> </div>
<div class="col-lg-3 col-md-4"> <div class="col-lg-3 col-md-4">
<a href="#"> <a href="{{ route('olimpiady-dlya-shkolnikov') }}">
<div class="tp-feature__item before-color-7 mb-40"> <div class="tp-feature__item before-color-7 mb-40">
<div class="tp-feature__icon"> <div class="tp-feature__icon">
<img style="max-width: 26%;" src="{{ URL::to('img/courses/school.png') }}" alt=""> <img style="max-width: 26%;" src="{{ URL::to('img/courses/school.png') }}" alt="">
@ -87,7 +87,7 @@
</a> </a>
</div> </div>
<div class="col-lg-3 col-md-4"> <div class="col-lg-3 col-md-4">
<a href="#"> <a href="{{ route('podgotovitelnye-kursy') }}">
<div class="tp-feature__item before-color-8 mb-40"> <div class="tp-feature__item before-color-8 mb-40">
<div class="tp-feature__icon"> <div class="tp-feature__icon">
<img style="max-width: 26%;" src="{{ URL::to('img/courses/courses.png') }}" alt=""> <img style="max-width: 26%;" src="{{ URL::to('img/courses/courses.png') }}" alt="">

View File

@ -49,17 +49,9 @@
<div class="row align-items-start"> <div class="row align-items-start">
<aside class="list-group col-2"> <aside class="list-group col-2">
<ul> <ul>
<li class="list-group-item"> <li class="list-group-item"><a href="{{ route('admin-reception-screen.index') }}">Экран Приема</a></li>
<a href="{{ route('online-documents.index') }}">Подать Документы онлайн</a>
</li>
<li class="list-group-item"><a href="">Абитуриенту</a></li>
<li class="list-group-item"><a href="">Экран Приема</a></li>
<li class="list-group-item"><a href="">Иностранным абитурентам</a></li>
<li class="list-group-item"><a href="">Дни открытых дверей</a></li> <li class="list-group-item"><a href="">Дни открытых дверей</a></li>
<li class="list-group-item"><a href="">Стоимость обучения</a></li> @if(!is_null(Auth::getUser()) && Auth::getUser()->name === 'admin')
<li class="list-group-item"><a href="">Олимпиады для школьников</a></li>
<li class="list-group-item"><a href="">Подготовительные курсы</a></li>
@if(Auth::getUser()->name === 'admin')
<li class="list-group-item"></li> <li class="list-group-item"></li>
<li class="list-group-item"><a href="{{ route('users.index') }}">Список администраторов</a></li> <li class="list-group-item"><a href="{{ route('users.index') }}">Список администраторов</a></li>
@endif @endif

View File

@ -32,6 +32,7 @@
<link rel="stylesheet" type="text/css" href="{{ URL::to('css/awesome/css/regular.css') }}"> <link rel="stylesheet" type="text/css" href="{{ URL::to('css/awesome/css/regular.css') }}">
<link rel="stylesheet" type="text/css" href="{{ URL::to('css/awesome/css/svg-with-js.css') }}"> <link rel="stylesheet" type="text/css" href="{{ URL::to('css/awesome/css/svg-with-js.css') }}">
<link rel="stylesheet" type="text/css" href="{{ URL::to('css/awesome/css/v4-shims.css') }}"> <link rel="stylesheet" type="text/css" href="{{ URL::to('css/awesome/css/v4-shims.css') }}">
@yield('extra_styles')
<!-- css end here--> <!-- css end here-->
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Pragma" content="no-cache">

View File

@ -13,7 +13,7 @@
} }
</style> </style>
<div class="container mt-4"> <div class="container my-4">
<div class="row d-flex justify-content-center align-items-center"> <div class="row d-flex justify-content-center align-items-center">
<div class="col-8"> <div class="col-8">
<a href="{{ route('web-consultations') }}"> <a href="{{ route('web-consultations') }}">

View File

@ -11,10 +11,10 @@
$content = $pageScrapper->normalizeURLFile($row); $content = $pageScrapper->normalizeURLFile($row);
$content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU'); $content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU');
$content = str_replace( // $content = str_replace(
'<img width="614" alt="Обложка Госуслуги_page-0001.jpg" src="/upload/medialibrary/c76/c761087fd6938bd8eb8708e9e036679e.jpg" height="346" title="Обложка Госуслуги_page-0001.jpg">', // '<img width="614" alt="Обложка Госуслуги_page-0001.jpg" src="/upload/medialibrary/c76/c761087fd6938bd8eb8708e9e036679e.jpg" height="346" title="Обложка Госуслуги_page-0001.jpg">',
'<img width="614" alt="Обложка Госуслуги_page-0001.jpg" src="https://mkgtu.ru/upload/medialibrary/c76/c761087fd6938bd8eb8708e9e036679e.jpg" height="346" title="Обложка Госуслуги_page-0001.jpg" class="border border-3 rounded-3 border-secondary">', // '<img width="614" alt="Обложка Госуслуги_page-0001.jpg" src="https://mkgtu.ru/upload/medialibrary/c76/c761087fd6938bd8eb8708e9e036679e.jpg" height="346" title="Обложка Госуслуги_page-0001.jpg" class="border border-3 rounded-3 border-secondary">',
$content); // $content);
echo $content; echo $content;
@endphp @endphp

View File

@ -0,0 +1,76 @@
@extends('layouts.applicant-layout')
@section('content')
<style>
.buttonHover {
transition: .3s all;
}
.buttonHover:hover {
background-color: #006147;
transform: scale(1.03);
color: #e0e0e0;
}
</style>
<div class="container my-4">
<div class="row d-flex justify-content-center align-items-center">
<div class="col-8">
<a href="{{ route('mezhdunarodnaya-deyatelnost') }}">
<h4>
<div
class="d-flex justify-content-start align-items-center w-100 h-100 border border-secondary m-1 p-4 buttonHover rounded-2">
Международная деятельность
</div>
</h4>
</a>
</div>
<div class="col-8">
<a href="{{ route('obshchie-svedeniya') }}">
<h4>
<div
class="d-flex justify-content-start align-items-center w-100 h-100 border border-secondary m-1 p-4 buttonHover rounded-2">
Общие сведения
</div>
</h4>
</a>
</div>
<div class="col-8">
<a href="{{ route('kafedry') }}">
<h4>
<div
class="d-flex justify-content-start align-items-center w-100 h-100 border border-secondary m-1 p-4 buttonHover rounded-2">
Кафедры
</div>
</h4>
</a>
</div>
<div class="col-8">
<a href="{{ route('tsentr-mezhdunarodnogo-obrazovaniya') }}">
<h4>
<div
class="d-flex justify-content-start align-items-center w-100 h-100 border border-secondary m-1 p-4 buttonHover rounded-2">
Центр международного образования
</div>
</h4>
</a>
</div>
<div class="col-8">
<a href="{{ route('akademicheskaya-mobilnost-i-mezhdunarodnoe-sotrudnichestvo') }}">
<h4>
<div
class="d-flex justify-content-start align-items-center w-100 h-100 border border-secondary m-1 p-4 buttonHover rounded-2">
Академическая мобильность и международное сотрудничество
</div>
</h4>
</a>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,19 @@
@extends('layouts.applicant-layout')
@section('content')
<div class=" fw-bolder fs-1 text-center py-5 lh-lg"> Кафедры </div>
<div class="container py-4 d-flex justify-content-center">
<div class="col-10">
@php
use App\Services\PageScrapper;
$pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/inostrannym-abiturientam/kafedry/", '<div class=["\']content_info["\']>');
$row = $pageScrapper->getHTML();
$content = $pageScrapper->normalizeURLFile($row);
$content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU');
echo $content;
@endphp
</div>
</div>
@endsection

View File

@ -0,0 +1,19 @@
@extends('layouts.applicant-layout')
@section('content')
<div class=" fw-bolder fs-1 text-center py-5 lh-lg"> Международная деятельность </div>
<div class="container py-4 d-flex justify-content-center">
<div class="col-10">
@php
use App\Services\PageScrapper;
$pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/inostrannym-abiturientam/mezhdunarodnaya-deyatelnost/", '<div class=["\']content_info["\']>');
$row = $pageScrapper->getHTML();
$content = $pageScrapper->normalizeURLFile($row);
$content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU');
echo $content;
@endphp
</div>
</div>
@endsection

View File

@ -0,0 +1,19 @@
@extends('layouts.applicant-layout')
@section('content')
<div class=" fw-bolder fs-1 text-center py-5 lh-lg"> Общие сведения </div>
<div class="container py-4 d-flex justify-content-center">
<div class="col-10">
@php
use App\Services\PageScrapper;
$pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/inostrannym-abiturientam/obshchie-svedeniya/", '<div class=["\']content_info["\']>');
$row = $pageScrapper->getHTML();
$content = $pageScrapper->normalizeURLFile($row);
$content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU');
echo $content;
@endphp
</div>
</div>
@endsection

View File

@ -0,0 +1,19 @@
@extends('layouts.applicant-layout')
@section('content')
<div class=" fw-bolder fs-1 text-center py-5 lh-lg"> Центр Международного образования </div>
<div class="container py-4 d-flex justify-content-center">
<div class="col-10">
@php
use App\Services\PageScrapper;
$pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/inostrannym-abiturientam/tsentr-mezhdunarodnogo-obrazovaniya/", '<div class=["\']content_info["\']>');
$row = $pageScrapper->getHTML();
$content = $pageScrapper->normalizeURLFile($row);
$content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU');
echo $content;
@endphp
</div>
</div>
@endsection

View File

@ -0,0 +1,30 @@
@extends('layouts.applicant-layout')
@section('content')
<div class=" fw-bolder fs-1 text-center py-5 lh-lg"> Олимпиады для школьников </div>
{{-- пофиксить!!!!--}}
<div class="container py-4 d-flex justify-content-center" style="padding-left: 150px;" >
<div class="col-10">
@php
use App\Services\PageScrapper;
$pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/olimpiady-dlya-shkolnikov/", '<div class=["\']content_info["\']>');
$row = $pageScrapper->getHTML();
$content = $pageScrapper->normalizeURLFile($row);
$content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU');
// $tmp = preg_match_all('/<p (.*)>/isU', "https://mkgtu.ru/postuplenie/olimpiady-dlya-shkolnikov/", $arr);
//
// $arr[0] = array_unique($arr[0]);
// $str = $arr[0][0];
$content = str_replace('<p style="text-align: left;">', '<p>', $content);
echo $content;
@endphp
</div>
</div>
@endsection

View File

@ -0,0 +1,28 @@
@extends('layouts.applicant-layout')
@section('extra_styles')
<link rel="stylesheet" type="text/css" href="{{ URL::to('https://mkgtu.ru/bitrix/js/ui/design-tokens/dist/ui.design-tokens.css?169469846524720') }}">
<link rel="stylesheet" type="text/css" href="{{ URL::to('https://mkgtu.ru/sveden/assets/review/v1/common/css/sveden.css?169469165352526') }}">
<link rel="stylesheet" type="text/css" href="{{ URL::to('https://mkgtu.ru/sveden/assets/review/v1/common/css/vendor.css?1694691653153304') }}">
<link rel="stylesheet" type="text/css" href="{{ URL::to('https://mkgtu.ru/vikon/sveden/assets/review/v1/common/css/vendor.css?1706157854153304') }}">
<link rel="stylesheet" type="text/css" href="{{ URL::to('https://mkgtu.ru/vikon/sveden/assets/review/v1/common/css/sveden.css?170615785463681') }}">
@endsection
@section('content')
<div class=" fw-bolder fs-1 text-center py-5 lh-lg"> Платные образовательные услуги </div>
<div class="container fs-6 py-4 d-flex justify-content-center">
<div class="col-10">
@php
use App\Services\PageScrapper;
$pageScrapper = new PageScrapper("https://mkgtu.ru/sveden/paid_edu/", '<div class=["\']content_info["\']>');
$row = $pageScrapper->getHTML();
$content = $pageScrapper->normalizeURLFile($row);
$content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU');
echo $content;
@endphp
</div>
</div>
@endsection

View File

@ -0,0 +1,20 @@
@extends('layouts.applicant-layout')
@section('content')
<div class=" fw-bolder fs-1 text-center py-5 lh-lg"> Подготовительные курсы </div>
<div class="container pt-4 d-flex justify-content-center">
<div class="col-10">
@php
use App\Services\PageScrapper;
$pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/podgotovitelnye-kursy/", '<div class=["\']content_info["\']>');
$row = $pageScrapper->getHTML();
$content = $pageScrapper->normalizeURLFile($row);
$content = $pageScrapper->cutHTML($content,'/<footer(.*)<\/footer>/isU');
echo $content;
@endphp
</div>
</div>
@endsection

View File

@ -1,11 +0,0 @@
@extends('layouts.admin-layout')
@section('content')
@foreach($onlineDocuments as $onlineDocument)
<div>
{{ $onlineDocument->name }}
{{ $onlineDocument->url }}
{{ $onlineDocument->parent }}
{{ $onlineDocument->children }}
</div>
@endforeach
@endsection

View File

@ -1,6 +1,6 @@
<?php <?php
use App\Http\Controllers\OnlineDocumentsController; use App\Http\Controllers\ReceptionScreenController;
use App\Http\Controllers\ProfileController; use App\Http\Controllers\ProfileController;
use App\Http\Controllers\UploadFileController; use App\Http\Controllers\UploadFileController;
use App\Http\Controllers\UserController; use App\Http\Controllers\UserController;
@ -23,7 +23,7 @@ Route::get('/', function () {
Route::resources([ Route::resources([
'/users' => UserController::class, '/users' => UserController::class,
'/online-documents' => OnlineDocumentsController::class '/admin-reception-screen' => ReceptionScreenController::class
]); ]);
Route::get('/course', function () { Route::get('/course', function () {
@ -34,6 +34,26 @@ Route::get('/applicant', function () {
return view('menu.abitur'); return view('menu.abitur');
})->name('abitur'); })->name('abitur');
Route::get('/for-foreign-applicants', function () {
return view('menu.inostrannym-abiturientam');
})->name('inostrannym-abiturientam');
Route::get('/paid_edu', function () {
return view('menu.paid_edu');
})->name('paid_edu');
Route::get('/olympiads-for-schoolchildren', function () {
return view('menu.olimpiady-dlya-shkolnikov');
})->name('olimpiady-dlya-shkolnikov');
Route::get('/training courses', function () {
return view('menu.podgotovitelnye-kursy');
})->name('podgotovitelnye-kursy');
Route::get('/web-consultations', function () { Route::get('/web-consultations', function () {
return view('menu.abitur.web-consultations'); return view('menu.abitur.web-consultations');
})->name('web-consultations'); })->name('web-consultations');
@ -62,6 +82,28 @@ Route::get('/video-materials-for-applicants', function () {
return view('menu.abitur.videomaterialy-dlya-postupayushchikh'); return view('menu.abitur.videomaterialy-dlya-postupayushchikh');
})->name('videomaterialy-dlya-postupayushchikh'); })->name('videomaterialy-dlya-postupayushchikh');
Route::get('/international-activity', function () {
return view('menu.inostrannym-abiturientam.mezhdunarodnaya-deyatelnost');
})->name('mezhdunarodnaya-deyatelnost');
Route::get('/general-information', function () {
return view('menu.inostrannym-abiturientam.obshchie-svedeniya');
})->name('obshchie-svedeniya');
Route::get('/departments', function () {
return view('menu.inostrannym-abiturientam.kafedry');
})->name('kafedry');
Route::get('/international-education-center', function () {
return view('menu.inostrannym-abiturientam.tsentr-mezhdunarodnogo-obrazovaniya');
})->name('tsentr-mezhdunarodnogo-obrazovaniya');
Route::get('/academic-mobility-and-international-cooperation', function () {
return view('menu.inostrannym-abiturientam.akademicheskaya-mobilnost-i-mezhdunarodnoe-sotrudnichestvo');
})->name('akademicheskaya-mobilnost-i-mezhdunarodnoe-sotrudnichestvo');
Route::post('/uploadfile', [UploadFileController::class, 'showUploadFile'])->name('uploadfile'); Route::post('/uploadfile', [UploadFileController::class, 'showUploadFile'])->name('uploadfile');
Route::get('/dashboard', function () { Route::get('/dashboard', function () {