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.

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

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.