<?php

require_once 'diff-reader/DiffReaderClass.php';
$file = $_GET['file'];
$reader = new DiffReader($_GET['stp']);
try {
    $content = $reader->getFile($file)->getContent();
} catch (InvalidArgumentException $exc) {
    header("HTTP/1.0 404 Not Found");
    $error[1] = $exc->getMessage();
} catch (LengthException $exc) {
    $error[2] = $exc->getMessage();
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Diff Reader: <?php 
echo $file;
?>
</title>
        <link media="all" rel="stylesheet" type="text/css" href="/diff-reader/main.css" />
        <style>
            body{background-color:#313131;color:#f1f1f1;}
            .added {color: #00AA00;}
            .content-start {color: #00CCCC;}
            .empty-string {background-color: #AA0000;}
            .file-info {color: #E9FD02;}
            .removed {color: #F85F5F;}
        </style>
Exemplo n.º 2
0
<?php

/**
 * Access point for listing diffs
 *
 * @author  Sergey boonya Buynitskiy boonya41@gmail.com
 * @url     https://github.com/boonya/Diff-Reader
 */
require_once './diff-reader/DiffReaderClass.php';
$reader = new DiffReader();
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Diff Reader: Listing</title>
        <link media="all" rel="stylesheet" type="text/css" href="./diff-reader/main.css" />
        <style>
            .total {
                color: #AA0000;
                font-size: 150%;
            }
            ol li {
                margin: 5px 0;
            }
            ol li a {
                border-left: transparent 2px solid;
                color: #c3c3c3;
                font-size: 18px;
                font-weight: bold;
                padding-left: 5px;