File tree Expand file tree Collapse file tree 10 files changed +154
-13
lines changed
Expand file tree Collapse file tree 10 files changed +154
-13
lines changed Original file line number Diff line number Diff line change 33//error_reporting(NULL);
44ob_start ();
55session_start ();
6- $ TAB = 'USER ' ;
6+ $ TAB = 'WEB ' ;
77include ($ _SERVER ['DOCUMENT_ROOT ' ]."/inc/main.php " );
88
99// Header
2121 }
2222
2323 // Ok
24- if (!empty ($ _GET ['user ' ])) {
25- $ v_username = escapeshellarg ($ _GET ['user ' ]);
26- exec (VESTA_CMD ."v_suspend_web_domain " .$ v_username , $ output , $ return_var );
24+ if (!empty ($ _GET ['domain ' ])) {
25+ $ v_username = escapeshellarg ($ user );
26+ $ v_domain = escapeshellarg ($ _GET ['domain ' ]);
27+ exec (VESTA_CMD ."v_suspend_web_domain " .$ v_username ." " .$ v_domain , $ output , $ return_var );
2728 if ($ return_var != 0 ) {
2829 $ error = implode ('<br> ' , $ output );
2930 if (empty ($ error )) $ error = 'Error: vesta did not return any output. ' ;
3031 $ _SESSION ['error_msg ' ] = $ error ;
3132 } else {
32- $ _SESSION ['ok_msg ' ] = "OK: user <b> " .$ _GET [user ]."</b> has been suspended. " ;
33+ $ _SESSION ['ok_msg ' ] = "OK: web domain <b> " .$ _GET [' domain ' ]."</b> has been suspended. " ;
3334 unset($ v_lname );
3435 }
3536 unset($ output );
3637
37- include ($ _SERVER ['DOCUMENT_ROOT ' ].'/templates/admin/menu_suspend_user .html ' );
38- include ($ _SERVER ['DOCUMENT_ROOT ' ].'/templates/admin/suspend_user .html ' );
38+ include ($ _SERVER ['DOCUMENT_ROOT ' ].'/templates/admin/menu_suspend_web .html ' );
39+ include ($ _SERVER ['DOCUMENT_ROOT ' ].'/templates/admin/suspend_web .html ' );
3940 unset($ _SESSION ['error_msg ' ]);
4041 unset($ _SESSION ['ok_msg ' ]);
4142
4243 } else {
43- header ("Location: /list/user / " );
44+ header ("Location: /list/web / " );
4445 }
4546
4647}
Original file line number Diff line number Diff line change 1414 < tr >
1515 < td style ="padding: 24px 0 0 0; ">
1616 < form method ="post ">
17- < input type ="submit " class ="add-button " name =" back " value ="Back to users ">
17+ < input type ="button " class ="add-button " value ="Back to users " onClick =" location.href='/list/user/' ">
1818 </ form >
1919 </ td >
2020 </ tr >
Original file line number Diff line number Diff line change 55 ++$i;
66 if ($data[$key]['SUSPENDED'] == 'yes') {
77 $status = 'suspended';
8- $spnd_action = 'ususpend ' ;
8+ $spnd_action = 'unsuspend ' ;
99 } else {
1010 $status = 'active';
1111 $spnd_action = 'suspend' ;
Original file line number Diff line number Diff line change 1+ < table class ="sub-menu ">
2+ < tr >
3+ < td style ="padding: 50px 2px 38px 153px; " >
4+ < ?php
5+ if (!empty($_SESSION['error_msg'])) {
6+ echo "< a class =\ "add-error\"> ".$_SESSION['error_msg']."</ a > ";
7+ } else {
8+ if (!empty($_SESSION['ok_msg'])) {
9+ echo "< a class =\ "add-ok\"> ".$_SESSION['ok_msg']."</ a > ";
10+ }
11+ }
12+ ?>
13+ </ td >
14+ </ tr >
15+ </ table >
Original file line number Diff line number Diff line change 1+ < table class ="sub-menu ">
2+ < tr >
3+ < td style ="padding: 50px 2px 38px 153px; " >
4+ < ?php
5+ if (!empty($_SESSION['error_msg'])) {
6+ echo "< a class =\ "add-error\"> ".$_SESSION['error_msg']."</ a > ";
7+ } else {
8+ if (!empty($_SESSION['ok_msg'])) {
9+ echo "< a class =\ "add-ok\"> ".$_SESSION['ok_msg']."</ a > ";
10+ }
11+ }
12+ ?>
13+ </ td >
14+ </ tr >
15+ </ table >
Original file line number Diff line number Diff line change 1313 < table class ="data-col2 " width ="830px ">
1414 < tr >
1515 < td style ="padding: 24px 0 0 0; " width ="100px ">
16- < form method ="post ">
17- < input type ="submit " class ="add-button " name =" back " value ="Back to users ">
16+ < form method ="get ">
17+ < input type ="button " class ="add-button " value ="Back to users " onClick =" location.href='/list/user/' ">
1818 </ form >
1919 </ td >
2020 < td style ="padding: 24px 0 0 0; ">
Original file line number Diff line number Diff line change 1+ < table class ='data '>
2+ < tr class ="data-add ">
3+ < td class ="data-dotted " style ="padding: 0px 10px 0px 0px " width ="150 ">
4+ < table class ="data-col1 ">
5+ < tr > < td style ="padding: 18 0 4 18; "> </ td > </ tr >
6+ </ table >
7+ </ td >
8+ < td class ="data-dotted " width ="830px " style ="vertical-align:top; ">
9+ < table width ="830px "> < tr >
10+ < td > </ td >
11+ </ tr > </ table >
12+
13+ < table class ="data-col2 " width ="830px ">
14+ < tr >
15+ < td style ="padding: 24px 0 0 0; " width ="100px ">
16+ < form method ="get ">
17+ < input type ="button " class ="add-button " value ="Back to domains " onClick ="location.href='/list/web/' ">
18+ </ form >
19+ </ td >
20+ < td style ="padding: 24px 0 0 0; ">
21+ < form action ="/unsuspend/web/ " method ="get ">
22+ < input type ="hidden " name ="domain " value ="<?php echo $_GET['domain']?> ">
23+ < input type ="submit " class ="add-button " name ="unsuspend " value ="Unsuspend <?php echo $_GET['domain']?> ">
24+ </ form >
25+ </ td >
26+ </ tr >
27+ </ table >
28+ </ td >
29+ </ tr >
30+ </ table >
Original file line number Diff line number Diff line change 1414 < tr >
1515 < td style ="padding: 24px 0 0 0; " width ="100px ">
1616 < form method ="post ">
17- < input type ="submit " class ="add-button " name =" back " value ="Back to users ">
17+ < input type ="button " class ="add-button " value ="Back to users " onClick =" location.href='/list/user/' ">
1818 </ form >
1919 </ td >
2020 < td style ="padding: 24px 0 0 0; ">
Original file line number Diff line number Diff line change 1+ < table class ='data '>
2+ < tr class ="data-add ">
3+ < td class ="data-dotted " style ="padding: 0px 10px 0px 0px " width ="150 ">
4+ < table class ="data-col1 ">
5+ < tr > < td style ="padding: 18 0 4 18; "> </ td > </ tr >
6+ </ table >
7+ </ td >
8+ < td class ="data-dotted " width ="830px " style ="vertical-align:top; ">
9+ < table width ="830px "> < tr >
10+ < td > </ td >
11+ </ tr > </ table >
12+
13+ < table class ="data-col2 " width ="830px ">
14+ < tr >
15+ < td style ="padding: 24px 0 0 0; " width ="100px ">
16+ < form method ="get ">
17+ < input type ="button " class ="add-button " value ="Back to domains " onClick ="location.href='/list/web/' ">
18+ </ form >
19+ </ td >
20+ < td style ="padding: 24px 0 0 0; ">
21+ < form action ="/suspend/web/ " method ="get ">
22+ < input type ="hidden " name ="domain " value ="<?php echo $_GET['domain']?> ">
23+ < input type ="submit " class ="add-button " name ="unsuspend " value ="Suspend <?php echo $_GET['domain']?> ">
24+ </ form >
25+ </ td >
26+ </ tr >
27+ </ table >
28+ </ td >
29+ </ tr >
30+ </ table >
Original file line number Diff line number Diff line change 1+ <?php
2+ // Init
3+ //error_reporting(NULL);
4+ ob_start ();
5+ session_start ();
6+ $ TAB = 'WEB ' ;
7+ include ($ _SERVER ['DOCUMENT_ROOT ' ]."/inc/main.php " );
8+
9+ // Header
10+ include ($ _SERVER ['DOCUMENT_ROOT ' ].'/templates/header.html ' );
11+
12+ // Panel
13+ top_panel ($ user ,$ TAB );
14+
15+ // Are you admin?
16+ if ($ _SESSION ['user ' ] == 'admin ' ) {
17+
18+ // Cancel
19+ if (!empty ($ _POST ['back ' ])) {
20+ header ("Location: /list/web/ " );
21+ }
22+
23+ // Ok
24+ if (!empty ($ _GET ['domain ' ])) {
25+ $ v_username = escapeshellarg ($ user );
26+ $ v_domain = escapeshellarg ($ _GET ['domain ' ]);
27+ exec (VESTA_CMD ."v_unsuspend_web_domain " .$ v_username ." " .$ v_domain , $ output , $ return_var );
28+ if ($ return_var != 0 ) {
29+ $ error = implode ('<br> ' , $ output );
30+ if (empty ($ error )) $ error = 'Error: vesta did not return any output. ' ;
31+ $ _SESSION ['error_msg ' ] = $ error ;
32+ } else {
33+ $ _SESSION ['ok_msg ' ] = "OK: web domain <b> " .$ _GET ['domain ' ]."</b> has been unsuspended. " ;
34+ unset($ v_lname );
35+ }
36+ unset($ output );
37+
38+ include ($ _SERVER ['DOCUMENT_ROOT ' ].'/templates/admin/menu_unsuspend_web.html ' );
39+ include ($ _SERVER ['DOCUMENT_ROOT ' ].'/templates/admin/unsuspend_web.html ' );
40+ unset($ _SESSION ['error_msg ' ]);
41+ unset($ _SESSION ['ok_msg ' ]);
42+
43+ } else {
44+ header ("Location: /list/web/ " );
45+ }
46+
47+ }
48+
49+ // Footer
50+ include ($ _SERVER ['DOCUMENT_ROOT ' ].'/templates/footer.html ' );
You can’t perform that action at this time.
0 commit comments