diff --git a/.vscode/sftp.json b/.vscode/sftp.json new file mode 100644 index 0000000..f49ebbb --- /dev/null +++ b/.vscode/sftp.json @@ -0,0 +1,12 @@ +{ + "name": "inwestprofil.fr", + "host": "inwestprofil.pl", + "protocol": "ftp", + "port": 21, + "username": "ftp@inwestprofil.fr", + "password": "4wCFuWYSQlckbqGBT", + "remotePath": "/public_html", + "uploadOnSave": false, + "useTempFile": false, + "openSsh": false +} diff --git a/admin/templates/articles/article-edit.php b/admin/templates/articles/article-edit.php index 9c2a7f2..6d230f5 100644 --- a/admin/templates/articles/article-edit.php +++ b/admin/templates/articles/article-edit.php @@ -2,7 +2,6 @@ -; global $db, $settings; ob_start(); @@ -120,12 +119,19 @@ ob_start();
Nr telefonu: ' . \S::get( 'phone' ) . '
' - . 'Email: ' . \S::get( 'email' ) . '
' - . '' . \S::get( 'text' ) . '
', - \S::get( 'email' ) + $subject, + 'Nr telefonu: ' . $phone . '
' + . 'Email: ' . $email . '
' + . '' . $text . '
', + $email ) ) { $mdb -> insert( 'pp_contact_emails', [ - 'email' => \S::get( 'email' ), - 'phone' => \S::get('phone' ), - 'title' => \S::get( 'subject' ), - 'mail' => \S::get( 'text' ), + 'email' => $email, + 'phone' => $phone, + 'title' => $subject, + 'mail' => $text, 'add_date' => date("Y-m-d, H:i") ]); diff --git a/autoload/.1645554992.suspected b/autoload/.1645554992.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645576321.suspected b/autoload/.1645576321.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645635829.suspected b/autoload/.1645635829.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645635840.suspected b/autoload/.1645635840.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645641524.suspected b/autoload/.1645641524.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645661211.suspected b/autoload/.1645661211.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645686576.suspected b/autoload/.1645686576.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645704702.suspected b/autoload/.1645704702.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645708327.suspected b/autoload/.1645708327.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645796929.suspected b/autoload/.1645796929.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645796935.suspected b/autoload/.1645796935.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/.1645796948.suspected b/autoload/.1645796948.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/.1645555001.suspected b/autoload/admin/.1645555001.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/.1645576320.suspected b/autoload/admin/.1645576320.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/.1645641515.suspected b/autoload/admin/.1645641515.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/.1645641527.suspected b/autoload/admin/.1645641527.suspected deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/admin/controls/class.Articles.php b/autoload/admin/controls/class.Articles.php index 3c29724..96c2581 100644 --- a/autoload/admin/controls/class.Articles.php +++ b/autoload/admin/controls/class.Articles.php @@ -98,7 +98,7 @@ class Articles $values['params'] = $params; if ( $id = \admin\factory\Articles::article_save( - $values['id'], $values['title'], $values['main_image'], $values['entry'], $values['text'], $values['table_of_contents'], $values['status'], $values['show_title'], $values['show_date_add'], $values['date_add'], + $values['id'], $values['title'], $values['main_image'], $values['entry'], $values['text'], $values['table_of_contents'], $values['status'], $values['show_title'], $values['show_table_of_contents'], $values['show_date_add'], $values['date_add'], $values['show_date_modify'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['layout_id'], $values['pages'], $values['noindex'], $values['repeat_entry'], $values['copy_from'], $values['social_icons'], $values['event_date'], $values['hidden-tags'], $values['block_direct_access'], $values['priority'], $values['password'], $values['pixieset'], $values['id_author'], $params diff --git a/autoload/admin/controls/class.Settings.php b/autoload/admin/controls/class.Settings.php index d328bd1..ba01075 100644 --- a/autoload/admin/controls/class.Settings.php +++ b/autoload/admin/controls/class.Settings.php @@ -54,6 +54,7 @@ class Settings \admin\factory\Settings::settings_update( 'lazy_loading', $values['lazy_loading'] == 'on' ? 1 : 0 ); \admin\factory\Settings::settings_update( 'generate_webp', $values['generate_webp'] == 'on' ? 1 : 0 ); \admin\factory\Settings::settings_update( 'contact_form_captcha', $values['contact_form_captcha'] == 'on' ? 1 : 0 ); + \admin\factory\Settings::settings_update( 'url_version', $values['url_version'] ); \S::alert( 'Ustawienia zostały zapisane.' ); diff --git a/autoload/admin/factory/class.Articles.php b/autoload/admin/factory/class.Articles.php index 55189a2..a10b710 100644 --- a/autoload/admin/factory/class.Articles.php +++ b/autoload/admin/factory/class.Articles.php @@ -238,7 +238,7 @@ class Articles } public static function article_save( - $article_id, $title, $main_image, $entry, $text, $table_of_contents, $status, $show_title, $show_date_add, $date_add, $show_date_modify, $seo_link, $meta_title, $meta_description, + $article_id, $title, $main_image, $entry, $text, $table_of_contents, $status, $show_title, $show_table_of_contents, $show_date_add, $date_add, $show_date_modify, $seo_link, $meta_title, $meta_description, $meta_keywords, $layout_id, $pages, $noindex, $repeat_entry, $copy_from, $social_icons, $event_date, $tags, $block_direct_access, $priority, $password, $pixieset, $id_author, $params ) { @@ -251,6 +251,7 @@ class Articles { $mdb -> insert( 'pp_articles', [ 'show_title' => $show_title == 'on' ? 1 : 0, + 'show_table_of_contents' => $show_table_of_contents == 'on' ? 1 : 0, 'show_date_add' => $show_date_add == 'on' ? 1 : 0, 'show_date_modify' => $show_date_modify == 'on' ? 1 : 0, 'date_add' => $date_add ? $date_add : date( 'Y-m-d H:i:s' ), @@ -435,6 +436,7 @@ class Articles { $mdb -> update( 'pp_articles', [ 'show_title' => $show_title == 'on' ? 1 : 0, + 'show_table_of_contents' => $show_table_of_contents == 'on' ? 1 : 0, 'show_date_add' => $show_date_add == 'on' ? 1 : 0, 'show_date_modify' => $show_date_modify == 'on' ? 1 : 0, 'date_modify' => date( 'Y-m-d H:i:s' ), diff --git a/autoload/admin/modlang.inc.php b/autoload/admin/modlang.inc.php deleted file mode 100644 index e69de29..0000000 diff --git a/autoload/class.S.php b/autoload/class.S.php index c7db4b4..278ead3 100644 --- a/autoload/class.S.php +++ b/autoload/class.S.php @@ -3,6 +3,30 @@ class S { static public function generate_webp_image($file, $compression_quality = 85) { + if ( strpos( $file, 'thumb/' ) !== false ) + { + $file_tmp = explode( '/', $file ); + + $width = $file_tmp[1]; + if ( empty( $width ) and $width !== '0' ) + $width = 500; + + $height = $file_tmp[2]; + if ( empty( $height ) and $height !== '0' ) + $height = 500; + + for ( $i = 0; $i <= 2; $i++ ) + unset( $file_tmp[$i] ); + + $img_src = implode( '/', $file_tmp ); + + $crop_w = $_GET['c_w']; + $crop_h = $_GET['c_h']; + + $img_md5 = md5( $img_src . $height . $width . $crop_h . $crop_w ); + $file = 'thumbs/' . $img_md5[0] . '/' . $img_md5[1] . '/' . $img_md5[2] . '/' . $img_md5; + } + if (!file_exists($file)) return false; @@ -10,25 +34,24 @@ class S if (file_exists($output_file)) return $output_file; - $file_type = strtolower(pathinfo($file, PATHINFO_EXTENSION)); + $file_type = mime_content_type( $file ); if (function_exists('imagewebp')) { switch ($file_type) { - case 'jpeg': - case 'jpg': + case 'image/jpeg': $image = imagecreatefromjpeg($file); break; - case 'png': + case 'image/png': $image = imagecreatefrompng($file); imagepalettetotruecolor($image); imagealphablending($image, true); imagesavealpha($image, true); break; - case 'gif': + case 'image/gif': $image = imagecreatefromgif($file); break; @@ -594,87 +617,87 @@ class S foreach ($available_domains as $domain) { $site_map[$domain['domain']] = '' . PHP_EOL; -$site_map[$domain['domain']] .= '