Просмотр файла id2764/newsstream/delstaff_1.php

Размер файла: 1.47Kb
  1. <?
  2. if ($nsauth == ok) {
  3. include("configure.php");
  4. include("user.php");
  5.  
  6. $table_name5 = "ns_staff";
  7.  
  8. $connection5 = @mysql_connect("$db_server", "$db_name", "$db_password") or die("Couldn't connect.");
  9.  
  10. $db5 = @mysql_select_db($db_database, $connection5) or die("Couldn't select database.");
  11.  
  12. $sql5 = "SELECT username, password, email, delall, delown, addmembers, delmembers
  13. FROM $table_name5
  14. ORDER BY username
  15. ";
  16.  
  17. $result5 = @mysql_query($sql5, $connection5) or die("Couldn't execute query.");
  18.  
  19. while ($row5 = mysql_fetch_array($result5)) {
  20.  
  21. $username5 = $row5['username'];
  22. $email5 = $row5['email'];
  23. $delall5 = $row5['delall'];
  24. $delown5 = $row5['delown'];
  25. $addmembers5 = $row5['addmembers'];
  26. $delmembers5 = $row5['delmembers'];
  27.  
  28. $listmembers5 .= "<option value=\"$username5\">
  29. $username5 </option> <br>";
  30.  
  31. }
  32.  
  33. if ($delmembers9 == yes) {
  34. $display = "
  35. <font size=4>
  36. <p>
  37. <form action=modifystaff_1.php method=post>
  38. <select name=deletemember>
  39. $listmembers5
  40. </select>
  41. <br>
  42. <input type=submit value=\"Modify\">
  43. </form>
  44. </p>
  45.  
  46. <p>
  47. <form action=delstaff_2.php method=post>
  48. <select name=deletemember>
  49. $listmembers5
  50. </select>
  51. <br>
  52. <input type=submit value=\"Delete\">
  53. </form>
  54. </p>
  55.  
  56. <p>
  57. <a href=\"admin.php\">Admin Center</a>
  58. </p>
  59.  
  60. ";
  61. } else {
  62. $display = "You do not have access to this page.";
  63. }
  64.  
  65. } else {
  66. header("location: login_admin.php");
  67. }
  68.  
  69.  
  70. ?>
  71. <body bgcolor=#D1E7FE>
  72. <title>Admin / Delete Staff</title>
  73.  
  74. <? echo $display; ?>
  75. </font>