PHP Classes

File: pages/p_userslist.php

Recommend this page to a friend!
  Classes of Javier AP   Pergamus Publication Manager   pages/p_userslist.php   Download  
File: pages/p_userslist.php
Role: Auxiliary script
Content type: text/plain
Description: Users list page
Class: Pergamus Publication Manager
Web based manager for scientific publications
Author: By
Last change:
Date: 19 years ago
Size: 2,767 bytes
 

Contents

Class file image Download
<?php
include '../class/class_collection.php';
include
'../class/autentification.php';
if(
$action == 'remove') {
 
$reg->remove_by_attr('username',$param);
}
?>
<html>
<head>
<title>Pergamus publication manager</title>
<link href="../style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html" charset="utf-8"">
</head>
<body>
 <div class="main">
  <h1>Users list </h1>
  <?php include 'p_session_bar.php';?>
<?php
     $lista_items
= $reg->registroXML->getElementsByTagName("item");
    
$count_items = $lista_items->getLength();
 
?>
<table width="100%" border="0" cellpadding="1" cellspacing="0">
    <tr bgcolor="#999999">
      <td><font color="#FFFFFF"><strong>Last name </strong></font></td>
      <td><font color="#FFFFFF"><strong>First Name </strong></font></td>
      <td><font color="#FFFFFF"><strong>Username</strong></font></td>
      <td><font color="#FFFFFF"><strong>E-mail</strong></font></td>
      <td><div align="center"><font color="#FFFFFF"><strong><em>Remove</em></strong></font></div></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <?php
    
for ($i = 0; $i < $count_items; $i++) {
        
$currNode =& $lista_items->item($i);
       
$last_name = $currNode->getAttribute("last_name");
       
$first_name = $currNode->getAttribute("first_name");
       
$correo = $currNode->getAttribute("email");
        
$username = $currNode->getAttribute("username");
       
        if(
$action == 'remove' && $param == $username) { ?>

        <tr <?php if($i % 2 == 0) echo('bgcolor="#f0f0f0"');?> >
              <td><span class="eliminado"><?php echo($last_name) ?></span></td>
              <td><span class="eliminado"><?php echo($first_name) ?></span></td>
            <td><span class="eliminado"><?php echo($username) ?></span></td>
               <td><span class="eliminado"><?php echo($correo) ?></span></td>
            <td><div align="center"><font color="#990000"><em>removed</em></font></div></td>
        </tr>
   
        <?php } else { ?>
       
            <tr <?php if($i % 2 == 0) echo('bgcolor="#f0f0f0"');?> >
          <td><?php echo($last_name) ?></td>
          <td><?php echo($first_name) ?></td>
          <td><?php echo($username) ?></td>
          <td><a href="mailto:<?php echo($correo) ?>"><?php echo($correo) ?>
</a>
          </td>
          <td>
          <div align="center">
              <a href="p_userslist.php?action=remove&param=<?php echo($username) ?>">
              <img src="../img/x.gif" width="16" height="16" border="0" align="top"></a>
            </div>
            </td>
         </tr>
     <?php } //else ?>
    <?php } //for ?>
</table>

  <?php include 'p_banner.php'?>
<p>&nbsp;</p>
</div>
</body>
</html>