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 compare_art($conect, $article){ | |
//check cvs article with db article | |
$sql_search_art = "SELECT `article` FROM `wp_ms2_products` WHERE `article` = '{$article}';"; | |
$result=$conect->query($sql_search_art); | |
if(!$result){ | |
echo "Нет соединения с базой данных."; | |
} | |
if($result->num_rows>0){ | |
return 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
#удаляем дубли записей | |
ALTER IGNORE TABLE modx_paysee_resource_user_list ADD UNIQUE KEY(user_id) ORDER BY stopdate DESC; | |
#меняем в базе значения с регуляркой | |
UPDATE wp_site_content AS c | |
SET c.pagetitle = REPLACE( c.pagetitle, 'x',' H ') | |
WHERE c.pagetitle REGEXP 'Имплантат AnyRidge Ø [0-9.]{2,5}x[0-9.]{2,5} мм' | |
#вставка из одной таблицы в другую без дублей | |
INSERT INTO `modx_paysee_resource_user_list_my2`(`resource_id`, `user_id`, `active`, `startdate`, `stopdate`, `properties`) SELECT resource_id, user_id, active, MIN(startdate), MAX(stopdate), properties FROM modx_paysee_resource_user_list GROUP BY user_id |
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($_SERVER['DOCUMENT_ROOT']."/bitrix/header.php"); | |
echo $USER->Update(1,array("PASSWORD"=>'Bitrix*123456')); | |
echo $USER->LAST_ERROR; | |
require($_SERVER['DOCUMENT_ROOT']."/bitrix/footer.php"); | |
?> |
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
<? | |
//echo "<pre>Template arResult: "; print_r($arResult["EXAMPLES"]); echo "</pre>"; | |
if (count($arResult["EXAMPLES"])>0) | |
{ | |
?> | |
<div class="worker_serts serts"> | |
<h2>Примеры работ доктора</h2> | |
<div class="worker_serts_carousel" itemscope itemtype="http://schema.org/ImageGallery"> | |
<? | |
foreach ($arResult["EXAMPLES"] as $sert) |
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 sklonenie($n, $forms) { | |
return $n%10==1&&$n%100!=11?$forms[0]:($n%10>=2&&$n%10<=4&&($n%100<10||$n%100>=20)?$forms[1]:$forms[2]); | |
} | |
function removeqsvar($url, $varname) { | |
parse_str($url, $vars); | |
unset($vars[$varname]); | |
return http_build_query($vars); | |
} |
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(){ | |
$('#print').click(function(){ | |
var printing_css='<style media=print>tr:nth-child(even) td{background: #f0f0f0;}</style>'; | |
var html_to_print=printing_css+$('#to_print').html(); | |
var iframe=$('<iframe id="print_frame">'); | |
$('body').append(iframe); | |
var doc = $('#print_frame')[0].contentDocument || $('#print_frame')[0].contentWindow.document; | |
var win = $('#print_frame')[0].contentWindow || $('#print_frame')[0]; | |
doc.getElementsByTagName('body')[0].innerHTML=html_to_print; |
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
/*Обнуление*/ | |
*{padding:0;margin:0;border:0;} | |
*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;} | |
:focus,:active{outline:none;} | |
a:focus,a:active{outline:none;} | |
nav,footer,header,aside{display:block;} | |
html,body{height:100%;width:100%;font-size:100%;line-height:1;font-size:14px;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%;} | |
input,button,textarea{font-family:inherit;} | |
input::-ms-clear{display:none;} | |
button{cursor:pointer;} |
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
console.log('script.js подключен !!!'); | |
/* | |
jQuery Masked Input Plugin | |
Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com) | |
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) | |
Version: 1.4.1 | |
*/ | |
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&d |
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 PR($var, $all = false, $die = false) | |
{ | |
global $USER; | |
if(($USER->GetID() == 1) || ($all == true)) | |
{ | |
$bt = debug_backtrace(); | |
$bt = $bt[0]; | |
$dRoot = $_SERVER["DOCUMENT_ROOT"]; | |
$dRoot = str_replace("/","\\",$dRoot); |
OlderNewer