Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.144.31.48
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/misswavenigeria.com/wp-content/plugins/totalcontest-lite/src/Widgets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/misswavenigeria.com/wp-content/plugins/totalcontest-lite/src/Widgets/Contest.php
<?php

namespace TotalContest\Widgets;

//@TODO: FIX THIS
use TotalContestVendors\TotalCore\Helpers\Arrays;

/**
 * Class Contest
 * @package TotalContest\Widgets
 */
class Contest extends Base {
	public function __construct() {
		$widgetOptions = [
			'classname'   => 'totalcontest-widget-contest',
			'description' => esc_html__( 'TotalContest contest widget', 'totalcontest' ),
		];
		parent::__construct( 'totalcontest_contest', esc_html__( '[TotalContest] Contest', 'totalcontest' ), $widgetOptions );
	}

	public function content( $args, $instance ) {
		if ( ! empty( $instance['contest'] ) ):
			$contest = TotalContest( 'contests.repository' )->getById( $instance['contest'] )->setMenuVisibility( false )->setScreen( $instance['screen'] );
			if ( $instance['screen'] === 'contest.content' ):
				$contest->setCustomPageId( $instance['pageId'] );
			endif;

			echo $contest->render();
		endif;
	}

	public function fields( $fields, $instance ) {
		$instance = Arrays::parse( $instance, [ 'contest' => null, 'screen' => 'contest.landing', 'pageId' => null ] );
		// Contest field
		foreach ( (array) get_posts( 'post_type=contest&posts_per_page=-1' ) as $post ):
			$contests[ $post->ID ] = $post->post_title;
		endforeach;
		$fields['contest'] = TotalContest( 'form.field.select' )->setOptions( [
			'class'   => 'widefat',
			'name'    => esc_attr( $this->get_field_name( 'contest' ) ),
			'label'   => esc_html__( 'Contest:', 'totalcontest' ),
			'options' => $contests,
		] )->setValue( $instance['contest'] ?: '' );

		// Screen
		$fields['screen'] = TotalContest( 'form.field.select' )->setOptions(
			[
				'class'      => 'widefat totalcontest-page-selector',
				'name'       => esc_attr( $this->get_field_name( 'screen' ) ),
				'label'      => esc_html__( 'Screen:', 'totalcontest' ),
				'options'    => [
					'contest.landing'     => esc_html__( 'Home', 'totalcontest' ),
					'contest.participate'       => esc_html__( 'Participate', 'totalcontest' ),
					'contest.submissions' => esc_html__( 'Submissions', 'totalcontest' ),
					'contest.content'     => esc_html__( 'Custom page', 'totalcontest' ),
				],
				'attributes' => [
					'onchange' => 'jQuery(this).closest(".widget-content").find(".totalcontest-pageid").toggle(jQuery(this).val() == "contest.content")',
				],
			]
		)->setValue( $instance['screen'] ?: 'contest.landing' );

		// Custom page
		$hidden           = $instance['screen'] === 'contest.content' ? '' : 'style="display: none"';
		$fields['pageId'] = TotalContest( 'form.field.text' )->setOptions( [
			'class'    => 'widefat',
			'name'     => esc_attr( $this->get_field_name( 'pageId' ) ),
			'label'    => esc_html__( 'Page ID:', 'totalcontest' ),
			'template' => '<div class="totalcontest-form-field totalcontest-column-full totalcontest-pageid" ' . $hidden . '>{{label}}{{field}}</div>',
		] )->setValue( $instance['pageId'] ?: '' );

		return $fields;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit