Пример #1
0
$conf = parse_ini_file("/var/share/html/easyMonitor/lib/Conf.ini", true);
require "./lib/Db.php";
require "./lib/Alert.php";
require "./lib/Host.php";
require "./lib/Monitor.php";
$act = htmlspecialchars($_GET["act"]);
switch ($act) {
    case "alertChecked":
        $alert_id = htmlspecialchars($_GET["alert_id"]);
        $checked = htmlspecialchars($_GET["checked"]);
        $res = _alert(['action' => 'update', 'conf' => $conf, 'con' => $con, 'alert_id' => $alert_id, 'checked' => $checked]);
        break;
    case "alertListGetJson":
        $offset = htmlspecialchars($_GET["offset"]);
        $count = htmlspecialchars($_GET["count"]);
        $res = _alert(['action' => 'select', 'conf' => $conf, 'con' => $con, 'offset' => $offset, 'count' => $count]);
        echo $res['list'];
        break;
    case "hostListGetJson":
        $offset = htmlspecialchars($_GET["offset"]);
        $count = htmlspecialchars($_GET["count"]);
        $res = _host(['action' => 'hostselect', 'conf' => $conf, 'con' => $con, 'offset' => $offset, 'count' => $count]);
        echo $res['list'];
        break;
    case "monitorListGetJson":
        $offset = htmlspecialchars($_GET["offset"]);
        $count = htmlspecialchars($_GET["count"]);
        $res = _monitor(['action' => 'monitorselect', 'conf' => $conf, 'con' => $con, 'offset' => $offset, 'count' => $count]);
        echo $res['list'];
        break;
    case "hostCreate":
Пример #2
0
 * stmp.func.php
 * 2102/7/24
 * 写此文件 纯属无奈  因为header conn't modify  没有解决掉    用javascript 也没解决掉  用<a>实现跳转连接
 * 参数 :$_GET['email'];$_GET['emaibody'];  收件人地址  和内容
 */
error_reporting(0);
header("Content-Type:text/html;charset=UTF-8");
require dirname(__FILE__) . '/../includes/common.inc.php';
//转换成硬路径
require_once 'stmp.class.php';
/*
 * 发送邮件
*
*/
$smtpemailto = $_GET['email'];
$mailsubject = "message from lzu_ask ";
if ($_GET['num'] == 1) {
    $active = $_GET['emailbody'];
    $host = DB_HOST;
    $pass = "******";
    $mailbody = '点击以下链接激活账号<a href="' . $pass . '">' . $active . '</a>';
} else {
    $mailbody = $_GET['emailbody'];
}
send_email($smtpemailto, $mailsubject, $mailbody);
_alert('请查收邮件!');
?>
<html>
<a href="../index.php">马上转到主页</a>
</html>
Пример #3
0
<?php

/*
 * 袁俊虎
 * 激活页面
 * includes/active.php
 * 2012/7/24
 * 主要讲ask_user中active改为特殊值 "空"
 */
//error_reporting(0);
header("Content-Type:text/html;charset=UTF-8");
require dirname(__FILE__) . '/../includes/common.inc.php';
//转换成硬路径
/*
 * 数据处理
 */
$pass = DB_PRE . 'ask_user';
$_sql = "UPDATE {$pass} SET active=NULL WHERE active='{$_GET['acti']}'";
_query($_sql);
if (!!mysql_affected_rows() == 1) {
    _location('激活成功', '../index.php');
} else {
    _alert('激活失败');
    exit;
}