xandeadx

Nemotron 3 Ultra (free)

Jun 25th, 2026 (edited)
48
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.98 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Drupal\date_block\Plugin\Block;
  4.  
  5. use Drupal\Core\Block\Attribute\Block;
  6. use Drupal\Core\Block\BlockBase;
  7. use Drupal\Core\Form\FormStateInterface;
  8. use Drupal\Core\StringTranslation\TranslatableMarkup;
  9. use Drupal\Core\Datetime\DateFormatterInterface;
  10. use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
  11. use Symfony\Component\DependencyInjection\ContainerInterface;
  12.  
  13. /**
  14.  * Provides a 'Current Date' block.
  15.  */
  16. #[Block(
  17.  id: "date_block",
  18.   admin_label: new TranslatableMarkup("Current Date"),
  19.   category: new TranslatableMarkup("Custom")
  20. )]
  21. class DateBlock extends BlockBase implements ContainerFactoryPluginInterface {
  22.  
  23.   /**
  24.    * The date formatter service.
  25.    *
  26.    * @var \Drupal\Core\Datetime\DateFormatterInterface
  27.    */
  28.   protected $dateFormatter;
  29.  
  30.   /**
  31.    * Constructs a DateBlock object.
  32.    *
  33.    * @param array $configuration
  34.    *   A configuration array containing information about the plugin instance.
  35.    * @param string $plugin_id
  36.    *   The plugin ID for the plugin instance.
  37.    * @param mixed $plugin_definition
  38.    *   The plugin implementation definition.
  39.    * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
  40.    *   The date formatter service.
  41.    */
  42.   public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter) {
  43.     parent::__construct($configuration, $plugin_id, $plugin_definition);
  44.     $this->dateFormatter = $date_formatter;
  45.   }
  46.  
  47.   /**
  48.    * {@inheritdoc}
  49.    */
  50.   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  51.     return new static(
  52.       $configuration,
  53.       $plugin_id,
  54.       $plugin_definition,
  55.       $container->get('date.formatter')
  56.     );
  57.   }
  58.  
  59.   /**
  60.    * {@inheritdoc}
  61.    */
  62.   public function defaultConfiguration() {
  63.     return [
  64.       'date_format' => 'short',
  65.       'custom_date_format' => '',
  66.       'label_display' => TRUE,
  67.     ] + parent::defaultConfiguration();
  68.   }
  69.  
  70.   /**
  71.    * {@inheritdoc}
  72.    */
  73.   public function blockForm($form, FormStateInterface $form_state) {
  74.     $formats = $this->dateFormatter->getAllFormats();
  75.  
  76.     $form['date_format'] = [
  77.       '#type' => 'select',
  78.       '#title' => $this->t('Date format'),
  79.       '#description' => $this->t('Select the date format to use for displaying the current date.'),
  80.       '#default_value' => $this->configuration['date_format'],
  81.       '#options' => $formats,
  82.       '#empty_option' => $this->t('- Custom -'),
  83.       '#empty_value' => 'custom',
  84.     ];
  85.  
  86.     $form['custom_date_format'] = [
  87.       '#type' => 'textfield',
  88.       '#title' => $this->t('Custom date format'),
  89.       '#description' => $this->t('Enter a custom PHP date format string. See <a href=":url" target="_blank">PHP date() function</a> for format options.', [':url' => 'https://www.php.net/manual/en/function.date.php']),
  90.       '#default_value' => $this->configuration['custom_date_format'],
  91.       '#states' => [
  92.         'visible' => [
  93.           ':input[name="date_format"]' => ['value' => 'custom'],
  94.         ],
  95.       ],
  96.     ];
  97.  
  98.     return $form;
  99.   }
  100.  
  101.   /**
  102.    * {@inheritdoc}
  103.    */
  104.   public function blockSubmit($form, FormStateInterface $form_state) {
  105.     $this->configuration['date_format'] = $form_state->getValue('date_format');
  106.     $this->configuration['custom_date_format'] = $form_state->getValue('custom_date_format');
  107.   }
  108.  
  109.   /**
  110.    * {@inheritdoc}
  111.    */
  112.   public function build() {
  113.     $current_time = \Drupal::time()->getRequestTime();
  114.  
  115.     if ($this->configuration['date_format'] === 'custom' && !empty($this->configuration['custom_date_format'])) {
  116.       $date_string = $this->dateFormatter->format($current_time, 'custom', $this->configuration['custom_date_format']);
  117.     }
  118.     else {
  119.       $date_string = $this->dateFormatter->format($current_time, $this->configuration['date_format']);
  120.     }
  121.  
  122.     return [
  123.       '#markup' => $date_string,
  124.       '#cache' => [
  125.         'max-age' => 0,
  126.       ],
  127.     ];
  128.   }
  129.  
  130. }
Advertisement
Comments
  • User was banned
  • User was banned
  • kenfewshus
    2 days
    # CSS 0.83 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://drive.google.com/file/d/1cvQPOZ7JecI0L6lqdIzIHJbHQBiDRT4U/view?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
Add Comment
Please, Sign In to add comment