This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// подключаем автолоад и запускаем общий кеш | |
require_once $PATHS['FILE']['ROOT'].'system'.DS.'vendor'.DS.'autoload.php'; | |
use Phpfastcache\CacheManager; | |
use Phpfastcache\Config\ConfigurationOption; | |
CacheManager::setDefaultConfig(new ConfigurationOption([ | |
'path' => $PATHS['FILE']['ROOT'].'system'.DS.'cache'.DS, // or in windows "C:/tmp/" // 'path' => sys_get_temp_dir(), | |
])); | |
$cache = CacheManager::getInstance('files'); | |
// Тест работы кеша |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/******************************************************************** | |
Model-View-Controller implementation according to POSA | |
(Pattern-Oriented Software Architecture | |
http://www.hillside.net/patterns/books/Siemens/book.html) | |
********************************************************************/ | |
class HelloWorldController { | |
private $model; | |
function __construct($model) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// multiple invisible recaptca, dont forget tot set $g_recaptcha_secret and data-sitekey | |
//// FORM / add to any form you want to check attribute like this | |
<form data-recaptcha="1"></form> | |
//// HTML / add this one time in any place, before body tag for example --> | |
<script> | |
var yal_grecaptcha_form; | |
var yal_grecaptcha_form_executed = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Код для проброса utm меток и др параметров через все внутренние и внешние ссылки --> | |
<!--<script src="https://fatma.ru/test/tmp/tilda_utm_transfer.js" type="text/javascript"></script>--> | |
<script type="text/javascript"> | |
$(function() { | |
yalTransferParams(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------- reset ---------- */ | |
*{box-sizing:border-box;padding:0;margin:0;font:inherit;}b,strong{font-weight:bold}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border:0}button,input,optgroup,select,textarea{font-family:inherit;}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,main{display:block}table{border-collapse:collapse;border-spacing:0} | |
/* variables */ | |
:root { | |
--id-1-color: #219653; /* news */ | |
--text-grey: #443E3E; | |
--mobile-h1-size: 1.8rem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_svg($path = '') | |
{ | |
// yal_debug($path); | |
if (empty($path)) return ''; | |
static $cache = array(); | |
$svg = ''; | |
$key = md5($path); | |
if (!empty($cache[$key])) { | |
$svg = $cache[$key]; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// So, if after you submit form, recaptcha challenge/puzze appears outside of current view screen, you can fix this by adding simple CSS rule: | |
body > div > div > iframe { position: fixed; z-index: 9999; top: 10px; } | |
// This will force exactly recaptcha iframe to appear inside visible area, on top of other elements. | |
// If you want to say thanks: | |
// ETH 0x79B3a1febF8b3Aa6DAC1227237d1d0E0B015cbc2 | |
// BTC bc1qlp4f8jzrpj4yajj5dpy00lkj65vp8gy6dccv8d | |
// https://donationalerts.com/r/yalme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Common paths | |
**/lib/ | |
**/libs/ | |
**/cache/ | |
**/vendor/ | |
**/uploads/ | |
**/images/ | |
**/imgs/ | |
**/files/ | |
**/fonts/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function() { | |
$('.yal-tabs .tabs-header .tab').on('click', function(e) { | |
// console.log('asfasdfa 1'); | |
if (!$(this).hasClass('active')) { | |
$(this).closest('.yal-tabs').find('.tabs-header .tab').removeClass('active'); | |
$(this).addClass('active'); | |
let p = $(this).index(); | |
// console.log('asfasdfa 3 pos: ' + p); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// if you want pass all | |
header('Access-Control-Allow-Origin: *'); | |
// if you want limit by domain | |
header('Access-Control-Allow-Origin: https://domain.com'); | |
// if you want limit by multiple domains | |
// list of allowed domains |
OlderNewer