Blame view

htdocs/documents/deleteMember.php 606 Bytes
c10d2abc   rcavalie   ajout fichiers se...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  <?php
  session_start();
  if($_SESSION['name']){
  	
  require_once 'include/DB_Functions.php';
  $db = new DB_Functions();
  
  $users =  $db->getUsers();
  $arrlength=count($users);
  
  echo "List of users:" . "<p>";
  for($x=0;$x<$arrlength;$x++)
    {
  	$name = $users[$x][0]; 
      if($name != "admin") echo $x . " : " . $name ."------>"."<a href='deleteMemberAction.php?username=$name'>Delete</a>" . "<br>";
    }
    if($arrlength == 1) echo "There are not new members on db!";
  	
  }else header('Location: index.php');
  ?>
  <html>
  <form action="workArea.php" >
    <input type="submit" name="submit" value="Cancel">
  </form>
  </html>