Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK ! 6ŠÀš š Readline.phpnu ÕIw¶´ historyFile);
if (!$history) {
return [];
}
// libedit doesn't seem to support non-unix line separators.
$history = \explode("\n", $history);
// shift the history signature, ensure it's valid
if (\array_shift($history) !== '_HiStOrY_V2_') {
return [];
}
// decode the line
$history = \array_map([$this, 'parseHistoryLine'], $history);
// filter empty lines & comments
return \array_values(\array_filter($history));
}
/**
* From GNUReadline (readline/histfile.c & readline/histexpand.c):
* lines starting with "\0" are comments or timestamps;
* if "\0" is found in an entry,
* everything from it until the next line is a comment.
*
* @param string $line The history line to parse
*
* @return string | null
*/
protected function parseHistoryLine($line)
{
// empty line, comment or timestamp
if (!$line || $line[0] === "\0") {
return;
}
// if "\0" is found in an entry, then
// everything from it until the end of line is a comment.
if (($pos = \strpos($line, "\0")) !== false) {
$line = \substr($line, 0, $pos);
}
return ($line !== '') ? Str::unvis($line) : null;
}
}
PK ! ¾žìÕ
Transient.phpnu ÕIw¶´ history = [];
$this->historySize = $historySize;
$this->eraseDups = $eraseDups;
}
/**
* {@inheritdoc}
*/
public function addHistory($line)
{
if ($this->eraseDups) {
if (($key = \array_search($line, $this->history)) !== false) {
unset($this->history[$key]);
}
}
$this->history[] = $line;
if ($this->historySize > 0) {
$histsize = \count($this->history);
if ($histsize > $this->historySize) {
$this->history = \array_slice($this->history, $histsize - $this->historySize);
}
}
$this->history = \array_values($this->history);
return true;
}
/**
* {@inheritdoc}
*/
public function clearHistory()
{
$this->history = [];
return true;
}
/**
* {@inheritdoc}
*/
public function listHistory()
{
return $this->history;
}
/**
* {@inheritdoc}
*/
public function readHistory()
{
return true;
}
/**
* {@inheritdoc}
*
* @throws BreakException if user hits Ctrl+D
*
* @return string
*/
public function readline($prompt = null)
{
echo $prompt;
return \rtrim(\fgets($this->getStdin()), "\n\r");
}
/**
* {@inheritdoc}
*/
public function redisplay()
{
// noop
}
/**
* {@inheritdoc}
*/
public function writeHistory()
{
return true;
}
/**
* Get a STDIN file handle.
*
* @throws BreakException if user hits Ctrl+D
*
* @return resource
*/
private function getStdin()
{
if (!isset($this->stdin)) {
$this->stdin = \fopen('php://stdin', 'r');
}
if (\feof($this->stdin)) {
throw new BreakException('Ctrl+D');
}
return $this->stdin;
}
}
PK ! 47°õ HoaConsole.phpnu ÕIw¶´ hoaReadline = new HoaReadline();
}
/**
* {@inheritdoc}
*/
public function addHistory($line)
{
$this->hoaReadline->addHistory($line);
return true;
}
/**
* {@inheritdoc}
*/
public function clearHistory()
{
$this->hoaReadline->clearHistory();
return true;
}
/**
* {@inheritdoc}
*/
public function listHistory()
{
$i = 0;
$list = [];
while (($item = $this->hoaReadline->getHistory($i++)) !== null) {
$list[] = $item;
}
return $list;
}
/**
* {@inheritdoc}
*/
public function readHistory()
{
return true;
}
/**
* {@inheritdoc}
*
* @throws BreakException if user hits Ctrl+D
*
* @return string
*/
public function readline($prompt = null)
{
return $this->hoaReadline->readLine($prompt);
}
/**
* {@inheritdoc}
*/
public function redisplay()
{
// noop
}
/**
* {@inheritdoc}
*/
public function writeHistory()
{
return true;
}
}
PK ! ÿM,ã ã GNUReadline.phpnu ÕIw¶´ historyFile = ($historyFile !== null) ? $historyFile : false;
$this->historySize = $historySize;
$this->eraseDups = $eraseDups;
}
/**
* {@inheritdoc}
*/
public function addHistory($line)
{
if ($res = \readline_add_history($line)) {
$this->writeHistory();
}
return $res;
}
/**
* {@inheritdoc}
*/
public function clearHistory()
{
if ($res = \readline_clear_history()) {
$this->writeHistory();
}
return $res;
}
/**
* {@inheritdoc}
*/
public function listHistory()
{
return readline_list_history();
}
/**
* {@inheritdoc}
*/
public function readHistory()
{
// Workaround PHP bug #69054
//
// If open_basedir is set, readline_read_history() segfaults. This was fixed in 5.6.7:
//
// https://github.com/php/php-src/blob/423a057023ef3c00d2ffc16a6b43ba01d0f71796/NEWS#L19-L21
//
if (\version_compare(PHP_VERSION, '5.6.7', '>=') || !\ini_get('open_basedir')) {
\readline_read_history();
}
\readline_clear_history();
return \readline_read_history($this->historyFile);
}
/**
* {@inheritdoc}
*/
public function readline($prompt = null)
{
return \readline($prompt);
}
/**
* {@inheritdoc}
*/
public function redisplay()
{
\readline_redisplay();
}
/**
* {@inheritdoc}
*/
public function writeHistory()
{
// We have to write history first, since it is used
// by Libedit to list history
if ($this->historyFile !== false) {
$res = \readline_write_history($this->historyFile);
} else {
$res = true;
}
if (!$res || !$this->eraseDups && !$this->historySize > 0) {
return $res;
}
$hist = $this->listHistory();
if (!$hist) {
return true;
}
if ($this->eraseDups) {
// flip-flip technique: removes duplicates, latest entries win.
$hist = \array_flip(\array_flip($hist));
// sort on keys to get the order back
\ksort($hist);
}
if ($this->historySize > 0) {
$histsize = \count($hist);
if ($histsize > $this->historySize) {
$hist = \array_slice($hist, $histsize - $this->historySize);
}
}
\readline_clear_history();
foreach ($hist as $line) {
\readline_add_history($line);
}
if ($this->historyFile !== false) {
return \readline_write_history($this->historyFile);
}
return true;
}
}
PK ! 9«§©› › TransientTest.phpnu ÕIw¶´ assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$this->assertSame(['foo'], $readline->listHistory());
$readline->addHistory('bar');
$this->assertSame(['foo', 'bar'], $readline->listHistory());
$readline->addHistory('baz');
$this->assertSame(['foo', 'bar', 'baz'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
/**
* @depends testHistory
*/
public function testHistorySize()
{
$readline = new Transient(null, 2);
$this->assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$readline->addHistory('bar');
$this->assertSame(['foo', 'bar'], $readline->listHistory());
$readline->addHistory('baz');
$this->assertSame(['bar', 'baz'], $readline->listHistory());
$readline->addHistory('w00t');
$this->assertSame(['baz', 'w00t'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
/**
* @depends testHistory
*/
public function testHistoryEraseDups()
{
$readline = new Transient(null, 0, true);
$this->assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$readline->addHistory('bar');
$readline->addHistory('foo');
$this->assertSame(['bar', 'foo'], $readline->listHistory());
$readline->addHistory('baz');
$readline->addHistory('w00t');
$readline->addHistory('baz');
$this->assertSame(['bar', 'foo', 'w00t', 'baz'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
public function testSomeThingsAreAlwaysTrue()
{
$readline = new Transient();
$this->assertTrue(Transient::isSupported());
$this->assertTrue($readline->readHistory());
$this->assertTrue($readline->writeHistory());
}
}
PK ! f¦ÖG
GNUReadlineTest.phpnu ÕIw¶´ markTestSkipped('GNUReadline not enabled');
}
$this->historyFile = \tempnam(\sys_get_temp_dir(), 'psysh_test_history');
\file_put_contents($this->historyFile, "_HiStOrY_V2_\n");
}
public function testHistory()
{
$readline = new GNUReadline($this->historyFile);
$this->assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$this->assertSame(['foo'], $readline->listHistory());
$readline->addHistory('bar');
$this->assertSame(['foo', 'bar'], $readline->listHistory());
$readline->addHistory('baz');
$this->assertSame(['foo', 'bar', 'baz'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
/**
* @depends testHistory
*/
public function testHistorySize()
{
$readline = new GNUReadline($this->historyFile, 2);
$this->assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$readline->addHistory('bar');
$this->assertSame(['foo', 'bar'], $readline->listHistory());
$readline->addHistory('baz');
$this->assertSame(['bar', 'baz'], $readline->listHistory());
$readline->addHistory('w00t');
$this->assertSame(['baz', 'w00t'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
/**
* @depends testHistory
*/
public function testHistoryEraseDups()
{
$readline = new GNUReadline($this->historyFile, 0, true);
$this->assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$readline->addHistory('bar');
$readline->addHistory('foo');
$this->assertSame(['bar', 'foo'], $readline->listHistory());
$readline->addHistory('baz');
$readline->addHistory('w00t');
$readline->addHistory('baz');
$this->assertSame(['bar', 'foo', 'w00t', 'baz'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
}
PK ! çps˜‘ ‘ LibeditTest.phpnu ÕIw¶´ markTestSkipped('Libedit not enabled');
}
$this->historyFile = \tempnam(\sys_get_temp_dir(), 'psysh_test_history');
if (false === \file_put_contents($this->historyFile, "_HiStOrY_V2_\n")) {
$this->fail('Unable to write history file: ' . $this->historyFile);
}
// Calling readline_read_history before readline_clear_history
// avoids segfault with PHP 5.5.7 & libedit v3.1
\readline_read_history($this->historyFile);
\readline_clear_history();
}
public function tearDown()
{
if (\is_file($this->historyFile)) {
\unlink($this->historyFile);
}
}
public function testHistory()
{
$readline = new Libedit($this->historyFile);
$this->assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$this->assertSame(['foo'], $readline->listHistory());
$readline->addHistory('bar');
$this->assertSame(['foo', 'bar'], $readline->listHistory());
$readline->addHistory('baz');
$this->assertSame(['foo', 'bar', 'baz'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
/**
* @depends testHistory
*/
public function testHistorySize()
{
$readline = new Libedit($this->historyFile, 2);
$this->assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$readline->addHistory('bar');
$this->assertSame(['foo', 'bar'], $readline->listHistory());
$readline->addHistory('baz');
$this->assertSame(['bar', 'baz'], $readline->listHistory());
$readline->addHistory('w00t');
$this->assertSame(['baz', 'w00t'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
/**
* @depends testHistory
*/
public function testHistoryEraseDups()
{
$readline = new Libedit($this->historyFile, 0, true);
$this->assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$readline->addHistory('bar');
$readline->addHistory('foo');
$this->assertSame(['bar', 'foo'], $readline->listHistory());
$readline->addHistory('baz');
$readline->addHistory('w00t');
$readline->addHistory('baz');
$this->assertSame(['bar', 'foo', 'w00t', 'baz'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
public function testListHistory()
{
$readline = new Libedit($this->historyFile);
\file_put_contents(
$this->historyFile,
"This is an entry\n\0This is a comment\nThis is an entry\0With a comment\n",
FILE_APPEND
);
$this->assertSame([
'This is an entry',
'This is an entry',
], $readline->listHistory());
$readline->clearHistory();
}
/**
* Libedit being a BSD library,
* it doesn't support non-unix line separators.
*/
public function testLinebreaksSupport()
{
$readline = new Libedit($this->historyFile);
\file_put_contents(
$this->historyFile,
"foo\rbar\nbaz\r\nw00t",
FILE_APPEND
);
$this->assertSame([
"foo\rbar",
"baz\r",
'w00t',
], $readline->listHistory());
$readline->clearHistory();
}
}
PK ! $ð³ùt t HoaConsoleTest.phpnu ÕIw¶´ assertEmpty($readline->listHistory());
$readline->addHistory('foo');
$this->assertSame(['foo'], $readline->listHistory());
$readline->addHistory('bar');
$this->assertSame(['foo', 'bar'], $readline->listHistory());
$readline->addHistory('baz');
$this->assertSame(['foo', 'bar', 'baz'], $readline->listHistory());
$readline->clearHistory();
$this->assertEmpty($readline->listHistory());
}
}
PK ! 6ŠÀš š Readline.phpnu ÕIw¶´ PK ! ›ð“Ž Ö Libedit.phpnu ÕIw¶´ PK ! ¾žìÕ
Transient.phpnu ÕIw¶´ PK ! 47°õ [ HoaConsole.phpnu ÕIw¶´ PK ! ÿM,ã ã ¶! GNUReadline.phpnu ÕIw¶´ PK ! 9«§©› › Ø1 TransientTest.phpnu ÕIw¶´ PK ! f¦ÖG
´; GNUReadlineTest.phpnu ÕIw¶´ PK ! çps˜‘ ‘ F LibeditTest.phpnu ÕIw¶´ PK ! $ð³ùt t ãU HoaConsoleTest.phpnu ÕIw¶´ PK Æ ™Y