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

📄 index.php

📁 通达OA系统
💻 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">
</head>
<body class="bodycolor" topmargin="5">
<?
 $query = "SELECT * from VOTE_TITLE where VOTE_ID=$VOTE_ID";
 $cursor= exequery($connection,$query);
 if($ROW=mysql_fetch_array($cursor))
 {
    $SUBJECT=$ROW["SUBJECT"];
    $ANONYMITY=$ROW["ANONYMITY"];
 }
?>
<table border="0" width="90%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/menu/vote.gif" align="absmiddle"><span class="big3"> 投票项目管理 — <?=$SUBJECT?></span>
    </td>
  </tr>
</table>

<table border="0" width="90%" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
  <tr class="TableHeader" align="center">
    <td width="40%">选项</td>
    <td width="10%">票数</td>
    <td width="35%">投票人员</td>
    <td width="15%">操作</td>
  </tr>
<?
$query = "SELECT * from VOTE_ITEM where VOTE_ID=$VOTE_ID";
$cursor= exequery($connection,$query);
while($ROW=mysql_fetch_array($cursor))
{
   $ITEM_ID=$ROW["ITEM_ID"];
   $ITEM_NAME=$ROW["ITEM_NAME"];
   $VOTE_COUNT=$ROW["VOTE_COUNT"];
   $VOTE_USER=$ROW["VOTE_USER"];
   
   if($ANONYMITY=="0")
   {
      $VOTE_USER_NAME="";
      $query = "SELECT * from USER where find_in_set(USER_ID,'$VOTE_USER')";
      $cursor1= exequery($connection,$query);
      while($ROW1=mysql_fetch_array($cursor1))
         $VOTE_USER_NAME.=$ROW1["USER_NAME"].",";
      $VOTE_USER_NAME=substr($VOTE_USER_NAME,0,-2);
   }
?>
  <tr class="TableData">
    <form method="post" action="update.php">
    <td>&nbsp;<input type="text" name="ITEM_NAME" class="SmallInput" value="<?=$ITEM_NAME?>" size="40"></td>
    <td align="right"><?=$VOTE_COUNT?>票</td>
    <td style="cursor:hand" title="<?=$VOTE_USER_NAME?>"><?=csubstr($VOTE_USER_NAME,0,30).(strlen($VOTE_USER_NAME)>30?"...":"")?></td>
    <td align="center">
    <input type="hidden" name="ITEM_ID" value="<?=$ITEM_ID?>">
    <input type="hidden" name="VOTE_ID" value="<?=$VOTE_ID?>">
    <input type="submit" name="submit" value="修改" class="SmallButton">&nbsp;&nbsp;
    <input type="button" value="删除" class="SmallButton" name="button" onclick="if (confirm('您真的要删除该条选项吗?\n\n注意:该操作不可恢复!'))location.href='delete.php?ITEM_ID=<?=$ITEM_ID?>&VOTE_ID=<?=$VOTE_ID?>'">
    </td>
    </form>
  </tr>
<?
}
?>
  <tr class="TableControl">
    <form method="post" action="add.php">
    <td colspan="4">添加项目:
    <input type="text" name="ITEM_NAME" class="SmallInput" size="40">
    <input type="hidden" name="VOTE_ID" value="<?=$VOTE_ID?>">&nbsp;&nbsp;
    <input type="submit" name="submit" class="SmallButton" value="添加"></td>
    </form>
  </tr>
</table>

<div align="center">
   <br>
   <input type="button" class="BigButton" value="返回" onclick="location='../index1.php?CUR_PAGE=<?=$CUR_PAGE?>'">
</div>
</body>
</html>

⌨️ 快捷键说明

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