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();

?>

 

   

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.