Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!$housekeeping->isAuthorized("hk_management.remotesignout")) {
- $nopage = 1;
- } else {
- ?>
- <SPAN class=SUBHEADLINE>Remote Logout</SPAN><BR>
- <BR>
- This tool allows you to remotely disconnect a user from the hotel.<br/>
- <i>The user must be online or this tool is usless</i><br/>
- <?php
- $userQ = mysql_query("SELECT * FROM `users` WHERE `'".$type."'` = '".$_POST['search']."'");
- if (isset($_POST['disconnect'])) {
- $theip = $housekeeping->securePost($_POST['ip']);
- if(isset($_POST['search']) == NULL) {
- echo("<br/><span style=color:red><b>You left a field blank!</b></span><br />");
- } else {
- if($_POST['search_type'] == 'userid') {
- $type = 'id';
- } elseif($_POST['search_type'] == 'username') {
- $type = 'username';
- } elseif($_POST['search_type'] == 'ip') {
- $type = 'ip_last';
- }
- if(mysql_num_rows($userQ) > 0) {
- echo("<br/><span style=color:red><b>User not found</d></span><br />");
- } else {
- $userI = mysql_fetch_array($userQ);
- $userid = $userI['id'];
- if ($housekeeping->sendMUS('signout', $userid)) {
- echo("<br/><span style=color:green><b>'".$_POST['search']."'</b> has been disconnected.</span><br />");
- } else {
- echo("<br/><span style=color:red><b>Unable to connect to $housekeeping->siteName</b>!</span><br />");
- }
- }
- }
- }
- ?>
- <br/>
- <FORM action=main?remote_signout method=POST>
- <TABLE cellSpacing=0 cellPadding=3 border=0>
- <TBODY>
- <TR>
- <TD>Select: </TD>
- <TD><SELECT name=search_type>
- <OPTION value=userid>userid is</OPTION>
- <OPTION value=username>username is</OPTION>
- <OPTION value=ip_last>ip_last is</OPTION>
- </SELECT></TD>
- </TR>
- <TR>
- <TD></TD>
- <TD><INPUT value="" name=search style=width:200px> </TD></TR>
- <TR>
- <TD></TD>
- <TD><INPUT type=submit value="Disconnect" name=disconnect id=disconnect>
- </TD></TR></TBODY></TABLE></FORM>
- <?php
- }
- ?>
Add Comment
Please, Sign In to add comment