Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
var/www/iplanru/data/www/i-plan.ru/libraries/legacy/application/cli.php 0000666 00000004132 15077705426 0022220 0 ustar 00 close();
}
// @codeCoverageIgnoreEnd
// If a input object is given use it.
if ($input instanceof JInput)
{
$this->input = $input;
}
// Create the input based on the application logic.
else
{
if (class_exists('JInput'))
{
$this->input = new JInputCLI;
}
}
// If a config object is given use it.
if ($config instanceof JRegistry)
{
$this->config = $config;
}
// Instantiate a new configuration object.
else
{
$this->config = new JRegistry;
}
$this->loadDispatcher($dispatcher);
// Load the configuration object.
$this->loadConfiguration($this->fetchConfigurationData());
// Set the execution datetime and timestamp;
$this->set('execution.datetime', gmdate('Y-m-d H:i:s'));
$this->set('execution.timestamp', time());
// Set the current directory.
$this->set('cwd', getcwd());
}
/**
* Returns a property of the object or the default value if the property is not set.
*
* @param string $key The name of the property.
* @param mixed $default The default value (optional) if none is set.
*
* @return mixed The value of the configuration.
*
* @since 11.3
*/
public function get($key, $default = null)
{
return $this->config->get($key, $default);
}
/**
* Returns a reference to the global JApplicationCli object, only creating it if it doesn't already exist.
*
* This method must be invoked as: $cli = JApplicationCli::getInstance();
*
* @param string $name The name (optional) of the JApplicationCli class to instantiate.
*
* @return JApplicationCli
*
* @since 11.1
*/
public static function getInstance($name = null)
{
// Only create the object if it doesn't exist.
if (empty(self::$instance))
{
if (class_exists($name) && (is_subclass_of($name, 'JApplicationCli')))
{
self::$instance = new $name;
}
else
{
self::$instance = new JApplicationCli;
}
}
return self::$instance;
}
/**
* Execute the application.
*
* @return void
*
* @since 11.1
*/
public function execute()
{
// Trigger the onBeforeExecute event.
$this->triggerEvent('onBeforeExecute');
// Perform application routines.
$this->doExecute();
// Trigger the onAfterExecute event.
$this->triggerEvent('onAfterExecute');
}
/**
* Load an object or array into the application configuration object.
*
* @param mixed $data Either an array or object to be loaded into the configuration object.
*
* @return JApplicationCli Instance of $this to allow chaining.
*
* @since 11.1
*/
public function loadConfiguration($data)
{
// Load the data into the configuration object.
if (is_array($data))
{
$this->config->loadArray($data);
}
elseif (is_object($data))
{
$this->config->loadObject($data);
}
return $this;
}
/**
* Write a string to standard output.
*
* @param string $text The text to display.
* @param boolean $nl True (default) to append a new line at the end of the output string.
*
* @return JApplicationCli Instance of $this to allow chaining.
*
* @codeCoverageIgnore
* @since 11.1
*/
public function out($text = '', $nl = true)
{
$output = $this->getOutput();
$output->out($text, $nl);
return $this;
}
/**
* Get an output object.
*
* @return CliOutput
*
* @since 3.3
*/
public function getOutput()
{
if (!$this->output)
{
// In 4.0, this will convert to throwing an exception and you will expected to
// initialize this in the constructor. Until then set a default.
$default = new Joomla\Application\Cli\Output\Xml;
$this->setOutput($default);
}
return $this->output;
}
/**
* Set an output object.
*
* @param CliOutput $output CliOutput object
*
* @return JApplicationCli Instance of $this to allow chaining.
*
* @since 3.3
*/
public function setOutput(CliOutput $output)
{
$this->output = $output;
return $this;
}
/**
* Get a value from standard input.
*
* @return string The input string from standard input.
*
* @codeCoverageIgnore
* @since 11.1
*/
public function in()
{
return rtrim(fread(STDIN, 8192), "\n");
}
/**
* Modifies a property of the object, creating it if it does not already exist.
*
* @param string $key The name of the property.
* @param mixed $value The value of the property to set (optional).
*
* @return mixed Previous value of the property
*
* @since 11.3
*/
public function set($key, $value = null)
{
$previous = $this->config->get($key);
$this->config->set($key, $value);
return $previous;
}
/**
* Method to load a PHP configuration class file based on convention and return the instantiated data object. You
* will extend this method in child classes to provide configuration data from whatever data source is relevant
* for your specific application.
*
* @param string $file The path and filename of the configuration file. If not provided, configuration.php
* in JPATH_BASE will be used.
* @param string $class The class name to instantiate.
*
* @return mixed Either an array or object to be loaded into the configuration object.
*
* @since 11.1
*/
protected function fetchConfigurationData($file = '', $class = 'JConfig')
{
// Instantiate variables.
$config = array();
if (empty($file) && defined('JPATH_BASE'))
{
$file = JPATH_BASE . '/configuration.php';
// Applications can choose not to have any configuration data
// by not implementing this method and not having a config file.
if (!file_exists($file))
{
$file = '';
}
}
if (!empty($file))
{
JLoader::register($class, $file);
if (class_exists($class))
{
$config = new $class;
}
else
{
throw new RuntimeException('Configuration class does not exist.');
}
}
return $config;
}
/**
* Method to run the application routines. Most likely you will want to instantiate a controller
* and execute it, or perform some sort of task directly.
*
* @return void
*
* @codeCoverageIgnore
* @since 11.3
*/
protected function doExecute()
{
// Your application routines go here.
}
}
var/www/iplanru/data/www/i-plan.ru/libraries/joomla/input/cli.php 0000666 00000007542 15100127442 0021060 0 ustar 00 filter = $options['filter'];
}
else
{
$this->filter = JFilterInput::getInstance();
}
// Get the command line options
$this->parseArguments();
// Set the options for the class.
$this->options = $options;
}
/**
* Method to serialize the input.
*
* @return string The serialized input.
*
* @since 12.1
*/
public function serialize()
{
// Load all of the inputs.
$this->loadAllInputs();
// Remove $_ENV and $_SERVER from the inputs.
$inputs = $this->inputs;
unset($inputs['env']);
unset($inputs['server']);
// Serialize the executable, args, options, data, and inputs.
return serialize(array($this->executable, $this->args, $this->options, $this->data, $inputs));
}
/**
* Method to unserialize the input.
*
* @param string $input The serialized input.
*
* @return JInput The input object.
*
* @since 12.1
*/
public function unserialize($input)
{
// Unserialize the executable, args, options, data, and inputs.
list($this->executable, $this->args, $this->options, $this->data, $this->inputs) = unserialize($input);
// Load the filter.
if (isset($this->options['filter']))
{
$this->filter = $this->options['filter'];
}
else
{
$this->filter = JFilterInput::getInstance();
}
}
/**
* Initialise the options and arguments
*
* Not supported: -abc c-value
*
* @return void
*
* @since 11.1
*/
protected function parseArguments()
{
$argv = $_SERVER['argv'];
$this->executable = array_shift($argv);
$out = array();
for ($i = 0, $j = count($argv); $i < $j; $i++)
{
$arg = $argv[$i];
// --foo --bar=baz
if (substr($arg, 0, 2) === '--')
{
$eqPos = strpos($arg, '=');
// --foo
if ($eqPos === false)
{
$key = substr($arg, 2);
// --foo value
if ($i + 1 < $j && $argv[$i + 1][0] !== '-')
{
$value = $argv[$i + 1];
$i++;
}
else
{
$value = isset($out[$key]) ? $out[$key] : true;
}
$out[$key] = $value;
}
// --bar=baz
else
{
$key = substr($arg, 2, $eqPos - 2);
$value = substr($arg, $eqPos + 1);
$out[$key] = $value;
}
}
elseif (substr($arg, 0, 1) === '-')
// -k=value -abc
{
// -k=value
if (substr($arg, 2, 1) === '=')
{
$key = substr($arg, 1, 1);
$value = substr($arg, 3);
$out[$key] = $value;
}
else
// -abc
{
$chars = str_split(substr($arg, 1));
foreach ($chars as $char)
{
$key = $char;
$value = isset($out[$key]) ? $out[$key] : true;
$out[$key] = $value;
}
// -a a-value
if ((count($chars) === 1) && ($i + 1 < $j) && ($argv[$i + 1][0] !== '-'))
{
$out[$key] = $argv[$i + 1];
$i++;
}
}
}
else
{
// Plain-arg
$this->args[] = $arg;
}
}
$this->data = $out;
}
}