Example #1
0
     $sql2 = "select count(id) from {$table2} where date like '%{$ntime}%' and content like '%文件被修改%'";
     $DB_site->query($sql2);
     $row2 = $DB_site->fetch_array();
     $countmodify = $row2[0];
     $sql3 = "select count(id) from {$table2} where date like '%{$ntime}%' and content like '%发现后门文件%'";
     $DB_site->query($sql3);
     $row3 = $DB_site->fetch_array();
     //var_dump($row);
     // $countNew = is_null($row['countNew'])? 0 : $row['countNew'];
     // $countKeywords = is_null($row['countKeywords'])? 0 : $row['countKeywords'];
     $countVirus = $row3[0];
     $sql4 = "select count(id) from {$table2} where date like '%{$ntime}%' and content like '%发现新增可疑文件%'";
     $DB_site->query($sql4);
     $row4 = $DB_site->fetch_array();
     $countKeywords = $row4[0];
     $t = new vemplator();
     $t->assign('countdel', $countdel);
     $t->assign('countmodify', $countmodify);
     // $t->assign('countnew',$countNew);
     $t->assign('countvirus', $countVirus);
     $t->assign('countkeyword', $countKeywords);
     echo $t->output('html/count.html');
 } else {
     if (trim($_GET['action']) == 'exit') {
         $_SESSION = array();
         session_destroy();
         setcookie('PHPSESSID', '', time() - 3600, '/', '', 0, 0);
         header('Location: login.php');
         ob_end_flush();
     } else {
         $page = $_GET['page'] ? intval($_GET['page']) : "1";
Example #2
0
<?php

session_start();
require_once 'base.php';
require_once 'vemplator.php';
$t = new vemplator();
$DB_site = new DB_Sql_vb();
$DB_site->database = $dbname;
$DB_site->server = $dbhost;
$DB_site->user = $dbuser;
$DB_site->password = $dbpass;
$DB_site->reporterror = 0;
$DB_site->connect();
$error = $DB_site->errno;
$t = new vemplator();
if (isset($_POST['submit']) && ctype_alnum($_POST['username'])) {
    $username = empty($_POST['username']) ? '' : trim($_POST['username']);
    $password = empty($_POST['password']) ? '' : trim($_POST['password']);
    $sql = "select username,password from {$table1} where username='******'and password='******'";
    $DB_site->query($sql);
    if ($DB_site->num_rows()) {
        $sid = session_id();
        $_SESSION['username'] = $sid;
        header('Location: index.php');
    } else {
        $message = "登录失败,密码或用户名错!";
        $t->assign('message', $message);
    }
}
echo $t->output('html/login.html');
include "footer.php";