{custom order="reads" days="7" limit="10"}
<?php phpinfo();
<?php require_once __DIR__ . "/engine/api/api.class.php"; require_once ENGINE_DIR . '/modules/functions.php'; $sql = $db->qquery('SELECT id, title, xfields FROM dle_post WHERE metatitle = ""'); while ($row = $db->get_row($sql)) { $xfields = xfieldsdataload($row['xfields']); $title = [ $row['title'], $xfields['year'], 'смотреть онлайн бесплатно на ***', ]; $title = stripslashes(join(' ', $title)); $db->query("UPDATE dle_post SET metatitle = '$title' WHERE id = {$row['id']}"); } echo 'Готово';