function oldDepending(m, h, g, k, b, d, n, o, e, l) {
var c = $("#" + h).val();
if (d) {
if (c == "-1") {
$("#span_" + h + "_other_val").show();
$("#span_" + g + "_other_val").show();
$("#" + g).removeAttr("disabled");
var j = $("<option></option>").attr("value", "-1").text(n);
$("#" + g).empty().append(j);
return
} else {
$("#span_" + h + "_other_val").hide();
$("#span_" + g + "_other_val").hide()
}
}
href="javascript:;"
var e=c.split(",");id=e[0];url_str=b+"/include/get_info.php?type=quick-search&id="+id;$.get(url_str,function(k){if(k==0){return}var j=k.split(",");var l=j.length;for(f=0;f<l;f++){div_spec=j[f];var g=div_spec.split("=");var h=g[0];if($("#"+h).val()!=null){if(g[1]==1){$("#"+h).fadeIn()}else{$("#"+h).fadeOut()}}}})}function IsNumeric(b){if(isNaN(parseFloat(b))){return false}return true}function dump(b,k){var h="";if(!k){k=0}var g="";for(var c=0;c<k+1;c++){g+=" "}if(typeof(b)=="object"){for(var d in b){var e=b[d];if(typeof(e)=="object"){h+=g+"'"+d+"' ...\n";h+=dump(e,k+1)}else{h+=g+"'"+d+"' => \""+e+'"\n'}}}else{h="===>"+b+"<===("+typeof(b)+")"}return h}function onReportMsg(d,c){if(myConfirm(c)==false){return}var b="include/actions.php?action=report&object=msg&id="+d;$.get(b,function(e){location.reload(true)})}function changeLocation(b,g){var c=g.split("|");var d=c[0];var e=c[1];$.post(b+"/include/set_location.php",{field:d,location:e,direct:1},function(h){location.reload(true)})}function changeDoubleLocation(l,m,j){var b=j.split(",");var k=b[0];var h=b[1];b=k.split("|");var d=b[0];var g=b[1];b=h.split("|");var c=b[0];var e=b[1];jQuery.post(l+"/include/set_location.php",{field1:d,location1:g,field2:c,location2:e,double_type:1},function(n){var o;if(m){o="html"}else{o="php"}location.href=l+"/listings."+o})}function deleteFile(c,e,b){var d="include/actions.php?action=delete_file&object="+b+"&id="+e+"&field_name="+c;$.get(d,function(g){location.reload(true)})}function load_gmaps(){var b=document.createElement("script");b.type="text/javascript";b.src="https://maps.googleapis.com/maps/api/js?callback=gmap_callback";if(typeof(places)!="undefined"&&places){b.src+="&libraries=places"}if(typeof(gmak)!="undefined"&&gmak!=null){b.src+="&key="+gmak}if(typeof(gmalng)!="undefined"&&gmalng!=null){b.src+="&language="+gmalng}if(typeof(gmareg)!="undefined"&&gmareg!=null){b.src+="®ion="+gmareg}document.body.appendChild(b)}function gmap_callback(){if(places){enable_autocomplete()}if(typeof init_gmap==="function"){init_gmap()}}jQuery.expr[":"].icontains=function(c,d,b){return jQuery(c).text().toUpperCase().indexOf(b[3].toUpperCase())>=0};function reinit(){$("#payment").empty();$(".form_footer").show()}function onEnable(e,d,b){if(d){if(myConfirm(d)==false){return}}var c="include/actions.php?action=enable&object="+b+"&id="+e;$.get(c,function(g){location.reload(true)})}function onDisable(e,d,b){if(d){if(myConfirm(d)==false){return}}var c="include/actions.php?action=favourite&object="+b+"&id="+e;$.get(c,function(g){location.reload(true)})}function makeFavorite(c,b){if(b){var d=b+"/"}d+="include/actions.php?object=favourite&action=add&id="+c;$.ajax({url:d,success:function(e){},async:false})}function remFavorite(c,b){if(b){var d=b+"/"}d+="include/actions.php?object=favourite&action=delete&id="+c;$.ajax({url:d,success:function(e){},async:false})}function loadExtScript(d,g,c){var b=document.createElement("script");b.type="text/javascript";if(b.readyState){b.onreadystatechange=function(){if(b.readyState=="loaded"||b.readyState=="complete"){b.onreadystatechange=null;g()}}}else{b.onload=function(){g()}}b.src=d;for(var e in c){b.setAttribute(e,c[e])}document.getElementsByTagName("head")[0].appendChild(b)};
select ".TABLE_ADS.".*$mlang_vars, ".TABLE_ADS.".id as adid
.*$mlang_vars,
я даже сейчас уже и не знаю SELECT /*DISTINCT*/ class_ads . * , class_ads.id AS adid, DATE_FORMAT( class_ads.`date_added` , '%d.%m в %H:%i' ) AS date_nice, DATE_FORMAT( class_ads.`date_expires` , '%d.%m в %H:%i' ) AS date_expires_nice, UNIX_TIMESTAMP( class_ads.`date_added` ) AS `time_added` , (
class_ads.date_expires < '2019-08-19 20:07:29'
AND class_ads.date_expires != '0000-00-00 00:00:00'
AND class_ads.active =0
) AS expired, class_slugs.slug
FROM class_ads
INNER JOIN class_slugs ON class_ads.id = class_slugs.object_id
WHERE class_ads.active =1
AND class_slugs.`type` = 'listing'
ORDER BY `priority` DESC , date_added DESC
LIMIT 0 , 12
$str_index = "";
if($this->use_index) $str_index = " use index ({$this->use_index}) ";
$sql = "select distinct ".TABLE_ADS.".*$mlang_vars, ".TABLE_ADS.".id as adid, date_format(".TABLE_ADS.".`date_added`,'$date_format') as date_nice, date_format(".TABLE_ADS.".`date_expires`,'$date_format') as date_expires_nice, UNIX_TIMESTAMP(".TABLE_ADS.".`date_added`) as `time_added`, (".TABLE_ADS.".date_expires < '$timestamp' and ".TABLE_ADS.".date_expires!='0000-00-00 00:00:00' and ".TABLE_ADS.".active=0) as expired
$str_slugs
$q_vars
from ".TABLE_ADS." $str_index
$q_join $join_pictures $join_cat $join_users
$join_slugs
".$where.$where_slugs." ".$order_by." ".$order_way." ";
if($ads_per_page>0) $sql .= " limit ".$general_row.", ".$ads_per_page;
// echo $sql."<br/><br/>";
$arr = $db->fetchAssocList($sql);
EXPLAIN SELECT DISTINCT class_ads . * , class_ads.id AS adid, DATE_FORMAT( class_ads.`date_added` , '%d.%m в %H:%i' ) AS date_nice, DATE_FORMAT( class_ads.`date_expires` , '%d.%m в %H:%i' ) AS date_expires_nice, UNIX_TIMESTAMP( class_ads.`date_added` ) AS `time_added` , (
class_ads.date_expires < '2019-08-19 20:07:29'
AND class_ads.date_expires != '0000-00-00 00:00:00'
AND class_ads.active =0
) AS expired, class_slugs.slug
FROM class_ads
INNER JOIN class_slugs ON class_ads.id = class_slugs.object_id
WHERE class_ads.active =1
AND class_slugs.`type` = 'listing'
ORDER BY `priority` DESC , date_added DESC
LIMIT 0 , 12
$str_index = "";
if($this->use_index) $str_index = " use index ({$this->use_index}) ";
$sql = "select distinct ".TABLE_ADS.".*$mlang_vars, ".TABLE_ADS.".id as adid, date_format(".TABLE_ADS.".`date_added`,'$date_format') as date_nice, date_format(".TABLE_ADS.".`date_expires`,'$date_format') as date_expires_nice, UNIX_TIMESTAMP(".TABLE_ADS.".`date_added`) as `time_added`, (".TABLE_ADS.".date_expires < '$timestamp' and ".TABLE_ADS.".date_expires!='0000-00-00 00:00:00' and ".TABLE_ADS.".active=0) as expired
$str_slugs
$q_vars
from ".TABLE_ADS." $str_index
$q_join $join_pictures $join_cat $join_users
$join_slugs
".$where.$where_slugs." ".$order_by." ".$order_way." ";
if($ads_per_page>0) $sql .= " limit ".$general_row.", ".$ads_per_page;
<script type="text/javascript">
if(window.innerWidth < 600){ /*если нужно чтобы блок показывался, когда больше 600, то >601? */
(function(w, d, n, s, t) {
w[n] = w[n] || [];
w[n].push(function() {
Ya.Context.AdvManager.render({
blockId: "R-A-355220-28",
renderTo: "yandex_rtb_R-A-355220-28",
async: true
});
});
t = d.getElementsByTagName("script")[0];
s = d.createElement("script");
s.type = "text/javascript";
s.src = "//an.yandex.ru/system/context.js";
s.async = true;
t.parentNode.insertBefore(s, t);
})(this, this.document, "yandexContextAsyncCallbacks");
}
</script>