📄 index.php
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
?>
<html>
<head>
<title>考核指标集定义</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function CheckForm()
{
if(document.form1.GROUP_NAME.value=="")
{ alert("考核指标集名称不能空!!!");
return (false);
}
return (true);
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_new.gif" WIDTH="22" HEIGHT="22" align="absmiddle"><span class="big3"> 新建考核指标集</span><br>
</td>
</tr>
</table>
<br>
<div align="center">
<table border="0" width="450" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form action="add.php?CUR_PAGE=<?=$CUR_PAGE?>" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableData">考核指标集名称:</td>
<td class="TableData">
<INPUT type="text"name="GROUP_NAME" class=BigInput size="20">
</td>
</tr>
<tr>
<td nowrap class="TableData">考核指标集描述:</td>
<td class="TableData">
<textarea name="GROUP_DESC" cols="45" rows="3" class="BigInput"></textarea>
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type="submit" value="新建" class="BigButton">
</td>
</tr>
</table>
</form>
</div>
<table width="95%" border="0" cellspacing="0" cellpadding="0" height="3">
<tr>
<td background="/images/dian1.gif" width="100%"></td>
</tr>
</table>
<?
$query = "SELECT count(*) from SCORE_GROUP";
$cursor= exequery($connection,$query);
$VOTE_COUNT=0;
if($ROW=mysql_fetch_array($cursor))
$VOTE_COUNT=$ROW[0];
if($VOTE_COUNT==0)
{
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/score.gif" WIDTH="20" HEIGHT="20" align="absmiddle"><span class="big3"> 考核指标集管理</span><br>
</td>
</tr>
</table>
<?
Message("","无考核指标集");
exit;
}
$PER_PAGE=5;
$PAGES=10;
$PAGE_COUNT=ceil($VOTE_COUNT/$PER_PAGE);
if($CUR_PAGE<=0 || $CUR_PAGE=="")
$CUR_PAGE=1;
if($CUR_PAGE>$PAGE_COUNT)
$CUR_PAGE=$PAGE_COUNT;
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/score.gif" WIDTH="20" HEIGHT="20" align="absmiddle"><span class="big3"> 考核指标集管理</span><br>
</td>
<td align="right" valign="bottom" class="small1">共<span class="big4"> <?=$VOTE_COUNT?></span> 条
</td>
<td align="right" valign="bottom" class="small1">
<a class="A1" href="index.php?CUR_PAGE=1">首页</a>
<a class="A1" href="index.php?CUR_PAGE=<?=$PAGE_COUNT?>">末页</a>
<?
if($CUR_PAGE%$PAGES==0)
$J=$PAGES;
else
$J=$CUR_PAGE%$PAGES;
if($CUR_PAGE> $PAGES)
{
?>
<a class="A1" href="index.php?CUR_PAGE=<?=$CUR_PAGE-$J-$PAGES+1?>">上<?=$PAGES?>页</a>
<?
}
for($I=$CUR_PAGE-$J+1;$I<=$CUR_PAGE-$J+$PAGES;$I++)
{
if($I>$PAGE_COUNT)
break;
if($I==$CUR_PAGE)
{
?>
[<?=$I?>]
<?
}
else
{
?>
[<a class="A1" href="index.php?CUR_PAGE=<?=$I?>"><?=$I?></a>]
<?
}
}
?>
<?
if($I-1< $PAGE_COUNT)
{
?>
<a class="A1" href="index.php?CUR_PAGE=<?=$I?>">下<?=$PAGES?>页</a>
<?
}
if($CUR_PAGE-1>=1)
{
?>
<a class="A1" href="index.php?CUR_PAGE=<?=$CUR_PAGE-1?>">上一页</a>
<?
}
else
{
?>
上一页
<?
}
if($CUR_PAGE+1<= $PAGE_COUNT)
{
?>
<a class="A1" href="index.php?CUR_PAGE=<?=$CUR_PAGE+1?>">下一页</a>
<?
}
else
{
?>
下一页
<?
}
?>
</td>
</tr>
</table>
<div align="center">
<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
<tr class="TableHeader">
<td nowrap align="center">考核指标集名称</td>
<td nowrap align="center">考核指标集描述</td>
<td nowrap align="center">操作</td>
</tr>
<?
//============================ 显示考核指标集=======================================
$query ="SELECT * from SCORE_GROUP order by GROUP_ID DESC";
$cursor= exequery($connection,$query);
$VOTE_COUNT=0;
while($ROW=mysql_fetch_array($cursor))
{
$VOTE_COUNT++;
if($VOTE_COUNT<$CUR_PAGE*$PER_PAGE-$PER_PAGE+1)
continue;
if($VOTE_COUNT>$CUR_PAGE*$PER_PAGE)
break;
$GROUP_ID=$ROW["GROUP_ID"];
$GROUP_NAME=$ROW["GROUP_NAME"];
$GROUP_DESC=$ROW["GROUP_DESC"];
if($VOTE_COUNT%2==1)
$TableLine="TableLine1";
else
$TableLine="TableLine2";
?>
<tr class="<?=$TableLine?>">
<td nowrap align="center"><?=$GROUP_NAME?></td>
<td nowrap align="center"><?=$GROUP_DESC?></td>
<td nowrap align="center">
<a href="detail?GROUP_ID=<?=$GROUP_ID?>&CUR_PAGE=<?=$CUR_PAGE?>">指标集明细</a>
<a href="modify.php?GROUP_ID=<?=$GROUP_ID?>&CUR_PAGE=<?=$CUR_PAGE?>"> 修改</a>
<a href="javascript:delete_vote('<?=$GROUP_ID?>','<?=$CUR_PAGE?>');"> 删除</a>
</td>
</tr>
<?
}
?>
</table>
</div>
</body>
</html>
<script>
function delete_vote(GROUP_ID,CUR_PAGE)
{
msg='确认要删除该指标集?';
if(window.confirm(msg))
{
URL="delete.php?GROUP_ID=" + GROUP_ID + "&CUR_PAGE=" + CUR_PAGE;
window.location=URL;
}
}
function delete_all()
{
msg='确认要删除所有指标集?';
if(window.confirm(msg))
{
URL="delete_all.php";
window.location=URL;
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -