⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index1.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 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 show_reader(GROUP_ID)
{
 URL="show_reader.php?GROUP_ID="+GROUP_ID;
 myleft=(screen.availWidth-500)/2;
 window.open(URL,"read_vote","height=500,width=500,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}

function show_desc(FLOW_ID)
{
 URL="show_desc.php?FLOW_ID="+FLOW_ID;
 myleft=(screen.availWidth-50)/2;
 window.open(URL,"read_vote","height=300,width=400,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}

function show_man(FLOW_ID,FLAG)
{
 URL="show_man.php?FLOW_ID="+FLOW_ID+"&type="+FLAG;
 myleft=(screen.availWidth-500)/2;
 window.open(URL,"read_vote","height=500,width=500,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}

function delete_vote(FLOW_ID,CUR_PAGE)
{
 msg='确认要删除该考核任务?考核数据将被删除且不可恢复!!';
 if(window.confirm(msg))
 {
  URL="delete.php?FLOW_ID=" + FLOW_ID + "&CUR_PAGE=" + CUR_PAGE;
  window.location=URL;
 }
}

</script>

</head>
<body class="bodycolor" topmargin="5">

<?
 $query = "SELECT count(*) from SCORE_FLOW";
 $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="18" HEIGHT="18" align="absmiddle"><span class="big3">&nbsp;&nbsp;管理已发布的考核任务</span><br>
    </td>
  </tr>
</table>
<br>

<?
   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" align="absmiddle" WIDTH="18" HEIGHT="18"><span class="big3">&nbsp;&nbsp;管理已发布的考核任务</span><br>
    </td>
    <td align="right" valign="bottom" class="small1">共<span class="big4">&nbsp;<?=$VOTE_COUNT?></span>&nbsp;条
    </td>
    <td align="right" valign="bottom" class="small1">
       <a class="A1" href="index1.php?CUR_PAGE=1">首页</a>&nbsp;
       <a class="A1" href="index1.php?CUR_PAGE=<?=$PAGE_COUNT?>">末页</a>&nbsp;&nbsp;
<?
if($CUR_PAGE%$PAGES==0)
   $J=$PAGES;
else
   $J=$CUR_PAGE%$PAGES;

if($CUR_PAGE> $PAGES)
{
?>
       <a class="A1" href="index1.php?CUR_PAGE=<?=$CUR_PAGE-$J-$PAGES+1?>">上<?=$PAGES?>页</a>&nbsp;&nbsp;
<?
}

for($I=$CUR_PAGE-$J+1;$I<=$CUR_PAGE-$J+$PAGES;$I++)
{
   if($I>$PAGE_COUNT)
      break;

   if($I==$CUR_PAGE)
   {
?>
       [<?=$I?>]&nbsp;
<?
   }
   else
   {
?>
       [<a class="A1" href="index1.php?CUR_PAGE=<?=$I?>"><?=$I?></a>]&nbsp;
<?
   }
}
?>
      &nbsp;
<?
if($I-1< $PAGE_COUNT)
{
?>
       <a class="A1" href="index1.php?CUR_PAGE=<?=$I?>">下<?=$PAGES?>页</a>&nbsp;&nbsp;
<?
}
if($CUR_PAGE-1>=1)
{
?>
       <a class="A1" href="index1.php?CUR_PAGE=<?=$CUR_PAGE-1?>">上一页</a>&nbsp;
<?
}
else
{
?>
       上一页&nbsp;
<?
}

if($CUR_PAGE+1<= $PAGE_COUNT)
{
?>
       <a class="A1" href="index1.php?CUR_PAGE=<?=$CUR_PAGE+1?>">下一页</a>&nbsp;
<?
}
else
{
?>
       下一页&nbsp;
<?
}
?>
       &nbsp;
    </td>
    </tr>
</table>

<br>
<table border="0" cellspacing="1" width="98%" class="small" bgcolor="#000000" cellpadding="3">
  <tr class="TableHeader">
  	  <td nowrap align="center">考核任务名称</td>
      <td nowrap align="center">考核人</td>
      <td nowrap align="center">被考核人</td>
      <td nowrap align="center">考核指标集</td>
      <td nowrap align="center">匿名</td>
      <td nowrap align="center">生效日期 <img border=0 src="/images/arrow_down.gif" width="11" height="10"></td>
      <td nowrap align="center">终止日期</td>

      <td nowrap align="center">状态</td>
      <td nowrap align="center">操作</td>
  </tr>

<?
 //============================ 显示已发布公告 =======================================
 $CUR_DATE=date("Y-m-d",time());
 $query = "SELECT * from SCORE_FLOW order by SEND_TIME 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;
    $FLOW_ID=$ROW["FLOW_ID"];
    $FLOW_TITLE=$ROW["FLOW_TITLE"];
    $BEGIN_DATE=$ROW["BEGIN_DATE"];
    $END_DATE=$ROW["END_DATE"];
    $RANKMAN=$ROW["RANKMAN"];
    $PARTICIPANT =$ROW["PARTICIPANT"];
    $GROUP_ID=$ROW["GROUP_ID"];
    $ANONYMITY=$ROW["ANONYMITY"];

    if($ANONYMITY=="0")
       $ANONYMITY_DESC="不允许";
    else
       $ANONYMITY_DESC="允许";

    if($END_DATE=="0000-00-00")
       $END_DATE="";
      $RAN_NAME="";
      $TOK=strtok($RANKMAN,",");
      while($TOK!="")
      {
        if($RAN_NAME!="")
           $RAN_NAME.=",";
        $query1="select * from USER where USER_ID='$TOK'";
        $cursor1= exequery($connection,$query1);
        if($ROW=mysql_fetch_array($cursor1))
           $RAN_NAME.=$ROW["USER_NAME"];
           $RAN_NAME.="....";
        break;
        $TOK=strtok(",");
      }
      $PARTI_NAME="";
      $TOK=strtok($PARTICIPANT,",");
      while($TOK!="")
      {
        if($PARTI_NAME!="")
           $PARTI_NAME.=",";
        $query1="select * from USER where USER_ID='$TOK'";
        $cursor1= exequery($connection,$query1);
        if($ROW=mysql_fetch_array($cursor1))
           $PARTI_NAME.=$ROW["USER_NAME"];
           $PARTI_NAME.="....";
           break;
        $TOK=strtok(",");
      }

       $query1="select * from SCORE_GROUP where GROUP_ID='$GROUP_ID'";
       $cursor1= exequery($connection,$query1);
       if($ROW=mysql_fetch_array($cursor1))
           $GROUP_NAME=$ROW["GROUP_NAME"];
    if(compare_date($CUR_DATE,$BEGIN_DATE)<0)
    {
       $VOTE_STATUS=1;
       $VOTE_STATUS_STR="待生效";
    }
    else
    {
       $VOTE_STATUS=2;
       $VOTE_STATUS_STR="<font color='#00AA00'><b>生效</font>";
    }


    if($END_DATE!="")
    {
      if(compare_date($CUR_DATE,$END_DATE)>0)
      {
         $VOTE_STATUS=3;
         $VOTE_STATUS_STR="<font color='#FF0000'><b>终止</font>";
      }
    }

    if($VOTE_COUNT%2==1)
       $TableLine="TableLine1";
    else
       $TableLine="TableLine2";
?>
    <tr class="<?=$TableLine?>">
      <td nowrap align="center"><?=$FLOW_TITLE?></td>
      <td align="center"><a href="javascript:show_man('<?=$FLOW_ID?>','1');" title="点击查看所有的考核人员"><?=$RAN_NAME?></a></td>
      <td align="center"><a href="javascript:show_man('<?=$FLOW_ID?>','0');" title="点击查看所有的被考核人员"><?=$PARTI_NAME?></a></td>
      <td align="center"><a href="javascript:show_reader('<?=$GROUP_ID?>');" title="点击查看考核项目"><?=$GROUP_NAME?></a></td>
      <td align="center"><?=$ANONYMITY_DESC?></td>
      <td nowrap align="center"><?=$BEGIN_DATE?></td>
      <td nowrap align="center"><?=$END_DATE?></td>

      <td nowrap align="center"><?=$VOTE_STATUS_STR?></td>




      <td nowrap align="center">
      	  <a href="new.php?FLOW_ID=<?=$FLOW_ID?>&CUR_PAGE=<?=$CUR_PAGE?>"> 修改</a>

      <a href="javascript:delete_vote('<?=$FLOW_ID?>','<?=$CUR_PAGE?>');"> 删除</a>

<?
      if($VOTE_STATUS==1)
      {
?>
      <a href="manage.php?FLOW_ID=<?=$FLOW_ID?>&OPERATION=1&CUR_PAGE=<?=$CUR_PAGE?>"> 立即生效</a>
<?
      }
      else if($VOTE_STATUS==2)
      {
?>

      <a href="manage.php?FLOW_ID=<?=$FLOW_ID?>&OPERATION=2&CUR_PAGE=<?=$CUR_PAGE?>"> 立即终止</a>
<?
      }
      else if($VOTE_STATUS==3)
      {
?>

      <a href="manage.php?FLOW_ID=<?=$FLOW_ID?>&OPERATION=3&CUR_PAGE=<?=$CUR_PAGE?>"> 恢复生效</a>
<?
      }
?>



      </td>
    </tr>
<?
 }
?>



</table>
</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -