Jump to content

an online user code giving an error


Worldwide

Recommended Posts

This code is giving me an error but i can't seem to understand why...  Error: Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\onlineuser.php  on line 9

 

 

CODE: <?php

include("usersetup.php");

 

$filename = "onlineusers.html";

$html = "";

 

if (!file_exists($filename) or filemtime($filename) < time() - 1){

 

<body>

<table width="780" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>

    <td valign="top">

      <?php include_once('header.php'); ?>

  <h4>オンライン状況</h4>

  <table width="100%" border="0" cellspacing="0" cellpadding="0">

        <tr>

          <td>

          ゲームサーバー:

            <?php

$query_R_characters = "SELECT * FROM characters WHERE OnlineStatus = 1 ORDER BY `Exp` DESC LIMIT 0,{$online_prayer_limit}";

$R_characters = mysql_query($query_R_characters, $l1jdb) or die(mysql_error());

$row_R_characters = mysql_fetch_assoc($R_characters);

$totalRows_R_characters = mysql_num_rows($R_characters);

if ($fs = @fsockopen($hostname_l1jdb, "2000", $errno, $errstr, 1)) {

echo "<span style=\"color:#339933\">オンライン</span> 現在接続中のプレイヤー:<span style=\"color:#339933\">{$totalRows_R_characters}</span>";

fclose($fs);

} else {

echo "<span style=\"color:#FF3333\">オフライン</span>";

}

  ?>

          </td>

        </tr>

      </table>

<?php if ($totalRows_R_characters > 0) { ?>

<br />

<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td colspan="2" nowrap="nowrap">Character</td>

    <td><div align="center">Level</div></td>

    <td>Clan</td>

  </tr>

  <?php do { ?>

  <tr>

    <td width="20" nowrap="nowrap" class="pd1">

      <div align="left">

        <?php if (file_exists($chagfx_small[$row_R_characters['Class']])) {echo "<img src=\"{$chagfx_small[$row_R_characters['Class']]}\">";} else {echo $classname[$row_R_characters['Class']];} ?>

        </div></td>

    <td nowrap="nowrap"><span class="pd3 fs14<?php if ($row_R_characters['Lawful'] > -1) {echo " blue";} else {echo " red";} ?>"><?php echo $row_R_characters['char_name']; ?></span></td>

    <td><div align="center"><?php echo $row_R_characters['level']; ?></div></td>

    <td nowrap="nowrap"><?php echo $row_R_characters['Clanname']; ?></td>

  </tr>

  <?php } while ($row_R_characters = mysql_fetch_assoc($R_characters)); ?>

</table>

<?php

}

mysql_free_result($R_characters);

?>

</table>

</body>

</html>

 

Link to comment
https://forums.phpfreaks.com/topic/200616-an-online-user-code-giving-an-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.