403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.59
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/phpmyadming/libraries/transformations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/phpmyadming/libraries/transformations/text_plain__dateformat.inc.php
<?php
/* $Id: text_plain__dateformat.inc.php 9577 2006-10-18 08:09:03Z nijel $ */
// vim: expandtab sw=4 ts=4 sts=4:

function PMA_transformation_text_plain__dateformat($buffer, $options = array(), $meta = '') {
    // possibly use a global transform and feed it with special options:
    // include('./libraries/transformations/global.inc.php');

    // further operations on $buffer using the $options[] array.
    if (empty($options[0])) {
        $options[0] = 0;
    }

    if (empty($options[2])) {
        $options[2] = 'local';
    } else {
        $options[2] = strtolower($options[2]);
    }

    if (empty($options[1])) {
        if ($options[2] == 'local') {
            $options[1] = $GLOBALS['datefmt'];
        } else {
            $options[1] = 'Y-m-d  H:i:s';
        }
    }

    $timestamp = -1;

    // Detect TIMESTAMP(6 | 8 | 10 | 12 | 14), (2 | 4) not supported here.
    if (preg_match('/^(\d{2}){3,7}$/', $buffer)) {

        if (strlen($buffer) == 14 || strlen($buffer) == 8) {
            $offset = 4;
        } else {
            $offset = 2;
        }

        $d = array();
        $d['year']   = substr($buffer, 0, $offset);
        $d['month']  = substr($buffer, $offset, 2);
        $d['day']    = substr($buffer, $offset + 2, 2);
        $d['hour']   = substr($buffer, $offset + 4, 2);
        $d['minute'] = substr($buffer, $offset + 6, 2);
        $d['second'] = substr($buffer, $offset + 8, 2);

        if (checkdate($d['month'], $d['day'], $d['year'])) {
            $timestamp = mktime($d['hour'], $d['minute'], $d['second'], $d['month'], $d['day'], $d['year']);
        }
    // If all fails, assume one of the dozens of valid strtime() syntaxes (http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html)
    } else {
        if (preg_match('/^[0-9]\d{1,9}$/', $buffer)) {
            $timestamp = (int)$buffer;
        } else {
            $timestamp = strtotime($buffer);
        }
    }

    // If all above failed, maybe it's a Unix timestamp already?
    if ($timestamp < 0 && preg_match('/^[1-9]\d{1,9}$/', $buffer)) {
        $timestamp = $buffer;
    }

    // Reformat a valid timestamp
    if ($timestamp >= 0) {
        $timestamp -= $options[0] * 60 * 60;
        $source = $buffer;
        if ($options[2] == 'local') {
            $text = PMA_localisedDate($timestamp, $options[1]);
        } elseif ($options[2] == 'utc') {
            $text = gmdate($options[1], $timestamp);
        } else {
            $text = 'INVALID DATE TYPE';
        }
        $buffer = '<dfn onclick="alert(\'' . $source . '\');" title="' . $source . '">' . $text . '</dfn>';
    }

    return $buffer;
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit