Edit file File name : index.php Content :<?php include "inc/MobileDetect.php"; include "inc/LangDetect.php"; include "inc/lang.php"; include "inc/ConfiguratorConsole.php"; require_once 'vendor/autoload.php'; use DeviceDetector\ClientHints; use DeviceDetector\DeviceDetector; use fiftyone\pipeline\core\Logger; $type = 'update-full'; //Вид лендинга - см. $type_list // TODO: Remove test-variant from $type_list array $type_list = [ 'logo', 'blue', 'default', 'icow', 'icob', 'greenb', 'iconred', 'gradback', 'icondown', 'icongear', 'nocancel', 'redcancel', 'new1', 'new2', 'new3', 'new4', 'new7', 'new8', 'new81', 'new9', 'test-variant', 'update-full', 'alert-blue-new-os', 'update-files-white', 'update-middle', 'trash-red', 'update-files-black', 'update-short', 'trash-black', 'update-files-red-new-os', 'update-red-new-os', 'alerts-short-red', ]; /* Вид кнопки - от 0 до 4, переопределяется GET[button] * 0 - обычная * 1 - анимация блика * 2 - анимация пульса * 3 - анимация "моргаия" * 4 - анимация покачивания */ $blue_button_type = 0; /* Всплывающая плашка "очистить кэш". false - не показывать, 1\2 - варианты вида. переопределяется GET[buttoncache] */ $show_buttoncache = false; /* Задержка всплытия после загрузки страницы в секундах */ $buttoncache_timer = 2; //Использовать ли закытие вкладки "отмена" для нецелевого устройства $use_is_target_close = true; //Основная ссылка, будет выведена, если ОС Android 5+ $redirect_url = 'https://play.google.com/store/apps/details?id=cmu.cleanmaster.new.app'; //Прочие ссылки, будет выбрана случайная, если ОС не Android 5+ $redirect_other_url = [ 'https://play.google.com/store/apps/details?id=com.piriform.ccleaner', 'https://play.google.com/store/apps/details?id=com.stolitomson', ]; if (isset($_GET["type"]) && in_array($_GET["type"], $type_list)) { $type = $_GET["type"]; } if (isset($_GET["button"]) && in_array($_GET["button"], array('0', '1', '2', '3', '4'))) { $blue_button_type = (int)$_GET["button"]; } if (isset($_GET["buttoncache"]) && in_array($_GET["buttoncache"], array('1', '2'))) { $show_buttoncache = (int)$_GET["buttoncache"]; } $update_button_text = 'update'; if (in_array($type, ['new4', 'new8', 'new81'])) { $update_button_text = 'install'; } $cancel_button_text = 'cancel'; if ($type == 'new9') { $cancel_button_text = 'later'; } $srv_id = 'kstv_prop'; $visitor_id = ''; $source_id = ''; $campaign_id = ''; if (isset($_GET["srv_id"]) && is_string($_GET["srv_id"])) { $srv_id = $_GET["srv_id"]; } if (isset($_GET["visitor_id"]) && is_string($_GET["visitor_id"])) { $visitor_id = $_GET["visitor_id"]; } elseif (isset($_GET["clickid"]) && is_string($_GET["clickid"])) { $visitor_id = $_GET["clickid"]; } if (isset($_GET["source_id"]) && is_string($_GET["source_id"])) { $source_id = $_GET["source_id"]; } if (isset($_GET["campaign_id"]) && is_string($_GET["campaign_id"])) { $campaign_id = $_GET["campaign_id"]; } $redirect_url_param = '&referrer=cnv_id%3D' . $visitor_id .'%26source_id%3D' . $source_id . '%26campaign_id%3D' . $campaign_id . '%26srv_id%3D' . $srv_id; $deviceBrand = ''; $deviceName = ''; $deviceNameLang = ''; $osName = ''; $osVersion = 0; $userAgent = (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''); if ($userAgent) { $dd = new MobileDetect($userAgent); $dd->parse(); $deviceBrand = $dd->getBrand(); $deviceNameLang = $deviceName = trim($dd->getBrand() . ' ' . $dd->getModel()); $osName = $dd->getOs('name'); $osVersion = (int)$dd->getOs('version'); } //Флаг целевого устройства $is_target = true; //Меняем ссылку, если ОС не Android 5+ if ($osName !== 'Android' || $osVersion < 5) { shuffle($redirect_other_url); $redirect_url = array_shift($redirect_other_url); if ($use_is_target_close) { $is_target = false; } } $redirect_url .= $redirect_url_param; if (empty($deviceBrand) || empty($deviceName)) { $clientHints = ClientHints::factory($_SERVER); // $DD = new DeviceDetector($userAgent, $clientHints); // $DD->parse(); // $deviceBrand = $DD->getBrandName(); // $deviceName = trim($DD->getBrandName() . ' ' . $DD->getModel()); $resourceKey = "AQSwacSPuMGbMy3o3Eg"; $logger = new Logger("info"); $info = (new ConfiguratorConsole())->run($resourceKey, $logger); print_r($info); if(empty($deviceBrand)){ $deviceBrand = 'Android'; } } if (isset($_GET['lang']) && is_string($_GET['lang']) && in_array($_GET['lang'], array_keys($lang_text))) { $lang = $_GET['lang']; } else { $lang = (new LangDetect())->getBestMatch(array_keys($lang_text)); } $writer = function ($text_id) use ($lang_text, $lang, $deviceBrand, $deviceName, $deviceNameLang) { if ($text_id == 'rtl') { if (isset($lang_text[$lang][$text_id]) && $lang_text[$lang][$text_id] === true) { return 'dir="rtl"'; } return ''; } if (isset($lang_text[$lang][$text_id])) { if (empty($deviceNameLang)) { $deviceNameLang = $lang_text[$lang]['smartphone']; } return str_replace(['{deviceBrand}', '{deviceName}', '{deviceNameLang}'], [$deviceBrand, $deviceName, $deviceNameLang], $lang_text[$lang][$text_id]); } return ''; }; ?> <!DOCTYPE html> <html lang="<?=$lang?>" <?=$writer('rtl')?>><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <base href=""> <meta name="robots" content="noindex, nofollow"> <meta name="theme-color" content="#999"> <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, width=device-width"> <meta name="format-detection" content="telephone=no"> <meta name="HandheldFriendly" content="true"> <meta name="apple-touch-fullscreen" content="yes"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet"> <link rel="stylesheet" href="css/style.css"> <title><?=$writer('title')?></title> <?php $default_css = "css/default.css"; $css_file = ''; if (in_array($type, $type_list)) { $css_file = "css/" . $type . ".css"; if (!file_exists($css_file)) { $css_file = $default_css; } } else { $css_file = $default_css; } echo '<link rel="stylesheet" href="' . $css_file . '">'; ?> </head> <body class="<?=$lang?>"> <style type="text/css"> .close {cursor: pointer;} .ad {position:absolute;top: 10px;left: 13px;display:inline-block;font-style:normal;font-weight:400;font-size:12px;line-height:14px;text-transform:uppercase;color:#c6c6c6} <?php if ($blue_button_type === 1): ?> .cancel{overflow:hidden}.install{position:relative;overflow:hidden}.install:after{content:'';display:block;width:30px;height:300px;margin-left:60px;background:#fff;background:-moz-linear-gradient(top,rgba(255,255,255,.7) 0,#fff 50%,rgba(255,255,255,.7) 100%);background:-webkit-linear-gradient(top,rgba(255,255,255,.7) 0,#fff 50%,rgba(255,255,255,.7) 100%);background:linear-gradient(to bottom,rgba(255,255,255,.7) 0,#fff 50%,rgba(255,255,255,.7) 100%);position:absolute;left:-40px;top:-150px;z-index:1;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-transition:all .1s;transition:all .1s;-webkit-animation-name:slideme;animation-name:slideme;-webkit-animation-duration:2.5s;animation-duration:2.5s;-webkit-animation-delay:50ms;animation-delay:50ms;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes slideme{0%{left:-30px;margin-left:0}30%{left:110%;margin-left:80px}100%{left:110%;margin-left:80px}} <?php elseif ($blue_button_type === 2): ?> .install{-webkit-animation:heartbeat 1s ease-in-out infinite both;animation:heartbeat 1s ease-in-out infinite both}@-webkit-keyframes heartbeat{from{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:center center;transform-origin:center center;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}10%{-webkit-transform:scale(.91);transform:scale(.91);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}17%{-webkit-transform:scale(.98);transform:scale(.98);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}33%{-webkit-transform:scale(.87);transform:scale(.87);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}45%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes heartbeat{from{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:center center;transform-origin:center center;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}10%{-webkit-transform:scale(.91);transform:scale(.91);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}17%{-webkit-transform:scale(.98);transform:scale(.98);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}33%{-webkit-transform:scale(.87);transform:scale(.87);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}45%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}} <?php elseif ($blue_button_type === 3): ?> .install{-webkit-animation:blink-2 1.5s ease-in-out infinite both;animation:blink-2 1.5s ease-in-out infinite both}@-webkit-keyframes blink-2{0%{opacity:1}50%{opacity:.8}100%{opacity:1}}@keyframes blink-2{0%{opacity:1}50%{opacity:.8}100%{opacity:1}} <?php elseif ($blue_button_type === 4): ?> .install{-webkit-animation:shake-bottom 1.5s cubic-bezier(.39,.575,.565,1) infinite;animation:shake-bottom 1.5s cubic-bezier(.39,.575,.565,1) infinite}@-webkit-keyframes shake-bottom{0%,100%{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}10%{-webkit-transform:rotate(2deg);transform:rotate(2deg)}20%,40%,60%{-webkit-transform:rotate(-4deg);transform:rotate(-4deg)}30%,50%,70%{-webkit-transform:rotate(4deg);transform:rotate(4deg)}80%{-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}90%{-webkit-transform:rotate(2deg);transform:rotate(2deg)}}@keyframes shake-bottom{0%,100%{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}10%{-webkit-transform:rotate(2deg);transform:rotate(2deg)}20%,40%,60%{-webkit-transform:rotate(-4deg);transform:rotate(-4deg)}30%,50%,70%{-webkit-transform:rotate(4deg);transform:rotate(4deg)}80%{-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}90%{-webkit-transform:rotate(2deg);transform:rotate(2deg)}} <?php endif; ?> <?php if ($show_buttoncache): ?> <?php if ($show_buttoncache == 2): ?> .clearinfo{display:block;width:100%;background:#fff;position:absolute;bottom:0;border-radius:25px 25px 0 0;text-align:center;padding-top:47px}.clearinfo_line{width:76%;min-width:235px;max-width:550px;margin:auto;margin-bottom:24px}.clearinfo_line span{font-style:normal;font-weight:400;font-size:18px;line-height:24px;letter-spacing:.01em;color:#000;text-align:left;float:left}.clearinfo_line span:before{content:"";display:block;width:18px;height:18px;background-color:#DADADA;background-image:url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0ZM7 14L2 9L3.4 7.6L7 11.2L14.6 3.6L16 5L7 14Z' fill='%232276EB'/%3E%3C/svg%3E%0A");float:left;margin-right:36px;margin-top:3px}.clearinfo_line b{font-style:normal;font-weight:500;font-size:18px;line-height:24px;text-align:right;letter-spacing:.01em;color:#1E75EA;float:right}.clearinfo_line:after{content:"";display:block;clear:both}.bg_clearinfo{width:100%;height:100%;background:rgba(0,0,0,0.3);position:absolute}.clearinfo_button{display:inline-block;border-radius:6px;text-align:center;text-transform:uppercase;padding:8px;font-style:normal;font-weight:500;font-size:14px;line-height:24px;background:linear-gradient(270deg,#1a73e9 0,#6c92f4 100%);box-shadow:0 2px 4px #260000 0 4px 6px #610000;color:#fff;width:204px;margin-top:30px;margin-bottom:30px}.anim-show{bottom:-1000px;transition:1s;animation:clearinfo_show 3s 1;animation-fill-mode:forwards;animation-delay:<?=$buttoncache_timer?>s}@keyframes clearinfo_show{0%{bottom:-1000px}100%{bottom:0}}.anim-bg{visibility:hidden;transition:1s;animation:clearinfo_show-bg 3s 1;animation-fill-mode:forwards;animation-delay:<?=$buttoncache_timer?>s;z-index:-1}@keyframes clearinfo_show-bg{0%{visibility:hidden}100%{visibility:visible;z-index:0}} <?php else: ?> .clearinfo{display:block;width:100%;background:#fff;position:absolute;bottom:0;border-radius:25px 25px 0 0;text-align:center;padding-top:47px}.clearinfo_line{width:76%;min-width:235px;max-width:550px;margin:auto;margin-bottom:24px}.clearinfo_line span{font-style:normal;font-weight:400;font-size:18px;line-height:24px;letter-spacing:.01em;color:#000;text-align:left;float:left}.clearinfo_line span:before{content:"";display:block;width:18px;height:18px;background-color:#DADADA;background-image:url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0ZM7 14L2 9L3.4 7.6L7 11.2L14.6 3.6L16 5L7 14Z' fill='%232276EB'/%3E%3C/svg%3E%0A");float:left;margin-right:36px;margin-top:3px}.clearinfo_line b{font-style:normal;font-weight:500;font-size:18px;line-height:24px;text-align:right;letter-spacing:.01em;color:#1E75EA;float:right}.clearinfo_line:after{content:"";display:block;clear:both}.bg_clearinfo{width:100%;height:100%;background:rgba(0,0,0,0.3);position:absolute}.clearinfo_button{display:inline-block;border-radius:6px;text-align:center;text-transform:uppercase;padding:8px;font-style:normal;font-weight:500;font-size:18px;line-height:24px;color:#fff;width:204px;margin-top:30px;margin-bottom:30px;color:#FE1649}.anim-show{bottom:-1000px;transition:1s;animation:clearinfo_show 3s 1;animation-fill-mode:forwards;animation-delay:<?=$buttoncache_timer?>s}@keyframes clearinfo_show{0%{bottom:-1000px}100%{bottom:0}}.anim-bg{visibility:hidden;transition:1s;animation:clearinfo_show-bg 3s 1;animation-fill-mode:forwards;animation-delay:<?=$buttoncache_timer?>s;z-index:-1}@keyframes clearinfo_show-bg{0%{visibility:hidden}100%{visibility:visible;z-index:0}} <?php endif; ?> <?php endif; ?> </style> <!-- Example how to get file --> <?php require_once('templates/' . $type . '.php'); ?> <?php if ($show_buttoncache): ?> <div class="bg_clearinfo anim-bg"></div> <div class="clearinfo anim-show"> <div class="clearinfo_line"> <span>Photos</span><b>274.7 MB</b> </div> <div class="clearinfo_line"> <span>Videos</span><b>619.3 MB</b> </div> <div class="clearinfo_line"> <span>Documents</span><b>305.9 MB</b> </div> <div class="clearinfo_line"> <span>Music</span><b>52.6 MB</b> </div> <div class="clearinfo_line"> <span>Other files</span><b>830.1 MB</b> </div> <a class="clearinfo_button" href="<?=$redirect_url?>"><?=$writer('clear_cache')?></a> </div> <?php endif; ?> <!--<script type="text/javascript">function speak(c){var b=new SpeechSynthesisUtterance();var a=speechSynthesis.getVoices();b.voice=a[2];b.voiceURI="native";b.volume=1;b.rate=1;b.pitch=1;b.text=c;speechSynthesis.speak(b)}speak("--><?php //=addslashes($writer('confirm'))?>//");</script> </body> </html>Save