HEX
Server: Apache
System: Linux webm013.cluster123.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: lesanew (165608)
PHP: 8.3.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/lesanew/www/wp-content/plugins/gift-hunt/views/gifthunt-layout.view.php
<?php

// Make sure we don't expose any info if called directly
if ( !function_exists( "add_action" ) ) {
	echo "Hi there!  I'm just a plugin, not much I can do when called directly.";
	exit;
}

/**
 * Display extension subpage
 */
$gifthunt_subpage = "sessions";

if ( isset ( $_GET["p"] ) ) {
  $gifthunt_subpage = sanitize_title( $_GET["p"] );
}

$gifthunt = new Gifthuntfree();

$path = "gifthunt-" . $gifthunt_subpage . ".view.php";

// get default Mailchimp integration settings
$mailchimp_default_settings = $gifthunt->get_mailchimp_default_settings();

switch ( $gifthunt_subpage ) {
  /**
   * List gifthunt sessions
   */
  case "sessions":
    if ( file_exists( dirname( __FILE__ ) . "/" . $path ) ) {
      /**
       * Get gifthunt sessions from the database
       */
      $gifthunt_sessions = $gifthunt->get_gifthunt_list();
      include $path;
    } else {
      // display 404
      include "gifthunt-404.view.php";
    }
    break;

  /**
   * Create new session
   */
  case "session-create":
    if ( file_exists( dirname( __FILE__ ) . "/" . $path ) ) {
      include $path;
    } else {
      // display 404
      include "gifthunt-404.view.php";
    }
    break;

  /**
   * Edit session
   */
  case "session-edit":
    if ( file_exists( dirname( __FILE__ ) . "/" . $path ) ) {
      $gifthunData = $gifthunt->get_gifthunt_data( intval( $_GET["id"] ) );
      if ( !isset( $gifthunData->id ) ) {
        // display 404
        include "gifthunt-404.view.php";
        break;
      }
      
      $gifthunt = $gifthunData;
      include $path;
    } else {
      // display 404
      include "gifthunt-404.view.php";
    }
    break;

  /**
   * List hunters
   */
  case "hunters":
    if ( file_exists( dirname( __FILE__ ) . "/" . $path ) ) {
      $gifthunData = $gifthunt->get_gifthunt_data( intval( $_GET["id"] ) );
      if ( ! isset( $gifthunData->id ) ) {
        // display 404
        include "gifthunt-404.view.php";
        break;
      }

      $gifthuntHunters = $gifthunt->get_hunters( intval( $_GET["id"] ) );

      $gifthunt = $gifthunData;
      include $path;
    } else {
      // display 404
      include "gifthunt-404.view.php";
    }
    break;

  /**
   * Mailchimp Integration settings
   */
  case "mailchimp-integration":
    if ( file_exists( dirname( __FILE__ ) . "/" . $path ) ) {
      include $path;
    } else {
      // display 404
      include "gifthunt-404.view.php";
    }
    break;

  /**
   * Mailchimp log list - for development purposes
   */
  case "mailchimp-log":
    if ( file_exists( dirname( __FILE__ ) . "/" . $path ) ) {
      $gifthunt_mailchimp_log = $gifthunt->get_mailchimp_log();
      include $path;
    } else {
      // display 404
      include "gifthunt-404.view.php";
    }
    break;

  default:
    if ( file_exists( dirname( __FILE__ ) . "/" . $path ) ) {
      include $path;
    } else {
      // display 404
      include "gifthunt-404.view.php";
    }
    break;
}