updated to new edit.php
This commit is contained in:
		
							parent
							
								
									01bfb82e0f
								
							
						
					
					
						commit
						3e54f60521
					
				| 
						 | 
				
			
			@ -47,7 +47,7 @@ $grp_units = $_SESSION['grp_units'];
 | 
			
		|||
if ($_POST['new_group'] || $_POST['del_group'] || $_POST['pdf_group'] || $_POST['pdf_all']){
 | 
			
		||||
	// add new group
 | 
			
		||||
	if ($_POST['new_group']){
 | 
			
		||||
		metaRefresh("../account/groupedit.php");
 | 
			
		||||
		metaRefresh("../account/edit.php?type=group");
 | 
			
		||||
		exit;
 | 
			
		||||
	}
 | 
			
		||||
	// delete group(s)
 | 
			
		||||
| 
						 | 
				
			
			@ -227,7 +227,7 @@ if (sizeof($grp_info) > 0) {
 | 
			
		|||
		echo("<tr class=\"grouplist\" onMouseOver=\"group_over(this, '" . $grp_info[$i]["dn"] . "')\"" .
 | 
			
		||||
									" onMouseOut=\"group_out(this, '" . $grp_info[$i]["dn"] . "')\"" .
 | 
			
		||||
									" onClick=\"group_click(this, '" . $grp_info[$i]["dn"] . "')\"" .
 | 
			
		||||
									" onDblClick=\"parent.frames[1].location.href='../account/groupedit.php?DN=" . $grp_info[$i]["dn"] . "'\">");
 | 
			
		||||
									" onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=group&DN=" . $grp_info[$i]["dn"] . "'\">");
 | 
			
		||||
		if ($_GET['selectall'] == "yes") {
 | 
			
		||||
		echo " <td height=22 align=\"center\"><input onClick=\"group_click(this, '" . $grp_info[$i]["dn"] . "')\" type=\"checkbox\"" .
 | 
			
		||||
			" name=\"" . $grp_info[$i]["dn"] . "\" checked></td>";
 | 
			
		||||
| 
						 | 
				
			
			@ -236,7 +236,7 @@ if (sizeof($grp_info) > 0) {
 | 
			
		|||
		echo " <td height=22 align=\"center\"><input onClick=\"group_click(this, '" . $grp_info[$i]["dn"] . "')\" type=\"checkbox\"" .
 | 
			
		||||
			" name=\"" . $grp_info[$i]["dn"] . "\"></td>";
 | 
			
		||||
		}
 | 
			
		||||
		echo (" <td align='center'><a href=\"../account/groupedit.php?DN='" . $grp_info[$i]["dn"] . "'\">" . _("Edit") . "</a></td>");
 | 
			
		||||
		echo (" <td align='center'><a href=\"../account/edit.php?type=group&DN='" . $grp_info[$i]["dn"] . "'\">" . _("Edit") . "</a></td>");
 | 
			
		||||
		for ($k = 0; $k < sizeof($attr_array); $k++) {
 | 
			
		||||
			echo ("<td>");
 | 
			
		||||
			// print all attribute entries seperated by "; "
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,7 +47,7 @@ $hst_units = $_SESSION['hst_units'];
 | 
			
		|||
if ($_POST['new_host'] || $_POST['del_host'] || $_POST['pdf_host'] || $_POST['pdf_all']){
 | 
			
		||||
	// add new host
 | 
			
		||||
	if ($_POST['new_host']){
 | 
			
		||||
		metaRefresh("../account/hostedit.php");
 | 
			
		||||
		metaRefresh("../account/edit.php?type=host");
 | 
			
		||||
		exit;
 | 
			
		||||
	}
 | 
			
		||||
	// delete host(s)
 | 
			
		||||
| 
						 | 
				
			
			@ -231,7 +231,7 @@ if (sizeof($hst_info) > 0) {
 | 
			
		|||
		echo("<tr class=\"hostlist\" onMouseOver=\"host_over(this, '" . $hst_info[$i]["dn"] . "')\"" .
 | 
			
		||||
									" onMouseOut=\"host_out(this, '" . $hst_info[$i]["dn"] . "')\"" .
 | 
			
		||||
									" onClick=\"host_click(this, '" . $hst_info[$i]["dn"] . "')\"" .
 | 
			
		||||
									" onDblClick=\"parent.frames[1].location.href='../account/hostedit.php?DN=" . $hst_info[$i]["dn"] . "'\">");
 | 
			
		||||
									" onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=host&DN=" . $hst_info[$i]["dn"] . "'\">");
 | 
			
		||||
		if ($_GET['selectall'] == "yes") {
 | 
			
		||||
		echo " <td height=22 align=\"center\"><input onClick=\"host_click(this, '" . $hst_info[$i]["dn"] . "')\"" .
 | 
			
		||||
					" type=\"checkbox\" checked name=\"" . $hst_info[$i]["dn"] . "\"></td>";
 | 
			
		||||
| 
						 | 
				
			
			@ -240,7 +240,7 @@ if (sizeof($hst_info) > 0) {
 | 
			
		|||
		echo " <td height=22 align=\"center\"><input onClick=\"host_click(this, '" . $hst_info[$i]["dn"] . "')\"" .
 | 
			
		||||
					" type=\"checkbox\" name=\"" . $hst_info[$i]["dn"] . "\"></td>";
 | 
			
		||||
		}
 | 
			
		||||
		echo (" <td align='center'><a href=\"../account/hostedit.php?DN='" . $hst_info[$i]["dn"] . "'\">" . _("Edit") . "</a></td>");
 | 
			
		||||
		echo (" <td align='center'><a href=\"../account/edit.php?type=host&DN='" . $hst_info[$i]["dn"] . "'\">" . _("Edit") . "</a></td>");
 | 
			
		||||
		for ($k = 0; $k < sizeof($attr_array); $k++) {
 | 
			
		||||
			echo ("<td>");
 | 
			
		||||
			// print all attribute entries seperated by "; "
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ $usr_units = $_SESSION['usr_units'];
 | 
			
		|||
if ($_POST['new_user'] || $_POST['del_user'] || $_POST['pdf_user'] || $_POST['pdf_all']){
 | 
			
		||||
	// add new user
 | 
			
		||||
	if ($_POST['new_user']){
 | 
			
		||||
		metaRefresh("../account/useredit.php?type=user");
 | 
			
		||||
		metaRefresh("../account/edit.php?type=user");
 | 
			
		||||
		exit;
 | 
			
		||||
	}
 | 
			
		||||
	// delete user(s)
 | 
			
		||||
| 
						 | 
				
			
			@ -283,7 +283,7 @@ if ($user_count != 0) {
 | 
			
		|||
		echo("<tr class=\"userlist\"\nonMouseOver=\"user_over(this, '" . $userinfo[$i]["dn"] . "')\"\n" .
 | 
			
		||||
			"onMouseOut=\"user_out(this, '" . $userinfo[$i]["dn"] . "')\"\n" .
 | 
			
		||||
			"onClick=\"user_click(this, '" . $userinfo[$i]["dn"] . "')\"\n" .
 | 
			
		||||
			"onDblClick=\"parent.frames[1].location.href='../account/useredit.php?type=user&DN=" . $userinfo[$i]["dn"] . "'\">\n");
 | 
			
		||||
			"onDblClick=\"parent.frames[1].location.href='../account/edit.php?type=user&DN=" . $userinfo[$i]["dn"] . "'\">\n");
 | 
			
		||||
		// checkboxes if selectall = "yes"
 | 
			
		||||
		if ($_GET['selectall'] == "yes") {
 | 
			
		||||
			echo "<td height=22 align=\"center\">\n<input onClick=\"user_click(this, '" . $userinfo[$i]["dn"] . "')\" type=\"checkbox\" name=\"" .
 | 
			
		||||
| 
						 | 
				
			
			@ -293,7 +293,7 @@ if ($user_count != 0) {
 | 
			
		|||
			echo "<td height=22 align=\"center\">\n<input onClick=\"user_click(this, '" . $userinfo[$i]["dn"] . "')\" type=\"checkbox\" name=\"" .
 | 
			
		||||
				$userinfo[$i]["dn"] . "\" value=\"" . $userinfo[$i]["dn"] . "\">\n</td>\n";
 | 
			
		||||
		}
 | 
			
		||||
		echo ("<td align='center'>\n<a href=\"../account/useredit.php?type=user&DN='" . $userinfo[$i]["dn"] . "'\">" .
 | 
			
		||||
		echo ("<td align='center'>\n<a href=\"../account/edit.php?type=user&DN='" . $userinfo[$i]["dn"] . "'\">" .
 | 
			
		||||
			_("Edit") . "</a>\n</td>\n");
 | 
			
		||||
		for ($k = 0; $k < sizeof($attr_array); $k++) {
 | 
			
		||||
			echo ("<td>\n");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,7 @@ $Id$
 | 
			
		|||
  along with this program; if not, write to the Free Software
 | 
			
		||||
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
			
		||||
 | 
			
		||||
  This page will redirect to account/useredit.php if the given user is valid.
 | 
			
		||||
  This page will redirect to account/edit.php if the given user is valid.
 | 
			
		||||
  It is called from listgroups.php via the memberUID links.
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
| 
						 | 
				
			
			@ -40,8 +40,8 @@ $user = str_replace("\'", '',$user);
 | 
			
		|||
$dn = $_SESSION['ldap']->search_username($user);
 | 
			
		||||
 | 
			
		||||
if ($dn) {
 | 
			
		||||
	// redirect to account/useredit.php
 | 
			
		||||
	metaRefresh("../account/useredit.php?type=user&DN='$dn'");
 | 
			
		||||
	// redirect to account/edit.php
 | 
			
		||||
	metaRefresh("../account/edit.php?type=user&DN='$dn'");
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue