rajven 2 лет назад
Родитель
Сommit
4292cad185

+ 2 - 2
html/admin/iplist/index.php

@@ -57,7 +57,7 @@ print_ip_submenu($page_url);
         <b><?php echo WEB_ips_show_by_state; ?> - </b><?php print_enabled_select('enabled', $enabled); ?>
         <?php echo WEB_ips_search_host; ?>:&nbsp<input type="text" name="ip" value="<?php echo $f_ip; ?>" pattern="^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}|([0-9a-fA-F]{4}[\\.-][0-9a-fA-F]{4}[\\.-][0-9a-fA-F]{4})|[0-9A-Fa-f]{12})$"/>
         <?php print WEB_rows_at_page."&nbsp"; print_row_at_pages('rows',$displayed); ?>
-        <input id="btn_filter" type="submit" value="<?php echo WEB_btn_show; ?>">
+        <input id="btn_filter" name="btn_filter" type="submit" value="<?php echo WEB_btn_show; ?>">
         </td>
 	</tr>
 </table>
@@ -96,7 +96,7 @@ print_ip_submenu($page_url);
 </div>
 </div>
 
-<form id="def" name="def" action="index.php" method="post">
+<form id="def" name="def">
 
 <?php
 $countSQL="SELECT Count(*) FROM User_auth, User_list WHERE User_auth.user_id = User_list.id AND User_auth.deleted =0 $ip_list_filter";

+ 2 - 2
html/admin/iplist/nagios.php

@@ -43,7 +43,7 @@ print_ip_submenu($page_url);
         <b><?php print WEB_network_subnet; ?> - </b><?php print_subnet_select_office($db_link, 'subnet', $rsubnet); ?>
         <b><?php print WEB_nagios; ?> :</b><?php print_enabled_select('enabled', $enabled); ?>
         <?php print WEB_rows_at_page."&nbsp"; print_row_at_pages('rows',$displayed); ?>
-        <input id="btn_filter" type="submit" value="<?php print WEB_btn_show; ?>">
+        <input id="btn_filter" name="btn_filter" type="submit" value="<?php print WEB_btn_show; ?>">
         </td>
 	</tr>
 </table>
@@ -78,7 +78,7 @@ print_navigation($page_url,$page,$displayed,$count_records[0],$total);
 ?>
 <br>
 
-<form id="def" name="def" action="nagios.php" method="post">
+<form id="def" name="def">
 
 <table class="data">
 	<tr>

+ 3 - 3
html/admin/users/index.php

@@ -46,11 +46,11 @@ if ($msg_error) {
     }
 ?>
 
-<form name="main" action="index.php" method="post">
+<form id="filter" name="filter" action="index.php" method="post">
 <div>
 <b><?php print WEB_cell_ou; ?> - </b>
 <?php print_ou_select($db_link, 'ou', $rou); print WEB_rows_at_page."&nbsp"; print_row_at_pages('rows',$displayed); ?>
-<input id="btn_filter" type="submit" value="<?php echo WEB_btn_show; ?>">
+<input id="btn_filter" name="btn_filter" type="submit" value="<?php echo WEB_btn_show; ?>">
 </div>
 <br>
 <div>
@@ -115,7 +115,7 @@ $sSQL = "SELECT U.id, U.login, U.fio, O.ou_name, U.enabled, U.day_quota, U.month
 
 ?>
 
-<form id="def" name="def" action="index.php" method="post">
+<form id="def" name="def" >
 
 <table class="data">
 <tr align="center">

+ 10 - 7
html/js/remodal-auth.js

@@ -1,11 +1,12 @@
 $(document).ready(function () {
     $("form").submit(function () {
 	var formID = $(this).attr('id');
-	var hangoutButton = document.getElementById("btn_filter");
         if (formID == "formAuthApply") {
+	    var hangoutButton = document.getElementById("btn_filter");
             var formNm = $('#' + formID);
 	    var formTID = $('#def').attr('id');
     	    var formTm = $('#' + formTID);
+	    var cur_href = location.href;
 	    var post_data = {};
             post_data = formTm.serializeArray();
 	    post_data = post_data.concat(formNm.serializeArray());
@@ -15,21 +16,24 @@ $(document).ready(function () {
         	data: post_data,
         	success: function (data) {
             	    $(formNm).html(data);
-		    location.href=location.href.replace('#modal','');
+		    location.href=cur_href.replace('#modal','');
 		    setTimeout(hangoutButton.click,1000);
         	},
         	error: function (jqXHR, text, error) {
         	    $(formNm).html(error);
-		    location.href=location.href.replace('#modal','');
+		    location.href=cur_href.replace('#modal','');
 		    setTimeout(hangoutButton.click,5000);
         	}
 	    });
+            return false;
 	    }
 
         if (formID == "formAuthDel") {
+	    var hangoutButton = document.getElementById("btn_filter");
             var formNm = $('#' + formID);
 	    var formTID = $('#def').attr('id');
     	    var formTm = $('#' + formTID);
+	    var cur_href = location.href;
 	    var post_data = {};
             post_data = formTm.serializeArray();
 	    post_data = post_data.concat(formNm.serializeArray());
@@ -39,17 +43,16 @@ $(document).ready(function () {
         	data: post_data,
         	success: function (data) {
             	    $(formNm).html(data);
-		    location.href=location.href.replace('#modalDel','');
+		    location.href=cur_href.replace('#modalDel','');
 		    setTimeout(hangoutButton.click,1000);
         	},
         	error: function (jqXHR, text, error) {
         	    $(formNm).html(error);
-		    location.href=location.href.replace('#modalDel','');
+		    location.href=cur_href.replace('#modalDel','');
 		    setTimeout(hangoutButton.click,5000);
         	}
 	    });
+            return false;
 	    }
-
-        return false;
     });
 });

+ 10 - 7
html/js/remodal-user.js

@@ -1,12 +1,13 @@
 $(document).ready(function () {
     $("form").submit(function () {
 	var formID = $(this).attr('id');
-	var hangoutButton = document.getElementById("btn_filter");
 
         if (formID == "formUserApply") {
+	    var hangoutButton = document.getElementById("btn_filter");
             var formNm = $('#' + formID);
 	    var formTID = $('#def').attr('id');
     	    var formTm = $('#' + formTID);
+	    var cur_href = location.href;
 	    var post_data = {};
             post_data = formTm.serializeArray();
 	    post_data = post_data.concat(formNm.serializeArray());
@@ -16,21 +17,24 @@ $(document).ready(function () {
         	data: post_data,
         	success: function (data) {
             	    $(formNm).html(data);
-		    location.href=location.href.replace('#modal','');
+		    location.href=cur_href.replace('#modal','');
 		    setTimeout(hangoutButton.click,1000);
         	},
         	error: function (jqXHR, text, error) {
         	    $(formNm).html(error);
-		    location.href=location.href.replace('#modal','');
+		    location.href=cur_href.replace('#modal','');
 		    setTimeout(hangoutButton.click,5000);
         	}
 	    });
+            return false;
 	    }
 
         if (formID == "formUserDel") {
+	    var hangoutButton = document.getElementById("btn_filter");
             var formNm = $('#' + formID);
 	    var formTID = $('#def').attr('id');
     	    var formTm = $('#' + formTID);
+	    var cur_href = location.href;
 	    var post_data = {};
             post_data = formTm.serializeArray();
 	    post_data = post_data.concat(formNm.serializeArray());
@@ -40,17 +44,16 @@ $(document).ready(function () {
         	data: post_data,
         	success: function (data) {
             	    $(formNm).html(data);
-		    location.href=location.href.replace('#modalDel','');
+		    location.href=cur_href.replace('#modalDel','');
 		    setTimeout(hangoutButton.click,1000);
         	},
         	error: function (jqXHR, text, error) {
         	    $(formNm).html(error);
-		    location.href=location.href.replace('#modalDel','');
+		    location.href=cur_href.replace('#modalDel','');
 		    setTimeout(hangoutButton.click,5000);
         	}
 	    });
+            return false;
 	    }
-
-        return false;
     });
 });