Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require("includes/logincheck.php");
- require("config.php");
- require("includes/settings.php");
- require("includes/functions.php");
- $tool = "";
- $toolselect = "";
- if (isset($_POST["subimportxml"]) and $_POST["subimportxml"] == "Import users") {
- $cspxmlusers = $_POST["cspxmlusers"];
- $cspxmlusers = str_replace("<auth-config>", "", $cspxmlusers);
- $cspxmlusers = str_replace("</auth-config>", "", $cspxmlusers);
- $cspxmlusers = str_replace("</user-manager>", "", $cspxmlusers);
- $cspxmlusers = str_replace("<user-manager class=\"com.bowman.cardserv.SimpleUserManager\" allow-on-failure=\"true\" log-failures=\"true\">", "", $cspxmlusers);
- $cspxmlusers = str_replace("<user-manager class=\"com.bowman.cardserv.SimpleUserManager\" allow-on-failure=\"false\" log-failures=\"false\">", "", $cspxmlusers);
- $cspxmlusers = str_replace("<user-manager class=\"com.bowman.cardserv.SimpleUserManager\" allow-on-failure=\"true\" log-failures=\"false\">", "", $cspxmlusers);
- $cspxmlusers = str_replace("<user-manager class=\"com.bowman.cardserv.SimpleUserManager\" allow-on-failure=\"false\" log-failures=\"true\">", "", $cspxmlusers);
- $cspxmlusers = str_replace("<user-manager class=\"com.bowman.cardserv.SimpleUserManager\">", "", $cspxmlusers);
- $cspxmlusers = str_replace("display-name", "displayname", $cspxmlusers);
- $cspxmlusers = str_replace("ip-mask", "ipmask", $cspxmlusers);
- $cspxmlusers = str_replace("max-connections", "maxconnections", $cspxmlusers);
- $cspxmlusers = str_replace("map-exclude", "mapexclude", $cspxmlusers);
- $cspxmlusers = str_replace("email-address", "emailaddress", $cspxmlusers);
- $cspxmlusers = str_replace("ecm-rate", "ecmrate", $cspxmlusers);
- $cspxmlusers = str_replace("start-date", "startdate", $cspxmlusers);
- $cspxmlusers = str_replace("expire-date", "expiredate", $cspxmlusers);
- $cspuserlines = explode("\n", $cspxmlusers);
- $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database");
- mysql_select_db($dbname, $conn);
- $i = 0;
- $x = 0;
- $y = 0;
- $e = 0;
- $userimportlist = "";
- $userexistlist = "";
- $importresult = "";
- $impdonecolor = "#347C2C";
- foreach ($cspuserlines as $i => $value) {
- libxml_use_internal_errors(true);
- $cspusersxml = simplexml_load_string(stripslashes($cspuserlines[$i]));
- if (!$cspusersxml) {
- $y = $y + 1;
- } elseif ($cspusersxml->attributes()->name == "" or $cspusersxml->attributes()->password == "") {
- $y = $y + 1;
- } else {
- $username = $cspusersxml->attributes()->name;
- $uesql = mysql_query("SELECT * FROM cmum_udb WHERE name='" . $username . "'");
- $foundusers = mysql_num_rows($uesql);
- if ($foundusers == 0) {
- $password = $cspusersxml->attributes()->password;
- $displayname = $cspusersxml->attributes()->displayname;
- $ipmask = $cspusersxml->attributes()->ipmask;
- $profiles = $cspusersxml->attributes()->profiles;
- $maxconnections = $cspusersxml->attributes()->maxconnections;
- $admin = $cspusersxml->attributes()->admin;
- $enabled = $cspusersxml->attributes()->enabled;
- $mapexclude = $cspusersxml->attributes()->mapexclude;
- $debug = $cspusersxml->attributes()->debug;
- $email = $cspusersxml->attributes()->emailaddress;
- $ecmrate = $cspusersxml->attributes()->ecmrate;
- $startdate = $cspusersxml->attributes()->startdate;
- $expiredate = $cspusersxml->attributes()->expiredate;
- $comment = "";
- $usrgroup = "";
- $improf = explode(" ", $profiles);
- foreach ($improf as $profvalue) {
- $sql = mysql_query("SELECT * FROM cmum_profiles WHERE value='" . $profvalue . "'");
- $line = mysql_fetch_array($sql);
- if ($line["id"] <> "") {
- $convporf[] = $line["id"];
- }
- }
- if (!isset($convporf)) {
- $convporf = "N;";
- } else {
- $convporf = serialize($convporf);
- }
- mysql_query("INSERT INTO cmum_udb (name,password,displayname,ipmask,profiles,maxconnections,admin,enabled,mapexclude,debug,comment,email,usrgroup,ecmrate,startdate,expiredate,added,addedby,changed,changedby) VALUES ('" . $username . "','" . $password . "','" . $displayname . "','" . $ipmask . "','" . $convporf . "','" . $maxconnections . "','" . strtolower($admin) . "','" . strtolower($enabled) . "','" . strtolower($mapexclude) . "','" . strtolower($debug) . "','" . $comment . "','" . $email . "','" . $usrgroup . "','" . $ecmrate . "','" . $startdate . "','" . $expiredate . "','" . date('Y-m-d H:i') . "','" . $_SESSION["loginuser"] . "','','')");
- $x = $x + 1;
- unset($convporf);
- $sql = "";
- $uesql = "";
- $foundusers = "";
- $userimportlist = $userimportlist . $username . "<br>";
- } else {
- $e = $e + 1;
- $userexistlist = $userexistlist . $username . "<br>";
- }
- }
- }
- mysql_close($conn);
- if ($x <> 0 and $e <> 0) {
- $importresult = "<br><br>The following users where imported:<br>" . $userimportlist . "<br>The following users where not imported due to duplicates:<br>" . $userexistlist;
- $impdonecolor = "#FF6600";
- }
- if ($x <> 0 and $e == 0) {
- $importresult = "<br><br>The following users where imported:<br>" . $userimportlist;
- }
- if ($x == 0 and $e <> 0) {
- $importresult = "<br><br>The following users where not imported due to duplicates:<br>" . $userexistlist;
- $impdonecolor = "#FF0000";
- }
- if ($y <> 0) {
- if ($x == 0) {
- $toolstatus = "<font color=\"#FF0000\">" . $x . " users imported into database! There were " . $y . " errors! Could be empty lines, not matching lines or users without username or password!" . $importresult . "</font>";
- } else {
- $toolstatus = "<font color=\"#FF6600\">" . $x . " users successfully imported into database! But there were " . $y . " errors! Could be empty lines, not matching lines or users without username or password!" . $importresult . "</font>";
- }
- } else {
- $toolstatus = "<font color=\"" . $impdonecolor . "\">" . $x . " users successfully imported into database!" . $importresult . "</font>";
- }
- $tool = "tools/imusrxmldone.php";
- $toolselect = "Import users (CSP XML)";
- }
- if (isset($_POST["subimportcsv"]) and $_POST["subimportcsv"] == "Import users") {
- $cspcsvusers = $_POST["cspcsvusers"];
- $cspuserlines = explode("\n", $cspcsvusers);
- $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database");
- mysql_select_db($dbname, $conn);
- $i = 0;
- $x = 0;
- $y = 0;
- $e = 0;
- $userimportlist = "";
- $userexistlist = "";
- $importresult = "";
- $impdonecolor = "#347C2C";
- foreach ($cspuserlines as $i => $value) {
- $csvuser = explode(";", $cspuserlines[$i]);
- if ($csvuser[0] == "" or $csvuser[1] == "") {
- $y = $y + 1;
- } else {
- $uesql = mysql_query("SELECT * FROM cmum_udb WHERE name='" . $csvuser[0] . "'");
- $foundusers = mysql_num_rows($uesql);
- if ($foundusers == 0) {
- if (isset($csvuser[9])) {
- $improf = explode(" ", $csvuser[4]);
- foreach ($improf as $profvalue) {
- $sql = mysql_query("SELECT * FROM cmum_profiles WHERE value='" . $profvalue . "'");
- $line = mysql_fetch_array($sql);
- if ($line["id"] <> "") {
- $convporf[] = $line["id"];
- }
- }
- if (!isset($convporf)) {
- $convporf = "N;";
- } else {
- $convporf = serialize($convporf);
- }
- if (!isset($csvuser[1])) {
- $csvuser[1] = "";
- }
- if (!isset($csvuser[2])) {
- $csvuser[2] = "";
- }
- if (!isset($csvuser[3])) {
- $csvuser[3] = "";
- }
- if (!isset($csvuser[4])) {
- $csvuser[4] = "";
- }
- if (!isset($csvuser[5])) {
- $csvuser[5] = "";
- }
- if (!isset($csvuser[6])) {
- $csvuser[6] = "";
- }
- if (!isset($csvuser[7])) {
- $csvuser[7] = "";
- }
- if (!isset($csvuser[8])) {
- $csvuser[8] = "";
- }
- if (!isset($csvuser[9])) {
- $csvuser[9] = "";
- }
- if (!isset($csvuser[10])) {
- $csvuser[10] = "";
- }
- if (!isset($csvuser[11])) {
- $csvuser[11] = "";
- }
- if (!isset($csvuser[12])) {
- $csvuser[12] = "";
- }
- if (!isset($csvuser[13])) {
- $csvuser[13] = "";
- }
- if (!isset($csvuser[14])) {
- $csvuser[14] = "";
- }
- if (!isset($csvuser[15])) {
- $csvuser[15] = "";
- }
- if (!isset($csvuser[16])) {
- $csvuser[16] = "";
- }
- $chkid = "0";
- do {
- $csvuser[$chkid] = replacechars($csvuser[$chkid]);
- $chkid++;
- } while ($chkid < "12");
- mysql_query("INSERT INTO cmum_udb (name,password,displayname,ipmask,profiles,maxconnections,admin,enabled,mapexclude,debug,comment,email,usrgroup,customvalues,ecmrate,startdate,expiredate,added,addedby,changed,changedby) VALUES ('" . $csvuser[0] . "','" . $csvuser[1] . "','" . $csvuser[2] . "','" . $csvuser[3] . "','" . $convporf . "','" . $csvuser[5] . "','" . strtolower($csvuser[6]) . "','" . strtolower($csvuser[7]) . "','" . strtolower($csvuser[8]) . "','" . strtolower($csvuser[9]) . "','" . trim($csvuser[10]) . "','" . trim($csvuser[11]) . "','" . trim($csvuser[12]) . "','" . replacechars(trim($csvuser[13])) . "','" . trim($csvuser[14]) . "','" . trim($csvuser[15]) . "','" . trim($csvuser[16]) . "','" . date('Y-m-d H:i') . "','" . $_SESSION["loginuser"] . "','','')");
- $x = $x + 1;
- unset($convporf);
- $sql = "";
- $uesql = "";
- $foundusers = "";
- $userimportlist = $userimportlist . $csvuser[0] . "<br>";
- } else {
- $y = $y + 1;
- }
- } else {
- $e = $e + 1;
- $userexistlist = $userexistlist . $csvuser[0] . "<br>";
- }
- }
- }
- mysql_close($conn);
- if ($x <> 0 and $e <> 0) {
- $importresult = "<br><br>The following users where imported:<br>" . $userimportlist . "<br>The following users where not imported due to duplicates:<br>" . $userexistlist;
- $impdonecolor = "#FF6600";
- }
- if ($x <> 0 and $e == 0) {
- $importresult = "<br><br>The following users where imported:<br>" . $userimportlist;
- $impdonecolor = "#347C2C";
- }
- if ($x == 0 and $e <> 0) {
- $importresult = "<br><br>The following users where not imported due to duplicates:<br>" . $userexistlist;
- $impdonecolor = "#FF0000";
- }
- if ($y <> 0) {
- if ($x == 0) {
- $toolstatus = "<font color=\"#FF0000\">" . $x . " users imported into database! There were " . $y . " errors! Could be empty lines, not matching lines or users without username or password!" . $importresult . "</font>";
- } else {
- $toolstatus = "<font color=\"#FF6600\">" . $x . " users successfully imported into database! But there were " . $y . " errors! Could be empty lines, not matching lines or users without username or password!" . $importresult . "</font>";
- }
- } else {
- $toolstatus = "<font color=\"" . $impdonecolor . "\">" . $x . " users successfully imported into database!" . $importresult . "</font>";
- }
- $tool = "tools/imusrcsvdone.php";
- $toolselect = "Import users (CSV)";
- }
- if (isset($_POST["subemptyudb"]) and $_POST["subemptyudb"] == "Yes") {
- $adminpassword = sha1($_POST["adminpassword"]);
- $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database");
- mysql_select_db($dbname, $conn);
- $sql = mysql_query("SELECT * FROM cmum_admins WHERE username='" . $_SESSION["loginuser"] . "'");
- while ($line = mysql_fetch_array($sql)) {
- if ($adminpassword == $line["password"]) {
- $esql = mysql_query("TRUNCATE TABLE cmum_udb");
- $emptyudbstatus = "<font color=\"#347C2C\">User database successfully erased!</font>";
- $tool = "tools/emptyudbdone.php";
- $toolselect = "Empty user database";
- mysql_close($conn);
- } else {
- $emptyudbstatus = "<font color=\"#FF0000\">Password didn't match!</font>";
- $tool = "tools/emptyudb.php";
- $toolselect = "Empty user database";
- mysql_close($conn);
- }
- }
- }
- if (isset($_POST["subendiudb"]) and $_POST["subendiudb"] == "Enable all") {
- $adminpassword = sha1($_POST["adminpassword"]);
- $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database");
- mysql_select_db($dbname, $conn);
- $sql = mysql_query("SELECT * FROM cmum_admins WHERE username='" . $_SESSION["loginuser"] . "'");
- while ($line = mysql_fetch_array($sql)) {
- if ($adminpassword == $line["password"]) {
- $ensql = mysql_query("SELECT * FROM cmum_udb");
- while ($line = mysql_fetch_array($ensql)) {
- mysql_query("UPDATE cmum_udb SET enabled='true' WHERE id='" . $line["id"] . "'");
- }
- $endiudbstatus = "<font color=\"#347C2C\">All users have been enabled!</font>";
- $tool = "tools/endiudbdone.php";
- $toolselect = "Enable/disable all users";
- mysql_close($conn);
- } else {
- $endiudbstatus = "<font color=\"#FF0000\">Password didn't match!</font>";
- $tool = "tools/endiudb.php";
- $toolselect = "Enable/disable all users";
- mysql_close($conn);
- }
- }
- }
- if (isset($_POST["subendiudb"]) and $_POST["subendiudb"] == "Disable all") {
- $adminpassword = sha1($_POST["adminpassword"]);
- $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database");
- mysql_select_db($dbname, $conn);
- $sql = mysql_query("SELECT * FROM cmum_admins WHERE username='" . $_SESSION["loginuser"] . "'");
- while ($line = mysql_fetch_array($sql)) {
- if ($adminpassword == $line["password"]) {
- $disql = mysql_query("SELECT * FROM cmum_udb");
- while ($line = mysql_fetch_array($disql)) {
- mysql_query("UPDATE cmum_udb SET enabled='false' WHERE id='" . $line["id"] . "'");
- }
- $endiudbstatus = "<font color=\"#347C2C\">All users have been disabled!</font>";
- $tool = "tools/endiudbdone.php";
- $toolselect = "Enable/disable all users";
- mysql_close($conn);
- } else {
- $endiudbstatus = "<font color=\"#FF0000\">Password didn't match!</font>";
- $tool = "tools/endiudb.php";
- $toolselect = "Enable/disable all users";
- mysql_close($conn);
- }
- }
- }
- if (isset($_POST["subdeldisusr"]) and $_POST["subdeldisusr"] == "Yes") {
- $adminpassword = sha1($_POST["adminpassword"]);
- $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database");
- mysql_select_db($dbname, $conn);
- $sql = mysql_query("SELECT * FROM cmum_admins WHERE username='" . $_SESSION["loginuser"] . "'");
- while ($line = mysql_fetch_array($sql)) {
- if ($adminpassword == $line["password"]) {
- $deldisql = mysql_query("SELECT * FROM cmum_udb WHERE enabled='false'");
- while ($line = mysql_fetch_array($deldisql)) {
- mysql_query("DELETE FROM cmum_udb WHERE id='" . $line["id"] . "'");
- }
- $deldisusrstatus = "<font color=\"#347C2C\">All disabled users have been removed!</font>";
- $tool = "tools/deldisusrdone.php";
- $toolselect = "Delete disabled users";
- mysql_close($conn);
- } else {
- $deldisusrstatus = "<font color=\"#FF0000\">Password didn't match!</font>";
- $tool = "tools/deldisusr.php";
- $toolselect = "Delete disabled users";
- mysql_close($conn);
- }
- }
- }
- if (isset($_POST["subupdatecspudb"]) and $_POST["subupdatecspudb"] == "Yes") {
- $updatecspudbstatus = updatecspudb();
- $tool = "tools/updatecspudbdone.php";
- $toolselect = "Update CSP users";
- }
- if (isset($_POST["bimcspprof"]) and $_POST["bimcspprof"] == "Import") {
- $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database");
- mysql_select_db($dbname, $conn);
- $i = 0;
- $e = 0;
- $pfexists = "";
- $pfimported = "";
- $cspvalue = $_POST["cspvalue"];
- $profilename = $_POST["profilename"];
- $cvnum = count($cspvalue);
- foreach ($cspvalue as $x => $value) {
- $cpsql = mysql_query("SELECT * FROM cmum_profiles WHERE value='" . $cspvalue[$x] . "'");
- $foundcspprof = mysql_num_rows($cpsql);
- if ($foundcspprof == 0 and $cspvalue[$x] <> "") {
- $pnsql = mysql_query("SELECT * FROM cmum_profiles WHERE name='" . $profilename[$x] . "'");
- $foundprofname = mysql_num_rows($pnsql);
- if ($foundprofname == 0 and $profilename[$x] <> "") {
- mysql_query("INSERT INTO cmum_profiles (name,value) VALUES ('" . $profilename[$x] . "','" . $cspvalue[$x] . "')");
- $i++;
- $pfimported = $pfimported . $profilename[$x] . " (" . $cspvalue[$x] . ")<br>";
- } else {
- $e++;
- $pfexists = $pfexists . $profilename[$x] . " (" . $cspvalue[$x] . ")<br>";
- }
- } else {
- $e++;
- $pfexists = $pfexists . $profilename[$x] . " (" . $cspvalue[$x] . ")<br>";
- }
- }
- if ($i <> 0 and $e <> 0) {
- $importresult = "<br><br>The following profiles where imported:<br>" . $pfimported . "<br>The following profiles where not imported due to duplicates:<br>" . $pfexists;
- $impdonecolor = "#FF6600";
- }
- if ($i <> 0 and $e == 0) {
- $importresult = "<br><br>The following profiles where imported:<br>" . $pfimported;
- $impdonecolor = "#347C2C";
- }
- if ($i == 0 and $e <> 0) {
- $importresult = "<br><br>The following profiles where not imported due to duplicates:<br>" . $pfexists;
- $impdonecolor = "#FF0000";
- }
- if ($e <> 0) {
- if ($i == 0) {
- $toolstatus = "<font color=\"#FF0000\">" . $i . " profiles imported into database! There were " . $e . " duplicates!" . $importresult . "</font>";
- } else {
- $toolstatus = "<font color=\"#FF6600\">" . $i . " profiles successfully imported into database! But there were " . $e . " duplicates!" . $importresult . "</font>";
- }
- } else {
- $toolstatus = "<font color=\"" . $impdonecolor . "\">" . $i . " profiles successfully imported into database!" . $importresult . "</font>";
- }
- mysql_close($conn);
- $tool = "tools/imcspprofilesdone.php";
- $toolselect = "Import profiles from CSP";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Choose a tool...") {
- $tool = "";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Enable/disable all users") {
- $tool = "tools/endiudb.php";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Delete disabled users") {
- $tool = "tools/deldisusr.php";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Empty user database") {
- $tool = "tools/emptyudb.php";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Update CSP users") {
- $tool = "tools/updatecspudb.php";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Import profiles from CSP") {
- $tool = "tools/imcspprofiles.php";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Import users (CSP XML)") {
- $tool = "tools/imusrxml.php";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Import users (CSV)") {
- $tool = "tools/imusrcsv.php";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Export users (CSP XML)") {
- $tool = "tools/expusrxml.php";
- }
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Export users (CSV)") {
- $tool = "tools/expusrcsv.php";
- }
- echo '<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=';
- print($charset);
- echo '" />
- <p align="center">
- <link href="css/main.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <tr bgcolor="#FFFFFF">
- <td height="18"> </td>
- <td height="18"><center>';
- require("includes/menu.php");
- echo '</center></td>
- <td height="18"> </td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td height="18"> </td>
- <td height="18"> </td>
- <td height="18"> </td>
- </tr>
- </table>
- <table width="780" height="20" border="0" align="center" valign="top" cellpadding="0" cellspacing="0" style="border-left: 1px solid #DDDDDD; border-right: 1px solid #DDDDDD; text-align: left;">
- <tr bgcolor="#FFFFFF">
- <td width="15" height="20"> </td>
- <td width="195" height="20">
- <form name="tool" action="tools.php" method="post">
- <fieldset>
- <legend>Tools</legend>
- <select name="choosetool" onChange="this.form.submit();" tabindex="1">
- <option ';
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Choose a tool..." or $toolselect == "Choose a tool...") {
- print("selected=\"selected\"");
- }
- echo '>Choose a tool...</option>
- <option ';
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Enable/disable all users" or $toolselect == "Enable/disable all users") {
- print("selected=\"selected\"");
- }
- echo '>Enable/disable all users</option>
- <option ';
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Delete disabled users" or $toolselect == "Delete disabled users") {
- print("selected=\"selected\"");
- }
- echo '>Delete disabled users</option>
- <option ';
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Empty user database" or $toolselect == "Empty user database") {
- print("selected=\"selected\"");
- }
- echo '>Empty user database</option>
- ';
- $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database");
- mysql_select_db($dbname, $conn);
- $sql = mysql_query("SELECT * FROM cmum_settings WHERE id='1'");
- $line = mysql_fetch_array($sql);
- if ($line["fetchfromcsp"] == "1") {
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Update CSP users" or $toolselect == "Update CSP users") {
- $selected = "selected";
- }
- print("<option " . $selected . ">Update CSP users</option>");
- }
- $selected = "";
- if ($line["fetchfromcsp"] == "1") {
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Import profiles from CSP" or $toolselect == "Import profiles from CSP") {
- $selected = "selected";
- }
- print("<option " . $selected . ">Import profiles from CSP</option>");
- }
- mysql_close($conn);
- echo '
- <option ';
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Import users (CSP XML)" or $toolselect == "Import users (CSP XML)") {
- print("selected=\"selected\"");
- }
- echo '>Import users (CSP XML)</option>
- <option ';
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Import users (CSV)" or $toolselect == "Import users (CSV)") {
- print("selected=\"selected\"");
- }
- echo '>Import users (CSV)</option>
- <option ';
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Export users (CSP XML)" or $toolselect == "Export users (CSP XML)") {
- print("selected=\"selected\"");
- }
- echo '>Export users (CSP XML)</option>
- <option ';
- if (isset($_POST["choosetool"]) and $_POST["choosetool"] == "Export users (CSV)" or $toolselect == "Export users (CSV)") {
- print("selected=\"selected\"");
- }
- echo '>Export users (CSV)</option>
- </select>
- </fieldset>
- </form>
- </td>
- <td width="555" height="20"> </td>
- <td width="15" height="20"> </td>
- </tr>
- </table>
- ';
- if ($tool <> "") {
- include $tool;
- }
- echo '<table width="780" height="20" border="0" align="center" valign="top" cellpadding="0" cellspacing="0" style="border-left: 1px solid #DDDDDD; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left;">
- <tr bgcolor="#FFFFFF">
- <td height="20" width="780"> </td>
- </tr>
- </table>
- ';
- require("includes/footer.php");
- echo '</body>
- </html>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement