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

📄 user.php

📁 通达OA2007SE源代码 非常好的
💻 PHP
字号:
<?
  include_once 'inc/auth.php';
  include_once 'inc/utility_all.php';
  echo '
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
  echo '<s';
  echo 'tyle>
.menulines{}
</style>
';
  echo '<s';
  echo 'cript Language="JavaScript">
var parent_window = parent.dialogArguments;
function click_dept(dept_id,td_id)
{
  TO_VAL=parent_window.form1.';
  echo $TO_ID;
  echo '.value;
  targetelement=document.all(td_id);
  if(TO_VAL.indexOf(","+dept_id+",")>0 || TO_VAL.indexOf(dept_id+",")==0)
  {
    if(TO_VAL.indexOf(dept_id+",")==0)
    {
       parent_window.form1.';
  echo $TO_ID;
  echo '.value=parent_window.form1.';
  echo $TO_ID;
  echo '.value.replace(dept_id+",","");
       borderize_off(targetelement);
    }
    if(TO_VAL.indexOf(","+dept_id+",")>0)
    {
       parent_window.form1.';
  echo $TO_ID;
  echo '.value=parent_window.form1.';
  echo $TO_ID;
  echo '.value.replace(","+dept_id+",",",");
       borderize_off(targetelement);
    }
  }
  else
  {
    parent_window.form1.';
  echo $TO_ID;
  echo '.value+=dept_id+",";
    borderize_on(targetelement);
  }
}
function borderize_on(targetelement)
{
 color="#003FBF";
 targetelement.style.borderColor="black";
 targetelement.style.backgroundColor=color;
 targetelement.style.color="white";
 targetelement.style.fontWeight="bold";
}
function borderize_off(targetelement)
{
  targetelement.style.backgroundColor="";
  targetelement.st';
  echo 'yle.borderColor="";
  targetelement.style.color="";
  targetelement.style.fontWeight="";
}
function begin_set()
{
  TO_VAL=parent_window.form1.';
  echo $TO_ID;
  echo '.value;
  for (step_i=0; step_i<document.all.length; step_i++)
  {
    if(document.all(step_i).className=="menulines")
    {
       dept_id=document.all(step_i).title;
       if(TO_VAL.indexOf(","+dept_id+",")>0 || TO_VAL.indexOf(dept_id+",")==0)
          borderize_on(document.all(step_i));
    }
  }
}
function add_all()
{
  TO_VAL=parent_window.form1.';
  echo $TO_ID;
  echo '.value;
  for (step_i=0; step_i<document.all.length; step_i++)
  {
    if(document.all(step_i).className=="menulines")
    {
       dept_id=document.all(step_i).title;
       if(TO_VAL.indexOf(","+dept_id+",")<=0 && TO_VAL.indexOf(dept_id+",")!=0)
       {
         parent_window.form1.';
  echo $TO_ID;
  echo '.value+=dept_id+",";
         borderize_on(document.all(step_i));
       }
    }
  }
}
function del_all()
{
  for (step_i=0; step_i<document.all.length; step_i++)
  {
    TO_VAL=parent_window.form1.';
  echo $TO_ID;
  echo '.value;
    if(document.all(step_i).className=="menulines")
    {
       dept_id=document.all(step_i).title;
       if(TO_VAL.indexOf(dept_id+",")==0)
       {
          parent_window.form1.';
  echo $TO_ID;
  echo '.value=parent_window.form1.';
  echo $TO_ID;
  echo '.value.replace(dept_id+",","");
       }
       if(TO_VAL.indexOf(","+dept_id+",")>0)
       {
          parent_window.form1.';
  echo $TO_ID;
  echo '.value=parent_window.form1.';
  echo $TO_ID;
  echo '.value.replace(","+dept_id+",",",");
       }
       borderize_off(document.all(step_i));
    }
  }
}
</script>
</head>
<body topmargin="1" leftmargin="0" class="bodycolor" onload="begin_set()">
';
  $query = (((((((''.'SELECT * from ADDRESS where USER_ID=\'').$USER_ID).'\' and GROUP_ID=\'').$GROUP_ID).'\' and ').$FIELD).'!=\'\' order by PSN_NAME');
  $cursor = exequery ($connection, $query);
  if ((mysql_num_rows ($cursor) == 0))
  {
    message ('', '该分组尚无记录');
    exit ();
  }
  echo ' <table border="1" cellspacing="0" width="95%" class="small" cellpadding="3"  bordercolorlight="#000000" bordercolordark="#FFFFFF"  align="center">
   <tr class="TableContent">
     <td onclick="javascript:add_all();" style="cursor:hand" align="center" colspan="2">全部添加</td>
   </tr>
   <tr class="TableContent">
     <td onclick="javascript:del_all();" style="cursor:hand" align="center" colspan="';
  echo '2">全部删除</td>
   </tr>
';
  while ($ROW = mysql_fetch_array ($cursor))
  {
    $ADD_ID = $ROW['ADD_ID'];
    $PSN_NAME = $ROW['PSN_NAME'];
    $FIELD_VALUE = $ROW[$FIELD];
    echo '  <tr class="TableData" style="cursor:hand" align="center">
    <td class="menulines" id="';
    echo $ADD_ID;
    echo '" onclick=javascript:click_dept(\'';
    echo $FIELD_VALUE;
    echo '\',\'';
    echo $ADD_ID;
    echo '\') title="';
    echo $FIELD_VALUE;
    echo '">';
    echo $PSN_NAME;
    echo '(';
    echo $FIELD_VALUE;
    echo ')</a></td>
  </tr>
';
  }
  echo '</body>
</html>
';
?>

⌨️ 快捷键说明

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