コード例 #1
0
ファイル: rep_sa_score_dist.php プロジェクト: thctlo/1.2.0
 *
 * As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
 * as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
 * JpGraph.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
// Include of necessary functions
require_once __DIR__ . '/functions.php';
require_once __DIR__ . '/filter.inc';
// Authentication checking
session_start();
require __DIR__ . '/login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("SpamAssassin Score Distribution", 0, false, true);
// File name
$filename = "" . CACHE_DIR . "/sa_score_dist.png." . time() . "";
$sql = "\n SELECT\n  ROUND(sascore) AS score,\n  COUNT(*) AS count\n FROM\n  maillog\n WHERE\n  spamwhitelisted=0\n" . $filter->CreateSQL() . "\n GROUP BY\n  score\n ORDER BY\n  score\n";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // JPGraph
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_log.php";
    include_once "./lib/jpgraph/src/jpgraph_bar.php";
    include_once "./lib/jpgraph/src/jpgraph_line.php";
    // ##### AJOS1 NOTE #####
    // ### AjosNote - Must be 2 or more rows...
    // ##### AJOS1 NOTE #####
    $result = dbquery($sql);
    if (mysql_num_rows($result) <= 1) {
コード例 #2
0
ファイル: detail.php プロジェクト: 4711/status.futurice.com
$pinstance = validate_get(GET('pi'), 'pinstance');
$type = validate_get(GET('t'), 'type');
$tinstance = validate_get(GET('ti'), 'tinstance');
$width = GET('x');
$heigth = GET('y');
$seconds = GET('s');
$requesthash = sha1(serialize($_GET));
$rediskey = "cache:grapher:detail:{$host}:{$plugin}:{$type}:{$tinstance}:{$seconds}";
$content = $redis->get($rediskey);
if ($content) {
    http_cache_etag();
    http_send_data($content);
    exit;
}
ob_start();
html_start();
if (isset($_GET["tz"])) {
    $tz = $_GET["tz"];
} else {
    $tz = "EEST";
}
printf('<h2><a href="%s">%s</a></h2>' . "\n", $CONFIG['weburl'] . 'host?h=' . htmlentities($host) . '&tz=' . $tz, $host);
$term = array('2 hours' => 3600 * 2, '8 hours' => 3600 * 8, 'day' => 86400, 'week' => 86400 * 7, 'month' => 86400 * 31, 'quarter' => 86400 * 31 * 3, 'year' => 86400 * 365);
$args = $_GET;
print "<ul>\n";
foreach ($term as $key => $s) {
    $args['s'] = $s;
    printf('<li><a href="%s%s">%s</a></li>' . "\n", $CONFIG['weburl'], build_url('detail', $args), $key);
}
print "</ul>\n";
$plugins = collectd_plugins($host);
コード例 #3
0
ファイル: rep_mcp_score_dist.php プロジェクト: thctlo/1.2.0
 *
 * As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
 * as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
 * JpGraph.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
// Include of necessary functions
require_once __DIR__ . '/functions.php';
require_once __DIR__ . '/filter.inc';
// Authentication checking
session_start();
require __DIR__ . '/login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("MCP Score Distribution", 0, false, true);
// File name
$filename = "" . CACHE_DIR . "/mcp_score_dist.png." . time() . "";
$sql = "\n SELECT\n  ROUND(mcpsascore) AS score,\n  COUNT(*) AS count\n FROM\n  maillog\n WHERE\n  mcpwhitelisted=0\n" . $filter->CreateSQL() . "\n GROUP BY\n  score\n ORDER BY\n  score\n";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // JPGraph
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_log.php";
    include_once "./lib/jpgraph/src/jpgraph_bar.php";
    include_once "./lib/jpgraph/src/jpgraph_line.php";
    ///////AJOS1 NOTE////////
    // AjosNote - Must be 2 or more rows...
    ///////AJOS1 NOTE////////
    $result = dbquery($sql);
    if (mysql_num_rows($result) <= 1) {
コード例 #4
0
ファイル: system.setting.php プロジェクト: a195474368/ejw
<?php

/*
*	Copyright VeryIDE 2009-2012
*	http://www.veryide.com/
*/
require '../../source/dialog/loader.php';
html_start("系统设置 - VeryIDE");
?>
    
	<?php 
require_once VI_ROOT . 'source/class/setting.php';
//检查权限
$func = 'system-system-set';
System::check_func($func, FALSE);
$do = getgpc('do');
if (!$do) {
    ob_end_clean();
    header("location:?do=global");
    exit;
}
$active = array('global', 'attach', 'mail');
if (in_array($do, $active)) {
    $_GalSet = new Setting(VI_ROOT . 'config/' . $do . '.php', VI_ROOT . 'config/' . $do . '.xml', $do);
    if ($_GET["action"] == "update" && !empty($_POST)) {
        //var_dump($_POST);
        //exit;
        if ($_GalSet->save('POST')) {
            //连接数据库
            System::connect();
            //写入日志
コード例 #5
0
ファイル: msre_index.php プロジェクト: rafaelbsd/1.2.0
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
include "msre_table_functions.php";
// Authentication checking
session_start();
require 'login.function.php';
// Check to see if the user is an administrator
if ($_SESSION['user_type'] != 'A') {
    // If the user isn't an administrator send them back to the index page.
    header("Location: index.php");
    audit_log('Non-admin user attempted to view MailScanner Rule Editor Page');
} else {
    html_start('Ruleset Editor', "0", false, false);
    // ############
    // ### Main ###
    // ############
    // start a table
    echo "<table border=\"0\" class=\"mailwatch\" align=\"center\">\n";
    TRH(array("Choose a ruleset to edit:"));
    $ruleset_file = array();
    // open directory and read its contents
    if (is_dir(MSRE_RULESET_DIR)) {
        if ($dh = opendir(MSRE_RULESET_DIR)) {
            while ($file = readdir($dh)) {
                // if it's a ruleset (*.rules), add it to the array
                if (preg_match("/.+\\.rules\$/", $file)) {
                    array_push($ruleset_file, $file);
                }
コード例 #6
0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("Top Mail Relays", 0, false, true);
// File name
$filename = "" . CACHE_DIR . "/top_mail_relays.png." . time() . "";
$sql = "\nSELECT\n clientip,\n count(*) AS count,\n sum(virusinfected) AS total_viruses,\n sum(isspam) AS total_spam,\n sum(size) AS size\nFROM\n maillog\nWHERE\n 1=1\n" . $filter->CreateSQL() . "\nGROUP BY\n clientip\nORDER BY\n count DESC\nLIMIT 10";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // JpGraph functions
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_pie.php";
    include_once "./lib/jpgraph/src/jpgraph_pie3d.php";
    $result = dbquery($sql);
    if (!mysql_num_rows($result) > 0) {
        die("Error: no rows retrieved from database\n");
    }
    $relay_array = array();
    while ($row = mysql_fetch_object($result)) {
コード例 #7
0
ファイル: module.control.php プロジェクト: a195474368/ejw
<?php

/*
*	Copyright VeryIDE 2009-2012
*	http://www.veryide.com/
*/
require '../../source/dialog/loader.php';
html_start("模块管理 - VeryIDE");
?>


	<?php 
//连接数据库
System::connect();
$action = getgpc('action');
$module = getgpc("module");
if ($action) {
    switch ($action) {
        //安装模块
        case "install":
            //检查权限
            $func = 'system-module-add';
            System::check_func($func, FALSE);
            $res = Module::install($module);
            switch ($res) {
                case 'permission':
                    echo '<div id="state" class="failure">抱歉!当前目录没有写权限(module/' . $module . ')</div>';
                    break;
                case 'locked':
                    echo '<div id="state" class="failure">抱歉!当前模块已安装(' . $module . ')</div>';
                    break;
コード例 #8
0
ファイル: edit_filters.php プロジェクト: jfmc/logen
<?php

require_once 'common.php';
require_once 'externals.php';
require_session();
html_start('Edit filters : ' . $_SESSION['filename'], 'prolog.css', 'javascript-always-save', 2, '');
if ($_SESSION['editerror']) {
    $error = htmlspecialchars($_SESSION['editerror']);
    echo "<p>An error occurred while editing the filters:</p>\n";
    echo "<pre>{$error}</pre>";
}
?>
<form action="new_annotations.php" method="post"
	  onsubmit="return submitAnnotations(this.form)">
<?php 
$filename = $_SESSION['filename'];
$annfile = $_SESSION['annfile'];
$tempdir = get_directory();
chdir($tempdir);
$file = fopen("{$tempdir}/{$filename}", "w");
fwrite($file, $_SESSION['plfile']);
fclose($file);
$file = fopen("{$tempdir}/{$filename}.ann", "w");
fwrite($file, $annfile);
fclose($file);
$output = show_annotated($filename);
if ($output[0] == 0) {
    $xml = $output[1];
    $_SESSION['annerror'] = '';
} else {
    $_SESSION['annerror'] = $output[1];
コード例 #9
0
ファイル: geoip_update.php プロジェクト: rafaelbsd/1.2.0
 If you do not wish to do so, delete this exception statement from your version.

 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
//Require files
require_once './functions.php';
// Authentication verification and keep the session alive
session_start();
require './login.function.php';
html_start("GeoIP Database Update", 0, false, false);
if (!isset($_POST['run'])) {
    echo '<form method="POST" action="' . sanitizeInput($_SERVER['PHP_SELF']) . '">
	 <input type="hidden" name="run" value="true">
	 <table class="boxtable" width="100%">
	    <tr>
	        <td>
	            This utility is used to download the GeoIP database files (which are updated on the first Tuesday of each month) from <a href="http://dev.maxmind.com/geoip/legacy/geolite/" target="_maxmind">MaxMind</a> which is used to work out the country of origin for any given IP address and is displayed on the Message Detail page.<br><br>
	        </td>
	    </tr>
	    <tr>
	        <td align="center"><br><input type="SUBMIT" value="Run Now"><br><br></td>
	    </tr>
	 </table>
	 </form>' . "\n";
} else {
コード例 #10
0
ファイル: msconfig.php プロジェクト: thctlo/1.2.0
 * If you do not wish to do so, delete this exception statement from your version.
 *
 * As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
 * as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
 * JpGraph.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
require_once __DIR__ . '/functions.php';
session_start();
require __DIR__ . '/login.function.php';
if ($_SESSION['user_type'] != 'A') {
    header("Location: index.php");
} else {
    html_start("Configuration");
    audit_log('Viewed MailScanner configuration');
    $conf_dir = get_conf_include_folder();
    $MailScanner_conf_file = '' . MS_CONFIG_DIR . 'MailScanner.conf';
    echo '<table border="0" cellpadding="1" cellspacing="1" class="maildetail" width="100%">';
    echo '<tr><th colspan="2">MailScanner Configuration</th></tr>';
    $array_output = array();
    $array_output1 = parse_conf_file($MailScanner_conf_file);
    $array_output2 = parse_conf_dir($conf_dir);
    if (is_array($array_output2)) {
        $array_output = array_merge($array_output1, $array_output2);
    } else {
        $array_output = $array_output1;
    }
    // Display the information from the configuration files
    foreach ($array_output as $out_key => $value) {
コード例 #11
0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("Top Senders by Quantity", 0, false, true);
// Set Date format
$date_format = "'" . DATE_FORMAT . "'";
$filename = "" . CACHE_DIR . "/top_senders_by_quantity.png" . time() . "";
$sql = "\n SELECT\n  from_address,\n  COUNT(*) as count,\n  SUM(size) as size\n FROM\n  maillog\n WHERE\n  from_address <> \"\"\t\t-- Exclude delivery receipts\n AND\n  from_address IS NOT NULL\t-- Exclude delivery receipts\n" . $filter->CreateSQL() . "\n GROUP BY\n  from_address\n ORDER BY\n  count DESC\n LIMIT 10\n";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // JPGraph
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_pie.php";
    include_once "./lib/jpgraph/src/jpgraph_pie3d.php";
    $result = dbquery($sql);
    if (!mysql_num_rows($result) > 0) {
        die("Error: no rows retrieved from database\n");
    }
    while ($row = mysql_fetch_object($result)) {
コード例 #12
0
ファイル: data.update.php プロジェクト: a195474368/ejw
<?php

/*
*	Copyright VeryIDE 2009-2012
*	http://www.veryide.com/
*/
require '../../source/dialog/loader.php';
html_start("更新管理 - VeryIDE");
?>
    
	<?php 
//更新基准目录
$base = Database::direct('update');
$action = getgpc('action');
$update = getgpc("update");
//连接数据库
System::connect();
switch ($action) {
    case "update":
        //检查权限
        $func = 'system-update-add';
        System::check_func($func, FALSE);
        $res = Database::update($update);
        switch ($res) {
            case 'locked':
                echo '<div id="state" class="failure">抱歉!安装已经存在。更新于早前已经安装,并在使用中:<span class="text-key">' . $update . '</span></div>';
                break;
            case 'abort':
                echo '<div id="state" class="failure">抱歉!安装更新失败。以下是本错误信息详细报告:</div>';
                break;
            case 'success':
コード例 #13
0
ファイル: quarantine.php プロジェクト: thctlo/1.2.0
 * You must obey the GNU General Public License in all respects for all of the code used other than those files in the
 * PEAR library that are licensed under the PHP License. If you modify this program, you may extend this exception to
 * your version of the program, but you are not obligated to do so.
 * If you do not wish to do so, delete this exception statement from your version.
 *
 * As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
 * as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
 * JpGraph.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
require_once __DIR__ . '/functions.php';
session_start();
require __DIR__ . '/login.function.php';
html_start("Quarantine Viewer", 0, false, false);
if (!isset($_GET['dir'])) {
    // Get the top-level list
    if (QUARANTINE_USE_FLAG) {
        // Don't use the database any more - it's too slow on big datasets
        $dates = return_quarantine_dates();
        echo '<table class="mail" cellspacing="2" align="center">' . "\n";
        echo '<tr><th colspan=2>' . __('folder08') . '</th></tr>' . "\n";
        foreach ($dates as $date) {
            $sql = "SELECT id FROM maillog WHERE " . $_SESSION['global_filter'] . " AND date='{$date}' AND quarantined=1";
            $result = dbquery($sql);
            $rowcnt = mysql_num_rows($result);
            $rowstr = "  ----------";
            if ($rowcnt > 0) {
                $rowstr = sprintf("  %02d " . __('items08'), $rowcnt);
            }
コード例 #14
0
ファイル: msre_edit.php プロジェクト: rafaelbsd/1.2.0
*/
// Include of necessary functions
require_once "./functions.php";
// Authentication checking
session_start();
require 'login.function.php';
// Check to see if the user is an administrator
if ($_SESSION['user_type'] != 'A') {
    // If the user isn't an administrator send them back to the index page.
    header("Location: index.php");
    audit_log('Non-admin user attempted to view MailScanner Rule Editor Page');
} else {
    // add the header information such as the logo, search, menu, ....
    $short_filename = basename(sanitizeInput($_GET["file"]));
    $pageheader = "Edit MailScanner Ruleset " . $short_filename;
    $filter = html_start($pageheader, 0, false, false);
    // ############################
    // ### Includes and whatnot ###
    // ############################
    include "msre_table_functions.php";
    // ###############################################################
    // ### Config Vars (eventually these will be in a config file) ###
    // ###############################################################
    //ruleset keywords are the key words that you can use in a ruleset.  This value is used to populate the dropdown boxen.
    $CONF_ruleset_keyword = array("From:", "To:", "FromOrTo:", "FromAndTo:", "Virus:");
    define('MSRE_COLUMNS', 6);
    // ############
    // ### Main ###
    // ############
    // get the filename and put it into some easier to read variables
    $full_filename = MSRE_RULESET_DIR . "/" . $short_filename;
コード例 #15
0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("Top Recipients by Quantity", 0, false, true);
// File name
$filename = "" . CACHE_DIR . "/top_recipients_by_quantity.png." . time() . "";
$sql = "\n SELECT\n  to_address,\n  COUNT(*) as count,\n  SUM(size) as size\n FROM\n  maillog\n WHERE\n  from_address <> \"\"\t\t-- Exclude delivery receipts\n AND\n  from_address IS NOT NULL\t-- Exclude delivery receipts\n" . $filter->CreateSQL() . "\n GROUP BY\n  to_address\n ORDER BY\n  count DESC\n LIMIT 10\n";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // JPGraph
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_pie.php";
    include_once "./lib/jpgraph/src/jpgraph_pie3d.php";
    $result = dbquery($sql);
    if (!mysql_num_rows($result) > 0) {
        die("Error: no rows retrieved from database\n");
    }
    while ($row = mysql_fetch_object($result)) {
        $data[] = $row->count;
コード例 #16
0
ファイル: postfixmailq.php プロジェクト: rafaelbsd/1.2.0
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 In addition, as a special exception, the copyright holder gives permission to link the code of this program
 with those files in the PEAR library that are licensed under the PHP License (or with modified versions of those
 files that use the same license as those files), and distribute linked combinations including the two.
 You must obey the GNU General Public License in all respects for all of the code used other than those files in the
 PEAR library that are licensed under the PHP License. If you modify this program, you may extend this exception to
 your version of the program, but you are not obligated to do so.
 If you do not wish to do so, delete this exception statement from your version.

 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require "./functions.php";
session_start();
require 'login.function.php';
html_start("Mail Queue Viewer");
echo '<b>Combined mail queue (Inbound and Outbound)</b>' . "\n";
echo '<pre>';
postfixmailq();
echo '</pre>';
html_end();
dbclose();
コード例 #17
0
ファイル: upload_spec.php プロジェクト: jfmc/logen
		<input type="hidden" name="stage" value="spec" />
		</td>
		<td>
		If you think this error is due to a bug in weblogen you can submit
		a bug report. Please make sure you have checked your annotations and
		filters and that your specified goal is compatible with them.
		</td>
		</tr>
		</table>
		</form>
		<?php 
    }
} elseif ($retarray[0] < 0) {
    $error = $_SESSION['specerror'] = $retarray[2];
    $goal = htmlspecialchars($goal);
    html_start('Specialising : ' . $_SESSION['filename'], 'prolog.css', '', 4, '');
    echo "<p>An error occured while highlighting the specialisation output:</p>\n";
    echo "<pre>{$error}</pre>\n";
    if (isset($db_name)) {
        ?>
		<form action="bug_report.php" method="post">
		<table border=0>
		<tr>
		<td>
		<input type="submit" value="Submit Bug Report" />
		<input type="hidden" name="stage" value="spec" />
		</td>
		<td>
		This is almost certainly a bug in Weblogen. Please submit it so that our
		developers can solve it.
		</td>
コード例 #18
0
ファイル: ms_lint.php プロジェクト: rafaelbsd/1.2.0
 PEAR library that are licensed under the PHP License. If you modify this program, you may extend this exception to
 your version of the program, but you are not obligated to do so.
 If you do not wish to do so, delete this exception statement from your version.

 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once "./functions.php";
session_start();
require 'login.function.php';
html_start("MailScanner Lint", 0, false, false);
echo '<table class="mail" cellspacing="1" width="100%">' . "\n";
echo ' <tr>' . "\n";
echo '  <th colspan="2">MailScanner Lint</th>' . "\n";
echo ' </tr>' . "\n";
if (!defined('MS_EXECUTABLE_PATH')) {
    echo '<tr>
    <td colspan="2">Please set MS_EXECUTABLE_PATH in conf.php to enable this feature</td>
    </tr>';
} else {
    if (!($fp = popen('sudo ' . MS_EXECUTABLE_PATH . ' --lint 2>&1', 'r'))) {
        die("Cannot open pipe");
    } else {
        audit_log('Run MailScanner lint');
    }
    // Start timer
コード例 #19
0
ファイル: group.list.php プロジェクト: a195474368/ejw
<?php

/*
*	Copyright VeryIDE 2009-2012
*	http://www.veryide.com/
*/
require '../../source/dialog/loader.php';
html_start("用户组管理 - VeryIDE");
?>


	<?php 
//loader
require 'include/naver.admin.php';
//菜单处理
$action = getgpc('action');
$jump = getgpc('jump');
//连接数据库
System::connect();
$id = getnum('id', 0);
$state = getnum('state', 0);
if ($action) {
    //动作处理
    switch ($action) {
        case "state":
            //检查权限
            $func = 'system-group-mod';
            System::check_func($func, FALSE);
            //更新数据
            $sql = "UPDATE `sys:group` SET `state`='" . $state . "' WHERE id=" . $id;
            System::$db->execute($sql);
コード例 #20
0
ファイル: sophos_status.php プロジェクト: rafaelbsd/1.2.0
 In addition, as a special exception, the copyright holder gives permission to link the code of this program
 with those files in the PEAR library that are licensed under the PHP License (or with modified versions of those
 files that use the same license as those files), and distribute linked combinations including the two.
 You must obey the GNU General Public License in all respects for all of the code used other than those files in the
 PEAR library that are licensed under the PHP License. If you modify this program, you may extend this exception to
 your version of the program, but you are not obligated to do so.
 If you do not wish to do so, delete this exception statement from your version.

 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once "./functions.php";
session_start();
include 'login.function.php';
html_start("Sophos", 0, false, false);
echo "<TABLE CLASS=\"boxtable\" WIDTH=\"100%\">";
echo "<TR>";
echo "<TD ALIGN=\"CENTER\">";
passthru(get_virus_conf('sophos') . " -v | awk -f ./sophos.awk");
echo "</TD>";
echo "</TR>";
echo "</TABLE>";
// Add footer
html_end();
// Close any open db connections
dbclose();
コード例 #21
0
ファイル: mysql_status.php プロジェクト: rafaelbsd/1.2.0
 You must obey the GNU General Public License in all respects for all of the code used other than those files in the
 PEAR library that are licensed under the PHP License. If you modify this program, you may extend this exception to
 your version of the program, but you are not obligated to do so.
 If you do not wish to do so, delete this exception statement from your version.

 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once './functions.php';
session_start();
include 'login.function.php';
html_start("MySQL Status", 0, false, true);
if ($_SESSION['user_type'] != 'A') {
    echo "Not Authorized";
} else {
    audit_log('Viewed MySQL Status');
    dbtable("SHOW TABLE STATUS");
    echo "<BR>\n";
    dbtable("SHOW FULL PROCESSLIST");
    echo "<BR>\n";
    dbtable("SHOW VARIABLES");
    // Add footer
    html_end();
    // Close any open db connections
    dbclose();
}
コード例 #22
0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("Top Recipients by Volume", 0, false, true);
// File name
$filename = "" . CACHE_DIR . "/top_recipients_by_volume.png." . time() . "";
$sql = "\n SELECT\n  to_address,\n  COUNT(*) as count,\n  SUM(size) as size\n FROM\n  maillog\n WHERE\n  from_address <> \"\"\t\t-- Exclude delivery receipts\n AND\n  from_address IS NOT NULL\t-- Exclude delivery receipts\n" . $filter->CreateSQL() . "\n GROUP BY\n  to_address\n ORDER BY\n  size DESC\n LIMIT 10\n";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // JPGraph
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_pie.php";
    include_once "./lib/jpgraph/src/jpgraph_pie3d.php";
    $result = dbquery($sql);
    if (!mysql_num_rows($result) > 0) {
        die("Error: no rows retrieved from database\n");
    }
    while ($row = mysql_fetch_object($result)) {
        $data[] = $row->count;
コード例 #23
0
ファイル: reports.php プロジェクト: thctlo/1.2.0
 */
//Require files
require_once __DIR__ . '/functions.php';
require_once __DIR__ . '/filter.inc';
// verify login
session_start();
require __DIR__ . '/login.function.php';
// Checking to see if there are any filters
if (!isset($_SESSION["filter"]) || !is_object($_SESSION["filter"])) {
    $filter = new Filter();
    $_SESSION["filter"] = $filter;
} else {
    $filter = $_SESSION["filter"];
}
// add the header information such as the logo, search, menu, ....
html_start("Reports", "0", false, false);
// Add filters and save them
if (isset($_GET["action"])) {
    switch (strtolower(sanitizeInput($_GET["action"]))) {
        case "add":
            $filter->Add(sanitizeInput($_GET["column"]), $_GET["operator"], sanitizeInput($_GET["value"]));
            break;
        case "remove":
            $filter->Remove(sanitizeInput($_GET["column"]));
            break;
        case "destroy":
            session_destroy();
            echo "Session destroyed\n";
            exit;
        case "save":
            if (isset($_GET['save_as'])) {
コード例 #24
0
ファイル: rep_top_viruses.php プロジェクト: rafaelbsd/1.2.0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("Top Viruses", 0, false, true);
// File name
$filename = CACHE_DIR . "/top_viruses.png." . time();
// SQL query to find all emails with a virus found
$sql = "\nSELECT\n report\nFROM\n maillog\nWHERE\n virusinfected = 1\nAND\n report IS NOT NULL\n" . $filter->CreateSQL();
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // JpGraph functions
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_pie.php";
    include_once "./lib/jpgraph/src/jpgraph_pie3d.php";
    // Must be one or more rows
    $result = dbquery($sql);
    if (mysql_num_rows($result) <= 0) {
        die("Error: no rows retrieved from database..." . mysql_num_rows($result) . "\n");
    }
コード例 #25
0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start(__('totalmailbydate14'), 0, false, true);
// Set Date format
$date_format = "'" . DATE_FORMAT . "'";
// File name
$filename = "" . CACHE_DIR . "/total_mail_by_date.png." . time() . "";
// Check if MCP is enabled
$is_MCP_enabled = get_conf_truefalse('mcpchecks');
// SQL query to pull the data from maillog
$sql = "\n SELECT\n  DATE_FORMAT(date, {$date_format}) AS xaxis,\n  COUNT(*) AS total_mail,\n  SUM(CASE WHEN virusinfected>0 THEN 1 ELSE 0 END) AS total_virus,\n  SUM(CASE WHEN (virusinfected=0 OR virusinfected IS NULL) AND isspam>0 THEN 1 ELSE 0 END) AS total_spam,\n  SUM(CASE WHEN (virusinfected=0 OR virusinfected IS NULL) AND (isspam=0 OR isspam IS NULL) AND ismcp>0 THEN 1 ELSE 0 END) AS total_mcp,\n  SUM(size) AS total_size\n FROM\n  maillog\n WHERE\n  1=1\n" . $filter->CreateSQL() . "\n GROUP BY\n  xaxis\n ORDER BY\n  date\n";
// Fetch MTA stats
$sql1 = "\nSELECT\n DATE_FORMAT(timestamp, {$date_format}) AS xaxis,\n type,\n count(*) as count\nFROM\n mtalog\nWHERE\n 1=1\n" . $filter->CreateMtalogSQL() . "\nAND\n type<>'relay'\nGROUP BY\n xaxis, type\nORDER BY\n timestamp\n";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // Includes for JPgraph
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_log.php";
コード例 #26
0
ファイル: rep_mcp_rule_hits.php プロジェクト: rafaelbsd/1.2.0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("MCP Rule Hits", 0, false, true);
// File name
$filename = "" . CACHE_DIR . "/rep_mcp_rule_hits.png." . time() . "";
$sql = "\n SELECT\n  mcpreport,\n  ismcp\n FROM\n  maillog\n WHERE\n  mcpreport IS NOT NULL\n AND mcpreport != \"\"\n" . $filter->CreateSQL();
$result = dbquery($sql);
if (!mysql_num_rows($result) > 0) {
    die("Error: no rows retrieved from database\n");
}
// Initialise the array
$sa_array = array();
// Retrieve rows and insert into array
while ($row = mysql_fetch_object($result)) {
    // Clean-up input
    $row->mcpreport = preg_replace('/\\n/', '', $row->mcpreport);
    $row->mcpreport = preg_replace('/\\t/', ' ', $row->mcpreport);
    preg_match('/ \\((.+?)\\)/i', $row->mcpreport, $sa_rules);
コード例 #27
0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("Total Mail by Date", 0, false, true);
// Set Date format
$date_format = "'" . DATE_FORMAT . "'";
// File name
$filename = "" . CACHE_DIR . "/total_mail_by_date.png." . time() . "";
// Check if MCP is enabled
$is_MCP_enabled = get_conf_truefalse('mcpchecks');
// SQL query to pull the data from maillog
$sql = "\n SELECT\n  DATE_FORMAT(date, {$date_format}) AS xaxis,\n  COUNT(*) AS total_mail,\n  SUM(CASE WHEN virusinfected>0 THEN 1 ELSE 0 END) AS total_virus,\n  SUM(CASE WHEN (virusinfected=0 OR virusinfected IS NULL) AND isspam>0 THEN 1 ELSE 0 END) AS total_spam,\n  SUM(CASE WHEN (virusinfected=0 OR virusinfected IS NULL) AND (isspam=0 OR isspam IS NULL) AND ismcp>0 THEN 1 ELSE 0 END) AS total_mcp,\n  SUM(size) AS total_size\n FROM\n  maillog\n WHERE\n  1=1\n" . $filter->CreateSQL() . "\n GROUP BY\n  xaxis\n ORDER BY\n  date\n";
// Fetch MTA stats
$sql1 = "\nSELECT\n DATE_FORMAT(timestamp, {$date_format}) AS xaxis,\n type,\n count(*) as count\nFROM\n mtalog\nWHERE\n 1=1\n" . $filter->CreateMtalogSQL() . "\nAND\n type<>'relay'\nGROUP BY\n xaxis, type\nORDER BY\n timestamp\n";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // Includes for JPgraph
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_log.php";
コード例 #28
0
ファイル: lists.php プロジェクト: rafaelbsd/1.2.0
 PEAR library that are licensed under the PHP License. If you modify this program, you may extend this exception to
 your version of the program, but you are not obligated to do so.
 If you do not wish to do so, delete this exception statement from your version.

 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once "./functions.php";
session_start();
require './login.function.php';
html_start("Whitelist/Blacklist", 0, false, false);
$url_type = isset($_GET['type']) ? sanitizeInput($_GET['type']) : '';
$url_type = htmlentities($url_type);
$url_type = safe_value($url_type);
$url_to = isset($_GET['to']) ? sanitizeInput($_GET['to']) : '';
$url_to = htmlentities($url_to);
$url_to = safe_value($url_to);
$url_host = isset($_GET['host']) ? sanitizeInput($_GET['host']) : '';
$url_host = htmlentities($url_host);
$url_host = safe_value($url_host);
$url_from = isset($_GET['from']) ? sanitizeInput($_GET['from']) : '';
$url_from = htmlentities($url_from);
$url_from = safe_value($url_from);
$url_submit = isset($_GET['submit']) ? sanitizeInput($_GET['submit']) : '';
$url_submit = htmlentities($url_submit);
$url_submit = safe_value($url_submit);
コード例 #29
0
 As a special exception, you have permission to link this program with the JpGraph library and
 distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software
 in the executable aside from JpGraph.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Include of necessary functions
require_once "./functions.php";
require_once "./filter.inc";
// Authentication checking
session_start();
require 'login.function.php';
// add the header information such as the logo, search, menu, ....
$filter = html_start("Top Sender Domains by Volume", 0, false, true);
// File name
$filename = "" . CACHE_DIR . "/top_sender_by_volume.png." . time() . "";
$sql = "\n SELECT\n  SUBSTRING_INDEX(from_address, '@', -1) AS from_domain,\n  COUNT(*) as count,\n  SUM(size) as size\n FROM\n  maillog\n WHERE\n  from_address <> \"\"\t\t-- Exclude delivery receipts\n AND\n  from_address IS NOT NULL\t-- Exclude delivery receipts\n" . $filter->CreateSQL() . "\n GROUP BY\n  from_domain\n ORDER BY\n  size DESC\n LIMIT 10\n";
// Check permissions to see if apache can actually create the file
if (is_writable(CACHE_DIR)) {
    // JPGraph
    include_once "./lib/jpgraph/src/jpgraph.php";
    include_once "./lib/jpgraph/src/jpgraph_pie.php";
    include_once "./lib/jpgraph/src/jpgraph_pie3d.php";
    $result = dbquery($sql);
    if (!mysql_num_rows($result) > 0) {
        die("Error: no rows retrieved from database\n");
    }
    while ($row = mysql_fetch_object($result)) {
        $data[] = $row->count;
コード例 #30
0
ファイル: mcp_rules_update.php プロジェクト: thctlo/1.2.0
 * If you do not wish to do so, delete this exception statement from your version.
 *
 * As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
 * as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
 * JpGraph.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
require_once __DIR__ . '/functions.php';
session_start();
require __DIR__ . '/login.function.php';
if ($_SESSION['user_type'] != 'A') {
    header('Location: index.php');
} else {
    html_start("MCP Rule Description Update", 0, false, false);
    echo '<form method="post" action="mcp_rules_update.php" >' . "\n";
    echo '<input type="hidden" name="run" value="true">' . "\n";
    echo '<table class="boxtable" width="100%">' . "\n";
    echo ' <tr>' . "\n";
    echo '  <td>' . "\n";
    echo '   This utility is used to update the SQL database with up-to-date descriptions of the MCP rules which are displayed on the Message Detail screen.<br>
   <br>
   This utility should generally be run after an update to your MCP rules, however it is safe to run at any time as it only replaces the existing values and inserts only new values in the table (therefore preserving descriptions from potentially deprecated or removed rules).<br>
  </td>
 </tr>
 <tr>' . "\n";
    echo '  <td align="center"><br><input type="submit" value="Run Now"><br><br></td>' . "\n";
    echo ' </tr>' . "\n";
    if (isset($_POST['run'])) {
        echo '<tr><td align="CENTER"><table class="mail" border="0" cellpadding="1" cellspacing="1"><tr><th>Rule</th><th>Description</th></tr>' . "\n";