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
@keyframes zomg { | |
0%,100% { | |
color: #7ccdea | |
} | |
16% { | |
color: #0074D9 | |
} | |
32% { |
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
<script> | |
var Share = { | |
facebook: function (purl, ptitle, pimg, text) { | |
var url = 'http://www.facebook.com/sharer.php?s=100' | |
+ '&p[title]=' + encodeURIComponent(ptitle) | |
+ '&p[summary]=' + encodeURIComponent(text) | |
+ '&p[url]=' + encodeURIComponent(purl) | |
+ '&p[images][0]=' + encodeURIComponent(pimg); | |
Share.popup(url); | |
}, |
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
isRetina = function(){ | |
var mediaQuery = '(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)'; | |
var root = (typeof exports === 'undefined' ? window : exports); | |
if (root.devicePixelRatio > 1) { | |
return true; | |
} | |
if (root.matchMedia && root.matchMedia(mediaQuery).matches) { | |
return true; | |
} |
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
jQuery(document).ready(function(){ | |
var changed='no'; | |
$('input[type="text"]').change(function() { | |
changed='yes'; | |
}) | |
$(window).on('beforeunload', function() { | |
if (changed == 'yes'){ | |
return "Были внесены изменения, которые НЕ БЫЛИ сохранены"; | |
} |
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
$(document).mousemove(function(event) { | |
currentMousePos.x = event.pageX; | |
currentMousePos.y = event.pageY; | |
}); |
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).scroll(function(){ | |
var topScr = $(window).scrollTop(); | |
// фиксация куска хедера и скрытие лишней части | |
if( topScr > 65 ){ $('#header').addClass('fix'); $('#body').css({'padding-top':'140px'}); | |
}else{ $('#header').removeClass('fix'); $('#body').css({'padding-top':'30px'}); } | |
// паралакс | |
if($('.chsk').length){ | |
$('.chsk>div').css({'background-position':'0px '+topScr/10+'px'}); |
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 validate_phone($phone) | |
{ | |
$phone = preg_replace("/[^0-9]/",'',$phone); | |
if(empty($phone) || (strlen($phone) < 8 || strlen($phone) > 16)) | |
return false; | |
return true; | |
} |
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 | |
class Model_general extends CI_Model { | |
function getData($table, $where=FALSE, $sort_by=FALSE, $limit=FALSE, $select=FALSE){ | |
if($select){ | |
$this->db->select($select); | |
} | |
if($where){ | |
$this->db->where($where); | |
} |
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 | |
class Model_admin extends CI_Model { | |
// UPDATE | |
function updateTable($table, $dbins, $where=FALSE) { | |
if($where) | |
$this->db->update($table, $dbins, $where); | |
else | |
$this->db->insert($table, $dbins); | |
} |
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 | |
$ID = urldecode(urldecode($_REQUEST["ORDER_ID"])); | |
$arFilter = Array( | |
"USER_ID" => $USER->GetID(), | |
"LID" => SITE_ID, | |
"ACCOUNT_NUMBER" => $ID, | |
); | |
$dbOrder = CSaleOrder::GetList(Array("ID" => "ASC"), $arFilter); |
NewerOlder