$query_where = "(a.`Checked` = 1 OR (a.`Checked` = 0 AND (" .
"SELECT `Message_ID` FROM `Message$classID` as `child` " .
" WHERE `child`.`Parent_Message_ID` = a.`Message_ID` AND `child`.`Checked` = 1 " .
" LIMIT 1" .
")))";
$query_where = "akciya=1 AND (a.`Checked` = 1 OR (a.`Checked` = 0 AND (" .
"SELECT `Message_ID` FROM `Message$classID` as `child` " .
" WHERE `child`.`Parent_Message_ID` = a.`Message_ID` AND `child`.`Checked` = 1 " .
" LIMIT 1" .
")))";
$APPLICATION->AddBufferContent('ShowCondTitle');
function ShowCondTitle()
{
global $APPLICATION;
echo'<pre>epilog1 ';
print_r($APPLICATION->GetPageProperty('keywords'));
echo'</pre>';
$APPLICATION->setPageProperty('keywords','123123');
echo'<pre>epilog2 ';
print_r($APPLICATION->GetPageProperty('keywords'));
echo'</pre>';
}
// добавляем свой тег(поле) для формы
function hfa_cf7_func() {
return "<span class=\"wpcf7-form-control-wrap email_hfa\"><input type=\"text\" name=\"email_hfa\" value=\"\" size=\"40\" class=\"wpcf7-form-control email required wpcf7-text wpcf7-validates-as-required form__field\" id=\"email_hfa\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"email\"></span>";
}
wpcf7_add_form_tag(array('email_hfa', 'email_hfa*'), 'hfa_cf7_func', array('name-attr' => true));
// добавляем правило валиации для тега(поля)
add_filter('wpcf7_validate_email_hfa', 'email_hfa_validation_filter', 10, 2);
add_filter('wpcf7_validate_email_hfa*', 'email_hfa_validation_filter', 10, 2);
function email_hfa_validation_filter($result, $tag) {
$name = $tag->name;
$value = isset($_POST[$name]) ? sanitize_text_field($_POST[$name]) : '';
if ( '' != $value ) { //если в поле есть символы - отдаем ошибку
$result->invalidate($tag, wpcf7_get_message('invalid_required'));
}
return $result;
}
#PRODUCT_URL#/?pid=#ID#
#PRODUCT_URL#/#pid=#ID#
if (isset($_GET['prod_id'])) {}
RewriteEngine on
RewriteRule ^post/([-a-z0-9]+.html)$ index.php?post=$1 [L]
[[pdoResources?
&parents=`46`
&depth = `0`
&includeTVs=`category_intro,img_cat,img_cat_inner`
&resources=`[[*rel_products]]`
&includeContent=`1`
&showLog=`1`
&showHidden=`1`
&tpl=`list_termo_c`
]]
<div class="item-box">
<p><a href="[[+uri]]" class="title-item">[[+pagetitle]]</a></p>
<div class="image" >
<a href="[[+uri]]">
[[getImageList?
&tvname=`img_cat`
&docid=`[[+id]]`
&tpl=`ic`
]]
</a>
<div class="clear"></div>
</div>
[[+tv.category_intro]]
<div class="cb"></div>
<p style="text-align: right;"><a href="[[+uri]]">Подробнее</a></p>
</div>
<img src="[[+image]]" />