Changeset 3004390
- Timestamp:
- 12/01/2023 07:39:07 PM (2 years ago)
- Location:
- toppersystem
- Files:
-
- 138 added
- 22 edited
-
tags/4.1 (added)
-
tags/4.1/api (added)
-
tags/4.1/api/.htaccess (added)
-
tags/4.1/api/Compressor.php (added)
-
tags/4.1/api/DelExceptionAspmts.php (added)
-
tags/4.1/api/JSMin.php (added)
-
tags/4.1/api/LoadStatusCssFiles_ts.php (added)
-
tags/4.1/api/LoadStatusDefer_ts.php (added)
-
tags/4.1/api/LoadStatusPages_ts.php (added)
-
tags/4.1/api/ReqExceptionsAspmts.php (added)
-
tags/4.1/api/SaveExceptionAspmts.php (added)
-
tags/4.1/api/SavePosAutoUpdateTimesTS.php (added)
-
tags/4.1/api/SavePosBlockStageWebsiteTS.php (added)
-
tags/4.1/api/SavePosCleanCacheTS.php (added)
-
tags/4.1/api/SavePosCo2ApplicationTS.php (added)
-
tags/4.1/api/SavePosCssFilesTS.php (added)
-
tags/4.1/api/SavePosDeferTS.php (added)
-
tags/4.1/api/SavePosLazyLoadingTS.php (added)
-
tags/4.1/api/SaveStatusAspmTS.php (added)
-
tags/4.1/api/SaveStatusAutoUpdateTS.php (added)
-
tags/4.1/api/SaveStatusCacheTS.php (added)
-
tags/4.1/api/SaveStatusCo2ApplicationTS.php (added)
-
tags/4.1/api/SaveStatusLazyLoadingTS.php (added)
-
tags/4.1/api/SaveStatusWpCronTS.php (added)
-
tags/4.1/api/StatusOptimizationTS.php (added)
-
tags/4.1/api/UpdatePagesTS.php (added)
-
tags/4.1/api/ajax_ts.php (added)
-
tags/4.1/api/aspmts.php (added)
-
tags/4.1/api/autoload.php (added)
-
tags/4.1/api/autoloadcheckTS.php (added)
-
tags/4.1/api/autoupdatedpageTS.php (added)
-
tags/4.1/api/connect.php (added)
-
tags/4.1/api/deletepage.php (added)
-
tags/4.1/api/download.php (added)
-
tags/4.1/api/events.php (added)
-
tags/4.1/api/loadclass.php (added)
-
tags/4.1/api/management_autoupdatetimes_ts.php (added)
-
tags/4.1/api/management_block_stage_websitets_ts.php (added)
-
tags/4.1/api/management_clean_cachets_ts.php (added)
-
tags/4.1/api/management_co2app_ts.php (added)
-
tags/4.1/api/management_cssfilests_ts.php (added)
-
tags/4.1/api/management_deferts_ts.php (added)
-
tags/4.1/api/management_lazyloadingts_ts.php (added)
-
tags/4.1/api/management_ts.php (added)
-
tags/4.1/api/received.php (added)
-
tags/4.1/api/register.php (added)
-
tags/4.1/api/safeclass.php (added)
-
tags/4.1/api/send.php (added)
-
tags/4.1/api/status.php (added)
-
tags/4.1/api/terms_condictions.php (added)
-
tags/4.1/api/toppersystem.php (added)
-
tags/4.1/aspmts (added)
-
tags/4.1/aspmts/.htaccess (added)
-
tags/4.1/aspmts/aspmts.php (added)
-
tags/4.1/aspmts/connect.php (added)
-
tags/4.1/assets (added)
-
tags/4.1/assets/.htaccess (added)
-
tags/4.1/co2 (added)
-
tags/4.1/co2/.htaccess (added)
-
tags/4.1/co2/calcolate.php (added)
-
tags/4.1/components (added)
-
tags/4.1/components/.htaccess (added)
-
tags/4.1/components/assetsts.php (added)
-
tags/4.1/components/error.php (added)
-
tags/4.1/components/general.php (added)
-
tags/4.1/components/isadmin.php (added)
-
tags/4.1/components/public.php (added)
-
tags/4.1/components/upgradets.php (added)
-
tags/4.1/css (added)
-
tags/4.1/css/.htaccess (added)
-
tags/4.1/css/components_toppersystem.css (added)
-
tags/4.1/css/loader.css (added)
-
tags/4.1/db (added)
-
tags/4.1/db/.htaccess (added)
-
tags/4.1/download (added)
-
tags/4.1/download/download.php (added)
-
tags/4.1/image (added)
-
tags/4.1/image/.htaccess (added)
-
tags/4.1/image/agrementts.png (added)
-
tags/4.1/image/apicenterts.png (added)
-
tags/4.1/image/apikeyts.png (added)
-
tags/4.1/image/aspmts.png (added)
-
tags/4.1/image/aspmts2.png (added)
-
tags/4.1/image/autoupdatets.png (added)
-
tags/4.1/image/cachets.png (added)
-
tags/4.1/image/cleancachests.png (added)
-
tags/4.1/image/co2applicationts.png (added)
-
tags/4.1/image/cssts.png (added)
-
tags/4.1/image/guidets.png (added)
-
tags/4.1/image/image.php (added)
-
tags/4.1/image/javascriptts.png (added)
-
tags/4.1/image/logo_menu_toppersystem.png (added)
-
tags/4.1/image/logo_toppersystem.png (added)
-
tags/4.1/image/noimageload.png (added)
-
tags/4.1/image/optimizationts.png (added)
-
tags/4.1/image/paymentts.png (added)
-
tags/4.1/image/screenshot_register_authcode_apicenter_toppersystem.jpg (added)
-
tags/4.1/image/smartimagelazyloadingts.png (added)
-
tags/4.1/image/stagingsitets.png (added)
-
tags/4.1/image/supportts.png (added)
-
tags/4.1/image/toppersystemseo.png (added)
-
tags/4.1/img (added)
-
tags/4.1/img/.htaccess (added)
-
tags/4.1/js (added)
-
tags/4.1/js/.htaccess (added)
-
tags/4.1/js/automatic_update.js (added)
-
tags/4.1/js/automatic_update.min.js (added)
-
tags/4.1/js/cleanwork.js (added)
-
tags/4.1/js/co2appts.js (added)
-
tags/4.1/js/co2ts.js (added)
-
tags/4.1/js/components_start_toppersystem.js (added)
-
tags/4.1/js/components_toppersystem.js (added)
-
tags/4.1/js/components_while_toppersystem.js (added)
-
tags/4.1/js/guide_interactive_plugin_toppersystem.js (added)
-
tags/4.1/js/lazyloading_ts.js (added)
-
tags/4.1/js/loaderpage.js (added)
-
tags/4.1/js/smartlazyloading_ts.js (added)
-
tags/4.1/js/start_components_cssmanagement_toppersystem.js (added)
-
tags/4.1/js/start_components_jsmanagement_toppersystem.js (added)
-
tags/4.1/js/start_components_toppersystem.js (added)
-
tags/4.1/js/start_components_while_toppersystem.js (added)
-
tags/4.1/js/start_guide_interactive_plugin_toppersystem.js (added)
-
tags/4.1/js/startgo_management_guide_interactive_plugin_toppersystem.js (added)
-
tags/4.1/js/startinit_components_toppersystem.js (added)
-
tags/4.1/license.txt (added)
-
tags/4.1/log (added)
-
tags/4.1/log/.htaccess (added)
-
tags/4.1/log/IndexToppersystem.txt (added)
-
tags/4.1/log/SaveToppersystem.txt (added)
-
tags/4.1/minify (added)
-
tags/4.1/minify/.htaccess (added)
-
tags/4.1/minify/Compressor.php (added)
-
tags/4.1/minify/JSMin.php (added)
-
tags/4.1/minify/minify.php (added)
-
tags/4.1/minify/minifyts.php (added)
-
tags/4.1/readme.txt (added)
-
tags/4.1/toppersystem.php (added)
-
tags/4.1/uninstall.php (added)
-
trunk/api/aspmts.php (modified) (1 diff)
-
trunk/api/autoupdatedpageTS.php (modified) (3 diffs)
-
trunk/api/management_autoupdatetimes_ts.php (modified) (1 diff)
-
trunk/api/management_block_stage_websitets_ts.php (modified) (1 diff)
-
trunk/api/management_clean_cachets_ts.php (modified) (1 diff)
-
trunk/api/management_co2app_ts.php (modified) (2 diffs)
-
trunk/api/management_cssfilests_ts.php (modified) (1 diff)
-
trunk/api/management_deferts_ts.php (modified) (15 diffs)
-
trunk/api/management_lazyloadingts_ts.php (modified) (2 diffs)
-
trunk/api/management_ts.php (modified) (7 diffs)
-
trunk/api/received.php (modified) (9 diffs)
-
trunk/aspmts/aspmts.php (modified) (1 diff)
-
trunk/aspmts/connect.php (modified) (1 diff)
-
trunk/components/general.php (modified) (3 diffs)
-
trunk/components/isadmin.php (modified) (1 diff)
-
trunk/components/public.php (modified) (2 diffs)
-
trunk/js/co2appts.js (modified) (1 diff)
-
trunk/js/co2ts.js (modified) (1 diff)
-
trunk/js/components_toppersystem.js (modified) (1 diff)
-
trunk/js/components_while_toppersystem.js (modified) (46 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/toppersystem.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
toppersystem/trunk/api/aspmts.php
r2963738 r3004390 624 624 } 625 625 626 $line_preleva2="<div class=\"pxdding12\"><big>$txtts15</big></div><table class=\"eventstables_ts margin0\"><tr><td class=\"eventstd_ts\"><strong>$txtts10</strong></td><td class=\"eventstd_ts\"><center><strong>$txtts5</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts6</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts7</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts8</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts9</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts11</strong></center></td></tr><tr><td class=\"eventstd_ts\"><input id=\"value_ts\" type=\"text\" name=\"value_ts\" value=\"\"></td><td class=\"eventstd_ts\"><center><input id=\"ip_aspmts_save\" name=\"ip_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><input id=\"page_aspmts_save\" name=\"page_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><input id=\"useragent_aspmts_save\" name=\"useragent_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><input id=\"servername_aspmts_save\" name=\"servername_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><input id=\"ipservername_aspmts_save\" name=\"ipservername_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center>< a rel=\"nofollow\" href=\"javascript:save_exception_aspmts();\">$txtts12</a></center></td></tr></table>";626 $line_preleva2="<div class=\"pxdding12\"><big>$txtts15</big></div><table class=\"eventstables_ts margin0\"><tr><td class=\"eventstd_ts\"><strong>$txtts10</strong></td><td class=\"eventstd_ts\"><center><strong>$txtts5</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts6</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts7</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts8</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts9</strong></center></td><td class=\"eventstd_ts\"><center><strong>$txtts11</strong></center></td></tr><tr><td class=\"eventstd_ts\"><input id=\"value_ts\" type=\"text\" name=\"value_ts\" value=\"\"></td><td class=\"eventstd_ts\"><center><input id=\"ip_aspmts_save\" name=\"ip_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><input id=\"page_aspmts_save\" name=\"page_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><input id=\"useragent_aspmts_save\" name=\"useragent_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><input id=\"servername_aspmts_save\" name=\"servername_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><input id=\"ipservername_aspmts_save\" name=\"ipservername_aspmts_save\" type=\"checkbox\"></center></td><td class=\"eventstd_ts\"><center><div id=\"block_save_details_aspmts_toppersystem\" class=\"\"><a rel=\"nofollow\" href=\"javascript:save_exception_aspmts();\">$txtts12</a></div><div id=\"block_save_details_loading_aspmts_toppersystem\" class=\"display_none_ts\"><table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></td></tr></table></div></center></td></tr></table>"; 627 627 628 628 $box_page="<div id=\"box_page_request_events_toppersystem\">$line_preleva2<br><br><div class=\"pxdding12\"><big>$txtts14</big></div><div id=\"box_exceptions_request_events_toppersystem\"> </div></div>"; -
toppersystem/trunk/api/autoupdatedpageTS.php
r2986590 r3004390 41 41 "authcode_toppersystem" => TopperSystemAuthTS::AuthTopperSystem()."".md5($url), 42 42 "images_toppersystem_send" => "1", 43 "destination_toppersystem" => "/api/rec_toppersystem_v1 2.php",43 "destination_toppersystem" => "/api/rec_toppersystem_v15.php", 44 44 "resend_toppersystem" => $resend_toppersystem, 45 45 "hreflang_toppersystem" => $language_toppersystem, … … 107 107 "authcode_toppersystem" => TopperSystemAuthTS::AuthTopperSystem()."".md5($url), 108 108 "images_toppersystem_send" => "1", 109 "destination_toppersystem" => "/api/rec_toppersystem_v1 2.php",109 "destination_toppersystem" => "/api/rec_toppersystem_v15.php", 110 110 "resend_toppersystem" => $resend_toppersystem, 111 111 "hreflang_toppersystem" => $language_toppersystem, … … 157 157 "authcode_toppersystem" => TopperSystemAuthTS::AuthTopperSystem()."".md5($url), 158 158 "images_toppersystem_send" => "1", 159 "destination_toppersystem" => "/api/rec_toppersystem_v1 2.php",159 "destination_toppersystem" => "/api/rec_toppersystem_v15.php", 160 160 "resend_toppersystem" => $resend_toppersystem, 161 161 "hreflang_toppersystem" => $language_toppersystem, -
toppersystem/trunk/api/management_autoupdatetimes_ts.php
r2975945 r3004390 515 515 $add_position_left_right.="<tr><td class=\"eventstd_ts\"><strong>$txtts3</strong><br><small>$txtts14</small></td><td class=\"eventstd_ts\"><select id=\"pos_sel_autoupdatetimes1_toppersystem_send\" name=\"pos_sel_autoupdatetimes1_toppersystem_send\"><option value=\"120\"$selected120>2 $txtts9</option><option value=\"300\"$selected300>5 $txtts9</option><option value=\"600\"$selected600>10 $txtts9</option><option value=\"900\"$selected900>15 $txtts9</option><option value=\"1800\"$selected1800>30 $txtts9</option><option value=\"3600\"$selected3600>1 $txtts5</option><option value=\"7200\"$selected7200>2 $txtts4</option><option value=\"14400\"$selected14400>4 $txtts4</option><option value=\"28800\"$selected28800>8 $txtts4</option><option value=\"43200\"$selected43200>12 $txtts4</option><option value=\"57600\"$selected57600>16 $txtts4</option><option value=\"72000\"$selected72000>20 $txtts4</option><option value=\"86400\"$selected86400>24 $txtts4</option></select></td></tr>"; 516 516 517 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6</small></td><td class=\"eventstd_ts\" ><a rel=\"nofollow\" href=\"javascript:save_events_autoupdatetimes_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_autoupdatetimes_toppersystem();\">$txtts8</a></td></tr>";517 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6</small></td><td class=\"eventstd_ts\" style=\"width:20%;\"><div id=\"block_save_details_autoupdatetimes_toppersystem\" class=\"\"><a rel=\"nofollow\" href=\"javascript:save_events_autoupdatetimes_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_autoupdatetimes_toppersystem();\">$txtts8</a></div><div id=\"block_save_details_loading_autoupdatetimes_toppersystem\" class=\"display_none_ts\"><table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></td></tr></table></div></td></tr>"; 518 518 } 519 519 } -
toppersystem/trunk/api/management_block_stage_websitets_ts.php
r2963738 r3004390 281 281 $add_position="<tr><td class=\"eventstd_ts\"><small><i>$txtts3</i><br><strong>$resend_toppersystem</strong><br><br></small><i>$txtts4</i><br><input id=\"block_stage_websitets_service_save\" name=\"block_stage_websitets_service_save\" type=\"text\" placeholder=\"\" value=\"".$contenuto_file_siste_stage_toppersystem."\" class=\"inputform_toppersystem\"><input id=\"block_stage_websitets_service_save_old\" name=\"block_stage_websitets_service_save_old\" type=\"hidden\" value=\"".$contenuto_file_siste_stage_toppersystem."\"><br><br><small><strong>(i)</strong> $txtts9<br><br><strong>(i)</strong> $txtts10<br><strong>$txtts5</strong><br>$txtts11 <a target=\"_blank\" href=\"https://www.toppersystem.com/apicenter/login.php?lang=$hreflang_toppersystem\">https://www.toppersystem.com/apicenter/</a><br>$txtts12<br>$txtts14</small></td><td class=\"eventstd_ts\"> </td></tr>"; 282 282 283 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6</small></td><td class=\"eventstd_ts\" ><a rel=\"nofollow\" href=\"javascript:save_events_block_stage_websitets_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_block_stage_websitets_toppersystem();\">$txtts8</a></td></tr>";283 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6</small></td><td class=\"eventstd_ts\" style=\"width:20%;\"><div id=\"block_save_details_block_stage_websitets_toppersystem\" class=\"\"><a rel=\"nofollow\" href=\"javascript:save_events_block_stage_websitets_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_block_stage_websitets_toppersystem();\">$txtts8</a></div><div id=\"block_save_details_loading_block_stage_websitets_toppersystem\" class=\"display_none_ts\"><table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></td></tr></table></div></td></tr>"; 284 284 285 285 $box_general="<div id=\"box_general_request_events_toppersystem\"><table class=\"eventstables_ts margin0\">".$add_position."".$add_save."</table></div>"; -
toppersystem/trunk/api/management_clean_cachets_ts.php
r2963738 r3004390 442 442 $add_position.="<tr><td class=\"eventstd_ts\"><strong>$txtts19</strong><br>$txtts20<br><small><i>$txtts21</i></small><br></td><td class=\"eventstd_ts\"><center><input id=\"clean_cachets_service_save$n_add_position\" name=\"clean_cachets_service_save$n_add_position\" type=\"checkbox\" $check_save></center></td></tr>"; 443 443 444 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6<br>$txtts18</small></td><td class=\"eventstd_ts\" ><a rel=\"nofollow\" href=\"javascript:save_events_clean_cachets_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_clean_cachets_toppersystem();\">$txtts8</a></td></tr>";444 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6<br>$txtts18</small></td><td class=\"eventstd_ts\" style=\"width:20%;\"><center><div id=\"block_save_details_clean_cachets_toppersystem\" class=\"\"><a rel=\"nofollow\" href=\"javascript:save_events_clean_cachets_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_clean_cachets_toppersystem();\">$txtts8</a></div><div id=\"block_save_details_loading_clean_cachets_toppersystem\" class=\"display_none_ts\"><table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></center></td></tr></table></div></td></tr>"; 445 445 446 446 $box_general="<div id=\"box_general_request_events_toppersystem\"><table class=\"eventstables_ts margin0\">".$add_position."".$add_save."</table></div>"; -
toppersystem/trunk/api/management_co2app_ts.php
r2963738 r3004390 491 491 492 492 if(($check_right != "")||($check_left != "")){ 493 $add_position_left_right="<tr><td class=\"eventstd_ts\"><strong>$txtts3</strong></td><td class=\"eventstd_ts\">< input type=\"radio\" name=\"pos_sel_co2application_toppersystem_send\" value=\"0\"$check_left> $txtts4<br><input type=\"radio\" name=\"pos_sel_co2application_toppersystem_send\" value=\"1\"$check_right> $txtts5</td></tr>";493 $add_position_left_right="<tr><td class=\"eventstd_ts\"><strong>$txtts3</strong></td><td class=\"eventstd_ts\"><div class=\"pxdding4\" style=\"white-space: nowrap;\"><input type=\"radio\" name=\"pos_sel_co2application_toppersystem_send\" value=\"0\"$check_left> $txtts4</div><div class=\"pxdding4\" style=\"white-space: nowrap;\"><input type=\"radio\" name=\"pos_sel_co2application_toppersystem_send\" value=\"1\"$check_right> $txtts5</div></td></tr>"; 494 494 $look_form++; 495 495 } … … 502 502 $add_save="<tr><td class=\"eventstd_ts\">$txtts9<br><br>$txtts10<br>$txtts11<br>$txtts12</td></tr>"; 503 503 }else{ 504 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6</small></td><td class=\"eventstd_ts\" ><a rel=\"nofollow\" href=\"javascript:save_events_co2application_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_co2application_toppersystem();\">$txtts8</a></td></tr>";504 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6</small></td><td class=\"eventstd_ts\" style=\"width:20%;\"><div id=\"block_save_details_co2application_toppersystem\" class=\"\"><a rel=\"nofollow\" href=\"javascript:save_events_co2application_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_co2application_toppersystem();\">$txtts8</a></div><div id=\"block_save_details_loading_co2application_toppersystem\" class=\"display_none_ts\"><table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></td></tr></table></div></td></tr>"; 505 505 } 506 506 -
toppersystem/trunk/api/management_cssfilests_ts.php
r2963738 r3004390 350 350 $add_position="<tr><td class=\"eventstd_ts\"><strong>$txtts3</strong><textareatoppersystem id=\"exclusionlink_defer_toppersystem\" style=\"width:100%;height:160px;\">$contenuto_file_defer_exclude_toppersystem</textareatoppersystem><br><small><i>$txtts15<br>$txtts16</i></small><br></td><td class=\"eventstd_ts\"> </td></tr>"; 351 351 352 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6<br>$txtts18</small></td><td class=\"eventstd_ts\" ><a rel=\"nofollow\" href=\"javascript:save_events_cssfilests_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_cssfilests_toppersystem();\">$txtts8</a></td></tr>";352 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6<br>$txtts18</small></td><td class=\"eventstd_ts\" style=\"width:20%;\"><div id=\"block_save_details_cssfilests_toppersystem\" class=\"\"><a rel=\"nofollow\" href=\"javascript:save_events_cssfilests_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_cssfilests_toppersystem();\">$txtts8</a></div><div id=\"block_save_details_loading_cssfilests_toppersystem\" class=\"display_none_ts\"><table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></td></tr></table></div></td></tr>"; 353 353 354 354 $box_general="<div id=\"box_general_request_events_toppersystem\"><table class=\"eventstables_ts margin0\">".$add_position."".$add_save."</table></div>"; -
toppersystem/trunk/api/management_deferts_ts.php
r3002364 r3004390 61 61 $txtts17="Defer"; 62 62 $txtts18="Le pagine web dovranno essere riottimizzate. Consigliamo di farlo subito dopo aver salvato!"; 63 $txtts19="Not set"; 64 $txtts20="Le risorse javascript presenti in pagina non subiscono variazioni."; 63 $txtts19="Automatic model"; 64 $txtts20="I processi di caricamento e esecuzione delle risorse javascript presenti nella pagina sono migliorati automaticamente."; 65 $txtts21="Automatic"; 65 66 }else if($hreflang_toppersystem == "ar"){ 66 67 $txtts0="تحقق من الأذونات لاستخدام نظام Topper System SEO"; … … 82 83 $txtts17="Defer"; 83 84 $txtts18="سوف تحتاج صفحات الويب إلى إعادة التحسين. نوصي بعمل هذا مباشرة بعد الحفظ!"; 84 $txtts19="Not set"; 85 $txtts20="موارد جافا سكريبت الموجودة على الصفحة لا تخضع لأي تغييرات."; 85 $txtts19="Automatic model"; 86 $txtts20="يتم تحسين عمليات التحميل والتنفيذ لموارد جافا سكريبت الموجودة على الصفحة تلقائيًا."; 87 $txtts21="Automatic"; 86 88 }else if($hreflang_toppersystem == "de"){ 87 89 $txtts0="Überprüfen Sie die Berechtigungen zur Verwendung des Topper System SEO"; … … 103 105 $txtts17="Defer"; 104 106 $txtts18="Die Webseiten müssen neu optimiert werden. Wir empfehlen, dies direkt nach dem Speichern zu tun! "; 105 $txtts19="Not set"; 106 $txtts20="Die auf der Seite vorhandenen Javascript-Ressourcen unterliegen keinen Änderungen."; 107 $txtts19="Automatic model"; 108 $txtts20="Die Lade- und Ausführungsprozesse der auf der Seite vorhandenen Javascript-Ressourcen werden automatisch verbessert."; 109 $txtts21="Automatic"; 107 110 }else if($hreflang_toppersystem == "es"){ 108 111 $txtts0="Verifique los permisos para usar el Topper System SEO"; … … 124 127 $txtts17="Defer"; 125 128 $txtts18="Las páginas web deberán volver a optimizarse. ¡Recomendamos hacer esto inmediatamente después de guardar! "; 126 $txtts19="Not set"; 127 $txtts20="Los recursos javascript presentes en la página no sufren cambios."; 129 $txtts19="Automatic model"; 130 $txtts20="Los procesos de carga y ejecución de los recursos javascript presentes en la página se mejoran automáticamente."; 131 $txtts21="Automatic"; 128 132 }else if($hreflang_toppersystem == "fr"){ 129 133 $txtts0="Vérifiez les autorisations pour utiliser le Topper System SEO"; … … 145 149 $txtts17="Defer"; 146 150 $txtts18="Les pages Web devront être ré-optimisées. Nous vous recommandons de le faire immédiatement après l'enregistrement !"; 147 $txtts19="Not set"; 148 $txtts20="Les ressources javascript présentes sur la page ne subissent pas de modifications."; 151 $txtts19="Automatic model"; 152 $txtts20="Les processus de chargement et d'exécution des ressources javascript présentes sur la page sont automatiquement améliorés."; 153 $txtts21="Automatic"; 149 154 }else if($hreflang_toppersystem == "hi"){ 150 155 $txtts0="उपयोग करने के लिए अनुमतियों की जाँच करें Topper System SEO"; … … 165 170 $txtts16="एनबी: अधिक मान जोड़ने के लिए, अनुमत विभाजक हैं: न्यूलाइन, स्पेस, कॉमा"; 166 171 $txtts17="Defer"; 167 $txtts18="वेब पेजों को फिर से अनुकूलित करने की आवश्यकता होगी। हम बचत करने के तुरंत बाद ऐसा करने की सलाह देते हैं!"; 168 $txtts19="Not set"; 169 $txtts20="पृष्ठ पर मौजूद जावास्क्रिप्ट संसाधनों में परिवर्तन नहीं होता है।"; 172 $txtts18="वेब पेजों को फिर से अनुकूलित करने की आवश्यकता होगी। हम बचत करने के तुरंत बाद ऐसा करने की सलाह देते हैं!"; 173 $txtts19="Automatic model"; 174 $txtts20="पृष्ठ पर मौजूद जावास्क्रिप्ट संसाधनों की लोडिंग और निष्पादन प्रक्रियाएँ स्वचालित रूप से बेहतर हो जाती हैं।"; 175 $txtts21="Automatic"; 170 176 }else if($hreflang_toppersystem == "ja"){ 171 177 $txtts0="使用する権限を確認してください Topper System SEO"; … … 187 193 $txtts17="Defer"; 188 194 $txtts18="Web ページを再度最適化する必要があります。 保存したらすぐにこれを行うことをお勧めします。"; 189 $txtts19="Not set"; 190 $txtts20="ページ上に存在する JavaScript リソースは変更されません。"; 195 $txtts19="Automatic model"; 196 $txtts20="ページ上に存在する JavaScript リソースの読み込みおよび実行プロセスが自動的に改善されます。"; 197 $txtts21="Automatic"; 191 198 }else if($hreflang_toppersystem == "pl"){ 192 199 $txtts0="Sprawdź uprawnienia do korzystania z Topper System SEO"; … … 208 215 $txtts17="Defer"; 209 216 $txtts18="Strony internetowe będą musiały zostać ponownie zoptymalizowane. Zalecamy zrobienie tego natychmiast po zapisaniu!"; 210 $txtts19="Not set"; 211 $txtts20="Zasoby javascript znajdujące się na stronie nie ulegają zmianom."; 217 $txtts19="Automatic model"; 218 $txtts20="Procesy ładowania i wykonywania zasobów JavaScript znajdujących się na stronie są automatycznie ulepszane."; 219 $txtts21="Automatic"; 212 220 }else if($hreflang_toppersystem == "pt"){ 213 221 $txtts0="Verifique as permissões para usar o Topper System SEO"; … … 229 237 $txtts17="Defer"; 230 238 $txtts18="As páginas da web precisarão ser re-otimizadas. Recomendamos fazer isso imediatamente após salvar!"; 231 $txtts19="Not set"; 232 $txtts20="Os recursos javascript presentes na página não sofrem alterações."; 239 $txtts19="Automatic model"; 240 $txtts20="Os processos de carregamento e execução dos recursos javascript presentes na página são melhorados automaticamente."; 241 $txtts21="Automatic"; 233 242 }else if($hreflang_toppersystem == "ru"){ 234 243 $txtts0="Проверьте разрешения на использование Topper System SEO"; … … 250 259 $txtts17="Defer"; 251 260 $txtts18="Веб-страницы должны быть заново оптимизированы. Мы рекомендуем сделать это сразу после сохранения!"; 252 $txtts19="Not set"; 253 $txtts20="Ресурсы javascript, представленные на странице, не претерпевают изменений."; 261 $txtts19="Automatic model"; 262 $txtts20="Автоматически улучшаются процессы загрузки и выполнения ресурсов JavaScript, представленных на странице."; 263 $txtts21="Automatic"; 254 264 }else if($hreflang_toppersystem == "zh"){ 255 265 $txtts0="检查使用权限 Topper System SEO"; … … 271 281 $txtts17="Defer"; 272 282 $txtts18="网页将需要重新优化。 我们建议在保存后立即执行此操作!"; 273 $txtts19="Not set"; 274 $txtts20="页面上存在的 javascript 资源不会发生变化。"; 283 $txtts19="Automatic model"; 284 $txtts20="页面上存在的 javascript 资源的加载和执行过程会自动改进。"; 285 $txtts21="Automatic"; 275 286 }else if($hreflang_toppersystem == "he"){ 276 287 $txtts0="Topper System SEO בדוק את ההרשאות לשימוש"; … … 291 302 $txtts16="הערה: כדי להוסיף ערכים נוספים, המפרידים המותרים הם: שורה חדשה, רווח, פסיק"; 292 303 $txtts17="Defer"; 293 $txtts18="יהיה צורך לבצע אופטימיזציה מחדש של דפי האינטרנט. אנו ממליצים לעשות זאת מיד לאחר השמירה! "; 294 $txtts19="Not set"; 295 $txtts20="משאבי ה-Javascript הקיימים בדף אינם עוברים שינויים."; 304 $txtts18="יהיה צורך לבצע אופטימיזציה מחדש של דפי האינטרנט. אנו ממליצים לעשות זאת מיד לאחר השמירה! "; 305 $txtts19="Automatic model"; 306 $txtts20="תהליכי הטעינה והביצוע של משאבי ה-Javascript הקיימים בדף משופרים אוטומטית."; 307 $txtts21="Automatic"; 296 308 }else if($hreflang_toppersystem == "la"){ 297 309 $txtts0="Reprehendo permissions ut Topper System SEO"; … … 313 325 $txtts17="Defer"; 314 326 $txtts18="Paginae interretiales necesse erit re-optimized. Hoc praecipimus statim post salutari!"; 315 $txtts19="Not set"; 316 $txtts20="Facultates Javascripte in pagina praesentes mutationes non subeunt."; 327 $txtts19="Automatic model"; 328 $txtts20="Onerationes et exsecutiones processus facultatum Javascripte in pagina praesentes automatice meliorantur."; 329 $txtts21="Automatic"; 317 330 }else{ 318 331 $txtts0="Check the permissions to use the Topper System SEO"; … … 334 347 $txtts17="Defer"; 335 348 $txtts18="The web pages will need to be re-optimized. We recommend doing this immediately after saving! "; 336 $txtts19="Not set"; 337 $txtts20="The javascript resources present on the page do not undergo changes."; 349 $txtts19="Automatic model"; 350 $txtts20="The loading and execution processes of the javascript resources present on the page are automatically improved."; 351 $txtts21="Automatic"; 338 352 } 339 353 … … 394 408 395 409 396 $add_position="<tr ><td class=\"eventstd_ts\"><strong>$txtts19</strong><br>$txtts20<br></td><td class=\"eventstd_ts\"><input type=\"radio\" name=\"pos_sel_deferts_toppersystem_send\" value=\"0\"$check_none> $txtts19</td></tr> <tr><td class=\"eventstd_ts\"><strong>$txtts3</strong><br>$txtts4<br>$txtts5<br></td><td class=\"eventstd_ts\"><input type=\"radio\" name=\"pos_sel_deferts_toppersystem_send\" value=\"1\"$check_low> $txtts9</td></tr><tr><td class=\"eventstd_ts\"><strong>$txtts10</strong><br>$txtts11<br>$txtts12<br><br>$txtts14<br><textareatoppersystem id=\"exclusionlink_defer_toppersystem\" style=\"width:100%;height:160px;\">$contenuto_file_defer_exclude_toppersystem</textareatoppersystem><br><small><i>$txtts15<br>$txtts16</i></small><br></td><td class=\"eventstd_ts\"><input type=\"radio\" name=\"pos_sel_deferts_toppersystem_send\" value=\"2\"$check_hight> $txtts17</td></tr>";397 398 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6<br>$txtts18</small></td><td class=\"eventstd_ts\" ><a rel=\"nofollow\" href=\"javascript:save_events_deferts_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_deferts_toppersystem();\">$txtts8</a></td></tr>";410 $add_position="<tr style=\"background-color:#f0f0f0;\"><td class=\"eventstd_ts\"><strong>$txtts19</strong><br>$txtts4<br>$txtts20<br></td><td class=\"eventstd_ts\"><div style=\"white-space: nowrap;\"><input type=\"radio\" name=\"pos_sel_deferts_toppersystem_send\" value=\"0\"$check_none> $txtts21</div></td></tr><tr><td class=\"eventstd_ts\"><strong>$txtts3</strong><br>$txtts4<br>$txtts5<br></td><td class=\"eventstd_ts\"><div style=\"white-space: nowrap;\"><input type=\"radio\" name=\"pos_sel_deferts_toppersystem_send\" value=\"1\"$check_low> $txtts9</div></td></tr><tr style=\"background-color:#f0f0f0;\"><td class=\"eventstd_ts\"><strong>$txtts10</strong><br>$txtts11<br>$txtts12<br><br>$txtts14<br><textareatoppersystem id=\"exclusionlink_defer_toppersystem\" style=\"width:100%;height:160px;\">$contenuto_file_defer_exclude_toppersystem</textareatoppersystem><br><small><i>$txtts15<br>$txtts16</i></small><br></td><td class=\"eventstd_ts\"><div style=\"white-space: nowrap;\"><input type=\"radio\" name=\"pos_sel_deferts_toppersystem_send\" value=\"2\"$check_hight> $txtts17</div></td></tr>"; 411 412 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6<br>$txtts18</small></td><td class=\"eventstd_ts\" style=\"width:20%;\"><div id=\"block_save_details_deferts_toppersystem\" class=\"\"><a rel=\"nofollow\" href=\"javascript:save_events_deferts_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_deferts_toppersystem();\">$txtts8</a></div><div id=\"block_save_details_loading_deferts_toppersystem\" class=\"display_none_ts\"><table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></td></tr></table></div></td></tr>"; 399 413 400 414 $box_general="<div id=\"box_general_request_events_toppersystem\"><table class=\"eventstables_ts margin0\">".$add_position."".$add_save."</table></div>"; -
toppersystem/trunk/api/management_lazyloadingts_ts.php
r2963738 r3004390 503 503 } 504 504 if(($check_hight != "")||($check_medium != "")||($check_low != "")){ 505 $add_position="<tr><td class=\"eventstd_ts\"><strong>$txtts3</strong><br><small>$txtts15<br><br>$txtts16<br>• <strong>$txtts4 (hight)</strong>: "<i>$txtts17</i>".<br><br>• <strong>$txtts5 (medium)</strong>: "<i>width</i>" $txtts18, "<i>height</i>" $txtts18, "<i>class</i>" $txtts18, "<i>style</i>" $txtts18, "<i>loading</i>".<br><br>• <strong>$txtts14 (low)</strong>: "<i>width</i>" $txtts18, "<i>height</i>" $txtts18, "<i>loading</i>".<br><br>$txtts19</small></td><td class=\"eventstd_ts\"><div class=\"pxdding4\" ><input type=\"radio\" name=\"pos_sel_lazyloadingts_toppersystem_send\" value=\"0\"$check_hight> $txtts4</div><div class=\"pxdding4\"><input type=\"radio\" name=\"pos_sel_lazyloadingts_toppersystem_send\" value=\"1\"$check_medium> $txtts5</div><div class=\"pxdding4\"><input type=\"radio\" name=\"pos_sel_lazyloadingts_toppersystem_send\" value=\"2\"$check_low> $txtts14</div></td></tr>";505 $add_position="<tr><td class=\"eventstd_ts\"><strong>$txtts3</strong><br><small>$txtts15<br><br>$txtts16<br>• <strong>$txtts4 (hight)</strong>: "<i>$txtts17</i>".<br><br>• <strong>$txtts5 (medium)</strong>: "<i>width</i>" $txtts18, "<i>height</i>" $txtts18, "<i>class</i>" $txtts18, "<i>style</i>" $txtts18, "<i>loading</i>".<br><br>• <strong>$txtts14 (low)</strong>: "<i>width</i>" $txtts18, "<i>height</i>" $txtts18, "<i>loading</i>".<br><br>$txtts19</small></td><td class=\"eventstd_ts\"><div class=\"pxdding4\" style=\"white-space: nowrap;\"><input type=\"radio\" name=\"pos_sel_lazyloadingts_toppersystem_send\" value=\"0\"$check_hight> $txtts4</div><div class=\"pxdding4\" style=\"white-space: nowrap;\"><input type=\"radio\" name=\"pos_sel_lazyloadingts_toppersystem_send\" value=\"1\"$check_medium> $txtts5</div><div class=\"pxdding4\" style=\"white-space: nowrap;\"><input type=\"radio\" name=\"pos_sel_lazyloadingts_toppersystem_send\" value=\"2\"$check_low> $txtts14</div></td></tr>"; 506 506 $look_form++; 507 507 } … … 514 514 $add_save="<tr><td class=\"eventstd_ts\">$txtts9<br><br>$txtts10<br>$txtts11<br>$txtts12</td></tr>"; 515 515 }else{ 516 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6</small></td><td class=\"eventstd_ts\" ><a rel=\"nofollow\" href=\"javascript:save_events_lazyloadingts_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_lazyloadingts_toppersystem();\">$txtts8</a></td></tr>";516 $add_save="<tr><td class=\"eventstd_ts\"><small>$txtts6</small></td><td class=\"eventstd_ts\" style=\"width:20%;\"><div id=\"block_save_details_lazyloadingts_toppersystem\" class=\"\"><a rel=\"nofollow\" href=\"javascript:save_events_lazyloadingts_toppersystem();\">$txtts7</a> <a rel=\"nofollow\" href=\"javascript:close_events_lazyloadingts_toppersystem();\">$txtts8</a></div><div id=\"block_save_details_loading_lazyloadingts_toppersystem\" class=\"display_none_ts\"><table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></td></tr></table></div></td></tr>"; 517 517 } 518 518 $box_general="<div id=\"box_general_request_events_toppersystem\"><table class=\"eventstables_ts margin0\">".$add_position."".$add_save."</table></div>"; -
toppersystem/trunk/api/management_ts.php
r2986590 r3004390 857 857 $pathfileactivedefertoppersystem=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/log/ActiveDeferToppersystem.txt"; 858 858 $pathfileexcludecsstoppersystem=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/log/ExcludeCSSToppersystem.txt"; 859 860 $loading_block="<table class=\"wait_load_ts\"><tr><td class=\"wait_load_ts\"><div class=\"wait_load_ts\"><div class=\"loader_toppersystem\"></div></div></td></tr></table>"; 859 861 860 862 $fileHtaxxess_ts=TopperSystemSetFilemanagementts::detect_pathfile()."."."ht"."acc"."ess"; … … 970 972 unset($fileWpConfig_ts); 971 973 if($mostra_line_preleva3 == "1"){ 972 $line_preleva3="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a3\" onclick=\"help_services_toppersystem('3')\"><span id=\"box_services_b3\">⊕</span> <span id=\"guideboxts23\" class=\"\" tabindex=\"0\">$txtts12</span></span><div id=\"box_services_c3\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('3')\"><small>$txtts29<br>$txtts30<br><i>$txtts31</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center>< input id=\"wpcron_service_save\" name=\"wpcron_service_save\" type=\"checkbox\" $check_wpconfig> $scrivi_save_status_wpconfig</center></td></tr>";974 $line_preleva3="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a3\" onclick=\"help_services_toppersystem('3')\"><span id=\"box_services_b3\">⊕</span> <span id=\"guideboxts23\" class=\"\" tabindex=\"0\">$txtts12</span></span><div id=\"box_services_c3\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('3')\"><small>$txtts29<br>$txtts30<br><i>$txtts31</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center><div id=\"block_save_wpcron_toppersystem\" class=\"\"><input id=\"wpcron_service_save\" name=\"wpcron_service_save\" type=\"checkbox\" $check_wpconfig> $scrivi_save_status_wpconfig</div><div id=\"block_save_loading_wpcron_toppersystem\" class=\"display_none_ts\">$loading_block</div></center></td></tr>"; 973 975 }else{ 974 976 $line_preleva3=""; … … 1122 1124 1123 1125 if($mostra_line_preleva4 == "1"){ 1124 $line_preleva4="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a4\" onclick=\"help_services_toppersystem('4')\"><span id=\"box_services_b4\">⊕</span> <span id=\"guideboxts24\" class=\"\" tabindex=\"0\">$txtts17</span></span> $scrivi_goto_exceptions_co2application<div id=\"box_services_c4\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('4')\"><small>$txtts32<br><i>$txtts33</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center>< input id=\"co2application_service_save\" name=\"co2application_service_save\" type=\"checkbox\" $check_general> $scrivi_save_status_general</center></td></tr>";1126 $line_preleva4="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a4\" onclick=\"help_services_toppersystem('4')\"><span id=\"box_services_b4\">⊕</span> <span id=\"guideboxts24\" class=\"\" tabindex=\"0\">$txtts17</span></span> $scrivi_goto_exceptions_co2application<div id=\"box_services_c4\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('4')\"><small>$txtts32<br><i>$txtts33</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center><div id=\"block_save_co2application_toppersystem\" class=\"\"><input id=\"co2application_service_save\" name=\"co2application_service_save\" type=\"checkbox\" $check_general> $scrivi_save_status_general</div><div id=\"block_save_loading_co2application_toppersystem\" class=\"display_none_ts\">$loading_block</div></center></td></tr>"; 1125 1127 }else{ 1126 1128 $line_preleva4=""; … … 1128 1130 1129 1131 if($mostra_line_preleva5 == "1"){ 1130 $line_preleva5="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a5\" onclick=\"help_services_toppersystem('5')\"><span id=\"box_services_b5\">⊕</span> <span id=\"guideboxts27\" class=\"\" tabindex=\"0\">$txtts20</span></span> $add_management_to_autoupdate_ts<div id=\"box_services_c5\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('5')\"><small>$txtts34<br>$txtts35<br><i>$txtts36</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center>< input id=\"autoupdate_service_save\" name=\"autoupdate_service_save\" type=\"checkbox\" $check_general2> $scrivi_save_status_general2</center></td></tr>";1132 $line_preleva5="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a5\" onclick=\"help_services_toppersystem('5')\"><span id=\"box_services_b5\">⊕</span> <span id=\"guideboxts27\" class=\"\" tabindex=\"0\">$txtts20</span></span> $add_management_to_autoupdate_ts<div id=\"box_services_c5\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('5')\"><small>$txtts34<br>$txtts35<br><i>$txtts36</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center><div id=\"block_save_autoupdate_toppersystem\" class=\"\"><input id=\"autoupdate_service_save\" name=\"autoupdate_service_save\" type=\"checkbox\" $check_general2> $scrivi_save_status_general2</div><div id=\"block_save_loading_autoupdate_toppersystem\" class=\"display_none_ts\">$loading_block</div></center></td></tr>"; 1131 1133 }else{ 1132 1134 $line_preleva5=""; … … 1134 1136 1135 1137 if($mostra_line_preleva6 == "1"){ 1136 $line_preleva6="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a6\" onclick=\"help_services_toppersystem('6')\"><span id=\"box_services_b6\">⊕</span> <span id=\"guideboxts22\" class=\"\" tabindex=\"0\">$txtts38</span></span> $scrivi_goto_exceptions_lazyloadingts<div id=\"box_services_c6\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('6')\"><small>$txtts40<br><i>$txtts25</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center>< input id=\"smartlazyloadts_service_save\" name=\"smartlazyloadts_service_save\" type=\"checkbox\" $check_general4> $scrivi_save_status_general4</center></td></tr>";1138 $line_preleva6="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a6\" onclick=\"help_services_toppersystem('6')\"><span id=\"box_services_b6\">⊕</span> <span id=\"guideboxts22\" class=\"\" tabindex=\"0\">$txtts38</span></span> $scrivi_goto_exceptions_lazyloadingts<div id=\"box_services_c6\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('6')\"><small>$txtts40<br><i>$txtts25</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center><div id=\"block_save_smartlazyloadts_toppersystem\" class=\"\"><input id=\"smartlazyloadts_service_save\" name=\"smartlazyloadts_service_save\" type=\"checkbox\" $check_general4> $scrivi_save_status_general4</div><div id=\"block_save_loading_smartlazyloadts_toppersystem\" class=\"display_none_ts\">$loading_block</div></center></td></tr>"; 1137 1139 }else{ 1138 1140 $line_preleva6=""; … … 1141 1143 $fileDefer_ts="$pathfileactivedefertoppersystem"; 1142 1144 if(file_exists($pathfileactivenoneresourcetoppersystem)){ 1143 $check_line_preleva7=" Not set";1145 $check_line_preleva7="Automatic model"; 1144 1146 }else if(file_exists($fileDefer_ts)){ 1145 1147 $check_line_preleva7="Defer model"; … … 1163 1165 $line_preleva10="<tr><td class=\"eventstd_ts\"><span id=\"box_services_a10\" onclick=\"help_services_toppersystem('10')\"><span id=\"box_services_b10\">⊕</span> <span id=\"guideboxts29\" class=\"\" tabindex=\"0\">$txtts51</span></span></small><div id=\"box_services_c10\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('10')\"><small>$txtts52<br><i>$txtts53</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center><a rel=\"nofollow\" href=\"javascript:goto_block_stage_websitets();\">$txtts6</a></center></td></tr>"; 1164 1166 1165 $line_preleva2="<table class=\"eventstables_ts margin0\"><tr><td class=\"eventstd_ts\"><strong>$txtts3</strong></td><td class=\"eventstd_ts\"><center><strong>$txtts4</strong></center></td></tr><tr><td class=\"eventstd_ts\"><span id=\"box_services_a1\" onclick=\"help_services_toppersystem('1')\"><span id=\"box_services_b1\">⊕</span> <span id=\"guideboxts20\" class=\"\" tabindex=\"0\">$txtts9</span></span> $scrivi_goto_exceptions_aspmts<div id=\"box_services_c1\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('1')\"><small>$txtts23<br>$txtts24<br><i>$txtts25</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center>< input id=\"aspmts_service_save\" name=\"aspmts_service_save\" type=\"checkbox\" $check_antispam> $scrivi_save_status_aspmts</center></td></tr><tr><td class=\"eventstd_ts\"><span id=\"box_services_a2\" onclick=\"help_services_toppersystem('2')\"><span id=\"box_services_b2\">⊕</span> <span id=\"guideboxts21\" class=\"\" tabindex=\"0\">$txtts10</span></span><div id=\"box_services_c2\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('2')\"><small>$txtts26<br>$txtts27<br><i>$txtts28</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center><input id=\"cache_service_save\" name=\"cache_service_save\" type=\"checkbox\" $check_cache> $scrivi_save_status_cache</center></td></tr>$line_preleva6$line_preleva3$line_preleva4$line_preleva7$line_preleva8$line_preleva5$line_preleva9$line_preleva10</table>";1167 $line_preleva2="<table class=\"eventstables_ts margin0\"><tr><td class=\"eventstd_ts\"><strong>$txtts3</strong></td><td class=\"eventstd_ts\"><center><strong>$txtts4</strong></center></td></tr><tr><td class=\"eventstd_ts\"><span id=\"box_services_a1\" onclick=\"help_services_toppersystem('1')\"><span id=\"box_services_b1\">⊕</span> <span id=\"guideboxts20\" class=\"\" tabindex=\"0\">$txtts9</span></span> $scrivi_goto_exceptions_aspmts<div id=\"box_services_c1\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('1')\"><small>$txtts23<br>$txtts24<br><i>$txtts25</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center><div id=\"block_save_aspmts_toppersystem\" class=\"\"><input id=\"aspmts_service_save\" name=\"aspmts_service_save\" type=\"checkbox\" $check_antispam> $scrivi_save_status_aspmts</div><div id=\"block_save_loading_aspmts_toppersystem\" class=\"display_none_ts\">$loading_block</div></center></td></tr><tr><td class=\"eventstd_ts\"><span id=\"box_services_a2\" onclick=\"help_services_toppersystem('2')\"><span id=\"box_services_b2\">⊕</span> <span id=\"guideboxts21\" class=\"\" tabindex=\"0\">$txtts10</span></span><div id=\"box_services_c2\" class=\"display_none_ts\" onclick=\"close_help_services_toppersystem('2')\"><small>$txtts26<br>$txtts27<br><i>$txtts28</i></small></div></td><td class=\"eventstd_ts wxdthb\"><center><div id=\"block_save_cache_toppersystem\" class=\"\"><input id=\"cache_service_save\" name=\"cache_service_save\" type=\"checkbox\" $check_cache> $scrivi_save_status_cache</div><div id=\"block_save_loading_cache_toppersystem\" class=\"display_none_ts\">$loading_block</div></center></td></tr>$line_preleva6$line_preleva3$line_preleva4$line_preleva7$line_preleva8$line_preleva5$line_preleva9$line_preleva10</table>"; 1166 1168 $box_page="<div id=\"box_page_request_management_toppersystem\">$scrivi_message"."$scrivi_message2"."$scrivi_message3"."$scrivi_message4"."$scrivi_message5"."$line_preleva2<div class=\"pxdding12\"><small>$txtts37</small></div>"; 1167 1169 -
toppersystem/trunk/api/received.php
r2979246 r3004390 195 195 } 196 196 return "$contenuto_link_sito"; 197 }198 199 public static function add_font_display_swap_to_css_ts($stringa_sito){200 if(trim($stringa_sito) != ""){201 if(str_replace(array("@font-face{","@font-face {"),"",strtolower($stringa_sito)) != strtolower("$stringa_sito")){202 if(str_replace(array("font-display:swap","font-display: swap"),"",strtolower($stringa_sito)) == strtolower("$stringa_sito")){203 $new_s="";204 $stringa_sito=str_replace(array("@font-face{","@font-face {","@font-face\n{","@font-face \n{","@font-face\n {"),"@font-face{font-display:swap;",$stringa_sito);205 $contenuto_link_sito_analizza="$stringa_sito";206 preg_match_all("'{font-display:swap;(.*?)}'is", trim($contenuto_link_sito_analizza), $contenuto_link_sito_analizza);207 $contenuto_link_sito_analizza = ($contenuto_link_sito_analizza[1]);208 for($i=0;$i<=count($contenuto_link_sito_analizza) + 1;$i++){209 if((isset($contenuto_link_sito_analizza[$i]))&&(trim($contenuto_link_sito_analizza[$i]) != "")){210 if(str_replace("font-display:","",strtolower($contenuto_link_sito_analizza[$i])) != strtolower($contenuto_link_sito_analizza[$i])){211 if(str_replace(array("font-display:swap;","font-display: swap;","font-display:auto;","font-display: auto;","font-display:block;","font-display: block;","font-display:optional;","font-display: optional;","font-display:fallback;","font-display: fallback;"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){212 $new_s=str_replace(array("font-display:swap;","font-display: swap;","font-display:auto;","font-display: auto;","font-display:block;","font-display: block;","font-display:optional;","font-display: optional;","font-display:fallback;","font-display: fallback;"),"",$contenuto_link_sito_analizza[$i]);213 }else if(str_replace(array("font-display:swap !important;","font-display: swap !important;","font-display:auto !important;","font-display: auto !important;","font-display:block !important;","font-display: block !important;","font-display:optional !important;","font-display: optional !important;","font-display:fallback !important;","font-display: fallback !important;"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){214 $new_s=str_replace(array("font-display:swap !important;","font-display: swap !important;","font-display:auto !important;","font-display: auto !important;","font-display:block !important;","font-display: block !important;","font-display:optional !important;","font-display: optional !important;","font-display:fallback !important;","font-display: fallback !important;"),"",$contenuto_link_sito_analizza[$i]);215 }else if(str_replace(array("font-display:swap!important;","font-display: swap!important;","font-display:auto!important;","font-display: auto!important;","font-display:block!important;","font-display: block!important;","font-display:optional!important;","font-display: optional!important;","font-display:fallback!important;","font-display: fallback!important;"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){216 $new_s=str_replace(array("font-display:swap!important;","font-display: swap!important;","font-display:auto!important;","font-display: auto!important;","font-display:block!important;","font-display: block!important;","font-display:optional!important;","font-display: optional!important;","font-display:fallback!important;","font-display: fallback!important;"),"",$contenuto_link_sito_analizza[$i]);217 }else if(str_replace(array("font-display:swap !important","font-display: swap !important","font-display:auto !important","font-display: auto !important","font-display:block !important","font-display: block !important","font-display:optional !important","font-display: optional !important","font-display:fallback !important","font-display: fallback !important"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){218 $new_s=str_replace(array("font-display:swap !important","font-display: swap !important","font-display:auto !important","font-display: auto !important","font-display:block !important","font-display: block !important","font-display:optional !important","font-display: optional !important","font-display:fallback !important","font-display: fallback !important"),"",$contenuto_link_sito_analizza[$i]);219 }else if(str_replace(array("font-display:swap!important","font-display: swap!important","font-display:auto!important","font-display: auto!important","font-display:block!important","font-display: block!important","font-display:optional!important","font-display: optional!important","font-display:fallback!important","font-display: fallback!important"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){220 $new_s=str_replace(array("font-display:swap!important","font-display: swap!important","font-display:auto!important","font-display: auto!important","font-display:block!important","font-display: block!important","font-display:optional!important","font-display: optional!important","font-display:fallback!important","font-display: fallback!important"),"",$contenuto_link_sito_analizza[$i]);221 }else if(str_replace(array("font-display:swap","font-display: swap","font-display:auto","font-display: auto","font-display:block","font-display: block","font-display:optional","font-display: optional","font-display:fallback","font-display: fallback"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){222 $new_s=str_replace(array("font-display:swap","font-display: swap","font-display:auto","font-display: auto","font-display:block","font-display: block","font-display:optional","font-display: optional","font-display:fallback","font-display: fallback"),"",$contenuto_link_sito_analizza[$i]);223 }else{224 $new_s="";225 }226 if((trim($new_s) != "")&&(trim($new_s) != trim($contenuto_link_sito_analizza[$i]))){227 $stringa_sito=str_replace($contenuto_link_sito_analizza[$i],"$new_s",$stringa_sito);228 }229 $new_s="";230 }231 $contenuto_link_sito_analizza[$i]="";232 }233 }234 if(is_array($contenuto_link_sito_analizza)){$contenuto_link_sito_analizza=array();}else{$contenuto_link_sito_analizza="";}235 unset($new_s);236 }237 }238 }else{239 $stringa_sito="";240 }241 return "$stringa_sito";242 }243 244 public static function clean_css($stringa_sito){245 if($stringa_sito != ""){246 if(((str_replace("{","",$stringa_sito) != "$stringa_sito")&&(str_replace("}","",$stringa_sito) != "$stringa_sito"))){247 $stringa_sito=TopperSystemSetFilereceived::add_font_display_swap_to_css_ts("$stringa_sito");248 if(TopperSystemSetFilereceived::is_script_accettable_ts($stringa_sito) == "ok"){249 $output=TopperSystemAndMinifyCSSCompressor::process($stringa_sito);250 }else{251 $output="$stringa_sito";252 }253 }else{254 $output="$stringa_sito";255 }256 }else{257 $output="";258 }259 unset($stringa_sito);260 return "$output";261 }262 263 public static function extract_font_inline_from_code_function($contenuto_link_sito){264 265 $lista_trovati_font="";266 if($contenuto_link_sito != ""){267 $contenuto_link_sito_prep=str_replace("\n","",$contenuto_link_sito);268 $contenuto_link_sito_prep=str_replace(";",";\n",$contenuto_link_sito_prep);269 $contenuto_link_sito_prep=str_replace("url(","\nurl(",$contenuto_link_sito_prep);270 $array_contenuto_link_sito_prep=explode("\n",$contenuto_link_sito_prep);271 272 $n_array_contenuto_link_sito_prep=count($array_contenuto_link_sito_prep);273 for($i=0;$i<=$n_array_contenuto_link_sito_prep;$i++){274 if((isset($array_contenuto_link_sito_prep[$i]))&&(trim($array_contenuto_link_sito_prep[$i]) != "")){275 $record_array=trim($array_contenuto_link_sito_prep[$i]);276 $url=trim(TopperSystemSetFilereceived::extractstringa_toppersystem($record_array, 'url(', ')'));277 if($url != ""){278 $url=str_replace(array("\"","'"),"",$url);279 $url_min=strtolower($url);280 if(str_replace(array(".etx",".sfp",".sfd",".fot",".pfa",".pfb",".eot",".pfm",".afm",".fnt",".ttf",".woff2",".woff"),"",$url_min) != "$url_min"){281 $array_url_min=explode(".",$url_min);282 if(isset($array_url_min["1"])){283 if(trim($array_url_min["1"]) != ""){284 $pass="no";285 if(str_replace("//","",$url) != "$url"){286 if(substr($url, 0, 2) == "//"){287 $pass="ok";288 }289 }290 if((str_replace(array("https://","http://"),"",$url) != "$url")||($pass == "ok")){291 $go="ok";292 }else{293 if(file_exists($url)){294 $go="ok";295 }else{296 $go="no";297 }298 }299 if($go == "ok"){300 $exstention=trim(end($array_url_min));301 if($exstention == "etx"){302 $lista_trovati_font.="$url,;";303 }else if($exstention == "sfp"){304 $lista_trovati_font.="$url,;";305 }else if($exstention == "sfd"){306 $lista_trovati_font.="$url,;";307 }else if($exstention == "fot"){308 $lista_trovati_font.="$url,;";309 }else if($exstention == "pfa"){310 $lista_trovati_font.="$url,;";311 }else if($exstention == "pfb"){312 $lista_trovati_font.="$url,;";313 }else if($exstention == "eot"){314 $lista_trovati_font.="$url,;";315 }else if($exstention == "pfm"){316 $lista_trovati_font.="$url,;";317 }else if($exstention == "afm"){318 $lista_trovati_font.="$url,;";319 }else if($exstention == "fnt"){320 $lista_trovati_font.="$url,;";321 }else if($exstention == "ttf"){322 $lista_trovati_font.="$url,;";323 }else if($exstention == "woff"){324 $lista_trovati_font.="$url,;";325 }else if($exstention == "woff2"){326 $lista_trovati_font.="$url,;";327 }else{328 #npt329 }330 $exstention="";331 }332 }333 }334 $array_url_min=array();335 }336 $url_min="";337 }338 $record_array="";339 $url="";340 $array_contenuto_link_sito_prep[$i]="";341 }342 }343 $array_contenuto_link_sito_prep=array();344 }345 return "$lista_trovati_font";346 }347 348 public static function extract_font_inline_from_code($contenuto_link_sito,$extract_class_css_from_page,$compare_if_class_exist){349 $lista_trovati_font="";350 351 if($contenuto_link_sito != ""){352 if($compare_if_class_exist == "1"){353 354 if($extract_class_css_from_page != ""){355 $extract_class_css_from_page_array=explode(",;",$extract_class_css_from_page);356 $n_extract_class_css_from_page_array=count($extract_class_css_from_page_array);357 358 $element = explode('}', $contenuto_link_sito);359 foreach ($element as $element2) {360 if($element2 != ""){361 $a_name = explode('{', $element2);362 $name = $a_name[0];363 if($name != ""){364 365 for($i=0;$i<=$n_extract_class_css_from_page_array;$i++){366 if((isset($extract_class_css_from_page_array[$i]))&&(trim($extract_class_css_from_page_array[$i]) != "")){367 if(str_replace(trim($extract_class_css_from_page_array[$i]),"",$name) != "$name"){368 $lista_trovati_font.=TopperSystemSetFilereceived::extract_font_inline_from_code_function($element2);369 }370 }371 }372 373 }374 $name="";375 $a_name=array();376 }377 }378 $element2="";379 $extract_class_css_from_page_array=array();380 $element=array();381 unset($n_extract_class_css_from_page_array);382 }383 }else{384 $lista_trovati_font.=TopperSystemSetFilereceived::extract_font_inline_from_code_function($contenuto_link_sito);385 }386 387 }388 389 return "$lista_trovati_font";390 }391 392 public static function modify_css($fileoriginale,$newfile,$extract_class_css_from_page){393 $return="";394 $lista_trovati_font="";395 396 if(($fileoriginale != "")&&($newfile != "")){397 $pathdirassets=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/assets/";398 399 $filename=TopperSystemSetFilereceived::detect_pathfile().$fileoriginale;400 $filenamenew=$pathdirassets.$newfile;401 if(file_exists($filename)){402 $contenuto_link_sito=TopperSystemSetFilereceived::searchfile($filename);403 $lista_trovati_font=TopperSystemSetFilereceived::extract_font_inline_from_code($contenuto_link_sito,"$extract_class_css_from_page","1");404 if(is_readable($filename)){405 $old_permessi_file=substr(sprintf('%o', fileperms($filename)), -4);406 }else{407 $old_permessi_file="";408 }409 410 if(file_exists($filenamenew)){411 if(filemtime($filenamenew) >= filemtime($filename)){412 #niente413 }else{414 if(trim($contenuto_link_sito) != ""){415 $new=TopperSystemSetFilereceived::clean_css($contenuto_link_sito);416 chmod($filename,0644);417 $textfilem=fopen($filename, "w");418 fwrite($textfilem,$new);419 fclose($textfilem);420 if($old_permessi_file == "0444"){421 chmod($filename,0444);422 }423 424 chmod($filenamenew,0644);425 $textfilev=fopen($filenamenew, "w");426 fwrite($textfilev,$contenuto_link_sito);427 fclose($textfilev);428 chmod($filenamenew,0444);429 430 clearstatcache();431 432 unset($new);433 $return="ok";434 }435 unset($contenuto_link_sito);436 }437 }else{438 if(trim($contenuto_link_sito) != ""){439 $new=TopperSystemSetFilereceived::clean_css($contenuto_link_sito);440 chmod($filename,0644);441 $textfilem=fopen($filename, "w");442 fwrite($textfilem,$new);443 fclose($textfilem);444 if($old_permessi_file == "0444"){445 chmod($filename,0444);446 }447 448 $textfilev=fopen($filenamenew, "w");449 fwrite($textfilev,$contenuto_link_sito);450 fclose($textfilev);451 chmod($filenamenew,0444);452 453 clearstatcache();454 455 unset($new);456 $return="ok";457 }458 unset($contenuto_link_sito);459 }460 }461 }462 return array("$return","$lista_trovati_font");463 }464 465 public static function go_css($contenuto_link_sito,$extract_class_css_from_page){466 $lista_trovati_font="";467 if($contenuto_link_sito != ""){468 $pathfileminifycss=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/log/MinifyCSS.txt";469 470 $filename="$pathfileminifycss";471 if(file_exists($filename)){472 $log=TopperSystemSetFilereceived::searchfile($filename);473 $crea="0";474 }else{475 $log="";476 $crea="1";477 }478 $scrivi="";479 480 $contenuto_file_index_toppersystem_array=explode(",;",$contenuto_link_sito);481 $n_contenuto_file_index_toppersystem_array=count($contenuto_file_index_toppersystem_array);482 unset($contenuto_link_sito);483 484 for($i=0;$i<=$n_contenuto_file_index_toppersystem_array;$i++){485 486 if((isset($contenuto_file_index_toppersystem_array[$i]))&&(trim($contenuto_file_index_toppersystem_array[$i]) != "")){487 $part_url=explode("||||",trim($contenuto_file_index_toppersystem_array[$i]));488 if((isset($part_url[1]))&&(trim($part_url[1]) != "")){489 $lista_trovati_font.=TopperSystemSetFilereceived::modify_css(explode("?",$part_url[0])[0],$part_url[1],$extract_class_css_from_page)["1"];490 if(str_replace(trim($contenuto_file_index_toppersystem_array[$i]),"",$log) == "$log"){491 $scrivi.=trim($contenuto_file_index_toppersystem_array[$i])."\n";492 }493 }494 }495 }496 if(is_array($contenuto_file_index_toppersystem_array)){$contenuto_file_index_toppersystem_array=array();}else{$contenuto_file_index_toppersystem_array="";}497 unset($n_contenuto_file_index_toppersystem_array);498 499 if($scrivi != ""){500 if($crea == "1"){501 if(file_exists($filename)){502 chmod("$filename",0644);503 }504 $textfilem=fopen($filename, "w");505 fwrite($textfilem,$scrivi);506 fclose($textfilem);507 chmod("$filename",0444);508 }else{509 chmod("$filename",0644);510 $textfilem=fopen($filename, "a");511 fwrite($textfilem,$scrivi);512 fclose($textfilem);513 chmod("$filename",0444);514 }515 }516 }517 return trim($lista_trovati_font);518 }519 520 public static function clean_javascript($stringa_sito){521 if($stringa_sito != ""){522 if(((str_replace(array("[","]","{","}"),"",$stringa_sito) != "$stringa_sito")&&(str_replace(array("="),"",$stringa_sito) != "$stringa_sito"))||(str_replace(array("document.","function(",".getElement","var "),"",$stringa_sito) != "$stringa_sito")){523 if(TopperSystemSetFilereceived::is_script_accettable_ts($stringa_sito) == "ok"){524 $output=TopperSystemAndJSMin::minify($stringa_sito);525 }else{526 $output="$stringa_sito";527 }528 }else{529 $output="$stringa_sito";530 }531 }else{532 $output="";533 }534 unset($stringa_sito);535 return "$output";536 }537 538 public static function modify_js($fileoriginale,$newfile){539 $return="";540 if(($fileoriginale != "")&&($newfile != "")){541 $pathdirassets=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/assets/";542 543 $filename=TopperSystemSetFilereceived::detect_pathfile().$fileoriginale;544 $filenamenew=$pathdirassets.$newfile;545 if(file_exists($filename)){546 if(is_readable($filename)){547 $old_permessi_file=substr(sprintf('%o', fileperms($filename)), -4);548 }else{549 $old_permessi_file="";550 }551 552 if(file_exists($filenamenew)){553 if(filemtime($filenamenew) >= filemtime($filename)){554 #niente555 }else{556 $contenuto_link_sito=TopperSystemSetFilereceived::searchfile($filename);557 if(trim($contenuto_link_sito) != ""){558 $new=TopperSystemSetFilereceived::clean_javascript($contenuto_link_sito);559 chmod($filename,0644);560 $textfilem=fopen($filename, "w");561 fwrite($textfilem,$new);562 fclose($textfilem);563 if($old_permessi_file == "0444"){564 chmod($filename,0444);565 }566 567 chmod($filenamenew,0644);568 $textfilev=fopen($filenamenew, "w");569 fwrite($textfilev,$contenuto_link_sito);570 fclose($textfilev);571 chmod($filenamenew,0444);572 573 clearstatcache();574 575 unset($new);576 $return="ok";577 }578 unset($contenuto_link_sito);579 }580 }else{581 $contenuto_link_sito=TopperSystemSetFilereceived::searchfile($filename);582 if(trim($contenuto_link_sito) != ""){583 $new=TopperSystemSetFilereceived::clean_javascript($contenuto_link_sito);584 chmod($filename,0644);585 $textfilem=fopen($filename, "w");586 fwrite($textfilem,$new);587 fclose($textfilem);588 if($old_permessi_file == "0444"){589 chmod($filename,0444);590 }591 592 $textfilev=fopen($filenamenew, "w");593 fwrite($textfilev,$contenuto_link_sito);594 fclose($textfilev);595 chmod($filenamenew,0444);596 597 clearstatcache();598 599 unset($new);600 $return="ok";601 }602 unset($contenuto_link_sito);603 }604 }605 }606 return "$return";607 }608 609 public static function go_js($contenuto_link_sito){610 if($contenuto_link_sito != ""){611 $pathfileminifyjs=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/log/MinifyJS.txt";612 613 $filename="$pathfileminifyjs";614 if(file_exists($filename)){615 $log=TopperSystemSetFilereceived::searchfile($filename);616 $crea="0";617 }else{618 $log="";619 $crea="1";620 }621 $scrivi="";622 623 $contenuto_file_index_toppersystem_array=explode(",;",$contenuto_link_sito);624 $n_contenuto_file_index_toppersystem_array=count($contenuto_file_index_toppersystem_array);625 unset($contenuto_link_sito);626 627 for($i=0;$i<=$n_contenuto_file_index_toppersystem_array;$i++){628 629 if((isset($contenuto_file_index_toppersystem_array[$i]))&&(trim($contenuto_file_index_toppersystem_array[$i]) != "")){630 $part_url=explode("||||",trim($contenuto_file_index_toppersystem_array[$i]));631 if((isset($part_url[1]))&&(trim($part_url[1]) != "")){632 $go=TopperSystemSetFilereceived::modify_js(explode("?",$part_url[0])[0],$part_url[1]);633 if(str_replace(trim($contenuto_file_index_toppersystem_array[$i]),"",$log) == "$log"){634 $scrivi.=trim($contenuto_file_index_toppersystem_array[$i])."\n";635 }636 }637 }638 }639 if(is_array($contenuto_file_index_toppersystem_array)){$contenuto_file_index_toppersystem_array=array();}else{$contenuto_file_index_toppersystem_array="";}640 unset($n_contenuto_file_index_toppersystem_array);641 642 if($scrivi != ""){643 if($crea == "1"){644 if(file_exists($filename)){645 chmod("$filename",0644);646 }647 $textfilem=fopen($filename, "w");648 fwrite($textfilem,$scrivi);649 fclose($textfilem);650 chmod("$filename",0444);651 }else{652 chmod("$filename",0644);653 $textfilem=fopen($filename, "a");654 fwrite($textfilem,$scrivi);655 fclose($textfilem);656 chmod("$filename",0444);657 }658 }659 }660 return "ok";661 }662 663 public static function rel2abs_ts($rel, $base){664 if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;665 if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;666 extract(parse_url($base));667 $path = preg_replace('#/[^/]*$#', '', $path);668 if ($rel[0] == '/') $path = '';669 $abs = "$host$path/$rel";670 $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#');671 for($n=1; $n>0;$abs=preg_replace($re,'/', $abs,-1,$n)){}672 $abs=str_replace("../","",$abs);673 return $scheme.'://'.$abs;674 }675 public static function perfect_url_ts($u,$b){676 $bp=parse_url($b);677 if(($bp['path']!="/" && $bp['path']!="") || $bp['path']==''){678 if($bp['scheme']==""){$scheme="http";}else{$scheme=$bp['scheme'];}679 $b=$scheme."://".$bp['host']."/";680 }681 if(substr($u,0,2)=="//"){682 $u="http:".$u;683 }684 if(substr($u,0,4)!="http"){685 $u=TopperSystemSetFilereceived::rel2abs_ts($u,$b);686 }687 return $u;688 }689 690 public static function perfect_url_ts2($url_rel,$url_link_sito){691 692 $url_link_sito=str_replace("//","[JdoppioslashesB]",$url_link_sito);693 $url_link_sito_array=explode("/",$url_link_sito);694 $url_link_sito_array_n=count($url_link_sito_array) - 1;695 if($url_link_sito_array_n < 0){696 $url_link_sito_array_n=0;697 }698 $url_link_sito="";699 700 $url_rel=str_replace("//","[JdoppioslashesB]",$url_rel);701 $url_rel_array=explode("/",$url_rel);702 $url_rel_array_n=count($url_rel_array) - 1;703 if($url_rel_array_n < 0){704 $url_rel_array_n=0;705 }706 $url_rel="";707 708 $url_rel_costruct="";709 $conta_elem_da_scalare=0;710 for($i=0;$i<=$url_rel_array_n;$i++){711 if((isset($url_rel_array["$i"]))&&($url_rel_array["$i"] != "")){712 if($url_rel_array["$i"] == "."){713 #niente714 }else if($url_rel_array["$i"] == ".."){715 $conta_elem_da_scalare++;716 }else{717 $url_rel_costruct.=$url_rel_array["$i"]."/";718 }719 $url_rel_array["$i"]="";720 }721 }722 723 $url_rel_array=array();724 $url_rel_array_n="";725 726 $ultimo_carattere=substr($url_rel_costruct, strlen($url_rel_costruct)-1);727 if($ultimo_carattere == "/"){728 $url_rel_costruct=substr($url_rel_costruct, 0, strlen($url_rel_costruct)-1);729 }730 $ultimo_carattere="";731 732 $url_link_sito_costruct="";733 for($i=0;$i<=$url_link_sito_array_n - $conta_elem_da_scalare - 1;$i++){734 if((isset($url_link_sito_array["$i"]))&&($url_link_sito_array["$i"] != "")){735 $url_link_sito_costruct.=$url_link_sito_array["$i"]."/";736 737 $url_link_sito_array["$i"]="";738 }739 }740 741 $url_link_sito_array=array();742 unset($url_link_sito_array_n);743 unset($conta_elem_da_scalare);744 745 $link_ok=$url_link_sito_costruct.$url_rel_costruct;746 $link_ok=str_replace("[JdoppioslashesB]","//",$link_ok);747 unset($url_link_sito_costruct);748 unset($url_rel_costruct);749 750 return $link_ok;751 }752 753 public static function get_headers_curlts($url){754 #$url=str_replace(" ","%20",$url);755 $options = array(756 CURLOPT_HEADER => true,757 CURLOPT_NOBODY => true,758 CURLOPT_RETURNTRANSFER => true,759 CURLOPT_CONNECTTIMEOUT => 8,760 CURLOPT_TIMEOUT => 8,761 CURLOPT_SSL_VERIFYPEER => false,762 CURLOPT_DNS_USE_GLOBAL_CACHE => false763 );764 $ch= curl_init( $url );765 curl_setopt_array( $ch, $options );766 if(curl_errno($ch)){767 $content = "";768 }else{769 $content = curl_exec( $ch );770 }771 curl_close( $ch );772 return "$content";773 }774 775 public static function file_curlimagets_contents($url){776 #$url=str_replace(" ","%20",$url);777 $options = array(778 CURLOPT_RETURNTRANSFER => true,779 CURLOPT_HEADER => false,780 CURLOPT_FOLLOWLOCATION => true,781 CURLOPT_ENCODING => "",782 CURLOPT_AUTOREFERER => true,783 CURLOPT_CONNECTTIMEOUT => 8,784 CURLOPT_TIMEOUT => 8,785 CURLOPT_SSL_VERIFYPEER => false,786 CURLOPT_DNS_USE_GLOBAL_CACHE => false787 );788 $ch= curl_init( $url );789 curl_setopt_array( $ch, $options );790 if(curl_errno($ch)){791 $content = "";792 }else{793 $content = curl_exec( $ch );794 }795 curl_close( $ch );796 return "$content";797 }798 799 public static function img_exists($url){800 if(function_exists('curl_init')) {801 $headers=TopperSystemSetFilereceived::get_headers_curlts($url);802 $n=0;803 if(str_replace(array("200"),"",$headers) != "$headers"){804 $n++;805 if(str_replace(array("image/jpeg", "image/png"),"",$headers) != "$headers"){806 $n++;807 }808 }809 if($n == "2"){810 $return=true;811 }else{812 $return=false;813 }814 unset($n);815 }else{816 stream_context_set_default( [817 'ssl' => [818 'verify_peer' => false,819 'verify_peer_name' => false,820 ],821 ]);822 $headers=get_headers($url);823 $n=0;824 foreach($headers as $result){825 if(trim($result) != ""){826 if(str_replace(array("200 OK", "image/jpeg", "image/png"),"",$result) != "$result"){827 $n++;828 }829 }830 $result="";831 }832 if(is_array($headers)){$headers=array();}833 if($n == "2"){834 $return=true;835 }else{836 $return=false;837 }838 }839 return $return;840 }841 842 public static function getBytesFromHexString($hexdata)843 {844 for($count = 0; $count < strlen($hexdata); $count+=2){845 $bytes[] = chr(hexdec(substr($hexdata, $count, 2)));846 }847 unset($hexdata);848 return implode($bytes);849 }850 851 public static function getImageMimeType($imagedata)852 {853 $imagemimetypes = array(854 "jpeg" => "FFD8",855 "png" => "89504E470D0A1A0A",856 "gif" => "474946",857 "bmp" => "424D",858 "tiff" => "4949",859 "tiff" => "4D4D"860 );861 862 foreach ($imagemimetypes as $mime => $hexbytes)863 {864 $bytes = TopperSystemSetFilereceived::getBytesFromHexString($hexbytes);865 if (substr($imagedata, 0, strlen($bytes)) == $bytes){866 return $mime;867 }868 $mine="";869 $bytes="";870 $hexbytes="";871 }872 873 unset($imagedata);874 $imagemimetypes=array();875 return NULL;876 }877 878 public static function getImageWidthHeight($immagine){879 $result="0-0";880 if(trim($immagine) != ""){881 if(function_exists('curl_init')) {882 $data=@TopperSystemSetFilereceived::file_curlimagets_contents("$immagine");883 }else{884 $data=@file_get_contents("$immagine",false);885 }886 887 if(($data == "Page not found")||($data == "false")||(trim($data == ""))||($data == false)||($data == "false google")){888 $result="0-0";889 }890 if($result != "noimageload"){891 $mimetype = TopperSystemSetFilereceived::getImageMimeType($data);892 if($mimetype == "png"){893 $type="3";894 }else if($mimetype == "gif"){895 $type="1";896 }else if($mimetype == "jpeg"){897 $type="2";898 }else{899 $type="0";900 }901 902 if($type != "0"){903 $im = @( imagecreatefromstring( $data ) );904 $x=(int) @imagesx( $im );905 $y=(int) @imagesy( $im );906 907 if(($x == 0)||($y == 0)||($x == "")||($y == "")){908 $result="0-0";909 }else{910 $result="$x-$y";911 }912 913 @ ( Imagedestroy( $im ) );914 915 }else{916 $result="0-0";917 }918 }919 }920 unset($immagine);921 unset($data);922 unset($mimetype);923 unset($type);924 unset($im);925 unset($x);926 unset($y);927 928 return $result;929 197 } 930 198 … … 1093 361 } 1094 362 363 public static function add_font_display_swap_to_css_ts($stringa_sito){ 364 if(trim($stringa_sito) != ""){ 365 if(str_replace(array("@font-face{","@font-face {"),"",strtolower($stringa_sito)) != strtolower("$stringa_sito")){ 366 if(str_replace(array("font-display:swap","font-display: swap"),"",strtolower($stringa_sito)) == strtolower("$stringa_sito")){ 367 $new_s=""; 368 $stringa_sito=str_replace(array("@font-face{","@font-face {","@font-face\n{","@font-face \n{","@font-face\n {"),"@font-face{font-display:swap;",$stringa_sito); 369 $contenuto_link_sito_analizza="$stringa_sito"; 370 preg_match_all("'{font-display:swap;(.*?)}'is", trim($contenuto_link_sito_analizza), $contenuto_link_sito_analizza); 371 $contenuto_link_sito_analizza = ($contenuto_link_sito_analizza[1]); 372 for($i=0;$i<=count($contenuto_link_sito_analizza) + 1;$i++){ 373 if((isset($contenuto_link_sito_analizza[$i]))&&(trim($contenuto_link_sito_analizza[$i]) != "")){ 374 if(str_replace("font-display:","",strtolower($contenuto_link_sito_analizza[$i])) != strtolower($contenuto_link_sito_analizza[$i])){ 375 if(str_replace(array("font-display:swap;","font-display: swap;","font-display:auto;","font-display: auto;","font-display:block;","font-display: block;","font-display:optional;","font-display: optional;","font-display:fallback;","font-display: fallback;"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){ 376 $new_s=str_replace(array("font-display:swap;","font-display: swap;","font-display:auto;","font-display: auto;","font-display:block;","font-display: block;","font-display:optional;","font-display: optional;","font-display:fallback;","font-display: fallback;"),"",$contenuto_link_sito_analizza[$i]); 377 }else if(str_replace(array("font-display:swap !important;","font-display: swap !important;","font-display:auto !important;","font-display: auto !important;","font-display:block !important;","font-display: block !important;","font-display:optional !important;","font-display: optional !important;","font-display:fallback !important;","font-display: fallback !important;"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){ 378 $new_s=str_replace(array("font-display:swap !important;","font-display: swap !important;","font-display:auto !important;","font-display: auto !important;","font-display:block !important;","font-display: block !important;","font-display:optional !important;","font-display: optional !important;","font-display:fallback !important;","font-display: fallback !important;"),"",$contenuto_link_sito_analizza[$i]); 379 }else if(str_replace(array("font-display:swap!important;","font-display: swap!important;","font-display:auto!important;","font-display: auto!important;","font-display:block!important;","font-display: block!important;","font-display:optional!important;","font-display: optional!important;","font-display:fallback!important;","font-display: fallback!important;"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){ 380 $new_s=str_replace(array("font-display:swap!important;","font-display: swap!important;","font-display:auto!important;","font-display: auto!important;","font-display:block!important;","font-display: block!important;","font-display:optional!important;","font-display: optional!important;","font-display:fallback!important;","font-display: fallback!important;"),"",$contenuto_link_sito_analizza[$i]); 381 }else if(str_replace(array("font-display:swap !important","font-display: swap !important","font-display:auto !important","font-display: auto !important","font-display:block !important","font-display: block !important","font-display:optional !important","font-display: optional !important","font-display:fallback !important","font-display: fallback !important"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){ 382 $new_s=str_replace(array("font-display:swap !important","font-display: swap !important","font-display:auto !important","font-display: auto !important","font-display:block !important","font-display: block !important","font-display:optional !important","font-display: optional !important","font-display:fallback !important","font-display: fallback !important"),"",$contenuto_link_sito_analizza[$i]); 383 }else if(str_replace(array("font-display:swap!important","font-display: swap!important","font-display:auto!important","font-display: auto!important","font-display:block!important","font-display: block!important","font-display:optional!important","font-display: optional!important","font-display:fallback!important","font-display: fallback!important"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){ 384 $new_s=str_replace(array("font-display:swap!important","font-display: swap!important","font-display:auto!important","font-display: auto!important","font-display:block!important","font-display: block!important","font-display:optional!important","font-display: optional!important","font-display:fallback!important","font-display: fallback!important"),"",$contenuto_link_sito_analizza[$i]); 385 }else if(str_replace(array("font-display:swap","font-display: swap","font-display:auto","font-display: auto","font-display:block","font-display: block","font-display:optional","font-display: optional","font-display:fallback","font-display: fallback"),"",$contenuto_link_sito_analizza[$i]) != $contenuto_link_sito_analizza[$i]){ 386 $new_s=str_replace(array("font-display:swap","font-display: swap","font-display:auto","font-display: auto","font-display:block","font-display: block","font-display:optional","font-display: optional","font-display:fallback","font-display: fallback"),"",$contenuto_link_sito_analizza[$i]); 387 }else{ 388 $new_s=""; 389 } 390 if((trim($new_s) != "")&&(trim($new_s) != trim($contenuto_link_sito_analizza[$i]))){ 391 $stringa_sito=str_replace($contenuto_link_sito_analizza[$i],"$new_s",$stringa_sito); 392 } 393 $new_s=""; 394 } 395 $contenuto_link_sito_analizza[$i]=""; 396 } 397 } 398 if(is_array($contenuto_link_sito_analizza)){$contenuto_link_sito_analizza=array();}else{$contenuto_link_sito_analizza="";} 399 unset($new_s); 400 } 401 } 402 }else{ 403 $stringa_sito=""; 404 } 405 return "$stringa_sito"; 406 } 407 408 public static function clean_css($stringa_sito){ 409 if($stringa_sito != ""){ 410 if(((str_replace("{","",$stringa_sito) != "$stringa_sito")&&(str_replace("}","",$stringa_sito) != "$stringa_sito"))){ 411 $stringa_sito=TopperSystemSetFilereceived::add_font_display_swap_to_css_ts("$stringa_sito"); 412 if(TopperSystemSetFilereceived::is_script_accettable_ts($stringa_sito) == "ok"){ 413 $output=TopperSystemAndMinifyCSSCompressor::process($stringa_sito); 414 }else{ 415 $output="$stringa_sito"; 416 } 417 }else{ 418 $output="$stringa_sito"; 419 } 420 }else{ 421 $output=""; 422 } 423 unset($stringa_sito); 424 return "$output"; 425 } 426 427 public static function extract_font_inline_from_code_function($contenuto_link_sito){ 428 429 $lista_trovati_font=""; 430 if($contenuto_link_sito != ""){ 431 $contenuto_link_sito_prep=str_replace("\n","",$contenuto_link_sito); 432 $contenuto_link_sito_prep=str_replace(";",";\n",$contenuto_link_sito_prep); 433 $contenuto_link_sito_prep=str_replace("url(","\nurl(",$contenuto_link_sito_prep); 434 $array_contenuto_link_sito_prep=explode("\n",$contenuto_link_sito_prep); 435 436 $n_array_contenuto_link_sito_prep=count($array_contenuto_link_sito_prep); 437 for($i=0;$i<=$n_array_contenuto_link_sito_prep;$i++){ 438 if((isset($array_contenuto_link_sito_prep[$i]))&&(trim($array_contenuto_link_sito_prep[$i]) != "")){ 439 $record_array=trim($array_contenuto_link_sito_prep[$i]); 440 $url=trim(TopperSystemSetFilereceived::extractstringa_toppersystem($record_array, 'url(', ')')); 441 if($url != ""){ 442 $url=str_replace(array("\"","'"),"",$url); 443 $url_min=strtolower($url); 444 if(str_replace(array(".etx",".sfp",".sfd",".fot",".pfa",".pfb",".eot",".pfm",".afm",".fnt",".ttf",".woff2",".woff"),"",$url_min) != "$url_min"){ 445 $array_url_min=explode(".",$url_min); 446 if(isset($array_url_min["1"])){ 447 if(trim($array_url_min["1"]) != ""){ 448 $pass="no"; 449 if(str_replace("//","",$url) != "$url"){ 450 if(substr($url, 0, 2) == "//"){ 451 $pass="ok"; 452 } 453 } 454 if((str_replace(array("https://","http://"),"",$url) != "$url")||($pass == "ok")){ 455 $go="ok"; 456 }else{ 457 if(file_exists($url)){ 458 $go="ok"; 459 }else{ 460 $go="no"; 461 } 462 } 463 if($go == "ok"){ 464 $exstention=trim(end($array_url_min)); 465 if($exstention == "etx"){ 466 $lista_trovati_font.="$url,;"; 467 }else if($exstention == "sfp"){ 468 $lista_trovati_font.="$url,;"; 469 }else if($exstention == "sfd"){ 470 $lista_trovati_font.="$url,;"; 471 }else if($exstention == "fot"){ 472 $lista_trovati_font.="$url,;"; 473 }else if($exstention == "pfa"){ 474 $lista_trovati_font.="$url,;"; 475 }else if($exstention == "pfb"){ 476 $lista_trovati_font.="$url,;"; 477 }else if($exstention == "eot"){ 478 $lista_trovati_font.="$url,;"; 479 }else if($exstention == "pfm"){ 480 $lista_trovati_font.="$url,;"; 481 }else if($exstention == "afm"){ 482 $lista_trovati_font.="$url,;"; 483 }else if($exstention == "fnt"){ 484 $lista_trovati_font.="$url,;"; 485 }else if($exstention == "ttf"){ 486 $lista_trovati_font.="$url,;"; 487 }else if($exstention == "woff"){ 488 $lista_trovati_font.="$url,;"; 489 }else if($exstention == "woff2"){ 490 $lista_trovati_font.="$url,;"; 491 }else{ 492 #npt 493 } 494 $exstention=""; 495 } 496 } 497 } 498 $array_url_min=array(); 499 } 500 $url_min=""; 501 } 502 $record_array=""; 503 $url=""; 504 $array_contenuto_link_sito_prep[$i]=""; 505 } 506 } 507 $array_contenuto_link_sito_prep=array(); 508 } 509 return "$lista_trovati_font"; 510 } 511 512 public static function extract_font_inline_from_code($contenuto_link_sito,$extract_class_css_from_page,$compare_if_class_exist){ 513 $lista_trovati_font=""; 514 515 if($contenuto_link_sito != ""){ 516 if($compare_if_class_exist == "1"){ 517 518 if($extract_class_css_from_page != ""){ 519 $extract_class_css_from_page_array=explode(",;",$extract_class_css_from_page); 520 $n_extract_class_css_from_page_array=count($extract_class_css_from_page_array); 521 522 $element = explode('}', $contenuto_link_sito); 523 foreach ($element as $element2) { 524 if($element2 != ""){ 525 $a_name = explode('{', $element2); 526 $name = $a_name[0]; 527 if($name != ""){ 528 529 for($i=0;$i<=$n_extract_class_css_from_page_array;$i++){ 530 if((isset($extract_class_css_from_page_array[$i]))&&(trim($extract_class_css_from_page_array[$i]) != "")){ 531 if(str_replace(trim($extract_class_css_from_page_array[$i]),"",$name) != "$name"){ 532 $lista_trovati_font.=TopperSystemSetFilereceived::extract_font_inline_from_code_function($element2); 533 } 534 } 535 } 536 537 } 538 $name=""; 539 $a_name=array(); 540 } 541 } 542 $element2=""; 543 $extract_class_css_from_page_array=array(); 544 $element=array(); 545 unset($n_extract_class_css_from_page_array); 546 } 547 }else{ 548 $lista_trovati_font.=TopperSystemSetFilereceived::extract_font_inline_from_code_function($contenuto_link_sito); 549 } 550 551 } 552 553 return "$lista_trovati_font"; 554 } 555 556 public static function modify_css($fileoriginale,$newfile,$extract_class_css_from_page){ 557 $return=""; 558 $lista_trovati_font=""; 559 560 if(($fileoriginale != "")&&($newfile != "")){ 561 $pathdirassets=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/assets/"; 562 563 $filename=TopperSystemSetFilereceived::detect_pathfile().$fileoriginale; 564 $filenamenew=$pathdirassets.$newfile; 565 if(file_exists($filename)){ 566 $contenuto_link_sito=TopperSystemSetFilereceived::searchfile($filename); 567 if(is_readable($filename)){ 568 $old_permessi_file=substr(sprintf('%o', fileperms($filename)), -4); 569 }else{ 570 $old_permessi_file=""; 571 } 572 573 if(file_exists($filenamenew)){ 574 if(filemtime($filenamenew) >= filemtime($filename)){ 575 #niente 576 }else{ 577 if(trim($contenuto_link_sito) != ""){ 578 $new=TopperSystemSetFilereceived::clean_css($contenuto_link_sito); 579 chmod($filename,0644); 580 $textfilem=fopen($filename, "w"); 581 fwrite($textfilem,$new); 582 fclose($textfilem); 583 if($old_permessi_file == "0444"){ 584 chmod($filename,0444); 585 } 586 587 chmod($filenamenew,0644); 588 $textfilev=fopen($filenamenew, "w"); 589 fwrite($textfilev,$contenuto_link_sito); 590 fclose($textfilev); 591 chmod($filenamenew,0444); 592 593 clearstatcache(); 594 595 unset($new); 596 $return="ok"; 597 } 598 unset($contenuto_link_sito); 599 } 600 }else{ 601 if(trim($contenuto_link_sito) != ""){ 602 $new=TopperSystemSetFilereceived::clean_css($contenuto_link_sito); 603 chmod($filename,0644); 604 $textfilem=fopen($filename, "w"); 605 fwrite($textfilem,$new); 606 fclose($textfilem); 607 if($old_permessi_file == "0444"){ 608 chmod($filename,0444); 609 } 610 611 $textfilev=fopen($filenamenew, "w"); 612 fwrite($textfilev,$contenuto_link_sito); 613 fclose($textfilev); 614 chmod($filenamenew,0444); 615 616 clearstatcache(); 617 618 unset($new); 619 $return="ok"; 620 } 621 unset($contenuto_link_sito); 622 } 623 } 624 } 625 return array("$return","$lista_trovati_font"); 626 } 627 628 public static function go_css($contenuto_link_sito,$extract_class_css_from_page){ 629 $lista_trovati_font=""; 630 if($contenuto_link_sito != ""){ 631 $pathfileminifycss=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/log/MinifyCSS.txt"; 632 633 $filename="$pathfileminifycss"; 634 if(file_exists($filename)){ 635 $log=TopperSystemSetFilereceived::searchfile($filename); 636 $crea="0"; 637 }else{ 638 $log=""; 639 $crea="1"; 640 } 641 $scrivi=""; 642 643 $contenuto_file_index_toppersystem_array=explode(",;",$contenuto_link_sito); 644 $n_contenuto_file_index_toppersystem_array=count($contenuto_file_index_toppersystem_array); 645 unset($contenuto_link_sito); 646 647 for($i=0;$i<=$n_contenuto_file_index_toppersystem_array;$i++){ 648 649 if((isset($contenuto_file_index_toppersystem_array[$i]))&&(trim($contenuto_file_index_toppersystem_array[$i]) != "")){ 650 $part_url=explode("||||",trim($contenuto_file_index_toppersystem_array[$i])); 651 if((isset($part_url[1]))&&(trim($part_url[1]) != "")){ 652 $lista_trovati_font.=TopperSystemSetFilereceived::modify_css(explode("?",$part_url[0])[0],$part_url[1],$extract_class_css_from_page)["1"]; 653 if(str_replace(trim($contenuto_file_index_toppersystem_array[$i]),"",$log) == "$log"){ 654 $scrivi.=trim($contenuto_file_index_toppersystem_array[$i])."\n"; 655 } 656 } 657 } 658 } 659 if(is_array($contenuto_file_index_toppersystem_array)){$contenuto_file_index_toppersystem_array=array();}else{$contenuto_file_index_toppersystem_array="";} 660 unset($n_contenuto_file_index_toppersystem_array); 661 662 if($scrivi != ""){ 663 if($crea == "1"){ 664 if(file_exists($filename)){ 665 chmod("$filename",0644); 666 } 667 $textfilem=fopen($filename, "w"); 668 fwrite($textfilem,$scrivi); 669 fclose($textfilem); 670 chmod("$filename",0444); 671 }else{ 672 chmod("$filename",0644); 673 $textfilem=fopen($filename, "a"); 674 fwrite($textfilem,$scrivi); 675 fclose($textfilem); 676 chmod("$filename",0444); 677 } 678 } 679 } 680 return trim($lista_trovati_font); 681 } 682 683 public static function extract_body_css_for_inline($css_toppersystem_send){ 684 $list_css=array('list_css' => null); 685 if($css_toppersystem_send != ""){ 686 $contenuto_file_index_toppersystem_array=explode(",;",$css_toppersystem_send); 687 $n_contenuto_file_index_toppersystem_array=count($contenuto_file_index_toppersystem_array); 688 #unset($css_toppersystem_send); 689 $n=0; 690 for($i=0;$i<=$n_contenuto_file_index_toppersystem_array;$i++){ 691 if((isset($contenuto_file_index_toppersystem_array[$i]))&&(trim($contenuto_file_index_toppersystem_array[$i]) != "")){ 692 $part_url=explode("||||",trim($contenuto_file_index_toppersystem_array[$i])); 693 if((isset($part_url[1]))&&(trim($part_url[1]) != "")){ 694 695 $fileoriginale=explode("?",$part_url[0])[0]; 696 $filename=TopperSystemSetFilereceived::detect_pathfile().$fileoriginale; 697 if(file_exists($filename)){ 698 $body_file=TopperSystemSetFilereceived::searchfile($filename); 699 if(trim($body_file) != ""){ 700 if(str_replace(array("./","@IMPORT","@import","URL(","url("),"",$body_file) == "$body_file"){ 701 $list_css[$n][0] = $part_url[0]; 702 $list_css[$n][1] = "$body_file"; 703 $n++; 704 } 705 } 706 $body_file=""; 707 } 708 $fileoriginale=""; 709 $filename=""; 710 } 711 } 712 } 713 if(is_array($contenuto_file_index_toppersystem_array)){$contenuto_file_index_toppersystem_array=array();}else{$contenuto_file_index_toppersystem_array="";} 714 unset($n_contenuto_file_index_toppersystem_array); 715 716 } 717 return $list_css; 718 } 719 720 public static function add_css_inline_save($contenuto_link_sito,$elimina,$list_css){ 721 $url_css_ok=""; 722 $body_css_ok=""; 723 $url_css_remove=""; 724 for($cssi=0;$cssi<=count($list_css);$cssi++){ 725 if((isset($list_css[$cssi][0]))&&(trim($list_css[$cssi][0]) != "")&&($body_css_ok == "")){ 726 $url_css=trim($list_css[$cssi][0]); 727 if(str_replace("$url_css","",$elimina) != "$elimina"){ 728 if((isset($list_css[$cssi][1]))&&(trim($list_css[$cssi][1]) != "")){ 729 $url_css_ok="$url_css"; 730 $body_css_ok=trim($list_css[$cssi][1]); 731 } 732 } 733 $url_css=""; 734 } 735 } 736 if($url_css_ok != ""){ 737 $ris_attributo_analisy_id=TopperSystemSetFilereceived::work_attributo("id",$elimina); 738 $ris_attributo_analisy_id_complete=$ris_attributo_analisy_id["0"]; 739 740 $ris_attributo_analisy_type=TopperSystemSetFilereceived::work_attributo("type",$elimina); 741 $ris_attributo_analisy_type_complete=$ris_attributo_analisy_type["0"]; 742 743 $styleinline="<style".$ris_attributo_analisy_id_complete.$ris_attributo_analisy_type_complete.">".$body_css_ok."</style>"; 744 745 preg_match_all("'<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*>'is", $styleinline , $risultato); 746 foreach ($risultato[1] as $stringa_sito) { 747 $pattern = '!/\*[^*]*\*+([^/][^*]*\*+)*/!'; 748 $stringa_sito_new = preg_replace($pattern, '', $stringa_sito); 749 750 $stringa_sito_new = preg_replace('/\/\*((?!\*\/).)*\*\//','',$stringa_sito_new); 751 $stringa_sito_new = preg_replace('/\s{2,}/',' ',$stringa_sito_new); 752 $stringa_sito_new = preg_replace('/\s*([:;{}])\s*/','$1',$stringa_sito_new); 753 $stringa_sito_new = preg_replace('/;}/','}',$stringa_sito_new); 754 755 $styleinline=str_replace("$stringa_sito","$stringa_sito_new",$styleinline); 756 $stringa_sito_new=""; 757 $stringa_sito=""; 758 759 } 760 if(is_array($risultato)){$risultato=array();} 761 762 preg_match_all("'<\s*style>(.*?)<\s*/\s*style\s*>'is", $styleinline , $risultato); 763 foreach ($risultato[1] as $stringa_sito) { 764 $pattern = '!/\*[^*]*\*+([^/][^*]*\*+)*/!'; 765 $stringa_sito_new = preg_replace($pattern, '', $stringa_sito); 766 767 $stringa_sito_new = preg_replace('/\/\*((?!\*\/).)*\*\//','',$stringa_sito_new); 768 $stringa_sito_new = preg_replace('/\s{2,}/',' ',$stringa_sito_new); 769 $stringa_sito_new = preg_replace('/\s*([:;{}])\s*/','$1',$stringa_sito_new); 770 $stringa_sito_new = preg_replace('/;}/','}',$stringa_sito_new); 771 772 $styleinline=str_replace("$stringa_sito","$stringa_sito_new",$styleinline); 773 $stringa_sito_new=""; 774 $stringa_sito=""; 775 } 776 if(is_array($risultato)){$risultato=array();} 777 $contenuto_link_sito_old="$contenuto_link_sito"; 778 $contenuto_link_sito=str_replace("$elimina","$styleinline",$contenuto_link_sito); 779 780 if($contenuto_link_sito != "$contenuto_link_sito_old"){ 781 $url_css_remove=trim($url_css_ok); 782 } 783 784 $contenuto_link_sito_old=""; 785 $ris_attributo_analisy_id=array(); 786 $ris_attributo_analisy_id_complete=""; 787 $ris_attributo_analisy_type=array(); 788 $ris_attributo_analisy_type_complete=""; 789 $styleinline=""; 790 $url_css_ok=""; 791 } 792 793 return array("$contenuto_link_sito","$url_css_remove"); 794 } 795 796 public static function remove_preload_tag($contenuto_link_sito,$css_url){ 797 if(($contenuto_link_sito != "")&&($css_url != "")){ 798 $contenuto_link_sito_analizza=explode("</head>",$contenuto_link_sito)["0"]; 799 preg_match_all('/<(.+?)[\s]*\/?[\s]*>/si', trim($contenuto_link_sito_analizza), $contenuto_link_sito_analizza); 800 $contenuto_link_sito_analizza = ($contenuto_link_sito_analizza[1]); 801 for($i=0;$i<=count($contenuto_link_sito_analizza);$i++){ 802 if((isset($contenuto_link_sito_analizza[$i]))&&(trim($contenuto_link_sito_analizza[$i]) != "")){ 803 804 if((explode(" ",strtolower($contenuto_link_sito_analizza[$i]))["0"] == "link")||(explode(" ",strtolower($contenuto_link_sito_analizza[$i]))["0"] == "link[jaccapoespaziob]")){ 805 $taglink=$contenuto_link_sito_analizza[$i]; 806 if(str_replace("$css_url","",$taglink) != "$taglink"){ 807 808 $ris_attributo_analisy_rel=TopperSystemSetFilereceived::work_attributo("rel","$taglink"); 809 $ris_attributo_analisy_rel_complete=$ris_attributo_analisy_rel["0"]; 810 $ris_attributo_analisy_rel_content=$ris_attributo_analisy_rel["1"]; 811 if(trim($ris_attributo_analisy_rel_complete) != ""){ 812 if(trim(strtolower($ris_attributo_analisy_rel_content)) == "preload"){ 813 814 $ris_attributo_analisy_as=TopperSystemSetFilereceived::work_attributo("as","$taglink"); 815 $ris_attributo_analisy_as_complete=$ris_attributo_analisy_as["0"]; 816 $ris_attributo_analisy_as_content=$ris_attributo_analisy_as["1"]; 817 if(trim($ris_attributo_analisy_as_complete) != ""){ 818 if(trim(strtolower($ris_attributo_analisy_as_content)) == "style"){ 819 820 $ris_attributo_analisy_href=TopperSystemSetFilereceived::work_attributo("href","$taglink"); 821 $ris_attributo_analisy_href_complete=$ris_attributo_analisy_href["0"]; 822 $ris_attributo_analisy_href_content=$ris_attributo_analisy_href["1"]; 823 if(trim($ris_attributo_analisy_href_content) != ""){ 824 if(str_replace("$css_url","",$ris_attributo_analisy_href_content) != "$ris_attributo_analisy_href_content"){ 825 $go="ok"; 826 $ris='<'.$taglink.' />'; 827 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 828 $ris='<'.$taglink.'/>'; 829 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 830 $ris='<'.$taglink.'>'; 831 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 832 $go="no"; 833 } 834 } 835 } 836 if($go == "ok"){ 837 $space_inject="[jaccapoespaziob] "; 838 if(str_replace(array("$ris</link>","$ris</LINK>","$ris$space_inject</link>","$ris$space_inject</LINK>"),"",$contenuto_link_sito) != "$contenuto_link_sito"){ 839 $contenuto_link_sito=str_replace(array("$ris</link>","$ris</LINK>","$ris$space_inject</link>","$ris$space_inject</LINK>"),"",$contenuto_link_sito); 840 }else{ 841 $contenuto_link_sito=str_replace("$ris","",$contenuto_link_sito); 842 } 843 $space_inject=""; 844 } 845 $ris=""; 846 } 847 } 848 $ris_attributo_analisy_href=array(); 849 $ris_attributo_analisy_href_complete=""; 850 $ris_attributo_analisy_href_content=""; 851 } 852 } 853 $ris_attributo_analisy_as=array(); 854 $ris_attributo_analisy_as_complete=""; 855 $ris_attributo_analisy_as_content=""; 856 } 857 } 858 $ris_attributo_analisy_rel=array(); 859 $ris_attributo_analisy_rel_complete=""; 860 $ris_attributo_analisy_rel_content=""; 861 } 862 $taglink=""; 863 } 864 $contenuto_link_sito_analizza[$i]=""; 865 } 866 } 867 } 868 869 return "$contenuto_link_sito"; 870 } 871 872 public static function add_css_inline($contenuto_link_sito,$css_toppersystem_send){ 873 if(($contenuto_link_sito != "")&&($css_toppersystem_send != "")){ 874 $list_css=TopperSystemSetFilereceived::extract_body_css_for_inline($css_toppersystem_send); 875 876 preg_match_all("'<\s*noscript[^>]*[^/]>(.*?)<\s*/\s*noscript\s*>'is", $contenuto_link_sito , $risultato); 877 foreach ($risultato[1] as $stringa_sito) { 878 $stringa_sito_new=str_replace("<","[JminoreB]",$stringa_sito); 879 $stringa_sito_new=str_replace(">","[JmaggioreB]",$stringa_sito_new); 880 $stringa_sito_new=str_replace(":","[JduepuntiB]",$stringa_sito_new); 881 $stringa_sito_new=str_replace("/","[JslashB]",$stringa_sito_new); 882 $stringa_sito_new=str_replace(".","[JpuntoB]",$stringa_sito_new); 883 $stringa_sito_new=str_replace(";","[JpuntoevirgolaB]",$stringa_sito_new); 884 $stringa_sito_new=str_replace("€","[JeuroB]",$stringa_sito_new); 885 $stringa_sito_new=str_replace("#","[JcancellettoB]",$stringa_sito_new); 886 $stringa_sito_new=str_replace("!","[JpuntoesclamativoB]",$stringa_sito_new); 887 $stringa_sito_new=str_replace("?","[JpuntointerrogativoB]",$stringa_sito_new); 888 $stringa_sito_new=str_replace("'","[JapostrofoB]",$stringa_sito_new); 889 $stringa_sito_new=str_replace("\"","[JdoppievirgoletteB]",$stringa_sito_new); 890 $stringa_sito_new=str_replace("style","[JstxleB]",$stringa_sito_new); 891 $stringa_sito_new=str_replace("Style","[JStxleB]",$stringa_sito_new); 892 $stringa_sito_new=str_replace("STYLE","[JSTXLEB]",$stringa_sito_new); 893 $stringa_sito_new=str_replace("script","[JscrxptB]",$stringa_sito_new); 894 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 895 896 $stringa_sito=""; 897 $stringa_sito_new=""; 898 } 899 if(is_array($risultato)){$risultato=array();} 900 901 preg_match_all("'<\s*noscript>(.*?)<\s*/\s*noscript\s*>'is", $contenuto_link_sito , $risultato); 902 foreach ($risultato[1] as $stringa_sito) { 903 $stringa_sito_new=str_replace("<","[JminoreB]",$stringa_sito); 904 $stringa_sito_new=str_replace(">","[JmaggioreB]",$stringa_sito_new); 905 $stringa_sito_new=str_replace(":","[JduepuntiB]",$stringa_sito_new); 906 $stringa_sito_new=str_replace("/","[JslashB]",$stringa_sito_new); 907 $stringa_sito_new=str_replace(".","[JpuntoB]",$stringa_sito_new); 908 $stringa_sito_new=str_replace(";","[JpuntoevirgolaB]",$stringa_sito_new); 909 $stringa_sito_new=str_replace("€","[JeuroB]",$stringa_sito_new); 910 $stringa_sito_new=str_replace("#","[JcancellettoB]",$stringa_sito_new); 911 $stringa_sito_new=str_replace("!","[JpuntoesclamativoB]",$stringa_sito_new); 912 $stringa_sito_new=str_replace("?","[JpuntointerrogativoB]",$stringa_sito_new); 913 $stringa_sito_new=str_replace("'","[JapostrofoB]",$stringa_sito_new); 914 $stringa_sito_new=str_replace("\"","[JdoppievirgoletteB]",$stringa_sito_new); 915 $stringa_sito_new=str_replace("style","[JstxleB]",$stringa_sito_new); 916 $stringa_sito_new=str_replace("Style","[JStxleB]",$stringa_sito_new); 917 $stringa_sito_new=str_replace("STYLE","[JSTXLEB]",$stringa_sito_new); 918 $stringa_sito_new=str_replace("script","[JscrxptB]",$stringa_sito_new); 919 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 920 921 $stringa_sito=""; 922 $stringa_sito_new=""; 923 } 924 if(is_array($risultato)){$risultato=array();} 925 926 preg_match_all("'<\s*script[^>]*[^/]>(.*?)<\s*/\s*script\s*>'is", $contenuto_link_sito , $risultato); 927 foreach ($risultato[1] as $stringa_sito) { 928 #echo $stringa_sito."<br><br>"; 929 $stringa_sito_new=str_replace("<","[JminoreB]",$stringa_sito); 930 $stringa_sito_new=str_replace(">","[JmaggioreB]",$stringa_sito_new); 931 $stringa_sito_new=str_replace(":","[JduepuntiB]",$stringa_sito_new); 932 $stringa_sito_new=str_replace("/","[JslashB]",$stringa_sito_new); 933 $stringa_sito_new=str_replace(".","[JpuntoB]",$stringa_sito_new); 934 $stringa_sito_new=str_replace(";","[JpuntoevirgolaB]",$stringa_sito_new); 935 $stringa_sito_new=str_replace("€","[JeuroB]",$stringa_sito_new); 936 $stringa_sito_new=str_replace("#","[JcancellettoB]",$stringa_sito_new); 937 $stringa_sito_new=str_replace("!","[JpuntoesclamativoB]",$stringa_sito_new); 938 $stringa_sito_new=str_replace("?","[JpuntointerrogativoB]",$stringa_sito_new); 939 $stringa_sito_new=str_replace("'","[JapostrofoB]",$stringa_sito_new); 940 $stringa_sito_new=str_replace("\"","[JdoppievirgoletteB]",$stringa_sito_new); 941 $stringa_sito_new=str_replace("style","[JstxleB]",$stringa_sito_new); 942 $stringa_sito_new=str_replace("Style","[JStxleB]",$stringa_sito_new); 943 $stringa_sito_new=str_replace("STYLE","[JSTXLEB]",$stringa_sito_new); 944 $stringa_sito_new=str_replace("script","[JscrxptB]",$stringa_sito_new); 945 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 946 947 $stringa_sito=""; 948 $stringa_sito_new=""; 949 } 950 if(is_array($risultato)){$risultato=array();} 951 952 preg_match_all("'<\s*script>(.*?)<\s*/\s*script\s*>'is", $contenuto_link_sito , $risultato); 953 foreach ($risultato[1] as $stringa_sito) { 954 #echo $stringa_sito."<br><br>"; 955 $stringa_sito_new=str_replace("<","[JminoreB]",$stringa_sito); 956 $stringa_sito_new=str_replace(">","[JmaggioreB]",$stringa_sito_new); 957 $stringa_sito_new=str_replace(":","[JduepuntiB]",$stringa_sito_new); 958 $stringa_sito_new=str_replace("/","[JslashB]",$stringa_sito_new); 959 $stringa_sito_new=str_replace(".","[JpuntoB]",$stringa_sito_new); 960 $stringa_sito_new=str_replace(";","[JpuntoevirgolaB]",$stringa_sito_new); 961 $stringa_sito_new=str_replace("€","[JeuroB]",$stringa_sito_new); 962 $stringa_sito_new=str_replace("#","[JcancellettoB]",$stringa_sito_new); 963 $stringa_sito_new=str_replace("!","[JpuntoesclamativoB]",$stringa_sito_new); 964 $stringa_sito_new=str_replace("?","[JpuntointerrogativoB]",$stringa_sito_new); 965 $stringa_sito_new=str_replace("'","[JapostrofoB]",$stringa_sito_new); 966 $stringa_sito_new=str_replace("\"","[JdoppievirgoletteB]",$stringa_sito_new); 967 $stringa_sito_new=str_replace("style","[JstxleB]",$stringa_sito_new); 968 $stringa_sito_new=str_replace("Style","[JStxleB]",$stringa_sito_new); 969 $stringa_sito_new=str_replace("STYLE","[JSTXLEB]",$stringa_sito_new); 970 $stringa_sito_new=str_replace("script","[JscrxptB]",$stringa_sito_new); 971 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 972 973 $stringa_sito=""; 974 $stringa_sito_new=""; 975 } 976 if(is_array($risultato)){$risultato=array();} 977 978 preg_match_all("'<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*>'is", $contenuto_link_sito , $risultato); 979 foreach ($risultato[1] as $stringa_sito) { 980 $stringa_sito_new=str_replace("<","[JminoreB]",$stringa_sito); 981 $stringa_sito_new=str_replace(">","[JmaggioreB]",$stringa_sito_new); 982 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 983 $stringa_sito=""; 984 $stringa_sito_new=""; 985 } 986 if(is_array($risultato)){$risultato=array();} 987 988 preg_match_all("'<\s*style>(.*?)<\s*/\s*style\s*>'is", $contenuto_link_sito , $risultato); 989 foreach ($risultato[1] as $stringa_sito) { 990 $stringa_sito_new=str_replace("<","[JminoreB]",$stringa_sito); 991 $stringa_sito_new=str_replace(">","[JmaggioreB]",$stringa_sito_new); 992 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 993 $stringa_sito=""; 994 $stringa_sito_new=""; 995 } 996 if(is_array($risultato)){$risultato=array();} 997 998 $array_remove_preload_css = array('array_remove_preload_css' => null); 999 $n_array_remove_preload_css=0; 1000 1001 $contenuto_link_sito_analizza=explode("</head>",$contenuto_link_sito)["0"]; 1002 $contenuto_link_sito_analizza_indice = array('contenuto_link_sito_analizza_indice' => null); 1003 $n_indice=0; 1004 preg_match_all('/<(.+?)[\s]*\/?[\s]*>/si', trim($contenuto_link_sito_analizza), $contenuto_link_sito_analizza); 1005 $contenuto_link_sito_analizza = ($contenuto_link_sito_analizza[1]); 1006 for($i=0;$i<=count($contenuto_link_sito_analizza);$i++){ 1007 if((isset($contenuto_link_sito_analizza[$i]))&&(trim($contenuto_link_sito_analizza[$i]) != "")){ 1008 1009 if((((explode(" ",strtolower($contenuto_link_sito_analizza[$i]))["0"] == "link")||(explode(" ",strtolower($contenuto_link_sito_analizza[$i]))["0"] == "link[jaccapoespaziob]"))&&(str_replace(array('stylesheet','text/css'),"",strtolower($contenuto_link_sito_analizza[$i])) != strtolower($contenuto_link_sito_analizza[$i])))||(explode(" ",strtolower($contenuto_link_sito_analizza[$i]))["0"] == "/link")||(substr(strtolower($contenuto_link_sito_analizza[$i]), 0, 5) == "/link")||(substr(strtolower($contenuto_link_sito_analizza[$i]), 0, 6) == "/ link")){ 1010 $contenuto_link_sito_analizza_indice[$n_indice]=$contenuto_link_sito_analizza[$i]; 1011 $n_indice++; 1012 } 1013 1014 } 1015 } 1016 if(is_array($contenuto_link_sito_analizza)){$contenuto_link_sito_analizza=array();}else{$contenuto_link_sito_analizza="";} 1017 1018 for($i=0;$i<=count($contenuto_link_sito_analizza_indice);$i++){ 1019 if((isset($contenuto_link_sito_analizza_indice[$i]))&&(trim($contenuto_link_sito_analizza_indice[$i]) != "")){ 1020 1021 if((explode(" ",strtolower($contenuto_link_sito_analizza_indice[$i]))["0"] == "link")||(explode(" ",strtolower($contenuto_link_sito_analizza_indice[$i]))["0"] == "link[jaccapoespaziob]")||(explode(" ",strtolower($contenuto_link_sito_analizza_indice[$i]))["0"] == "/link")||(substr(strtolower($contenuto_link_sito_analizza_indice[$i]), 0, 5) == "/link")||(substr(strtolower($contenuto_link_sito_analizza_indice[$i]), 0, 6) == "/ link")){ 1022 1023 1024 if(explode(" ",strtolower($contenuto_link_sito_analizza_indice[$i]))["0"] == "/link"){ 1025 #niente 1026 }else{ 1027 1028 if((isset($contenuto_link_sito_analizza_indice[$i + 1]))&&(trim($contenuto_link_sito_analizza_indice[$i + 1]) != "")){ 1029 if((explode(" ",strtolower($contenuto_link_sito_analizza_indice[$i + 1]))["0"] == "/link")||(substr(strtolower($contenuto_link_sito_analizza_indice[$i + 1]), 0, 5) == "/link")||(substr(strtolower($contenuto_link_sito_analizza_indice[$i + 1]), 0, 6) == "/ link")){ 1030 1031 $ris=TopperSystemSetFilereceived::extractstringa($contenuto_link_sito, '<'.$contenuto_link_sito_analizza_indice[$i].'>', '<'.$contenuto_link_sito_analizza_indice[$i + 1].'>'); 1032 $elimina="<".$contenuto_link_sito_analizza_indice[$i].">".$ris."<".$contenuto_link_sito_analizza_indice[$i + 1].">"; 1033 1034 if(str_replace("$elimina","",$contenuto_link_sito) != "$contenuto_link_sito"){ 1035 $contenuto_link_sito_transform_array=TopperSystemSetFilereceived::add_css_inline_save("$contenuto_link_sito","$elimina",$list_css); 1036 $contenuto_link_sito=$contenuto_link_sito_transform_array["0"]; 1037 $url_css_ok=$contenuto_link_sito_transform_array["1"]; 1038 if($url_css_ok != ""){ 1039 $array_remove_preload_css[$n_array_remove_preload_css]="$url_css_ok"; 1040 $n_array_remove_preload_css++; 1041 } 1042 $url_css_ok=""; 1043 $contenuto_link_sito_transform_array=array(); 1044 } 1045 1046 }else{ 1047 $go="ok"; 1048 $ris='<'.$contenuto_link_sito_analizza_indice[$i].' />'; 1049 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 1050 $ris='<'.$contenuto_link_sito_analizza_indice[$i].'/>'; 1051 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 1052 $ris='<'.$contenuto_link_sito_analizza_indice[$i].'>'; 1053 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 1054 $go="no"; 1055 } 1056 } 1057 } 1058 if($go == "ok"){ 1059 $elimina=$ris; 1060 $contenuto_link_sito_transform_array=TopperSystemSetFilereceived::add_css_inline_save("$contenuto_link_sito","$elimina",$list_css); 1061 $contenuto_link_sito=$contenuto_link_sito_transform_array["0"]; 1062 $url_css_ok=$contenuto_link_sito_transform_array["1"]; 1063 if($url_css_ok != ""){ 1064 $array_remove_preload_css[$n_array_remove_preload_css]="$url_css_ok"; 1065 $n_array_remove_preload_css++; 1066 } 1067 $url_css_ok=""; 1068 $contenuto_link_sito_transform_array=array(); 1069 } 1070 } 1071 }else{ 1072 $go="ok"; 1073 $ris='<'.$contenuto_link_sito_analizza_indice[$i].' />'; 1074 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 1075 $ris='<'.$contenuto_link_sito_analizza_indice[$i].'/>'; 1076 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 1077 $ris='<'.$contenuto_link_sito_analizza_indice[$i].'>'; 1078 if(str_replace("$ris","",$contenuto_link_sito) == "$contenuto_link_sito"){ 1079 $go="no"; 1080 } 1081 } 1082 } 1083 if($go == "ok"){ 1084 $elimina=$ris; 1085 $contenuto_link_sito_transform_array=TopperSystemSetFilereceived::add_css_inline_save("$contenuto_link_sito","$elimina",$list_css); 1086 $contenuto_link_sito=$contenuto_link_sito_transform_array["0"]; 1087 $url_css_ok=$contenuto_link_sito_transform_array["1"]; 1088 if($url_css_ok != ""){ 1089 $array_remove_preload_css[$n_array_remove_preload_css]="$url_css_ok"; 1090 $n_array_remove_preload_css++; 1091 } 1092 $url_css_ok=""; 1093 $contenuto_link_sito_transform_array=array(); 1094 } 1095 } 1096 } 1097 } 1098 } 1099 } 1100 if(is_array($list_css)){$list_css=array();} 1101 $contenuto_link_sito_analizza_indice=array(); 1102 1103 for($i=0;$i<=count($array_remove_preload_css);$i++){ 1104 if((isset($array_remove_preload_css[$i]))&&(trim($array_remove_preload_css[$i]) != "")){ 1105 if(trim($array_remove_preload_css[$i]) != "null"){ 1106 $contenuto_link_sito=TopperSystemSetFilereceived::remove_preload_tag("$contenuto_link_sito",trim($array_remove_preload_css[$i])); 1107 } 1108 $array_remove_preload_css[$i]=""; 1109 } 1110 } 1111 $array_remove_preload_css=array(); 1112 1113 preg_match_all("'<\s*noscript[^>]*[^/]>(.*?)<\s*/\s*noscript\s*>'is", $contenuto_link_sito , $risultato); 1114 foreach ($risultato[1] as $stringa_sito) { 1115 $stringa_sito_new=str_replace("[JminoreB]","<",$stringa_sito); 1116 $stringa_sito_new=str_replace("[JmaggioreB]",">",$stringa_sito_new); 1117 $stringa_sito_new=str_replace("[JduepuntiB]",":",$stringa_sito_new); 1118 $stringa_sito_new=str_replace("[JslashB]","/",$stringa_sito_new); 1119 $stringa_sito_new=str_replace("[JpuntoB]",".",$stringa_sito_new); 1120 $stringa_sito_new=str_replace("[JpuntoevirgolaB]",";",$stringa_sito_new); 1121 $stringa_sito_new=str_replace("[JeuroB]","€",$stringa_sito_new); 1122 $stringa_sito_new=str_replace("[JcancellettoB]","#",$stringa_sito_new); 1123 $stringa_sito_new=str_replace("[JpuntoesclamativoB]","!",$stringa_sito_new); 1124 $stringa_sito_new=str_replace("[JpuntointerrogativoB]","?",$stringa_sito_new); 1125 $stringa_sito_new=str_replace("[JapostrofoB]","'",$stringa_sito_new); 1126 $stringa_sito_new=str_replace("[JdoppievirgoletteB]","\"",$stringa_sito_new); 1127 $stringa_sito_new=str_replace("[JstxleB]","style",$stringa_sito_new); 1128 $stringa_sito_new=str_replace("[JStxleB]","Style",$stringa_sito_new); 1129 $stringa_sito_new=str_replace("[JSTXLEB]","STYLE",$stringa_sito_new); 1130 $stringa_sito_new=str_replace("[JscrxptB]","script",$stringa_sito_new); 1131 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 1132 1133 $stringa_sito=""; 1134 $stringa_sito_new=""; 1135 } 1136 if(is_array($risultato)){$risultato=array();} 1137 1138 preg_match_all("'<\s*noscript>(.*?)<\s*/\s*noscript\s*>'is", $contenuto_link_sito , $risultato); 1139 foreach ($risultato[1] as $stringa_sito) { 1140 $stringa_sito_new=str_replace("[JminoreB]","<",$stringa_sito); 1141 $stringa_sito_new=str_replace("[JmaggioreB]",">",$stringa_sito_new); 1142 $stringa_sito_new=str_replace("[JduepuntiB]",":",$stringa_sito_new); 1143 $stringa_sito_new=str_replace("[JslashB]","/",$stringa_sito_new); 1144 $stringa_sito_new=str_replace("[JpuntoB]",".",$stringa_sito_new); 1145 $stringa_sito_new=str_replace("[JpuntoevirgolaB]",";",$stringa_sito_new); 1146 $stringa_sito_new=str_replace("[JeuroB]","€",$stringa_sito_new); 1147 $stringa_sito_new=str_replace("[JcancellettoB]","#",$stringa_sito_new); 1148 $stringa_sito_new=str_replace("[JpuntoesclamativoB]","!",$stringa_sito_new); 1149 $stringa_sito_new=str_replace("[JpuntointerrogativoB]","?",$stringa_sito_new); 1150 $stringa_sito_new=str_replace("[JapostrofoB]","'",$stringa_sito_new); 1151 $stringa_sito_new=str_replace("[JdoppievirgoletteB]","\"",$stringa_sito_new); 1152 $stringa_sito_new=str_replace("[JstxleB]","style",$stringa_sito_new); 1153 $stringa_sito_new=str_replace("[JStxleB]","Style",$stringa_sito_new); 1154 $stringa_sito_new=str_replace("[JSTXLEB]","STYLE",$stringa_sito_new); 1155 $stringa_sito_new=str_replace("[JscrxptB]","script",$stringa_sito_new); 1156 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 1157 1158 $stringa_sito=""; 1159 $stringa_sito_new=""; 1160 } 1161 if(is_array($risultato)){$risultato=array();} 1162 1163 preg_match_all("'<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*>'is", $contenuto_link_sito , $risultato); 1164 foreach ($risultato[1] as $stringa_sito) { 1165 $stringa_sito_new=str_replace("[JminoreB]","<",$stringa_sito); 1166 $stringa_sito_new=str_replace("[JmaggioreB]",">",$stringa_sito_new); 1167 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 1168 $stringa_sito=""; 1169 $stringa_sito_new=""; 1170 } 1171 if(is_array($risultato)){$risultato=array();} 1172 1173 preg_match_all("'<\s*style>(.*?)<\s*/\s*style\s*>'is", $contenuto_link_sito , $risultato); 1174 foreach ($risultato[1] as $stringa_sito) { 1175 $stringa_sito_new=str_replace("[JminoreB]","<",$stringa_sito); 1176 $stringa_sito_new=str_replace("[JmaggioreB]",">",$stringa_sito_new); 1177 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 1178 $stringa_sito=""; 1179 $stringa_sito_new=""; 1180 } 1181 if(is_array($risultato)){$risultato=array();} 1182 1183 preg_match_all("'<\s*script[^>]*[^/]>(.*?)<\s*/\s*script\s*>'is", $contenuto_link_sito , $risultato); 1184 foreach ($risultato[1] as $stringa_sito) { 1185 #echo $stringa_sito."\n\n"; 1186 $stringa_sito_new=str_replace("[JminoreB]","<",$stringa_sito); 1187 $stringa_sito_new=str_replace("[JmaggioreB]",">",$stringa_sito_new); 1188 $stringa_sito_new=str_replace("[JduepuntiB]",":",$stringa_sito_new); 1189 $stringa_sito_new=str_replace("[JslashB]","/",$stringa_sito_new); 1190 $stringa_sito_new=str_replace("[JpuntoB]",".",$stringa_sito_new); 1191 $stringa_sito_new=str_replace("[JpuntoevirgolaB]",";",$stringa_sito_new); 1192 $stringa_sito_new=str_replace("[JeuroB]","€",$stringa_sito_new); 1193 $stringa_sito_new=str_replace("[JcancellettoB]","#",$stringa_sito_new); 1194 $stringa_sito_new=str_replace("[JpuntoesclamativoB]","!",$stringa_sito_new); 1195 $stringa_sito_new=str_replace("[JpuntointerrogativoB]","?",$stringa_sito_new); 1196 $stringa_sito_new=str_replace("[JapostrofoB]","'",$stringa_sito_new); 1197 $stringa_sito_new=str_replace("[JdoppievirgoletteB]","\"",$stringa_sito_new); 1198 $stringa_sito_new=str_replace("[JstxleB]","style",$stringa_sito_new); 1199 $stringa_sito_new=str_replace("[JStxleB]","Style",$stringa_sito_new); 1200 $stringa_sito_new=str_replace("[JSTXLEB]","STYLE",$stringa_sito_new); 1201 $stringa_sito_new=str_replace("[JscrxptB]","script",$stringa_sito_new); 1202 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 1203 $stringa_sito=""; 1204 $stringa_sito_new=""; 1205 } 1206 if(is_array($risultato)){$risultato=array();} 1207 1208 preg_match_all("'<\s*script>(.*?)<\s*/\s*script\s*>'is", $contenuto_link_sito , $risultato); 1209 foreach ($risultato[1] as $stringa_sito) { 1210 #echo $stringa_sito."\n\n"; 1211 $stringa_sito_new=str_replace("[JminoreB]","<",$stringa_sito); 1212 $stringa_sito_new=str_replace("[JmaggioreB]",">",$stringa_sito_new); 1213 $stringa_sito_new=str_replace("[JduepuntiB]",":",$stringa_sito_new); 1214 $stringa_sito_new=str_replace("[JslashB]","/",$stringa_sito_new); 1215 $stringa_sito_new=str_replace("[JpuntoB]",".",$stringa_sito_new); 1216 $stringa_sito_new=str_replace("[JpuntoevirgolaB]",";",$stringa_sito_new); 1217 $stringa_sito_new=str_replace("[JeuroB]","€",$stringa_sito_new); 1218 $stringa_sito_new=str_replace("[JcancellettoB]","#",$stringa_sito_new); 1219 $stringa_sito_new=str_replace("[JpuntoesclamativoB]","!",$stringa_sito_new); 1220 $stringa_sito_new=str_replace("[JpuntointerrogativoB]","?",$stringa_sito_new); 1221 $stringa_sito_new=str_replace("[JapostrofoB]","'",$stringa_sito_new); 1222 $stringa_sito_new=str_replace("[JdoppievirgoletteB]","\"",$stringa_sito_new); 1223 $stringa_sito_new=str_replace("[JstxleB]","style",$stringa_sito_new); 1224 $stringa_sito_new=str_replace("[JStxleB]","Style",$stringa_sito_new); 1225 $stringa_sito_new=str_replace("[JSTXLEB]","STYLE",$stringa_sito_new); 1226 $stringa_sito_new=str_replace("[JscrxptB]","script",$stringa_sito_new); 1227 $contenuto_link_sito=str_replace("$stringa_sito","$stringa_sito_new",$contenuto_link_sito); 1228 $stringa_sito=""; 1229 $stringa_sito_new=""; 1230 } 1231 if(is_array($risultato)){$risultato=array();} 1232 } 1233 return $contenuto_link_sito; 1234 } 1235 1236 public static function clean_javascript($stringa_sito){ 1237 if($stringa_sito != ""){ 1238 if(((str_replace(array("[","]","{","}"),"",$stringa_sito) != "$stringa_sito")&&(str_replace(array("="),"",$stringa_sito) != "$stringa_sito"))||(str_replace(array("document.","function(",".getElement","var "),"",$stringa_sito) != "$stringa_sito")){ 1239 if(TopperSystemSetFilereceived::is_script_accettable_ts($stringa_sito) == "ok"){ 1240 $output=TopperSystemAndJSMin::minify($stringa_sito); 1241 }else{ 1242 $output="$stringa_sito"; 1243 } 1244 }else{ 1245 $output="$stringa_sito"; 1246 } 1247 }else{ 1248 $output=""; 1249 } 1250 unset($stringa_sito); 1251 return "$output"; 1252 } 1253 1254 public static function modify_js($fileoriginale,$newfile){ 1255 $return=""; 1256 if(($fileoriginale != "")&&($newfile != "")){ 1257 $pathdirassets=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/assets/"; 1258 1259 $filename=TopperSystemSetFilereceived::detect_pathfile().$fileoriginale; 1260 $filenamenew=$pathdirassets.$newfile; 1261 if(file_exists($filename)){ 1262 if(is_readable($filename)){ 1263 $old_permessi_file=substr(sprintf('%o', fileperms($filename)), -4); 1264 }else{ 1265 $old_permessi_file=""; 1266 } 1267 1268 if(file_exists($filenamenew)){ 1269 if(filemtime($filenamenew) >= filemtime($filename)){ 1270 #niente 1271 }else{ 1272 $contenuto_link_sito=TopperSystemSetFilereceived::searchfile($filename); 1273 if(trim($contenuto_link_sito) != ""){ 1274 $new=TopperSystemSetFilereceived::clean_javascript($contenuto_link_sito); 1275 chmod($filename,0644); 1276 $textfilem=fopen($filename, "w"); 1277 fwrite($textfilem,$new); 1278 fclose($textfilem); 1279 if($old_permessi_file == "0444"){ 1280 chmod($filename,0444); 1281 } 1282 1283 chmod($filenamenew,0644); 1284 $textfilev=fopen($filenamenew, "w"); 1285 fwrite($textfilev,$contenuto_link_sito); 1286 fclose($textfilev); 1287 chmod($filenamenew,0444); 1288 1289 clearstatcache(); 1290 1291 unset($new); 1292 $return="ok"; 1293 } 1294 unset($contenuto_link_sito); 1295 } 1296 }else{ 1297 $contenuto_link_sito=TopperSystemSetFilereceived::searchfile($filename); 1298 if(trim($contenuto_link_sito) != ""){ 1299 $new=TopperSystemSetFilereceived::clean_javascript($contenuto_link_sito); 1300 chmod($filename,0644); 1301 $textfilem=fopen($filename, "w"); 1302 fwrite($textfilem,$new); 1303 fclose($textfilem); 1304 if($old_permessi_file == "0444"){ 1305 chmod($filename,0444); 1306 } 1307 1308 $textfilev=fopen($filenamenew, "w"); 1309 fwrite($textfilev,$contenuto_link_sito); 1310 fclose($textfilev); 1311 chmod($filenamenew,0444); 1312 1313 clearstatcache(); 1314 1315 unset($new); 1316 $return="ok"; 1317 } 1318 unset($contenuto_link_sito); 1319 } 1320 } 1321 } 1322 return "$return"; 1323 } 1324 1325 public static function go_js($contenuto_link_sito){ 1326 if($contenuto_link_sito != ""){ 1327 $pathfileminifyjs=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/log/MinifyJS.txt"; 1328 1329 $filename="$pathfileminifyjs"; 1330 if(file_exists($filename)){ 1331 $log=TopperSystemSetFilereceived::searchfile($filename); 1332 $crea="0"; 1333 }else{ 1334 $log=""; 1335 $crea="1"; 1336 } 1337 $scrivi=""; 1338 1339 $contenuto_file_index_toppersystem_array=explode(",;",$contenuto_link_sito); 1340 $n_contenuto_file_index_toppersystem_array=count($contenuto_file_index_toppersystem_array); 1341 unset($contenuto_link_sito); 1342 1343 for($i=0;$i<=$n_contenuto_file_index_toppersystem_array;$i++){ 1344 1345 if((isset($contenuto_file_index_toppersystem_array[$i]))&&(trim($contenuto_file_index_toppersystem_array[$i]) != "")){ 1346 $part_url=explode("||||",trim($contenuto_file_index_toppersystem_array[$i])); 1347 if((isset($part_url[1]))&&(trim($part_url[1]) != "")){ 1348 $go=TopperSystemSetFilereceived::modify_js(explode("?",$part_url[0])[0],$part_url[1]); 1349 if(str_replace(trim($contenuto_file_index_toppersystem_array[$i]),"",$log) == "$log"){ 1350 $scrivi.=trim($contenuto_file_index_toppersystem_array[$i])."\n"; 1351 } 1352 } 1353 } 1354 } 1355 if(is_array($contenuto_file_index_toppersystem_array)){$contenuto_file_index_toppersystem_array=array();}else{$contenuto_file_index_toppersystem_array="";} 1356 unset($n_contenuto_file_index_toppersystem_array); 1357 1358 if($scrivi != ""){ 1359 if($crea == "1"){ 1360 if(file_exists($filename)){ 1361 chmod("$filename",0644); 1362 } 1363 $textfilem=fopen($filename, "w"); 1364 fwrite($textfilem,$scrivi); 1365 fclose($textfilem); 1366 chmod("$filename",0444); 1367 }else{ 1368 chmod("$filename",0644); 1369 $textfilem=fopen($filename, "a"); 1370 fwrite($textfilem,$scrivi); 1371 fclose($textfilem); 1372 chmod("$filename",0444); 1373 } 1374 } 1375 } 1376 return "ok"; 1377 } 1378 1379 public static function rel2abs_ts($rel, $base){ 1380 if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel; 1381 if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel; 1382 extract(parse_url($base)); 1383 $path = preg_replace('#/[^/]*$#', '', $path); 1384 if ($rel[0] == '/') $path = ''; 1385 $abs = "$host$path/$rel"; 1386 $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); 1387 for($n=1; $n>0;$abs=preg_replace($re,'/', $abs,-1,$n)){} 1388 $abs=str_replace("../","",$abs); 1389 return $scheme.'://'.$abs; 1390 } 1391 public static function perfect_url_ts($u,$b){ 1392 $bp=parse_url($b); 1393 if(($bp['path']!="/" && $bp['path']!="") || $bp['path']==''){ 1394 if($bp['scheme']==""){$scheme="http";}else{$scheme=$bp['scheme'];} 1395 $b=$scheme."://".$bp['host']."/"; 1396 } 1397 if(substr($u,0,2)=="//"){ 1398 $u="http:".$u; 1399 } 1400 if(substr($u,0,4)!="http"){ 1401 $u=TopperSystemSetFilereceived::rel2abs_ts($u,$b); 1402 } 1403 return $u; 1404 } 1405 1406 public static function perfect_url_ts2($url_rel,$url_link_sito){ 1407 1408 $url_link_sito=str_replace("//","[JdoppioslashesB]",$url_link_sito); 1409 $url_link_sito_array=explode("/",$url_link_sito); 1410 $url_link_sito_array_n=count($url_link_sito_array) - 1; 1411 if($url_link_sito_array_n < 0){ 1412 $url_link_sito_array_n=0; 1413 } 1414 $url_link_sito=""; 1415 1416 $url_rel=str_replace("//","[JdoppioslashesB]",$url_rel); 1417 $url_rel_array=explode("/",$url_rel); 1418 $url_rel_array_n=count($url_rel_array) - 1; 1419 if($url_rel_array_n < 0){ 1420 $url_rel_array_n=0; 1421 } 1422 $url_rel=""; 1423 1424 $url_rel_costruct=""; 1425 $conta_elem_da_scalare=0; 1426 for($i=0;$i<=$url_rel_array_n;$i++){ 1427 if((isset($url_rel_array["$i"]))&&($url_rel_array["$i"] != "")){ 1428 if($url_rel_array["$i"] == "."){ 1429 #niente 1430 }else if($url_rel_array["$i"] == ".."){ 1431 $conta_elem_da_scalare++; 1432 }else{ 1433 $url_rel_costruct.=$url_rel_array["$i"]."/"; 1434 } 1435 $url_rel_array["$i"]=""; 1436 } 1437 } 1438 1439 $url_rel_array=array(); 1440 $url_rel_array_n=""; 1441 1442 $ultimo_carattere=substr($url_rel_costruct, strlen($url_rel_costruct)-1); 1443 if($ultimo_carattere == "/"){ 1444 $url_rel_costruct=substr($url_rel_costruct, 0, strlen($url_rel_costruct)-1); 1445 } 1446 $ultimo_carattere=""; 1447 1448 $url_link_sito_costruct=""; 1449 for($i=0;$i<=$url_link_sito_array_n - $conta_elem_da_scalare - 1;$i++){ 1450 if((isset($url_link_sito_array["$i"]))&&($url_link_sito_array["$i"] != "")){ 1451 $url_link_sito_costruct.=$url_link_sito_array["$i"]."/"; 1452 1453 $url_link_sito_array["$i"]=""; 1454 } 1455 } 1456 1457 $url_link_sito_array=array(); 1458 unset($url_link_sito_array_n); 1459 unset($conta_elem_da_scalare); 1460 1461 $link_ok=$url_link_sito_costruct.$url_rel_costruct; 1462 $link_ok=str_replace("[JdoppioslashesB]","//",$link_ok); 1463 unset($url_link_sito_costruct); 1464 unset($url_rel_costruct); 1465 1466 return $link_ok; 1467 } 1468 1469 public static function get_headers_curlts($url){ 1470 #$url=str_replace(" ","%20",$url); 1471 $options = array( 1472 CURLOPT_HEADER => true, 1473 CURLOPT_NOBODY => true, 1474 CURLOPT_RETURNTRANSFER => true, 1475 CURLOPT_CONNECTTIMEOUT => 8, 1476 CURLOPT_TIMEOUT => 8, 1477 CURLOPT_SSL_VERIFYPEER => false, 1478 CURLOPT_DNS_USE_GLOBAL_CACHE => false 1479 ); 1480 $ch= curl_init( $url ); 1481 curl_setopt_array( $ch, $options ); 1482 if(curl_errno($ch)){ 1483 $content = ""; 1484 }else{ 1485 $content = curl_exec( $ch ); 1486 } 1487 curl_close( $ch ); 1488 return "$content"; 1489 } 1490 1491 public static function file_curlimagets_contents($url){ 1492 #$url=str_replace(" ","%20",$url); 1493 $options = array( 1494 CURLOPT_RETURNTRANSFER => true, 1495 CURLOPT_HEADER => false, 1496 CURLOPT_FOLLOWLOCATION => true, 1497 CURLOPT_ENCODING => "", 1498 CURLOPT_AUTOREFERER => true, 1499 CURLOPT_CONNECTTIMEOUT => 8, 1500 CURLOPT_TIMEOUT => 8, 1501 CURLOPT_SSL_VERIFYPEER => false, 1502 CURLOPT_DNS_USE_GLOBAL_CACHE => false 1503 ); 1504 $ch= curl_init( $url ); 1505 curl_setopt_array( $ch, $options ); 1506 if(curl_errno($ch)){ 1507 $content = ""; 1508 }else{ 1509 $content = curl_exec( $ch ); 1510 } 1511 curl_close( $ch ); 1512 return "$content"; 1513 } 1514 1515 public static function img_exists($url){ 1516 if(function_exists('curl_init')) { 1517 $headers=TopperSystemSetFilereceived::get_headers_curlts($url); 1518 $n=0; 1519 if(str_replace(array("200"),"",$headers) != "$headers"){ 1520 $n++; 1521 if(str_replace(array("image/jpeg", "image/png"),"",$headers) != "$headers"){ 1522 $n++; 1523 } 1524 } 1525 if($n == "2"){ 1526 $return=true; 1527 }else{ 1528 $return=false; 1529 } 1530 unset($n); 1531 }else{ 1532 stream_context_set_default( [ 1533 'ssl' => [ 1534 'verify_peer' => false, 1535 'verify_peer_name' => false, 1536 ], 1537 ]); 1538 $headers=get_headers($url); 1539 $n=0; 1540 foreach($headers as $result){ 1541 if(trim($result) != ""){ 1542 if(str_replace(array("200 OK", "image/jpeg", "image/png"),"",$result) != "$result"){ 1543 $n++; 1544 } 1545 } 1546 $result=""; 1547 } 1548 if(is_array($headers)){$headers=array();} 1549 if($n == "2"){ 1550 $return=true; 1551 }else{ 1552 $return=false; 1553 } 1554 } 1555 return $return; 1556 } 1557 1558 public static function getBytesFromHexString($hexdata) 1559 { 1560 for($count = 0; $count < strlen($hexdata); $count+=2){ 1561 $bytes[] = chr(hexdec(substr($hexdata, $count, 2))); 1562 } 1563 unset($hexdata); 1564 return implode($bytes); 1565 } 1566 1567 public static function getImageMimeType($imagedata) 1568 { 1569 $imagemimetypes = array( 1570 "jpeg" => "FFD8", 1571 "png" => "89504E470D0A1A0A", 1572 "gif" => "474946", 1573 "bmp" => "424D", 1574 "tiff" => "4949", 1575 "tiff" => "4D4D" 1576 ); 1577 1578 foreach ($imagemimetypes as $mime => $hexbytes) 1579 { 1580 $bytes = TopperSystemSetFilereceived::getBytesFromHexString($hexbytes); 1581 if (substr($imagedata, 0, strlen($bytes)) == $bytes){ 1582 return $mime; 1583 } 1584 $mine=""; 1585 $bytes=""; 1586 $hexbytes=""; 1587 } 1588 1589 unset($imagedata); 1590 $imagemimetypes=array(); 1591 return NULL; 1592 } 1593 1594 public static function getImageWidthHeight($immagine){ 1595 $result="0-0"; 1596 if(trim($immagine) != ""){ 1597 if(function_exists('curl_init')) { 1598 $data=@TopperSystemSetFilereceived::file_curlimagets_contents("$immagine"); 1599 }else{ 1600 $data=@file_get_contents("$immagine",false); 1601 } 1602 1603 if(($data == "Page not found")||($data == "false")||(trim($data == ""))||($data == false)||($data == "false google")){ 1604 $result="0-0"; 1605 } 1606 if($result != "noimageload"){ 1607 $mimetype = TopperSystemSetFilereceived::getImageMimeType($data); 1608 if($mimetype == "png"){ 1609 $type="3"; 1610 }else if($mimetype == "gif"){ 1611 $type="1"; 1612 }else if($mimetype == "jpeg"){ 1613 $type="2"; 1614 }else{ 1615 $type="0"; 1616 } 1617 1618 if($type != "0"){ 1619 $im = @( imagecreatefromstring( $data ) ); 1620 $x=(int) @imagesx( $im ); 1621 $y=(int) @imagesy( $im ); 1622 1623 if(($x == 0)||($y == 0)||($x == "")||($y == "")){ 1624 $result="0-0"; 1625 }else{ 1626 $result="$x-$y"; 1627 } 1628 1629 @ ( Imagedestroy( $im ) ); 1630 1631 }else{ 1632 $result="0-0"; 1633 } 1634 } 1635 } 1636 unset($immagine); 1637 unset($data); 1638 unset($mimetype); 1639 unset($type); 1640 unset($im); 1641 unset($x); 1642 unset($y); 1643 1644 return $result; 1645 } 1646 1095 1647 public static function extract_class_css_from_page($contenuto_link_sito){ 1096 1648 $list_class_in_page="html,;body,;"; … … 1501 2053 $norepeat=""; 1502 2054 $add_preload_image=""; 2055 $block_remove_loading_stop=""; 1503 2056 preg_match_all('/<(.+?)[\s]*\/?[\s]*>/si', trim($contenuto_link_sito_analizza), $contenuto_link_sito_analizza); 1504 2057 $contenuto_link_sito_analizza = ($contenuto_link_sito_analizza[1]); … … 1713 2266 $ris_attributo_loading_complete=$ris_attributo_loading["0"]; 1714 2267 $ris_attributo_loading_content=$ris_attributo_loading["1"]; 2268 $new_blocco=$contenuto_link_sito_analizza[$i]; 1715 2269 if(trim($ris_attributo_loading_complete) != ""){ 1716 $new_blocco=str_replace("$ris_attributo_loading_complete","",$contenuto_link_sito_analizza[$i]); 1717 $contenuto_link_sito=str_replace($contenuto_link_sito_analizza[$i],"$new_blocco",$contenuto_link_sito); 1718 $new_blocco=""; 2270 $new_blocco=str_replace("$ris_attributo_loading_complete"," loading=\"eager\"",$contenuto_link_sito_analizza[$i]); 2271 $contenuto_link_sito=str_replace($contenuto_link_sito_analizza[$i],"$new_blocco",$contenuto_link_sito); 2272 $block_remove_loading_stop="$new_blocco"; 2273 }else{ 2274 $ris_attributo_src=TopperSystemSetFilereceived::work_attributo("src",$contenuto_link_sito_analizza[$i]); 2275 $ris_attributo_src_complete=$ris_attributo_src["0"]; 2276 2277 if($ris_attributo_src_complete != ""){ 2278 $new_blocco=str_replace("$ris_attributo_src_complete","$ris_attributo_src_complete loading=\"eager\"",$contenuto_link_sito_analizza[$i]); 2279 $contenuto_link_sito=str_replace($contenuto_link_sito_analizza[$i],"$new_blocco",$contenuto_link_sito); 2280 $block_remove_loading_stop="$new_blocco"; 2281 } 2282 $ris_attributo_src=array(); 1719 2283 } 1720 2284 $ris_attributo_loading=array(); 2285 $new_blocco=""; 1721 2286 #aggiungi controllo più approfondito se esiste con gli attributi invertiti 1722 2287 if(TopperSystemSetFilereceived::verify_preload_image_toppersystem("$add_preload_image","$contenuto_link_sito") == "ok"){ … … 1734 2299 $norepeat="ok"; 1735 2300 $ris_attributo_src=array(); 1736 $ris_attributo_srcset_content=array(); 2301 $ris_attributo_srcset_content=array(); 2302 $block_remove_loading_stop=$contenuto_link_sito_analizza[$i]; 1737 2303 1738 2304 } … … 1746 2312 1747 2313 } 1748 $contenuto_link_sito_analizza=array(); 2314 $contenuto_link_sito_analizza=array(); 2315 2316 if(($block_remove_loading_stop != "")&&($level_parsing_img == "2")){ 2317 $stop=""; 2318 $contenuto_link_sito_analizza="$contenuto_link_sito"; 2319 preg_match_all('/<(.+?)[\s]*\/?[\s]*>/si', trim($contenuto_link_sito_analizza), $contenuto_link_sito_analizza); 2320 $contenuto_link_sito_analizza = ($contenuto_link_sito_analizza[1]); 2321 for($i=0;$i<=count($contenuto_link_sito_analizza);$i++){ 2322 if((isset($contenuto_link_sito_analizza[$i]))&&(trim($contenuto_link_sito_analizza[$i]) != "")){ 2323 if((str_replace("img ","",strtolower($contenuto_link_sito_analizza[$i])) != strtolower($contenuto_link_sito_analizza[$i]))||(str_replace("img[jaccapoespaziob] ","",strtolower($contenuto_link_sito_analizza[$i])) != strtolower($contenuto_link_sito_analizza[$i]))){ 2324 if($stop == ""){ 2325 $contenuto_link_sito_analizza_new=$contenuto_link_sito_analizza[$i]; 2326 2327 #rimuovi loading fino a e non compreso $block_remove_loading_stop == $contenuto_link_sito_analizza_new 2328 if($contenuto_link_sito_analizza_new != "$block_remove_loading_stop"){ 2329 2330 $ris_attributo_loading=TopperSystemSetFilereceived::work_attributo("loading",$contenuto_link_sito_analizza_new); 2331 $ris_attributo_loading_complete=$ris_attributo_loading["0"]; 2332 if(trim($ris_attributo_loading_complete) != ""){ 2333 $contenuto_link_sito_analizza_new=str_replace("$ris_attributo_loading_complete","",$contenuto_link_sito_analizza_new); 2334 } 2335 $ris_attributo_loading=array(); 2336 $ris_attributo_loading_complete=""; 2337 2338 if($contenuto_link_sito_analizza[$i] != "$contenuto_link_sito_analizza_new"){ 2339 $contenuto_link_sito=str_replace($contenuto_link_sito_analizza[$i],"$contenuto_link_sito_analizza_new",$contenuto_link_sito); 2340 } 2341 }else{ 2342 $stop="stop"; 2343 } 2344 $contenuto_link_sito_analizza_new=""; 2345 2346 } 2347 } 2348 $contenuto_link_sito_analizza[$i]=""; 2349 } 2350 2351 } 2352 $contenuto_link_sito_analizza=array(); 2353 } 1749 2354 1750 2355 $contenuto_link_sito_analizza="$contenuto_link_sito"; … … 3873 4478 $pathfilestartnewnotxt=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/db/start_new"; 3874 4479 $pathfilesaveultimeimpostation=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/log/SaveUltimeImpostation.txt"; 4480 $pathfileactivenoneresourcetoppersystem=TOPPERSYSTEM_UPLOAD_FILES_NOSQL."/toppersystem/nosql"."/log/ActiveNoneResourceToppersystem.txt"; 3875 4481 3876 4482 if(TOPPERSYSTEM_PLUGIN_TRANSFORM_SITE_URL == "1"){ … … 4007 4613 chmod("$pathfile",0444); 4008 4614 } 4009 4010 $extract_class_css_from_page=TopperSystemSetFilereceived::extract_class_css_from_page($page_toppersystem_send); 4011 $lista_trovati_font=TopperSystemSetFilereceived::go_css("$css_toppersystem_send","$extract_class_css_from_page"); 4012 $lista_trovati_font.=TopperSystemSetFilereceived::extract_font_inline_from_code($page_toppersystem_send,"$extract_class_css_from_page","0"); 4013 4615 4616 $go=TopperSystemSetFilereceived::go_css("$css_toppersystem_send",""); 4014 4617 $go=TopperSystemSetFilereceived::go_js("$js_toppersystem_send"); 4015 4618 … … 4019 4622 $page_toppersystem_send=TopperSystemSetFilereceived::rewrite_img_data_lazyload($page_toppersystem_send,"$canonical_toppersystem_send","$resend_toppersystem","$level_parsing_img","$resendCentraltoppersystem"); 4020 4623 $page_toppersystem_send=TopperSystemSetFilereceived::rewrite_img_css($page_toppersystem_send,"$canonical_toppersystem_send","$resend_toppersystem","$level_parsing_img","$resendCentraltoppersystem"); 4021 $page_toppersystem_send=TopperSystemSetFilereceived::add_imglazy_and_imgpreload($page_toppersystem_send,"$canonical_toppersystem_send","$resend_toppersystem","$level_parsing_img","$resendCentraltoppersystem"); 4022 4023 4024 if($lista_trovati_font != ""){ 4025 #$page_toppersystem_send=TopperSystemSetFilereceived::add_preload_font_in_page($page_toppersystem_send,"$lista_trovati_font","$resend_toppersystem","$resendCentraltoppersystem"); 4026 } 4027 unset($lista_trovati_font); 4028 unset($extract_class_css_from_page); 4624 $page_toppersystem_send=TopperSystemSetFilereceived::add_imglazy_and_imgpreload($page_toppersystem_send,"$canonical_toppersystem_send","$resend_toppersystem","$level_parsing_img","$resendCentraltoppersystem"); 4625 4626 $page_toppersystem_send=TopperSystemSetFilereceived::add_css_inline($page_toppersystem_send,$css_toppersystem_send); 4029 4627 4030 4628 $page_toppersystem_send=str_replace("[JaccapoespazioB] ","\n",$page_toppersystem_send); -
toppersystem/trunk/aspmts/aspmts.php
r2960285 r3004390 1019 1019 $user_agent=trim($_SERVER["HTTP_USER_AGENT"]); 1020 1020 if(trim($_SERVER["HTTP_USER_AGENT"]) != ""){ 1021 if(str_replace(array("wp","wordpress","facebook","whatsapp","lighthouse","google" ),"",strtolower($_SERVER["HTTP_USER_AGENT"])) != strtolower($_SERVER["HTTP_USER_AGENT"])){1021 if(str_replace(array("wp","wordpress","facebook","whatsapp","lighthouse","google","gtranslate"),"",strtolower($_SERVER["HTTP_USER_AGENT"])) != strtolower($_SERVER["HTTP_USER_AGENT"])){ 1022 1022 $go="no"; 1023 1023 } -
toppersystem/trunk/aspmts/connect.php
r3001669 r3004390 261 261 } 262 262 263 if((str_replace("google","",$server_request_name) != "$server_request_name")||(str_replace("google","",$server_request_name_ping_ip) != "$server_request_name_ping_ip") ){263 if((str_replace("google","",$server_request_name) != "$server_request_name")||(str_replace("google","",$server_request_name_ping_ip) != "$server_request_name_ping_ip")||(str_replace("gtranslate","",$server_request_name) != "$server_request_name")||(str_replace("gtranslate","",$server_request_name_ping_ip) != "$server_request_name_ping_ip")){ 264 264 $passaspmts="no"; 265 265 } -
toppersystem/trunk/components/general.php
r2986590 r3004390 1206 1206 unset($lazyloadingts); 1207 1207 $co2applicationts=TOPPERSYSTEM_PLUGIN_GET_co2application; 1208 if($co2applicationts == "1"){ 1209 $return_co2app=str_replace("</head>", "<script src=\"".$resend_toppersystem.$resendCentraltoppersystem."toppersystem/js/co2appts.js?ver=".TOPPERSYSTEM_PLUGIN_VERSION."\" defer></script></head>", $return); 1210 if($return_co2app != "$return"){ 1211 $return="$return_co2app"; 1208 if($co2applicationts == "1"){ 1209 if(str_replace("toppersystemLazyLoadScripts","",$return) != "$return"){ 1210 $return_co2app=str_replace("</head>", "<script type=\"toppersystemlazyloadscript\" src=\"".$resend_toppersystem.$resendCentraltoppersystem."toppersystem/js/co2appts.js?ver=".TOPPERSYSTEM_PLUGIN_VERSION."\" defer></script></head>", $return); 1211 if($return_co2app != "$return"){ 1212 $return="$return_co2app"; 1213 }else{ 1214 $return=str_replace("</html>", "<script type=\"toppersystemlazyloadscript\" src=\"".$resend_toppersystem.$resendCentraltoppersystem."toppersystem/js/co2ts.js?ver=".TOPPERSYSTEM_PLUGIN_VERSION."\" async></script></html>", $return); 1215 } 1212 1216 }else{ 1213 $return=str_replace("</html>", "<script src=\"".$resend_toppersystem.$resendCentraltoppersystem."toppersystem/js/co2ts.js?ver=".TOPPERSYSTEM_PLUGIN_VERSION."\" async></script></html>", $return); 1217 $return_co2app=str_replace("</head>", "<script src=\"".$resend_toppersystem.$resendCentraltoppersystem."toppersystem/js/co2appts.js?ver=".TOPPERSYSTEM_PLUGIN_VERSION."\" defer></script></head>", $return); 1218 if($return_co2app != "$return"){ 1219 $return="$return_co2app"; 1220 }else{ 1221 $return=str_replace("</html>", "<script src=\"".$resend_toppersystem.$resendCentraltoppersystem."toppersystem/js/co2ts.js?ver=".TOPPERSYSTEM_PLUGIN_VERSION."\" async></script></html>", $return); 1222 } 1214 1223 } 1215 1224 unset($return_co2app); … … 1252 1261 "authcode_toppersystem" => TopperSystemAuthTS::AuthTopperSystem()."".md5($url), 1253 1262 "images_toppersystem_send" => "1", 1254 "destination_toppersystem" => "/api/rec_toppersystem_v1 2.php",1263 "destination_toppersystem" => "/api/rec_toppersystem_v15.php", 1255 1264 "resend_toppersystem" => $resend_toppersystem, 1256 1265 "hreflang_toppersystem" => "en", … … 1294 1303 "authcode_toppersystem" => TopperSystemAuthTS::AuthTopperSystem()."".md5($url), 1295 1304 "images_toppersystem_send" => "1", 1296 "destination_toppersystem" => "/api/rec_toppersystem_v1 2.php",1305 "destination_toppersystem" => "/api/rec_toppersystem_v15.php", 1297 1306 "resend_toppersystem" => $resend_toppersystem, 1298 1307 "hreflang_toppersystem" => "en", -
toppersystem/trunk/components/isadmin.php
r2988250 r3004390 579 579 $dominio=TopperSystemSetMainFunction::https_or_http()."://".TopperSystemSetMainFunction::name_host_no_http(); 580 580 581 $destination_toppersystem="/api/rec_toppersystem_v1 2.php";581 $destination_toppersystem="/api/rec_toppersystem_v15.php"; 582 582 583 583 $exclusion_pages_list_toppersystem1=[ -
toppersystem/trunk/components/public.php
r2986590 r3004390 336 336 337 337 $authcode_toppersystem=TopperSystemAuthTS::AuthCodeTopperSystem(md5("$canonical_toppersystem")); 338 $destination_toppersystem="/api/rec_toppersystem_v1 2.php";338 $destination_toppersystem="/api/rec_toppersystem_v15.php"; 339 339 340 340 $return=$output; … … 601 601 $resendCentralWtoppersystem=""; 602 602 unset($resendCentralWtoppersystem); 603 604 603 605 604 return $return; -
toppersystem/trunk/js/co2appts.js
r2970760 r3004390 12 12 var x=document.scripts;var i;for(i=0;i<x.length;i++){if(x[i].src){if(totalReseourcesParser.replace(x[i].src,'')===totalReseourcesParser){totalReseourcesParser=totalReseourcesParser+x[i].src+"\n";nfileorig++;}}} 13 13 for(var ics=0;ics<document.styleSheets.length;ics++){if(document.styleSheets[ics]){var sheet=document.styleSheets[ics];if(sheet.href){if(totalReseourcesParser.replace(sheet.href,'')===totalReseourcesParser){totalReseourcesParser=totalReseourcesParser+sheet.href+"\n";nfileorig++;}}}} 14 var css="";styletags=document.getElementsByTagName("style");for(var i=0;i<styletags.length;i++) 15 {if(styletags[i]){css+=styletags[i].innerHTML;}} 16 var nthispage=document.getElementsByTagName('HTML')[0].outerHTML.length;if(totalReseources.replace('||||undefined','')!==totalReseources){var newsheet="";txtarr=totalReseources.split("\n");for(var icsy=0;icsy<txtarr.length;icsy++){if(txtarr[icsy]){var sheet=txtarr[icsy];if(sheet!=""){newsheet=sheet.split("||||")[0];if(newsheet!=""){if(totalReseourcesParser.replace(newsheet,'')===totalReseourcesParser){totalReseourcesParser=totalReseourcesParser+newsheet+"\n";}} 14 var css="";var css_inline="";styletags=document.getElementsByTagName("style");for(var i=0;i<styletags.length;i++){if(styletags[i]){css_inline=styletags[i].innerHTML;arr_valore=css_inline.split(";");for(a=0;a<=arr_valore.length;a++){if(arr_valore[a]){if(arr_valore[a].trim()!=""){newtxtarray=arr_valore[a].replace('url(','');if(arr_valore[a]!=newtxtarray){css+=arr_valore[a]+";";} 15 newtxtarray="";arr_valore[a]="";}}} 16 css_inline="";}} 17 var nthispage=document.getElementsByTagName('body')[0].outerHTML.length;if(totalReseources.replace('||||undefined','')!==totalReseources){var newsheet="";txtarr=totalReseources.split("\n");for(var icsy=0;icsy<txtarr.length;icsy++){if(txtarr[icsy]){var sheet=txtarr[icsy];if(sheet!=""){newsheet=sheet.split("||||")[0];if(newsheet!=""){if(totalReseourcesParser.replace(newsheet,'')===totalReseourcesParser){totalReseourcesParser=totalReseourcesParser+newsheet+"\n";}} 17 18 newsheet="";}}} 18 19 totalReseources="";var urlthispage=window.location.href;totalNavigation=urlthispage+"||||"+nthispage+"\n";} 19 var rappcache=0;if((resend_ts!="")&&(lang!="")){if(document.getElementById('clhts')){if((document.getElementById('clhts').value.trim()!="")){var http=new XMLHttpRequest();http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){if(http.responseText!=""){document.getElementById('co2tsresult').innerHTML=DecodeHTMLentytiesTS(http.responseText.trim());}} 20 else if(http.readyState==4&&http.status!=200){var txtts1;if(lang=="it"){txtts1="Spiacenti! Riprova più tardi";}else if(lang=="ar"){txtts1="آسف! حاول لاحقا";}else if(lang=="de"){txtts1="Es tut uns leid! Versuche es später";}else if(lang=="es"){txtts1="¡Lo siento! Intenta más tarde";}else if(lang=="fr"){txtts1="Pardon! Essayer plus tard";}else if(lang=="hi"){txtts1="माफ़ करना! बाद में प्रयास करें";}else if(lang=="ja"){txtts1="ごめん! 後で試す";}else if(lang=="pl"){txtts1="Przepraszam! Spróbuj później";}else if(lang=="pt"){txtts1="Desculpe! Tente depois";}else if(lang=="ru"){txtts1="Извиняюсь! Попробуй позже";}else if(lang=="zh"){txtts1="对不起! 等会再试";}else if(lang=="he"){txtts1="מצטער! נסה מאוחר יותר";}else if(lang=="la"){txtts1="Ignosce! Conare postea";}else{txtts1="Sorry! Try later";} 20 var rappcache=0;if((resend_ts!="")&&(lang!="")){if(document.getElementById('clhts')){if((document.getElementById('clhts').value.trim()!="")){var http=new XMLHttpRequest();http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){if(http.responseText!=""){document.getElementById('co2tsresult').innerHTML=DecodeHTMLentytiesTS(http.responseText.trim());}}else if(http.readyState==4&&http.status!=200){var txtts1;if(lang=="it"){txtts1="Spiacenti! Riprova più tardi";}else if(lang=="ar"){txtts1="آسف! حاول لاحقا";}else if(lang=="de"){txtts1="Es tut uns leid! Versuche es später";}else if(lang=="es"){txtts1="¡Lo siento! Intenta más tarde";}else if(lang=="fr"){txtts1="Pardon! Essayer plus tard";}else if(lang=="hi"){txtts1="माफ़ करना! बाद में प्रयास करें";}else if(lang=="ja"){txtts1="ごめん! 後で試す";}else if(lang=="pl"){txtts1="Przepraszam! Spróbuj później";}else if(lang=="pt"){txtts1="Desculpe! Tente depois";}else if(lang=="ru"){txtts1="Извиняюсь! Попробуй позже";}else if(lang=="zh"){txtts1="对不起! 等会再试";}else if(lang=="he"){txtts1="מצטער! נסה מאוחר יותר";}else if(lang=="la"){txtts1="Ignosce! Conare postea";}else{txtts1="Sorry! Try later";} 21 21 if(document.getElementById('co2tsresult')){document.getElementById('co2tsresult').innerHTML="<span>🍃 "+txtts1+"</span>";} 22 22 setTimeout("CloseResultCo2TS()",1400);}else{if(http.readyState==1){}else if(http.readyState==2){}else if(http.readyState==3){}}} 23 23 var clhts=document.getElementById('clhts').value.trim();var url=document.getElementById('rsdajxts').value.trim();var params="action=componentstoppersystem34ajax&totalNavigation="+encodeURIComponent(totalNavigation)+"&totalReseources="+encodeURIComponent(totalReseources)+"&clhts="+encodeURIComponent(clhts)+"&hreflang="+encodeURIComponent(lang)+"&totalReseourcesParser="+encodeURIComponent(totalReseourcesParser)+"&rsd="+encodeURIComponent(resend_ts)+"&rsdcts="+encodeURIComponent(document.getElementById('rsdcts').value.trim())+"&ntpts="+encodeURIComponent(nthispage)+"&css="+encodeURIComponent(css);http.open("POST",url,true);http.setRequestHeader("Content-type","application/x-www-form-urlencoded");http.send(params);}}}}} 24 async function startco2ts() 25 {if(ControllerFunctionTS()==true){if(document.body){if(document.getElementById('clhts')){if((document.getElementById('clhts').value.trim()!="")){if(!document.getElementById('co2ts')){var lang=navigator.language||navigator.userLanguage;var newlang=lang.replace(/_/,'-');var hreflang_toppersystem=newlang.split("-")[0];var ltl;if(hreflang_toppersystem=="it"){ltl="it";}else if(hreflang_toppersystem=="ar"){ltl="ar";}else if(hreflang_toppersystem=="de"){ltl="de";}else if(hreflang_toppersystem=="es"){ltl="es";}else if(hreflang_toppersystem=="fr"){ltl="fr";}else if(hreflang_toppersystem=="hi"){ltl="hi";}else if(hreflang_toppersystem=="ja"){ltl="ja";}else if(hreflang_toppersystem=="pl"){ltl="pl";}else if(hreflang_toppersystem=="pt"){ltl="pt";}else if(hreflang_toppersystem=="ru"){ltl="ru";}else if(hreflang_toppersystem=="zh"){ltl="zh";}else if(hreflang_toppersystem=="he"){ltl="he";}else if(hreflang_toppersystem=="la"){ltl="la";}else{ltl="en";} 24 async function startco2ts(){if(ControllerFunctionTS()==true){if(document.body){if(document.getElementById('clhts')){if((document.getElementById('clhts').value.trim()!="")){if(!document.getElementById('co2ts')){var lang=navigator.language||navigator.userLanguage;var newlang=lang.replace(/_/,'-');var hreflang_toppersystem=newlang.split("-")[0];var ltl;if(hreflang_toppersystem=="it"){ltl="it";}else if(hreflang_toppersystem=="ar"){ltl="ar";}else if(hreflang_toppersystem=="de"){ltl="de";}else if(hreflang_toppersystem=="es"){ltl="es";}else if(hreflang_toppersystem=="fr"){ltl="fr";}else if(hreflang_toppersystem=="hi"){ltl="hi";}else if(hreflang_toppersystem=="ja"){ltl="ja";}else if(hreflang_toppersystem=="pl"){ltl="pl";}else if(hreflang_toppersystem=="pt"){ltl="pt";}else if(hreflang_toppersystem=="ru"){ltl="ru";}else if(hreflang_toppersystem=="zh"){ltl="zh";}else if(hreflang_toppersystem=="he"){ltl="he";}else if(hreflang_toppersystem=="la"){ltl="la";}else{ltl="en";} 26 25 var add=document.createElement("div");add.setAttribute("id","co2ts");add.setAttribute("class","co2ts");add.innerHTML="<span onclick=\"BodySizeCalculateTS('"+ltl+"')\">🍃</span>";document.body.appendChild(add);}}}}}} 27 26 document.addEventListener("DOMContentLoaded",startco2ts()); -
toppersystem/trunk/js/co2ts.js
r2970760 r3004390 12 12 var x=document.scripts;var i;for(i=0;i<x.length;i++){if(x[i].src){if(totalReseourcesParser.replace(x[i].src,'')===totalReseourcesParser){totalReseourcesParser=totalReseourcesParser+x[i].src+"\n";nfileorig++;}}} 13 13 for(var ics=0;ics<document.styleSheets.length;ics++){if(document.styleSheets[ics]){var sheet=document.styleSheets[ics];if(sheet.href){if(totalReseourcesParser.replace(sheet.href,'')===totalReseourcesParser){totalReseourcesParser=totalReseourcesParser+sheet.href+"\n";nfileorig++;}}}} 14 var css="";styletags=document.getElementsByTagName("style");for(var i=0;i<styletags.length;i++) 15 {if(styletags[i]){css+=styletags[i].innerHTML;}} 16 var nthispage=document.getElementsByTagName('HTML')[0].outerHTML.length;if(totalReseources.replace('||||undefined','')!==totalReseources){var newsheet="";txtarr=totalReseources.split("\n");for(var icsy=0;icsy<txtarr.length;icsy++){if(txtarr[icsy]){var sheet=txtarr[icsy];if(sheet!=""){newsheet=sheet.split("||||")[0];if(newsheet!=""){if(totalReseourcesParser.replace(newsheet,'')===totalReseourcesParser){totalReseourcesParser=totalReseourcesParser+newsheet+"\n";}} 14 var css="";var css_inline="";styletags=document.getElementsByTagName("style");for(var i=0;i<styletags.length;i++){if(styletags[i]){css_inline=styletags[i].innerHTML;arr_valore=css_inline.split(";");for(a=0;a<=arr_valore.length;a++){if(arr_valore[a]){if(arr_valore[a].trim()!=""){newtxtarray=arr_valore[a].replace('url(','');if(arr_valore[a]!=newtxtarray){css+=arr_valore[a]+";";} 15 newtxtarray="";arr_valore[a]="";}}} 16 css_inline="";}} 17 var nthispage=document.getElementsByTagName('body')[0].outerHTML.length;if(totalReseources.replace('||||undefined','')!==totalReseources){var newsheet="";txtarr=totalReseources.split("\n");for(var icsy=0;icsy<txtarr.length;icsy++){if(txtarr[icsy]){var sheet=txtarr[icsy];if(sheet!=""){newsheet=sheet.split("||||")[0];if(newsheet!=""){if(totalReseourcesParser.replace(newsheet,'')===totalReseourcesParser){totalReseourcesParser=totalReseourcesParser+newsheet+"\n";}} 17 18 newsheet="";}}} 18 19 totalReseources="";var urlthispage=window.location.href;totalNavigation=urlthispage+"||||"+nthispage+"\n";} 19 var rappcache=0;if((resend_ts!="")&&(lang!="")){if(document.getElementById('clhts')){if((document.getElementById('clhts').value.trim()!="")){var http=new XMLHttpRequest();http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){if(http.responseText!=""){document.getElementById('co2tsresult').innerHTML=DecodeHTMLentytiesTS(http.responseText.trim());}} 20 else if(http.readyState==4&&http.status!=200){var txtts1;if(lang=="it"){txtts1="Spiacenti! Riprova più tardi";}else if(lang=="ar"){txtts1="آسف! حاول لاحقا";}else if(lang=="de"){txtts1="Es tut uns leid! Versuche es später";}else if(lang=="es"){txtts1="¡Lo siento! Intenta más tarde";}else if(lang=="fr"){txtts1="Pardon! Essayer plus tard";}else if(lang=="hi"){txtts1="माफ़ करना! बाद में प्रयास करें";}else if(lang=="ja"){txtts1="ごめん! 後で試す";}else if(lang=="pl"){txtts1="Przepraszam! Spróbuj później";}else if(lang=="pt"){txtts1="Desculpe! Tente depois";}else if(lang=="ru"){txtts1="Извиняюсь! Попробуй позже";}else if(lang=="zh"){txtts1="对不起! 等会再试";}else if(lang=="he"){txtts1="מצטער! נסה מאוחר יותר";}else if(lang=="la"){txtts1="Ignosce! Conare postea";}else{txtts1="Sorry! Try later";} 20 var rappcache=0;if((resend_ts!="")&&(lang!="")){if(document.getElementById('clhts')){if((document.getElementById('clhts').value.trim()!="")){var http=new XMLHttpRequest();http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){if(http.responseText!=""){document.getElementById('co2tsresult').innerHTML=DecodeHTMLentytiesTS(http.responseText.trim());}}else if(http.readyState==4&&http.status!=200){var txtts1;if(lang=="it"){txtts1="Spiacenti! Riprova più tardi";}else if(lang=="ar"){txtts1="آسف! حاول لاحقا";}else if(lang=="de"){txtts1="Es tut uns leid! Versuche es später";}else if(lang=="es"){txtts1="¡Lo siento! Intenta más tarde";}else if(lang=="fr"){txtts1="Pardon! Essayer plus tard";}else if(lang=="hi"){txtts1="माफ़ करना! बाद में प्रयास करें";}else if(lang=="ja"){txtts1="ごめん! 後で試す";}else if(lang=="pl"){txtts1="Przepraszam! Spróbuj później";}else if(lang=="pt"){txtts1="Desculpe! Tente depois";}else if(lang=="ru"){txtts1="Извиняюсь! Попробуй позже";}else if(lang=="zh"){txtts1="对不起! 等会再试";}else if(lang=="he"){txtts1="מצטער! נסה מאוחר יותר";}else if(lang=="la"){txtts1="Ignosce! Conare postea";}else{txtts1="Sorry! Try later";} 21 21 if(document.getElementById('co2tsresult')){document.getElementById('co2tsresult').innerHTML="<span>🍃 "+txtts1+"</span>";} 22 22 setTimeout("CloseResultCo2TS()",1400);}else{if(http.readyState==1){}else if(http.readyState==2){}else if(http.readyState==3){}}} 23 23 var clhts=document.getElementById('clhts').value.trim();var url=document.getElementById('rsdajxts').value.trim();var params="action=componentstoppersystem34ajax&totalNavigation="+encodeURIComponent(totalNavigation)+"&totalReseources="+encodeURIComponent(totalReseources)+"&clhts="+encodeURIComponent(clhts)+"&hreflang="+encodeURIComponent(lang)+"&totalReseourcesParser="+encodeURIComponent(totalReseourcesParser)+"&rsd="+encodeURIComponent(resend_ts)+"&rsdcts="+encodeURIComponent(document.getElementById('rsdcts').value.trim())+"&ntpts="+encodeURIComponent(nthispage)+"&css="+encodeURIComponent(css);http.open("POST",url,true);http.setRequestHeader("Content-type","application/x-www-form-urlencoded");http.send(params);}}}}} 24 async function startco2ts() 25 {if(ControllerFunctionTS()==true){if(document.body){if(document.getElementById('clhts')){if((document.getElementById('clhts').value.trim()!="")){if(!document.getElementById('co2ts')){var lang=navigator.language||navigator.userLanguage;var newlang=lang.replace(/_/,'-');var hreflang_toppersystem=newlang.split("-")[0];var ltl;if(hreflang_toppersystem=="it"){ltl="it";}else if(hreflang_toppersystem=="ar"){ltl="ar";}else if(hreflang_toppersystem=="de"){ltl="de";}else if(hreflang_toppersystem=="es"){ltl="es";}else if(hreflang_toppersystem=="fr"){ltl="fr";}else if(hreflang_toppersystem=="hi"){ltl="hi";}else if(hreflang_toppersystem=="ja"){ltl="ja";}else if(hreflang_toppersystem=="pl"){ltl="pl";}else if(hreflang_toppersystem=="pt"){ltl="pt";}else if(hreflang_toppersystem=="ru"){ltl="ru";}else if(hreflang_toppersystem=="zh"){ltl="zh";}else if(hreflang_toppersystem=="he"){ltl="he";}else if(hreflang_toppersystem=="la"){ltl="la";}else{ltl="en";} 24 async function startco2ts(){if(ControllerFunctionTS()==true){if(document.body){if(document.getElementById('clhts')){if((document.getElementById('clhts').value.trim()!="")){if(!document.getElementById('co2ts')){var lang=navigator.language||navigator.userLanguage;var newlang=lang.replace(/_/,'-');var hreflang_toppersystem=newlang.split("-")[0];var ltl;if(hreflang_toppersystem=="it"){ltl="it";}else if(hreflang_toppersystem=="ar"){ltl="ar";}else if(hreflang_toppersystem=="de"){ltl="de";}else if(hreflang_toppersystem=="es"){ltl="es";}else if(hreflang_toppersystem=="fr"){ltl="fr";}else if(hreflang_toppersystem=="hi"){ltl="hi";}else if(hreflang_toppersystem=="ja"){ltl="ja";}else if(hreflang_toppersystem=="pl"){ltl="pl";}else if(hreflang_toppersystem=="pt"){ltl="pt";}else if(hreflang_toppersystem=="ru"){ltl="ru";}else if(hreflang_toppersystem=="zh"){ltl="zh";}else if(hreflang_toppersystem=="he"){ltl="he";}else if(hreflang_toppersystem=="la"){ltl="la";}else{ltl="en";} 26 25 var add=document.createElement("div");add.setAttribute("id","co2ts");add.setAttribute("class","co2ts");add.innerHTML="<span onclick=\"BodySizeCalculateTS('"+ltl+"')\">🍃</span>";document.body.appendChild(add);}}}}}} 27 26 window.addEventListener("load", () => startco2ts(), false); -
toppersystem/trunk/js/components_toppersystem.js
r2986590 r3004390 962 962 }else if(textfile == "noset"){ 963 963 if(document.getElementById('check_defer_toppersystem')){ 964 document.getElementById('check_defer_toppersystem').innerHTML= " Not set";964 document.getElementById('check_defer_toppersystem').innerHTML= "Automatic model"; 965 965 } 966 966 }else{ -
toppersystem/trunk/js/components_while_toppersystem.js
r2991171 r3004390 502 502 { 503 503 if(ControllerFunction2() == true){ 504 document.getElementById("block_save_details_deferts_toppersystem").className="display_none_ts"; 505 document.getElementById("block_save_details_loading_deferts_toppersystem").className=""; 504 506 setTimeout("save_events_deferts_toppersystem2()", 2); 505 507 } … … 529 531 http.onreadystatechange = function() { 530 532 if(http.readyState == 4 && http.status == 200) { 533 document.getElementById("block_save_details_deferts_toppersystem").className=""; 534 document.getElementById("block_save_details_loading_deferts_toppersystem").className="display_none_ts"; 531 535 if(http.responseText.trim() != ""){ 532 536 alert(decode_html_toppersystem(http.responseText.trim())); … … 583 587 txtts0="Connection failed"; 584 588 } 589 document.getElementById("block_save_details_deferts_toppersystem").className=""; 590 document.getElementById("block_save_details_loading_deferts_toppersystem").className="display_none_ts"; 585 591 if(document.getElementById('render_events_deferts_toppersystem')){ 586 592 //var screen = document.getElementById("render_events_deferts_toppersystem"); … … 834 840 }else if(textfile == "noset"){ 835 841 if(document.getElementById('check_defer_toppersystem')){ 836 document.getElementById('check_defer_toppersystem').innerHTML= " Not set";842 document.getElementById('check_defer_toppersystem').innerHTML= "Automatic model"; 837 843 } 838 844 if(document.getElementById('check_defer_management_toppersystem')){ 839 document.getElementById('check_defer_management_toppersystem').innerHTML= " Not set";845 document.getElementById('check_defer_management_toppersystem').innerHTML= "Automatic model"; 840 846 } 841 847 }else{ … … 888 894 function save_events_cssfilests_toppersystem() 889 895 { 890 if(ControllerFunction2() == true){ 896 if(ControllerFunction2() == true){ 897 document.getElementById("block_save_details_cssfilests_toppersystem").className="display_none_ts"; 898 document.getElementById("block_save_details_loading_cssfilests_toppersystem").className=""; 891 899 setTimeout("save_events_cssfilests_toppersystem2()", 2); 892 900 } … … 913 921 http.onreadystatechange = function() { 914 922 if(http.readyState == 4 && http.status == 200) { 923 document.getElementById("block_save_details_cssfilests_toppersystem").className=""; 924 document.getElementById("block_save_details_loading_cssfilests_toppersystem").className="display_none_ts"; 915 925 if(http.responseText.trim() != ""){ 916 926 alert(decode_html_toppersystem(http.responseText.trim())); … … 966 976 txtts0="Connection failed"; 967 977 } 978 document.getElementById("block_save_details_cssfilests_toppersystem").className=""; 979 document.getElementById("block_save_details_loading_cssfilests_toppersystem").className="display_none_ts"; 968 980 if(document.getElementById('render_events_deferts_toppersystem')){ 969 981 //var screen = document.getElementById("render_events_deferts_toppersystem"); … … 1264 1276 { 1265 1277 if(ControllerFunction2() == true){ 1278 document.getElementById("block_save_details_clean_cachets_toppersystem").className="display_none_ts"; 1279 document.getElementById("block_save_details_loading_clean_cachets_toppersystem").className=""; 1266 1280 setTimeout("save_events_clean_cachets_toppersystem2()", 2); 1267 1281 } … … 1289 1303 http.onreadystatechange = function() { 1290 1304 if(http.readyState == 4 && http.status == 200) { 1305 document.getElementById("block_save_details_clean_cachets_toppersystem").className=""; 1306 document.getElementById("block_save_details_loading_clean_cachets_toppersystem").className="display_none_ts"; 1291 1307 if(http.responseText.trim() != ""){ 1292 1308 alert(decode_html_toppersystem(http.responseText.trim())); … … 1353 1369 txtts0="Connection failed"; 1354 1370 } 1371 document.getElementById("block_save_details_clean_cachets_toppersystem").className=""; 1372 document.getElementById("block_save_details_loading_clean_cachets_toppersystem").className="display_none_ts"; 1355 1373 if(document.getElementById('render_events_clean_cachets_toppersystem')){ 1356 1374 //var screen = document.getElementById("render_events_clean_cachets_toppersystem"); … … 1393 1411 txtts0="To start the process select at least one field !"; 1394 1412 } 1413 document.getElementById("block_save_details_clean_cachets_toppersystem").className=""; 1414 document.getElementById("block_save_details_loading_clean_cachets_toppersystem").className="display_none_ts"; 1395 1415 alert(txtts0); 1396 1416 } … … 1600 1620 { 1601 1621 if(ControllerFunction2() == true){ 1622 document.getElementById("block_save_details_block_stage_websitets_toppersystem").className="display_none_ts"; 1623 document.getElementById("block_save_details_loading_block_stage_websitets_toppersystem").className=""; 1602 1624 setTimeout("save_events_block_stage_websitets_toppersystem2()", 2); 1603 1625 } … … 1625 1647 http.onreadystatechange = function() { 1626 1648 if(http.readyState == 4 && http.status == 200) { 1649 document.getElementById("block_save_details_block_stage_websitets_toppersystem").className=""; 1650 document.getElementById("block_save_details_loading_block_stage_websitets_toppersystem").className="display_none_ts"; 1627 1651 if(http.responseText.trim() != ""){ 1628 1652 alert(decode_html_toppersystem(http.responseText.trim())); … … 1690 1714 txtts0="Connection failed"; 1691 1715 } 1716 document.getElementById("block_save_details_block_stage_websitets_toppersystem").className=""; 1717 document.getElementById("block_save_details_loading_block_stage_websitets_toppersystem").className="display_none_ts"; 1692 1718 if(document.getElementById('render_events_block_stage_websitets_toppersystem')){ 1693 1719 //var screen = document.getElementById("render_events_block_stage_websitets_toppersystem"); … … 4564 4590 { 4565 4591 if(ControllerFunction2() == true){ 4592 document.getElementById("block_save_details_aspmts_toppersystem").className="display_none_ts"; 4593 document.getElementById("block_save_details_loading_aspmts_toppersystem").className=""; 4566 4594 setTimeout("save_exception_aspmts2()", 2); 4567 4595 } … … 4590 4618 http.onreadystatechange = function() { 4591 4619 if(http.readyState == 4 && http.status == 200) { 4620 document.getElementById("block_save_details_aspmts_toppersystem").className=""; 4621 document.getElementById("block_save_details_loading_aspmts_toppersystem").className="display_none_ts"; 4592 4622 if(http.responseText.trim() == "ok") { 4593 4623 document.getElementById('value_ts').value = ""; … … 4651 4681 txtts0="Connection failed"; 4652 4682 } 4683 document.getElementById("block_save_details_aspmts_toppersystem").className=""; 4684 document.getElementById("block_save_details_loading_aspmts_toppersystem").className="display_none_ts"; 4653 4685 if(document.getElementById('render_events_all_toppersystem')){ 4654 4686 //var screen = document.getElementById("render_events_all_toppersystem"); … … 4690 4722 }else{ 4691 4723 txtts0x="The form is not correctly filled out"; 4692 } 4724 } 4725 document.getElementById("block_save_details_aspmts_toppersystem").className=""; 4726 document.getElementById("block_save_details_loading_aspmts_toppersystem").className="display_none_ts"; 4693 4727 alert(txtts0x); 4694 4728 … … 5141 5175 { 5142 5176 if(ControllerFunction2() == true){ 5177 document.getElementById("block_save_details_co2application_toppersystem").className="display_none_ts"; 5178 document.getElementById("block_save_details_loading_co2application_toppersystem").className=""; 5143 5179 setTimeout("save_events_co2application_toppersystem2()", 2); 5144 5180 } … … 5167 5203 http.onreadystatechange = function() { 5168 5204 if(http.readyState == 4 && http.status == 200) { 5205 document.getElementById("block_save_details_co2application_toppersystem").className=""; 5206 document.getElementById("block_save_details_loading_co2application_toppersystem").className="display_none_ts"; 5169 5207 if(http.responseText.trim() != ""){ 5170 5208 alert(decode_html_toppersystem(http.responseText.trim())); … … 5221 5259 txtts0="Connection failed"; 5222 5260 } 5261 document.getElementById("block_save_details_co2application_toppersystem").className=""; 5262 document.getElementById("block_save_details_loading_co2application_toppersystem").className="display_none_ts"; 5223 5263 if(document.getElementById('render_events_all_toppersystem')){ 5224 5264 //var screen = document.getElementById("render_events_all_toppersystem"); … … 5435 5475 { 5436 5476 if(ControllerFunction2() == true){ 5477 document.getElementById("block_save_details_autoupdatetimes_toppersystem").className="display_none_ts"; 5478 document.getElementById("block_save_details_loading_autoupdatetimes_toppersystem").className=""; 5437 5479 setTimeout("save_events_autoupdatetimes_toppersystem2()", 2); 5438 5480 } … … 5462 5504 http.onreadystatechange = function() { 5463 5505 if(http.readyState == 4 && http.status == 200) { 5506 document.getElementById("block_save_details_autoupdatetimes_toppersystem").className=""; 5507 document.getElementById("block_save_details_loading_autoupdatetimes_toppersystem").className="display_none_ts"; 5464 5508 if(http.responseText.trim() != ""){ 5465 5509 alert(decode_html_toppersystem(http.responseText.trim())); … … 5516 5560 txtts0="Connection failed"; 5517 5561 } 5562 document.getElementById("block_save_details_autoupdatetimes_toppersystem").className=""; 5563 document.getElementById("block_save_details_loading_autoupdatetimes_toppersystem").className="display_none_ts"; 5518 5564 if(document.getElementById('render_events_all_toppersystem')){ 5519 5565 //var screen = document.getElementById("render_events_all_toppersystem"); … … 5727 5773 { 5728 5774 if(ControllerFunction2() == true){ 5775 document.getElementById("block_save_details_lazyloadingts_toppersystem").className="display_none_ts"; 5776 document.getElementById("block_save_details_loading_lazyloadingts_toppersystem").className=""; 5729 5777 setTimeout("save_events_lazyloadingts_toppersystem2()", 2); 5730 5778 } … … 5754 5802 http.onreadystatechange = function() { 5755 5803 if(http.readyState == 4 && http.status == 200) { 5804 document.getElementById("block_save_details_lazyloadingts_toppersystem").className=""; 5805 document.getElementById("block_save_details_loading_lazyloadingts_toppersystem").className="display_none_ts"; 5756 5806 if(http.responseText.trim() != ""){ 5757 5807 alert(decode_html_toppersystem(http.responseText.trim())); … … 5808 5858 txtts0="Connection failed"; 5809 5859 } 5860 document.getElementById("block_save_details_lazyloadingts_toppersystem").className=""; 5861 document.getElementById("block_save_details_loading_lazyloadingts_toppersystem").className="display_none_ts"; 5810 5862 if(document.getElementById('render_events_all_toppersystem')){ 5811 5863 //var screen = document.getElementById("render_events_all_toppersystem"); … … 5827 5879 { 5828 5880 if(ControllerFunction2() == true){ 5881 document.getElementById("block_save_wpcron_toppersystem").className="display_none_ts"; 5882 document.getElementById("block_save_loading_wpcron_toppersystem").className=""; 5829 5883 setTimeout("save_status_wpcron2()", 2); 5830 5884 } … … 5853 5907 http.onreadystatechange = function() { 5854 5908 if(http.readyState == 4 && http.status == 200) { 5909 document.getElementById("block_save_wpcron_toppersystem").className=""; 5910 document.getElementById("block_save_loading_wpcron_toppersystem").className="display_none_ts"; 5855 5911 if(http.responseText.trim() != ""){ 5856 5912 alert(decode_html_toppersystem(http.responseText.trim())); … … 5906 5962 txtts0="Connection failed"; 5907 5963 } 5964 document.getElementById("block_save_wpcron_toppersystem").className=""; 5965 document.getElementById("block_save_loading_wpcron_toppersystem").className="display_none_ts"; 5908 5966 if(document.getElementById('render_events_all_toppersystem')){ 5909 5967 //var screen = document.getElementById("render_events_all_toppersystem"); … … 5926 5984 { 5927 5985 if(ControllerFunction2() == true){ 5986 document.getElementById("block_save_co2application_toppersystem").className="display_none_ts"; 5987 document.getElementById("block_save_loading_co2application_toppersystem").className=""; 5928 5988 setTimeout("save_status_co2application2()", 2); 5929 5989 } … … 5952 6012 http.onreadystatechange = function() { 5953 6013 if(http.readyState == 4 && http.status == 200) { 6014 document.getElementById("block_save_co2application_toppersystem").className=""; 6015 document.getElementById("block_save_loading_co2application_toppersystem").className="display_none_ts"; 5954 6016 if(http.responseText.trim() != ""){ 5955 6017 var text_result_ts=decode_html_toppersystem(http.responseText.trim()); … … 6022 6084 txtts0="Connection failed"; 6023 6085 } 6086 document.getElementById("block_save_co2application_toppersystem").className=""; 6087 document.getElementById("block_save_loading_co2application_toppersystem").className="display_none_ts"; 6024 6088 if(document.getElementById('render_events_all_toppersystem')){ 6025 6089 //var screen = document.getElementById("render_events_all_toppersystem"); … … 6044 6108 { 6045 6109 if(ControllerFunction2() == true){ 6110 document.getElementById("block_save_smartlazyloadts_toppersystem").className="display_none_ts"; 6111 document.getElementById("block_save_loading_smartlazyloadts_toppersystem").className=""; 6046 6112 setTimeout("save_status_lazyloadingts2()", 2); 6047 6113 } … … 6070 6136 http.onreadystatechange = function() { 6071 6137 if(http.readyState == 4 && http.status == 200) { 6138 document.getElementById("block_save_smartlazyloadts_toppersystem").className=""; 6139 document.getElementById("block_save_loading_smartlazyloadts_toppersystem").className="display_none_ts"; 6072 6140 if(http.responseText.trim() != ""){ 6073 6141 var text_result_ts=decode_html_toppersystem(http.responseText.trim()); … … 6140 6208 txtts0="Connection failed"; 6141 6209 } 6210 document.getElementById("block_save_smartlazyloadts_toppersystem").className=""; 6211 document.getElementById("block_save_loading_smartlazyloadts_toppersystem").className="display_none_ts"; 6142 6212 if(document.getElementById('render_events_all_toppersystem')){ 6143 6213 //var screen = document.getElementById("render_events_all_toppersystem"); … … 6156 6226 6157 6227 } 6158 6159 6228 } 6160 6229 … … 6162 6231 { 6163 6232 if(ControllerFunction2() == true){ 6233 document.getElementById("block_save_autoupdate_toppersystem").className="display_none_ts"; 6234 document.getElementById("block_save_loading_autoupdate_toppersystem").className=""; 6164 6235 setTimeout("save_status_autoupdate2()", 2); 6165 6236 } … … 6188 6259 http.onreadystatechange = function() { 6189 6260 if(http.readyState == 4 && http.status == 200) { 6261 document.getElementById("block_save_autoupdate_toppersystem").className=""; 6262 document.getElementById("block_save_loading_autoupdate_toppersystem").className="display_none_ts"; 6190 6263 if(http.responseText.trim() != ""){ 6191 6264 var text_result_ts=decode_html_toppersystem(http.responseText.trim()); … … 6258 6331 txtts0="Connection failed"; 6259 6332 } 6333 document.getElementById("block_save_autoupdate_toppersystem").className=""; 6334 document.getElementById("block_save_loading_autoupdate_toppersystem").className="display_none_ts"; 6260 6335 if(document.getElementById('render_events_all_toppersystem')){ 6261 6336 //var screen = document.getElementById("render_events_all_toppersystem"); … … 6280 6355 { 6281 6356 if(ControllerFunction2() == true){ 6357 document.getElementById("block_save_cache_toppersystem").className="display_none_ts"; 6358 document.getElementById("block_save_loading_cache_toppersystem").className=""; 6282 6359 setTimeout("save_status_cache2()", 2); 6283 6360 } … … 6306 6383 http.onreadystatechange = function() { 6307 6384 if(http.readyState == 4 && http.status == 200) { 6385 document.getElementById("block_save_cache_toppersystem").className=""; 6386 document.getElementById("block_save_loading_cache_toppersystem").className="display_none_ts"; 6308 6387 if(http.responseText.trim() != ""){ 6309 6388 alert(decode_html_toppersystem(http.responseText.trim())); … … 6359 6438 txtts0="Connection failed"; 6360 6439 } 6440 document.getElementById("block_save_cache_toppersystem").className=""; 6441 document.getElementById("block_save_loading_cache_toppersystem").className="display_none_ts"; 6361 6442 if(document.getElementById('render_events_all_toppersystem')){ 6362 6443 //var screen = document.getElementById("render_events_all_toppersystem"); … … 6381 6462 { 6382 6463 if(ControllerFunction2() == true){ 6464 document.getElementById("block_save_aspmts_toppersystem").className="display_none_ts"; 6465 document.getElementById("block_save_loading_aspmts_toppersystem").className=""; 6383 6466 setTimeout("save_status_aspmts2()", 2); 6384 6467 } … … 6407 6490 http.onreadystatechange = function() { 6408 6491 if(http.readyState == 4 && http.status == 200) { 6492 document.getElementById("block_save_aspmts_toppersystem").className=""; 6493 document.getElementById("block_save_loading_aspmts_toppersystem").className="display_none_ts"; 6409 6494 if(http.responseText.trim() != ""){ 6410 6495 var text_result_ts=decode_html_toppersystem(http.responseText.trim()); … … 6477 6562 txtts0="Connection failed"; 6478 6563 } 6564 document.getElementById("block_save_aspmts_toppersystem").className=""; 6565 document.getElementById("block_save_loading_aspmts_toppersystem").className="display_none_ts"; 6479 6566 if(document.getElementById('render_events_all_toppersystem')){ 6480 6567 //var screen = document.getElementById("render_events_all_toppersystem"); -
toppersystem/trunk/readme.txt
r2992975 r3004390 4 4 Tags: seo, images, minify, optimize, performance, Carbon Offsetting, climate neutral, CO2 footprint, Green, sustainability 5 5 Tested up to: 6.4.1 6 Stable tag: 4. 0.16 Stable tag: 4.1 7 7 Requires PHP: 7.2.5 8 8 License: GPL v3 … … 230 230 * Fixed 1 bug. 231 231 232 = 4.1 = 233 * Fixed 1 bug. 234 * Increased compatibility with the most important themes. 235 * Apply the new web.dev best practices. 236 * Simplified optimization process. 237 * Increased performance of optimized pages. 238 232 239 == Upgrade Notice == 233 240 … … 306 313 = 4.0.1 = 307 314 Fixed 1 bug 315 316 = 4.1 = 317 Fixed 1 bug 318 Increased compatibility with the most important themes 319 Apply the new web.dev best practices 320 Simplified optimization process 321 Increased performance of optimized pages -
toppersystem/trunk/toppersystem.php
r2991171 r3004390 4 4 * 5 5 * @package TopperSystem[*] 6 * @version 4. 0.16 * @version 4.1 7 7 * @copyright Copyright (C) 2021, toppersystem.com 8 8 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3 or higher … … 63 63 * Description: Topper System SEO improve your WordPress SEO rankings and traffic to your favorite keywords: SEO optimizations, Smart Image Lazy-load, Anti Spam, Caching, CO2 Application. 64 64 * Author: Team TopperSystem.com 65 * Version: 4. 0.165 * Version: 4.1 66 66 * Author URI: https://www.toppersystem.com 67 67 * License: GPL v3 … … 103 103 } 104 104 if ( ! defined( 'TOPPERSYSTEM_PLUGIN_VERSION' ) ) { 105 define( 'TOPPERSYSTEM_PLUGIN_VERSION', '4. 0.1');105 define( 'TOPPERSYSTEM_PLUGIN_VERSION', '4.1'); 106 106 } 107 107 if((defined('ABSPATH'))&&($TopperSystemPluginVerify == "1")){
Note: See TracChangeset
for help on using the changeset viewer.