Jump to content

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /export/


Ibshas25

Recommended Posts

can't seem to find the error. helppp

 

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /export/SOI-50/students/m2009/abhr428/web/WebIbs/view_user.php on line 20

 

<?php

 

require_once( "common.inc.php");

require_once( "config.php" );

require_once( "users.class.php" );

require_once( "LogEntry.class.php" );

 

 

$userid = isset( $_GET["userid"] ) ? (int)$_GET["userid"] : 0;

 

 

if ( !$user = user::getuser( $userid) ) {

displayPageHeader( "Error" );

echo "<div>User not found.</div>;

displayPageFooter();

exit;

}

 

$logEntries = LogEntry::getLogEntries( $userid );

displayPageHeader( "View user: ". $user->getValueEncoded( "usr_name")

." ". $user->getValueEncoded( "usr_surname") );

 

?>

 

<dl style="width: 30em;">

<dt>Username</dt>

<dd><?php echo $user->getValueEncoded( "usr_username" ) ?></dd>

<dt>First name</dt>

<dd><?php echo $user->getValueEncoded( "usr_name" ) ?></dd>

<dt> Last name</dt>

<dd><?php echo $user->getValueEncoded( "usr_surename" ) ?></dd>

<dt>Joined on</dt>

<dd><?php echo $user->getValueEncoded( "usr_recordtime") ?></dd>

<dt>Last time active</dt>

<dd><?php echo $user->getValueEncoded( "usr_lastlogintime" ) ?></dd>

 

</dl>

 

<h2> Access Log </h2>

 

 

<table cellspacing="0" style="width":30em; border: 1px solid #667;">

<tr>

<th>Web Page</th>

<th>Number of visits</th>

<th> Last visit</th>

</tr>

 

<?php

 

$rowCount = 0;

foreach ~( $logEntries as $logEntry ) {

$rowCount++;

?>

   

   

    <tr<?php if ( $rowCount % 2 == 0 ) echo ' class="alt"' ?>>

        <td><?php echo $logEntry->getValueEncoded( "pageUrl" ) ?></td>

        <td><?php echo $logEntry->getValueEncoded( "numVisits") ?></td>

        <td><?php echo $logEntry->getValueEncoded( "lastAccess") ?> </td>

       

        </tr>

       

      <?php

 

 

  </table>

 

  <div style="width: 30em; margin-top: 20px; text-align: center;">

  <a href="javascript:history.go(-1)">back</a> 

</div>

 

<?php

displayPageFooter();

?>

 

   

 

 

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.