diff --git a/app/Http/Controllers/Updater.php b/app/Http/Controllers/Updater.php deleted file mode 100644 index 8af2829..0000000 --- a/app/Http/Controllers/Updater.php +++ /dev/null @@ -1,193 +0,0 @@ - 'required|file|mimes:zip'); - $validator = Validator::make($request->all(), $rules); - if ($validator->fails()) { - return redirect()->back()->with('error', get_phrase('Select a valid zip file')); - } - - //Create update directory - $dir = 'upload'; - if (!is_dir($dir) && !file_exists($dir)) { - - mkdir($dir, 0777, true); - } - - //Uploaded file name - $file_name = $request->file->getClientOriginalName(); - $path = $dir . '/' . $file_name; - - if (class_exists('ZipArchive')) { - //File uploading.. - FileUploader::upload($request->file, '../'.$path); - - // Unzip uploaded update file and remove zip file. - $zip = new ZipArchive; - $res = $zip->open(base_path($path)); - $zip->extractTo(base_path($dir)); - $zip->close(); - unlink(base_path($path)); - } else { - return redirect()->back()->with('error', get_phrase('Your server is unable to extract the zip file') . '. ' . get_phrase('Please enable the zip extension to the server, then try again')); - } - - $uploaded_folder_name = substr($file_name, 0, -4); - $version_ = substr($file_name, 0, -4); - - // Exicute php or laravel's code - $step1Exicution = file_get_contents(base_path($dir . '/' . $uploaded_folder_name . '/step1_pre_checker.php')); - if ($step1Exicution) { - eval($step1Exicution); - } - - //check required version - $product_current_version = DB::table('settings')->where('type', 'version')->value('description'); - - $config = file_get_contents(base_path($dir . '/' . $uploaded_folder_name . '/step2_config.json')); - if ($config) { - $config = json_decode($config, true); - } - - //check ias addon or main product update - if (array_key_exists('is_addon', $config) && strval($config['is_addon']) == "1") { - - //check required main product version to install this addon - if ($config['product_version']['minimum_required_version'] > $product_current_version) { - return redirect()->back()->with('error', get_phrase("You have to update your main application's version.") . '(' . $config['product_version']['minimum_required_version'] . ') ' . get_phrase(' to install the addon')); - } - - $addons_current_version = DB::table('addons')->where('unique_identifier', $config['addons'][0]['unique_identifier']); - if ($addons_current_version->get()->count() > 0) { - $addons_current_version = $addons_current_version->value('version'); - } else { - $addons_current_version = "0"; - } - - //check required addon version to update this addon - if (strval($config['addon_version']['minimum_required_version']) != strval($addons_current_version)) { - return redirect()->back()->with('error', get_phrase('It looks like you are skipping a version') . '. ' . get_phrase('Please update version') . ' ' . $config['addon_version']['minimum_required_version'] . ' ' . get_phrase('first')); - } - - foreach ($config['addons'] as $addon) { - $data['unique_identifier'] = $addon['unique_identifier']; - $data['title'] = $addon['title']; - $data['version'] = $config['addon_version']['update_version']; - $data['features'] = $addon['features']; - $data['status'] = 1; - $data['parent_id'] = $addons_parent_id; - - $parent_id = DB::table('addons')->insertGetId($data); - - if ($addons_parent_id == null) { - $addons_parent_id = $parent_id; - } - } - } else { - //check required main product version - if (strval($config['product_version']['minimum_required_version']) != strval($product_current_version)) { - return redirect()->back()->with('error', get_phrase('It looks like you are skipping a version') . '. ' . get_phrase('Please update version') . ' ' . $config['product_version']['minimum_required_version'] . ' ' . get_phrase('first')); - } - } - - //Update files, folders and libraries - $this->fileAndFolderDistributor($uploaded_folder_name); - - //run SQL file - $sql = file_get_contents(base_path($dir . '/' . $uploaded_folder_name . '/step3_database.sql')); - if ($sql) { - DB::unprepared($sql); - } - - // Exicute php or laravel's code - $step4Exicution = file_get_contents(base_path($dir . '/' . $uploaded_folder_name . '/step4_update_data.php')); - if ($step4Exicution) { - eval($step4Exicution); - } - - if (array_key_exists('is_addon', $config) && strval($config['is_addon']) == "1") { - if ($config['addon_version']['minimum_required_version'] == "0") { - return redirect()->back()->with('success', get_phrase('Addon installed successfully')); - } else { - return redirect()->back()->with('success', get_phrase('Addon updated successfully')); - } - } else { - DB::table('settings')->where('type', 'version')->update(['description' => $config['product_version']['update_version']]); - return redirect()->back()->with('success', get_phrase('Version updated successfully')); - } - } - - public function fileAndFolderDistributor($param1, $param2 = "") - { - if ($param2 == "") { - $param2 = $param1; - $uploaded_dir_path = base_path('upload/' . $param1 . '/sources'); - } else { - $uploaded_dir_path = $param1; - } - - $uploaded_dir_paths = glob($uploaded_dir_path . '/*'); - - foreach ($uploaded_dir_paths as $uploaded_sub_dir_path) { - - if (is_dir($uploaded_sub_dir_path)) { - - $all_available_sub_paths = count(glob($uploaded_sub_dir_path . '/*')); - - if ($all_available_sub_paths == 0) { - //Create directory - $application_dir_path = str_replace('upload/' . $param2 . '/sources/', "", $uploaded_sub_dir_path); - if (!is_dir($application_dir_path) && !file_exists($application_dir_path)) { - mkdir($application_dir_path, 0777, true); - } - } else { - $this->fileAndFolderDistributor($uploaded_sub_dir_path, $param2); - } - } else { - $application_file_path = str_replace('upload/' . $param2 . '/sources/', "", $uploaded_sub_dir_path); - - //Check dir. If not exist then created - $file_path_arr = explode("/", $application_file_path); - $file_name = $file_path_arr[count($file_path_arr) - 1]; - $application_dir_path = str_replace('/' . $file_name, "", $application_file_path); - if (!is_dir($application_dir_path) && !file_exists($application_dir_path)) { - - mkdir($application_dir_path, 0777, true); - } - - //Copy file to application path - copy($uploaded_sub_dir_path, $application_file_path); - - //Zip file extract for any big size libraries - if (pathinfo($file_name, PATHINFO_EXTENSION) == 'zip') { - // PATH OF EXTRACTING LIBRARY FILE - array_pop($file_path_arr); - $extract_to = implode('/', $file_path_arr); - $library_zip = new ZipArchive; - $library_result = $library_zip->open($application_file_path); - $library_zip->extractTo($extract_to); - $library_zip->close(); - unlink($application_file_path); - } - } - } - } -} diff --git a/public/assets/frontend/default/css/style.css b/public/assets/frontend/default/css/style.css index 600a517..5b9ae1a 100644 --- a/public/assets/frontend/default/css/style.css +++ b/public/assets/frontend/default/css/style.css @@ -351,6 +351,82 @@ img { border-radius: 24px !important; } +.divider { + display: flex; + align-items: center; + text-align: center; + margin: 20px 0; +} + +.divider::before, +.divider::after { + content: ''; + flex: 1; + border-bottom: 1px solid #ddd; +} + +.divider span { + padding: 0 15px; + color: #666; + font-size: 14px; + background: white; +} + +.hover-color-2 { + transition: color 0.3s ease, font-weight 0.1 ease-in-out; +} + +.hover-color-1:hover { + color: var(--color-1); + cursor: pointer; +} + +.hover-color-2:hover { + color: black; + cursor: pointer; +} + +.google-login-btn { + display: flex !important; + align-items: center; + justify-content: center; + padding: 12px 30px; + border-radius: 10px; + background: linear-gradient(45deg, #ffffff 0%, #f8f9fa 100%); + border: 2px solid #e9ecef; + color: #333; + font-size: 15px; + font-weight: 600; + text-decoration: none; + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +.google-login-btn:hover { + background: linear-gradient(45deg, #f8f9fa 0%, #e9ecef 100%); + border-color: var(--color-1); + transform: translateY(-2px); + color: #333; + text-decoration: none; + box-shadow: 0 4px 15px rgba(66, 133, 244, 0.2); +} + +.google-login-btn:active { + transform: translateY(0); +} + +.google-login-btn img { + width: 20px; + height: 20px; + margin-right: 12px; + transition: transform 0.3s ease; +} + +.google-login-btn:hover img { + transform: scale(1.1); +} + .eBtn { padding: 12px 30px; border-radius: 10px; @@ -362,10 +438,22 @@ img { .gradient { background: linear-gradient(45deg, rgba(2, 25, 110, 1) 0%, rgba(2, 25, 110, 1) 13%, rgba(217, 217, 217, 1) 65%, rgba(255, 255, 255, 1) 98%); - transition: 0.5s; + transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); background-size: 200% auto; } +.eBtn:hover { + background-position: right center; + border-color: #0330c4 !important; + transform: translateY(-1px); + box-shadow: 0 6px 20px rgba(2, 25, 110, 0.25); +} + +.eBtn:active { + transform: translateY(0); + transition: all 0.1s ease; +} + .shadow-none { box-shadow: none !important; } @@ -7701,4 +7789,4 @@ textarea.lms-form-control { /* =================================================================== Tutor Details CSS End -====================================================================*/ +====================================================================*/ \ No newline at end of file diff --git a/public/assets/frontend/default/image/Google.png b/public/assets/frontend/default/image/Google.png new file mode 100644 index 0000000..0c8078b Binary files /dev/null and b/public/assets/frontend/default/image/Google.png differ diff --git a/resources/views/admin/setting/live_class_settings.blade.php b/resources/views/admin/setting/live_class_settings.blade.php index 061c64a..478e2d2 100644 --- a/resources/views/admin/setting/live_class_settings.blade.php +++ b/resources/views/admin/setting/live_class_settings.blade.php @@ -17,7 +17,7 @@
+ {{ get_phrase('Login with Google') }}
+
+ @endif
+
{{ get_phrase('Not have an account yet?') }} - {{ get_phrase('Create Account') }} + {{ get_phrase('Create Account') }}
{{ get_phrase('Already have account?') }} {{ get_phrase('Sign in') }}
+ {{-- Google Login Button --}} + +
+ {{ get_phrase('Sign Up with Google') }}
+
+ @endif
+
+ {{ get_phrase('Already have account?') }} {{ get_phrase('Sign in') }}
{{ get_phrase('We invites learners to explore courses designed by industry experts, offering cutting-edge content for skill development.')}}