📄 mng_system_log.php
字号:
<?php session_start(); if(!$_SESSION['teacher']) {echo '<SCRIPT LANGUAGE="JavaScript">location.replace(\'mng.php\');</script>';exit;}?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>EasyTeacher信息技术课堂教学助手(ItAssis)教师端-日志管理</title>
<link href="et.css" rel="stylesheet" type="text/css">
<style type="text/css">
body,td,th {font-size: 14px;}
</style>
</head>
<body>
<?php
include "conn.inc.php";
include "config.inc.php";
$db=Connect_db($CFG_DB_ADDRESS,$CFG_DB_PORT,$CFG_DB_NAME,$CFG_DB_OWNER,$CFG_DB_PWD);
if( isset($_GET['lid']) ){
if($_GET['lid']=="all")
$sql="delete from login_his";
else
$sql="delete from login_his where lid=".$_GET['lid'];
mysql_query($sql,$db) or die($sql."<br>".mysql_error());
}
$sql="SELECT login_his.*,title";
$sql.=" FROM login_his left join course on login_his.cid=course.cid";
$sql.=" ORDER BY log_time DESC";
$result=mysql_query($sql,$db) or die($sql."<br>".mysql_error());
$num=mysql_num_rows($result);
$del_url=$_SERVER['PHP_SELF']."?lid=all";
?>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" background="images/top_bg.jpg"><div align="left"> 位于:<strong class="red">登陆日志</strong>计[<span class=red><strong><?php echo $num; ?></strong></span>条]</div></td>
<td width="100" background="images/top_bg.jpg"><div align="left">[<a href="#explain">说明</a>]</div></td>
</tr>
</table>
<br>
<table width="740" border="1" align="center" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#DEE3EF">
<tr>
<td width="8%">日志号</td>
<td width="10%">姓名</td>
<td width="22%">课程号</td>
<td width="23%">时间</td>
<td width="20%">IP地址</td>
<td width="17%">操作(<?php echo "<a href=$del_url>清空所有</a>";?>)</td>
</tr>
<?php
while($array=mysql_fetch_array($result)){
if(!$array['title'])
$array['title']="<span class=red>直接登陆</span>";
$del_url=$_SERVER['PHP_SELF']."?lid=".$array['lid'];
echo "
<tr>
<td>".$array['lid']."</td>
<td>".$array['sid']."</td>
<td>".$array['title']."</td>
<td>".$array['log_time']."</td>
<td>".$array['ip']."</td>
<td><a href=$del_url>删除</a></td>
</tr>
";
}
?>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -