OpenVPN_Management_GUI/Admin/Modules/Usermanagement/index.php

65 lines
1.7 KiB
PHP
Executable File

<?php
include ($_SERVER["DOCUMENT_ROOT"]."/Site/checkadmin.php");
$moduleurl = $_SERVER["REQUEST_URI"];
$urlcut = strpos($moduleurl, "&");
if($urlcut > 0)
{
$moduleurl = substr($moduleurl,0,$urlcut);
}
else
{
if(strpos($moduleurl, "?") == 0)
{
$moduleurl = $_SERVER["REQUEST_URI"]."?site=1";
}
}
$mode = $_REQUEST["uebergabe"];
$status = $_REQUEST["uebergabe2"];
echo" <p><a href=\"".$moduleurl."&uebergabe=0\">Home</a>
| <a href=\"".$moduleurl."&uebergabe=1\">Add new User</a>
| <a href=\"".$moduleurl."&uebergabe=2\">Edit User</a>
| <a href=\"".$moduleurl."&uebergabe=3\">Delete User</a>
| <a href=\"".$moduleurl."&uebergabe=4\">View Users</a></p><hr><br>";
switch($status)
{
case 1:
echo "<b>User added successfully!</b>";
break;
case 2:
echo "<b>User edited successfully!</b>";
break;
case 3:
echo "<b>User deleted successfully!</b>";
break;
default:
break;
}
switch($mode)
{
case 1:
include ($_SERVER["DOCUMENT_ROOT"]."/Admin/Modules/Usermanagement/include/adduser_index.php");
break;
case 2:
include ($_SERVER["DOCUMENT_ROOT"]."/Admin/Modules/Usermanagement/include/edituser_index.php");
break;
case 3:
include ($_SERVER["DOCUMENT_ROOT"]."/Admin/Modules/Usermanagement/include/deleteuser_index.php");
break;
case 4:
include ($_SERVER["DOCUMENT_ROOT"]."/Admin/Modules/Usermanagement/include/viewuser_index.php");
break;
default:
echo"<h1><b>User Management</b></h1>
<h2>Choose an action:</h2>
<p># <a href=\"".$moduleurl."&uebergabe=1\">Add new User</a></p>
<p># <a href=\"".$moduleurl."&uebergabe=2\">Edit User</a></p>
<p># <a href=\"".$moduleurl."&uebergabe=3\">Delete User</a></p>
<p># <a href=\"".$moduleurl."&uebergabe=4\">View Users</a></p><br>";
break;
}
?>