Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.0
- * @ Author : DeZender
- * @ Release on : 15.05.2020
- * @ Official site : http://DeZender.Net
- *
- */
- namespace Sandev;
- class ViewsTop
- {
- private $days = 30;
- private $licensed;
- public function __construct(int $days = 30)
- {
- $this->days = (int) $days;
- $this->init();
- }
- /**
- * Перенос данных из таблицы dle_views в dle_views_top
- * Запускается в цикле из файла cron.php
- */
- public function updateViews(int $news_id, int $count = 0): void
- {
- global $db;
- if (!$this->init()) {
- return NULL;
- }
- $db->query('INSERT INTO `dle_views_top` (`news_id`, `date`, `views`) ' . "\n\t\t\t" . 'VALUES (' . $news_id . ', CURDATE(), ' . $count . ')' . "\n\t\t\t" . 'ON DUPLICATE KEY UPDATE `views` = `views` + ' . $count . "\n\t\t");
- }
- /**
- * Обновление колонки dle_post.views_top
- */
- public function updatePosts(int $cron): void
- {
- global $db;
- if (!$this->init()) {
- return NULL;
- .....................................................................
- .........................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement