コード例 #1
0
    if (is_file($options['d'])) {
        delete_old_shadow_links($options['d']);
    } else {
        echo "\nYou need to supply the path to the PHP file as the argument of -d option.\nRun the script without argument to see its usage.\n\n";
    }
    exit;
}
// Get old shadow links
$old_links = get_old_shadow_links();
// If there are no old shadow links, print a message and quit
if (empty($old_links)) {
    echo "\nThere are no old shadow links in the system.\n\n";
    exit;
}
// Print old shadow links
print_links($old_links);
// If the options -s, -p and -d are not used at all, print a message to remind the user
if (!isset($options['s']) && !isset($options['p'])) {
    echo '
You will need to run this script with -s or -p option to save the shadow links to files
and -d option to delete the shadow links stored in the output file generated by -p option.
(You have to use an SQL client like psql to execute the SQL statements generated by -s option)

';
} else {
    // Save SQL statements to file
    if (isset($options['s'])) {
        save_sql_statements($old_links, $options['s']);
    }
    // Save shadow links as array to a file
    if (isset($options['p'])) {
コード例 #2
0
$frameDepth = get_param("frameDepth", "fd", $frameDepthDefault);
$viewerUrlDefault = "viewer.php?pd=";
$viewerUrl = get_param("viewerUrl", "vu", $viewerUrlDefault);
$showDownload = get_param("showDownload", "sd", "false");
$showDownload = $showDownload == "true" || $showDownload == "t";
$headlessPage = get_param("headlessPage", "hp", "false");
$headlessPage = $headlessPage == "true" || $headlessPage == "t";
$help = get_param("help", "h", "false");
$help = $help == "true" || $help == "t";
if (!is_numeric($frameDepth) || $frameDepth < 0 || $frameDepth > 5) {
    $frameDepth = $frameDepthDefault;
}
$actualFrameDepth = 0;
$urls = array();
get_links($targetUrl, $frameDepth);
print_links();
function get_links($targetUrl, $depth)
{
    global $urls, $linkFilter, $frameDepth, $actualFrameDepth;
    if (!$targetUrl) {
        return;
    }
    if ($frameDepth - $depth > $actualFrameDepth) {
        $actualFrameDepth = $frameDepth - $depth;
    }
    $html = file_get_contents($targetUrl);
    $dom = new DOMDocument();
    @$dom->loadHTML($html);
    $xpath = new DOMXPath($dom);
    $bases = $xpath->evaluate("/html/head//base");
    if ($bases->length > 0) {
コード例 #3
0
ファイル: results.php プロジェクト: ssalbiz/DSFinder-website
    echo "<p><a href=\"index.html\"> Home </a></p>";
    echo "<p> Unable to connect to database!</p>";
    exit;
}
$pkglist = array('Bean', 'DCM', 'LawOfDemeter', 'NullCheck', 'ProdLine', 'StarJ-Pool', 'Tetris', 'aglets', 'antlr-gunit', 'aoi', 'argoUML', 'asm', 'axion', 'azureus', 'bcel', 'bloat', 'cglib', 'colt', 'columba', 'commons-cli', 'commons-collections', 'commons-lang', 'commons-logging', 'derby', 'dom4j', 'drjava', 'fit', 'fop', 'galleon', 'gantt', 'hibernate', 'hsqldb', 'ireport', 'jag', 'jasper', 'javacc', 'jaxen', 'jchem', 'jcm', 'jedit', 'jeppers', 'jetty', 'jext', 'jfreechart', 'jgraph', 'jmeter', 'jre', 'jung', 'junit', 'jython', 'log4j', 'lucene', 'megamek', 'pmd', 'poi', 'proxool', 'regexp', 'sablecc', 'sandmark', 'tomcat', 'xerces', 'xstream');
?>
<div id="sidebar">

<?php 
include 'menu.php';
?>
<hr />

<?php 
foreach ($pkglist as $pkg) {
    print_links($pkg);
}
echo "</div>\n";
echo "<div id=\"main\">";
if (isset($_GET['pkg'])) {
    if (!in_array($_GET['pkg'], $pkglist)) {
        echo "<p> Invalid benchmark! </p>\n";
    } else {
        getlogs($_GET['pkg']);
    }
    //  printf("<p><br />IN SUMMARY: <br />TOTAL EXACT FIELD MATCH STRUCTURES: %d OUT OF %d : %0.2f%s<br />", $total_exact_hits, $total_exact, ($total_exact_hits*100.0/$total_exact), "%");
    //  printf("TOTAL NON_OBJECT STRUCTURES: %d OUT OF %d : %0.2f%s<br />", $total_nonobject_hits, $total_nonobject,  ($total_nonobject_hits*100.0/$total_nonobject), "%");
    //  printf("TOTAL OBJECT STRUCTURES: %d OUT OF %d : %0.2f%s<br />", $total_object_hits, $total_object, ($total_object_hits*100.0/$total_object) ,"%");
    echo "<p>TOTAL PACKAGES: ", count($pkglist), "<br /></p>";
} else {
    if (isset($_GET['log'])) {