This file contains 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
window.open("http://", "_blank"); |
This file contains 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
<html> | |
<head> | |
<style type="text/css"> | |
.b-top {z-index:2600;position:fixed;left:0;bottom:90px;width:34%;margin-left:50%;opacity: 0.5;filter:alpha(opacity=50);} | |
.b-top:hover {opacity:1;filter:alpha(opacity=100);cursor:pointer;} | |
.b-top-but {z-index:2600;position:absolute;display:block;left:56px;bottom:0;margin:0 0 0 100%;padding:32px 12px 4px; | |
color:white;background:#D8D5C2 url(http://alaev.info/wp-content/plugins/goupbutt/b-j-top.png) no-repeat 50% 11px;border-radius:7px;} | |
</style> | |
<script type="text/javascript">$(document).ready(function(){ | |
$(window).scroll(function () {if ($(this).scrollTop() > 0) {$('#scroller').fadeIn();} else {$('#scroller').fadeOut();}}); |
This file contains 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_flag display_errors On | |
#показать все ошибки кроме предупреждений (Notice) | |
php_value error_reporting "E_ALL & ~E_NOTICE" | |
Если Вам нужно работать с конкретным типом ошибок, то привожу основные их виды: | |
E_ALL - все ошибки | |
E_ERROR - ошибки функций (критические) | |
E_WARNING - предупреждения | |
E_PARSE - ошибки синтаксиса |
This file contains 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 | |
// Письмо менеджерам | |
$mail = new Mail($this->config->get('config_mail')); | |
$mail->setTo($this->config->get('config_shop_email')); | |
$mail->setFrom($this->request->post['email']); | |
$mail->setSender($this->config->get('config_name')); | |
$mail->setSubject(sprintf($this->language->get('text_subject_manager'),$this->config->get('config_owner'), $Order_id)); | |
$mail->setHtml($manager); | |
$mail->send(); |
This file contains 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 | |
function file_get_contents_curl($url) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Устанавливаем параметр, чтобы curl возвращал данные, вместо того, чтобы выводить их в браузер. | |
curl_setopt($ch, CURLOPT_URL, $url); | |
$data = curl_exec($ch); | |
curl_close($ch); |
This file contains 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 page_excerpt() { | |
add_post_type_support('page', array('excerpt')); | |
} | |
add_action('init', 'page_excerpt'); | |
// Отключаем поиск | |
function fb_filter_query( $query, $error = true ) { | |
if ( is_search() ) { | |
$query->is_search = false; |
This file contains 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 translit($value) | |
{ | |
$converter = array( | |
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', | |
'е' => 'e', 'ё' => 'e', 'ж' => 'zh', 'з' => 'z', 'и' => 'i', | |
'й' => 'y', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', | |
'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', | |
'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch', | |
'ш' => 'sh', 'щ' => 'sch', 'ь' => '', 'ы' => 'y', 'ъ' => '', | |
'э' => 'e', 'ю' => 'yu', 'я' => 'ya', |
This file contains 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 translit_seo($value) | |
{ | |
$converter = array( | |
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', | |
'е' => 'e', 'ё' => 'e', 'ж' => 'zh', 'з' => 'z', 'и' => 'i', | |
'й' => 'y', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', | |
'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', | |
'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch', | |
'ш' => 'sh', 'щ' => 'sch', 'ь' => '', 'ы' => 'y', 'ъ' => '', | |
'э' => 'e', 'ю' => 'yu', 'я' => 'ya', |
This file contains 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 translit_path($value) | |
{ | |
$converter = array( | |
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', | |
'е' => 'e', 'ё' => 'e', 'ж' => 'zh', 'з' => 'z', 'и' => 'i', | |
'й' => 'y', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', | |
'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', | |
'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch', | |
'ш' => 'sh', 'щ' => 'sch', 'ь' => '', 'ы' => 'y', 'ъ' => '', | |
'э' => 'e', 'ю' => 'yu', 'я' => 'ya', |
This file contains 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 translit_file($filename) | |
{ | |
$converter = array( | |
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', | |
'е' => 'e', 'ё' => 'e', 'ж' => 'zh', 'з' => 'z', 'и' => 'i', | |
'й' => 'y', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', | |
'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', | |
'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch', | |
'ш' => 'sh', 'щ' => 'sch', 'ь' => '', 'ы' => 'y', 'ъ' => '', | |
'э' => 'e', 'ю' => 'yu', 'я' => 'ya', |
OlderNewer