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
public function clear_doubles(){ | |
$query = $this->db->query("SELECT * FROM `oc_product` WHERE xml_id IN ( SELECT xml_id FROM `oc_product` GROUP BY `xml_id` HAVING COUNT( `xml_id` ) > 1 ) ORDER BY `oc_product`.`xml_id` ASC"); | |
$doubles = $query->num_rows != 0 ? $query->rows : []; | |
$original = array_shift($doubles); | |
foreach($doubles as $double){ | |
var_dump($original['xml_id'], $double['xml_id']); echo "<br>"; |
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 | |
require './wp-config.php'; | |
mb_internal_encoding("UTF-8"); | |
try { | |
$dbh = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME .';charset=utf8' , DB_USER, DB_PASSWORD); | |
$posts = $dbh->query("SELECT * from 8qbBV3a040_posts WHERE `post_type`='". page ."'"); | |
foreach($posts as $post){ |
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
<div class="bigCont"> | |
<img src="//lorempixel.com/500/500" /> | |
</div> | |
<div class="smallCont"> | |
<ul class="list-inline" style="list-style: none"> | |
<li style="display: inline-block"><a href="//lorempixel.com/500/500"><img src="//lorempixel.com/100/100" alt=""></a></li> | |
<li style="display: inline-block"><a href="//lorempixel.com/500/500"><img src="//lorempixel.com/100/100" alt=""></a></li> | |
<li style="display: inline-block"><a href="//lorempixel.com/500/500"><img src="//lorempixel.com/100/100" alt=""></a></li> | |
<li style="display: inline-block"><a href="//lorempixel.com/500/500"><img src="//lorempixel.com/100/100" alt=""></a></li> | |
<li style="display: inline-block"><a href="//lorempixel.com/500/500"><img src="//lorempixel.com/100/100" alt=""></a></li> |
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
// FLOOR | |
var floorTexture = new THREE.ImageUtils.loadTexture( 'images/checkerboard.jpg' ); | |
floorTexture.wrapS = floorTexture.wrapT = THREE.RepeatWrapping; | |
floorTexture.repeat.set( 10, 10 ); | |
var floorMaterial = new THREE.MeshBasicMaterial( { map: floorTexture, side: THREE.DoubleSide } ); | |
var floorGeometry = new THREE.PlaneGeometry(30, 30, 0, 0); | |
var floor = new THREE.Mesh(floorGeometry, floorMaterial); | |
floor.position.y = -0.5; | |
floor.rotation.x = Math.PI / 2; | |
scene.add(floor); |
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
//ROOM | |
var roomGeometry = new THREE.BoxGeometry( 20, 10, 20 ); | |
var roomFrontMaterial = new THREE.MeshPhongMaterial( { | |
color: 0xffffff, | |
transparent: true, | |
opacity: 0.1 | |
} ); | |
var roomFront = new THREE.Mesh( roomGeometry, roomFrontMaterial ); | |
roomFront.position.y = 5; | |
var roomBackMaterial = new THREE.MeshPhongMaterial( { |
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
//magnific-popup | |
$(document).ready(function () { | |
$('div.big-image').click(function (e) { | |
e.preventDefault(); | |
var items = []; | |
var active; | |
$('.thumbnails img').each(function(i, item) { |
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
$('.accordion-link').click(function(){ | |
var $btn = $(this); | |
var $tab = $btn.next(); | |
if($tab.is(':visible')){ | |
$('.tabcontent').slideUp(); | |
}else{ | |
$('.tabcontent').slideUp(); | |
$tab.slideDown(function(){ | |
$('html,body').animate({ | |
scrollTop: $btn.offset().top - ($(document).width()<768 ? 60 : $('.header-fixed').height()) |
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
include_once "library/sxgeo/SxGeo.php"; | |
$sxGeoBase = "library/sxgeo/SxGeoCity.dat"; | |
$sxGeo = new SxGeo($sxGeoBase, SXGEO_BATCH | SXGEO_MEMORY); | |
$city = $sxGeo->getCity($this->request->server['REMOTE_ADDR'])['city']['name_ru']; |
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
if ($('#header .button-ugps span').hasClass('choose-city')) { | |
$.ajax({ | |
url: '/index.php?route=ugps/city/get&json=Y', | |
type: 'GET', | |
dataType: 'json', | |
error: function() { | |
return console.error(); | |
}, | |
success: function(res) { | |
if (res.name !== void 0) { |
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
{"lastUpload":"2019-01-09T12:05:59.049Z","extensionVersion":"v3.2.4"} |
OlderNewer