#!/bin/sh
#This script is created by ssparser automatically. The parser first created by MaoShouyan
printf "Content-type: text/html
Cache-Control: no-cache

"
echo -n "";
. ../common/common.sh 
myself="/cgi-bin/Maintain/`basename $0`"

echo -n "
<script type=\"text/javascript\" src=\"/img/common.js\"></script>
<script language=\"javascript\">
function onEditEvent(evt)
{
	window.location.href = \"/cgi-bin/Maintain/cfg_evtedit?evtype=\" + evt;
}
	
</script>
<body>
"; 
if [ "${CGI_logfile}" = "" ]; then
	cgi_show_title "־->־" 
else
	cgi_show_title "־->ʷ־ʾ"
fi

echo -n "
<br>
<table width=950 border=0 cellspacing=1 cellpadding=1>
<tr id=tblhdr height=22>
	<td width=120 align=center>û</td>
	<td width=120 align=center>¼ַ</td>
	<td width=150 align=center>ʱ</td>
	<td width=120 align=center></td>
	<td width=* align=center></td>
</tr>
";
[ "${CGI_logfile}" = "" ] && CGI_logfile="web_`date +%Y.%m.%d`.log"
if [ -f ${DATAPATH}/${CGI_logfile} ]; then
	tblid="row1"
	exec 0<${DATAPATH}/${CGI_logfile}
	while read optime opaddr opuser oper opargs theothers;
	do

echo -n "
		<tr id=${tblid}>
		<td align=center>${opuser}</td>
		<td align=center>${opaddr}</td>
		<td align=center>${optime}</td>
		<td align=center>${oper}</td>
		<td align=center>${opargs}</td>
		</tr>
";
	done
	if [ "${tblid}" = "row1" ]; then
		tblid="row2"
	else
		tblid="row1"
	fi
fi

echo -n "
</table>
</body>
</html>
";