import from HEAD:
[freeradius.git] / dialup_admin / htdocs / user_delete.php3
1 <?php
2 require('../conf/config.php3');
3 if ($type != 'group')
4         if (is_file("../lib/$config[general_lib_type]/user_info.php3"))
5                 include("../lib/$config[general_lib_type]/user_info.php3");
6 else
7         if (is_file("../lib/$config[general_lib_type]/group_info.php3"))
8                 include("../lib/$config[general_lib_type]/group_info.php3");
9
10 $whatis = ($user_type == 'group') ? 'group' : 'user';
11 $whatisL = ($user_type == 'group') ? 'Group' : 'User';
12
13 echo <<<EOM
14 <html>
15 <head>
16 EOM;
17
18 if ($user_type != 'group')
19         echo "<title>delete user $login ($cn)</title>\n";
20 else
21         echo "<title>delete group $login</title>\n";
22
23 echo <<<EOM
24 <meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
25 <link rel="stylesheet" href="style.css">
26 </head>
27 <body bgcolor="#80a040" background="images/greenlines1.gif" link="black" alink="black">
28 <center>
29 <table border=0 width=550 cellpadding=0 cellspacing=0>
30 <tr valign=top>
31 <td align=center><img src="images/title2.gif"></td>
32 </tr>
33 </table>
34
35 <table border=0 width=400 cellpadding=0 cellspacing=2>
36 EOM;
37
38 if ($user_type != 'group')
39         include("../html/user_toolbar.html.php3");
40 else
41         include("../html/group_toolbar.html.php3");
42
43 print <<<EOM
44 </table>
45
46 <br>
47 <table border=0 width=540 cellpadding=1 cellspacing=1>
48 <tr valign=top>
49 <td width=340></td>
50 <td bgcolor="black" width=200>
51         <table border=0 width=100% cellpadding=2 cellspacing=0>
52         <tr bgcolor="#907030" align=right valign=top><th>
53         <font color="white">$whatisL $login Deletion</font>&nbsp;
54         </th></tr>
55         </table>
56 </td></tr>
57 <tr bgcolor="black" valign=top><td colspan=2>
58         <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
59         <tr><td>
60 EOM;
61    
62 if ($delete_user == 1){
63         if ($user_type != 'group'){
64                 if (is_file("../lib/$config[general_lib_type]/delete_user.php3"))
65                         include("../lib/$config[general_lib_type]/delete_user.php3");
66         }
67         else{
68                 if (is_file("../lib/$config[general_lib_type]/delete_group.php3"))
69                         include("../lib/$config[general_lib_type]/delete_group.php3");
70         }
71         echo <<<EOM
72 </td></tr>
73 </table>
74 </tr>
75 </table>
76 </body>
77 </html>
78 EOM;
79         exit();
80 }
81 ?>
82    <form method=post>
83       <input type=hidden name=login value="<?php print $login ?>">
84       <input type=hidden name=delete_user value="0">
85         <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
86 <tr>
87 <td align=center>
88 Are you sure you want to delete <?php echo "$whatis $login"; ?> ?
89 </td>
90 </tr>
91         </table>
92 <br>
93 <input type=submit class=button value="Yes Delete" OnClick="this.form.delete_user.value=1">
94 </form>
95 </td></tr>
96 </table>
97 </tr>
98 </table>
99 </body>
100 </html>