Esempio n. 1
0
<?php

/**
 * @package     JBDump test
 * @version     1.2.0
 * @author      admin@joomla-book.ru
 * @link        http://joomla-book.ru/
 * @copyright   Copyright (c) 2009-2011 Joomla-book.ru
 * @license     GNU General Public License version 2 or later; see LICENSE
 * 
 */
include './included_file.php';
JBDump::showErrors();
?>
<h3>Code</h3><?php 
JBDump(file_get_contents(__FILE__), 0, '-= Code =-::source');
?>
<h3>Result</h3><?php 
echo "JBDump::hash('123456');";
JBDump::hash('123456');
echo "JBDump::timestamp(time());";
JBDump::timestamp(time());
echo "JBDump::ip();";
JBDump::ip();
echo 'JBDump::json($jsonData, \'JSON\');';
JBDump::json($jsonData, 'JSON');
echo "JBDump::url('http://yandex.ru/yandsearch?text=joomla-book.ru&lr=213', 'yandex url');";
JBDump::url('http://yandex.ru/yandsearch?text=joomla-book.ru&lr=213', 'yandex url');
echo 'JBDump::print_r($var, 0, \'print_r\');';
JBDump::print_r($var, 0, 'print_r');
echo 'JBDump::var_dump($var, 0, \'var_dump\');';
Esempio n. 2
0
<?php

if (!isset($_POST['value'])) {
    $_POST['value'] = '';
}
?>
<html>
    <head>
        <title>Base64 decode</title>
    </head>
    <body>
        <form action="" method="post">
            <textarea name="value" rows="5" cols="50"><?php 
echo $_POST['value'];
?>
</textarea>
            <br>
            <input type="submit" value="Submit">
        </form>
        <?php 
if ($_POST['value']) {
    JBDump(base64_decode($_POST['value']), 'base64_decode');
}
?>
    </body>
</html>

Esempio n. 3
0
<?php

if (!isset($_POST['value'])) {
    $_POST['value'] = '';
}
?>
<html>
    <head>
        <title>Html special chars</title>
    </head>
    <body>
        <form action="" method="post">
            <textarea name="value" rows="5" cols="50"><?php 
echo $_POST['value'];
?>
</textarea>
            <br>
            <input type="submit" value="Submit">
        </form>

        <?php 
if ($_POST['value']) {
    JBDump(htmlspecialchars($_POST['value']), 'htmlspecialchars');
}
?>

    </body>
</html>

Esempio n. 4
0
<?php

if (!isset($_POST['value'])) {
    $_POST['value'] = '';
}
?>
<html>
    <head>
        <title>JSON decode</title>
    </head>
    <body>
        <form action="" method="post">
            <textarea name="value" rows="5" cols="50"><?php 
echo $_POST['value'];
?>
</textarea>
            <br>
            <input type="submit" value="Submit">
        </form>

        <?php 
if ($_POST['value']) {
    JBDump(json_decode($_POST['value'], true), 0, 'JSON decode');
}
?>

    </body>
</html>

Esempio n. 5
0
    </head>
    <body>
        <form action="" method="post">
            <textarea name="value" rows="5" cols="50"><?php 
echo $_POST['value'];
?>
</textarea>
            <br>
            <input type="submit" value="Submit">
        </form>

        <?php 
JBDump(time() - $_POST['value'] . ' sec', 0, 'time() - $value');
echo '<hr>';
$consts = get_defined_constants(true);
foreach ($consts['user'] as $key => $const) {
    if (strpos($key, 'JBDUMP_DATE_') === 0) {
        $key = str_replace('JBDUMP_DATE_', '', $key);
        JBDump(date($const, $_POST['value']), 0, $key . '  ' . $const);
    }
}
foreach ($consts['date'] as $key => $const) {
    if (strpos($key, 'DATE_') === 0) {
        $key = str_replace('DATE_', '', $key);
        JBDump(date($const, $_POST['value']), 0, $key . '  ' . $const);
    }
}
?>
    </body>
</html>
<?php

if (!isset($_POST['value'])) {
    $_POST['value'] = '';
}
?>
<html>
    <head>
        <title>Html special chars decode</title>
    </head>
    <body>
        <form action="" method="post">
            <textarea name="value" rows="5" cols="50"><?php 
echo $_POST['value'];
?>
</textarea>
            <br>
            <input type="submit" value="Submit">
        </form>

        <?php 
if ($_POST['value']) {
    JBDump(htmlspecialchars_decode($_POST['value']), 'htmlspecialchars');
}
?>

    </body>
</html>

Esempio n. 7
0
if (!isset($_POST['value'])) {
    $_POST['value'] = '';
}
?>
<html>
    <head>
        <title>Parse url string</title>
    </head>
    <body>
        <form action="" method="post">
            <textarea name="value" rows="5" cols="50"><?php 
echo $_POST['value'];
?>
</textarea>
            <br>
            <input type="submit" value="Submit">
        </form>

        <?php 
if ($_POST['value']) {
    JBDump::url($_POST['value'], 'JBDump::url');
    parse_str($_POST['value'], $var);
    JBDump($var, 0, 'Parsed url params');
}
?>

    </body>
</html>

Esempio n. 8
0
<?php

/**
 * @package     JBDump test
 * @version     1.2.0
 * @author      admin@joomla-book.ru
 * @link        http://joomla-book.ru/
 * @copyright   Copyright (c) 2009-2011 Joomla-book.ru
 * @license     GNU General Public License version 2 or later; see LICENSE
 * 
 */
include './included_file.php';
JBDump::showErrors();
?>
<h3>Code</h3><?php 
JBDump(file_get_contents(__FILE__), 0, '-= Code =-::source');
?>
<h3>Result</h3><?php 
echo 'JBDump($var, 0);';
JBDump($var, 0);
echo 'JBDump($var, 1, \'myLoveVariable\');';
JBDump($var, 1, 'myLoveVariable');
echo 'Hidden message';
Esempio n. 9
0
<?php

/**
 * @package     JBDump test
 * @version     1.2.0
 * @author      admin@joomla-book.ru
 * @link        http://joomla-book.ru/
 * @copyright   Copyright (c) 2009-2011 Joomla-book.ru
 * @license     GNU General Public License version 2 or later; see LICENSE
 * 
 */
include './included_file.php';
JBDump::showErrors();
?>
<h3>Code</h3><?php 
JBDump(file_get_contents(__FILE__), 0, '-= Code =-::source');
?>
<h3>Result</h3><?php 
jbdump(1, 0);
JBDump::off();
echo 'text1<br/>';
JBDump('JBDump with die flag', 1, 'die');
echo 'text2<br/>';
JBDump::on();
jbdump(2, 1);
Esempio n. 10
0
<?php

if (!isset($_POST['value'])) {
    $_POST['value'] = '';
}
?>
<html>
    <head>
        <title>Unserialize</title>
    </head>
    <body>
        <form action="" method="post">
            <textarea name="value" rows="5" cols="50"><?php 
echo @$_POST['value'];
?>
</textarea>
            <br>
            <input type="submit" value="Submit">
        </form>
        <?php 
if ($_POST['value']) {
    JBDump(unserialize($_POST['value']), 'unserialize');
}
?>
    </body>
</html>