Jump to content

Parse error: syntax error, unexpected $end in /export/SOI-50/students/m20


Ibshas25

Recommended Posts

 

cant seemed to solve this... helppp

 

<?php

require_once( "common.inc.php" );
require_once( "config.php");
require_once("users.class.php");


$start = isset( $_GET["start"] ) ? (int)$_GET["start"] : 0;
$order = isset( $_GET["order"] ) ? preg_replace( "/[^a-zA-Z]/", "",
$_GET["order"] ) : "usr_username";
list( $users, $totalRows ) =users::getusers( $start, PAGE_SIZE,
$order );
displayPageHeader( "View  project Employees" );

?>

      <h2> Displaying Available Project Employees <?php echo $start + 1 ?> - <?php echo min( $start + PAGE_SIZE, $totalRows ) ?> of <?php echo $totalRows ?></h2>

      <table cellspacing="0" style="width: 30em; border: 1px solid #667;">
        <tr>
           <th><?php if ( $order != " usr_username" ) { ?><a href="view_users.php? order= usr_username"><?php } ?>Username<?php if ( $order != "usr_username")
   { ?></a><?php } ?></th>
    
     <th><?php if ( $order != "usr_name" ) { ?><a href= "view_users.php? order= usr_name"> <?php } ?>First name<?php if ( $order != "usr_name" )
    { ?></a><?php } ?></th>
     
       
     <th><?php if ( $order != "usr_surname" ) { ?><a href= "view_users.php? order= usr_surname"> <?php } ?>Last name<?php if ( $order != "usr_surname" )
    { ?></a><?php } ?></th>
     </tr>
     
   <?php
   $rowCount= 0;
   
   foreach ( $users as $users ) {
   $rowCount++;
   
   ?>
   
         <tr<?php if ( $rowCount % 2 == 0 ) echo ' class="alt"' ?>>
           <td><a href="view_user.php?userid=<?php echo $user->
         
   getValueEncoded ( "id" ) ?><?php echo $user->getValueEncoded( "usr_username" )
   ?></a></td>
          <td><?php echo $user->getValueEncoded( "usr_name" ) ?></td>
            <td><?php echo $user->getValueEncoded( "usr_surname") ?> </td>
           </tr>
           
           
   <?php
   }
   
   ?>
   
   </table>
   
   <div style="width: 30em; margin-top: 20px; text-align; center;">
   <?php if ( $start > 0 ) { ?>
   
         <a href="view_users.php?start=<?php echo max( $start - PAGE_SIZE, 0 )?>
        &order=<?php echo $order ?>">Previous Page</a>
     
    <?php if ( $start + PAGE_SIZE < $totalRows ) { ?>
       <a href="view_users.php?start=<?php echo min( $start + PAGE_SIZE,
      $totalRows ) ?>& order=<?php echo $order ?>">Next Page</a>
        <?php
      displayPageFooter();
      ?>

 

 

MOD EDIT:

 . . . 

tags added.

Link to comment
Share on other sites

<?php

require_once( "common.inc.php" );
require_once( "config.php");
require_once("users.class.php");


$start = isset( $_GET["start"] ) ? (int)$_GET["start"] : 0;
$order = isset( $_GET["order"] ) ? preg_replace( "/[^a-zA-Z]/", "",
$_GET["order"] ) : "usr_username";
list( $users, $totalRows ) =users::getusers( $start, PAGE_SIZE,
$order );
displayPageHeader( "View  project Employees" );

?>

      <h2> Displaying Available Project Employees <?php echo $start + 1 ?> - <?php echo min( $start + PAGE_SIZE, $totalRows ) ?> of <?php echo $totalRows ?></h2>

      <table cellspacing="0" style="width: 30em; border: 1px solid #667;">
        <tr>
           <th><?php if ( $order != " usr_username" ) { ?><a href="view_users.php? order= usr_username"><?php } ?>Username<?php if ( $order != "usr_username")
   { ?></a><?php } ?></th>
   
     <th><?php if ( $order != "usr_name" ) { ?><a href= "view_users.php? order= usr_name"> <?php } ?>First name<?php if ( $order != "usr_name" )
    { ?></a><?php } ?></th>
     
       
     <th><?php if ( $order != "usr_surname" ) { ?><a href= "view_users.php? order= usr_surname"> <?php } ?>Last name<?php if ( $order != "usr_surname" )
    { ?></a><?php } ?></th>
     </tr>
     
   <?php
   $rowCount= 0;
   
   foreach ( $users as $users ) {
   $rowCount++;
   
   ?>
   
         <tr<?php if ( $rowCount % 2 == 0 ) echo ' class="alt"' ?>>
           <td><a href="view_user.php?userid=<?php echo $user->
         
   getValueEncoded ( "id" ) ?><?php echo $user->getValueEncoded( "usr_username" )
   ?></a></td>
          <td><?php echo $user->getValueEncoded( "usr_name" ) ?></td>
            <td><?php echo $user->getValueEncoded( "usr_surname") ?> </td>
           </tr>
           
           
   <?php
   }
   
   ?>
   
   </table>
   
   <div style="width: 30em; margin-top: 20px; text-align; center;">
   <?php if ( $start > 0 ) { ?>
   
         <a href="view_users.php?start=<?php echo max( $start - PAGE_SIZE, 0 )?>
        &order=<?php echo $order ?>">Previous Page</a>
     
    <?php 
    }
    if ( $start + PAGE_SIZE < $totalRows ) { ?>
       <a href="view_users.php?start=<?php echo min( $start + PAGE_SIZE,
      $totalRows ) ?>& order=<?php echo $order ?>">Next Page</a>
        <?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.