users - <?php /* * Invision Power File Manager * User...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
<?php < /* * Invision Power File Manager * User Manager * Copyright (c) 2003 Invision Power Services * ------------------------------------- * You may not remove the copyright or * redistribute the script in any form * * Authors: Stephen Ball <stephen@invisionfilemanager.com> * * Last Modified: 4th March 2003 * */ error_reporting(0); e if (!(include("./header.lib.php"))) { die("<p align=\"center\">There was an error loading the header module</p>"); } if (!(include($script_dir . "/settings/languages.inc.php"))) { include_error("There was an error loading the language settings file"); } // Get the $op variable $op = param("op", "GET"); if (empty($op)) { $op = param("op", "POST"); } if ($op == "del" || $op == "edit") { // Need to check for only 1 (on delete) or 0 entries $userlist = file($script_dir . "/settings/" . $scripts["userlist"]); $first = 0; if ($op == "del") { $next = "remove"; $submit = "Delete Account"; $pagetitle = "Delete an Existing User"; } else { $next = "change"; $submit = "Edit Account"; $pagetitle = "Edit an Existing User"; } if (count($userlist) == 0) { $data = msg("There are no users available"); } else if (count($userlist) == 1 && $op == "del")
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{ $data = msg("You cannot delete the last user account"); } else { $form = "<form action=\"" . $PHP_SELF ."\" method=\"post\">\r\n"; $form .= "<input type=\"hidden\" name=\"op\" value=\"" . $next . "\">\r\n"; $form .= "<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">\r\n"; $form .= " <tr>\r\n"; $form .= " <td colspan=\"2\" align=\"center\"><font size=\"1\" face=\"Verdana, Geneva, Arial, Helvetica, Sans-Serif\" color=\"#000000\">Please select a user from the list below</font></td>\r\n"; $form .= " </tr>\r\n"; // List the users while(list(,$value) = each($userlist)) { if ($value != "") { list($username, $password, $htpasswd, $changepass, $chmod, $upload, $rename, $edit, $delete, $copy, $move, $newfolder, $newfile, $overwrite, $compress, $mysql, $dbhost, $dbuser, $dbpass, $dbname, $root_url, $root_dir, $max_space, $lang) = split("[|]", $value); $form .= " <tr>\r\n"; if ($first == 0) { // Make sure the first user is checked $first = 1; $form .= " <td width=\"1%\"><input type=\"radio\" name=\"user\" value=\"" . $username . "\" checked=\"checked\"/></td>\r\n"; } else { $form .= " <td width=\"1%\"><input type=\"radio\" name=\"user\" value=\"" . $username . "\" /></td>\r\n"; } $form .= " <td><font size=\"1\" face=\"Verdana, Geneva, Arial, Helvetica, Sans-Serif\" color=\"#000000\">" . $username . "</font></td>\r\n"; $form .= " </tr>\r\n"; } } if ($op == "del") { $form .= " <tr>\r\n"; $form .= " <td colspan=\"2\" align=\"center\"> </td>\r\n"; $form .= " </tr>\r\n"; $form .= " <tr>\r\n"; $form .= " <td width=\"1%\"><input type=\"checkbox\" value=\"1\" name=\"rmdir\" /></td>\r\n"; $form .= " <td><font size=\"1\" face=\"Verdana, Geneva, Arial, Helvetica, Sans-Serif\" color=\"#000000\">Delete the users directory</font></td>\r\ n"; $form .= " </tr>\r\n"; }
Background image of page 2
$form .= " <tr>\r\n";
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2011 for the course CSE 099 taught by Professor Hawkins during the Spring '11 term at N. Arizona.

Page1 / 20

users - &lt;?php /* * Invision Power File Manager * User...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online