//------------------------------------------------------------------------ ?> <table align="center"> <tr><td> <?php // Set up Graph variables $slice = 0; $type = "pie3d"; $mapName = 'Top10'; $fileName = IMG_CACHE_DIR . "Top10-" . time(3600) . ".png"; if ($slice > 0) { // include ("pageload.php"); $url = SITEURL . "{$ParamsGET}"; $mode = "JS"; // die ("$url -- $mode -- $host"); g_redirect($url, $mode); die("Error in redirect to graph"); // just in case g_redir fails or something weird } // $query="SELECT host, count(host) as count FROM " . DEFAULTLOGTABLE . " WHERE $where GROUP BY host ORDER BY count DESC LIMIT $limit"; // die($query); $result = perform_query($query, $dbLink) or die(mysql_error()); $numrows = mysql_num_rows($result); // echo "$numrows Rows\n<br>"; if ($numrows < 1) { die("<center>No results found.<br><a href=\"index.php?pageId=searchform\">BACK TO SEARCH</a></center>"); } else { while ($row = mysql_fetch_assoc($result)) { $count[] = $row['count']; // Use something like below to filter off domain names // $host[] = preg_replace("/\.tld.domain.*/", "", $row['host']);
} if ($_POST) { if (auth($_POST) == $_SESSION["username"]) { $act = "logged in"; action($act); $destination = $_SESSION['SITE_URL']."index.php"; if (!empty($_POST['searchQuery'])) { $destination .= '?' . ($_POST['searchQuery']); } g_redirect($destination, "JS"); // Redirect unauthenticated member } elseif ($_SESSION['error']) { g_redirect($SESSION['SITE_URL'], "JS"); // Redirect unauthenticated member } } else { ?> <html> <head> <title><?php echo $_SESSION['PROGNAME'] ." v". $_SESSION['VERSION'] ." ". $_SESSION['VERSION_SUB']?> Login</title> </head> <div align="center"> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <?php if (!empty($_SERVER['QUERY_STRING'])) {
* Developed by Clayton Dukes <*****@*****.**> * Copyright (c) 2010 LogZilla, LLC * All rights reserved. * * Changelog: * 2010-01-13 - created * */ $basePath = dirname(__FILE__); require_once $basePath . "/../common_funcs.php"; $dbLink = db_connect_syslog(DBADMIN, DBADMINPW); session_start(); $text = get_input('txt'); // logmsg("$text"); $sql = "SELECT value FROM settings where name='PATH_BASE'"; $result = perform_query($sql, $dbLink, $_SERVER['PHP_SELF']); if (num_rows($result) == 0) { echo "ERROR: Unable to determine installed path<br />Please check your database setting for PATH_BASE"; } else { $line = fetch_array($result); $path = $line[0]; $text = preg_replace('/\'/', '', $text); $cmd = "echo '{$text}' | sudo {$path}/scripts/licadd.pl"; exec($cmd, $out); if ($out[0] == 1) { $destination = $_SESSION['SITE_URL'] . "index.php"; g_redirect($destination, "JS"); } else { echo $out[0]; } }