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

📄 view.php

📁 通达OA2007SE源代码 非常好的
💻 PHP
字号:
<?
  include_once 'inc/auth.php';
  echo '
<html>
<head>
<title>聊天室显示发言内容</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
  echo '<s';
  echo 'cript Language=JavaScript>
window.setTimeout(\'this.location.reload();\',5000);
</script>
</head>
<body bgcolor="#F1FAF5" class="small">
';
  $CUR_TIME = date ('Y-m-d H:i:s', time ());
  $MSG_FILE = (('msg/'.$CHAT_ID).'.msg');
  if (!file_exists ($MSG_FILE))
  {
    $fp = fopen ($MSG_FILE, 'r');
    flock ($fp, 2);
    fclose ($fp);
  }
  $SCREEN_HEIGHT = 20;
  $LINES = file ($MSG_FILE);
  $LINES_COUNT = count ($LINES);
  $LINES_START = ($LINES_COUNT - $SCREEN_HEIGHT);
  if (($LINES_START < 0))
  {
    $LINES_START = 0;
  }
  echo '
';
  echo '<s';
  echo 'cript>
//parent.chat_view_area.document.open("text/html", "replace")
parent.chat_view_area.document.open();
parent.chat_view_area.document.writeln("<html>");
parent.chat_view_area.document.writeln("<body bgcolor=\'#F1FAF5\' class=\'small\'>");
';
  for ($I = $LINES_START; ($I < $LINES_COUNT); ++$I)
  {
    $STR = substr ($LINES[$I], 0, (strlen ($LINES[$I]) - 1));
    $TO_STR = substr ($STR, 0, strpos ($STR, '@+#'));
    $TO_ID = '';
    $FROM_ID = '';
    if (($TO_STR != ''))
    {
      $TO_STR = strtok ($TO_STR, ',');
      $TO_ID = $TO_STR;
      $TO_STR = strtok (',');
      $FROM_ID = $TO_STR;
      $POS = strpos ($STR, '@+#');
      $STR = substr ($STR, ($POS + 3));
    }
    if (($STR != ''))
    {
      if (((($TO_ID == '') OR ($TO_ID == $LOGIN_USER_ID)) OR ($FROM_ID == $LOGIN_USER_ID)))
      {
        $OUT_PUT = (('<span>'.$STR).'</span><br>');
        $OUT_PUT = str_replace (chr (34), '”', $OUT_PUT);
        echo '
        a=parent.chat_view_area.document;
        a.writeln("';
        echo $OUT_PUT;
        echo '");
';
        continue;
      }
      continue;
    }
  }
  echo '
parent.chat_view_area.document.writeln("</body></html>");
for(i=1;i<=2;i++)
   parent.chat_view_area.scroll(0,1000);
window.status="聊天室";
</script>
</body>
</html>
';
?>

⌨️ 快捷键说明

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