home *** CD-ROM | disk | FTP | other *** search
- <%
- dim szPath
- szPath = "Table"
- SkinTable = SysInfo.GetSkinParameter(szPath)
- szPath = "Font"
- SkinFont = SysInfo.GetSkinParameter(szPath)
- %>
- <script language="JavaScript">
- <!--
- function MM_preloadImages() { //v3.0
- var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
- var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
- if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
- }
-
- function MM_swapImgRestore() { //v3.0
- var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
- }
-
- function MM_findObj(n, d) { //v4.0
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
- if(!x && document.getElementById) x=document.getElementById(n); return x;
- }
-
- function MM_swapImage() { //v3.0
- var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
- if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
- }
- //-->
- </script>
- <body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" background="../images/backgr_x.gif"onLoad="MM_preloadImages('../images/comit01.gif','../images/cancel01.gif')">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="344"><img src="images/1_r1_c2.jpg" width="344" height="70"></td>
- <td width="135"><img src="images/1_r1_c3.jpg" width="135" height="70"></td>
- <td width="100"><a href="hlpAccounts.agp"><img src="images/1_r1_c4.jpg" width="100" height="70"border=0></a></td>
- <td width="1000"> </td>
- </tr>
- </table>
- <map name="n1_r4_c3Map">
- <area shape="rect" coords="492,45,567,76" href="hlpAccounts.agp">
- </map>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta NAME="Author,Design" Content="GateKeeper Team; GateKeeper3Support@infopulse.ro">
- <meta NAME="Copyright" Content="Infopulse; www.infopulse.ro">
- <title>Empty</title>
- </head>
-
- <body>
- <%
- If Request.ReqParam("action") = "Cancel" Then
- Response.Redirect("users.agp")
- End If
- bValidPwd = True
-
- If Request.ReqParam("name") = "" Then
- Set user = Accounts.Users.NewUser
- NewUser = TRUE
- Else
- If Request.ReqParam("newuser") = "True" Then
- Set user = Accounts.Users.NewUser
- user.Name = Request.ReqParam("name")
- NewUser = TRUE
- Else
- Set user = Accounts.Users.item(Request.ReqParam("name"))
- NewUser = FALSE
- End If
- End If
-
- If Request.ReqParam("action") = "Remove" AND Not NewUser = TRUE Then
- On Error Resume Next
- user.Remove
- If Not Err.Number = 0 Then
- ErrLine = Err.Description
- Else
- Response.Redirect("users.agp")
- End If
- ElseIf Request.ReqParam("action") = "Commit" Then
- ' Process the user account
- If Request.ReqParam("CanChangePwd") = "True" Then
- user.CanChangePassword = TRUE
- Else
- user.CanChangePassword = FALSE
- End If
- If Request.ReqParam("MustChangePwd") = "True" Then
- user.MustChangePassword = TRUE
- Else
- user.MustChangePassword = FALSE
- End If
- If Request.ReqParam("Enabled") = "True" Then
- user.Enabled = TRUE
- Else
- user.Enabled = FALSE
- End If
-
- user.RealName = Request.ReqParam("realname")
- user.Description = Request.ReqParam("description")
-
- If Accounts.IsNTVersion Then
- if Request.ReqParam("NTAccount") = "True" Then
- user.NTAccount = TRUE
- Else
- user.NTAccount = FALSE
- End If
- if Request.ReqParam("NonNTAccount") = "True" Then
- user.NonNTAccount = TRUE
- Else
- user.NonNTAccount = FALSE
- End If
- user.DomainName = Request.ReqParam("domainname")
-
- Else
- user.NTAccount = FALSE
- user.NonNTAccount = FALSE
- user.DomainName = ""
- End If
-
- sPwd = Request.ReqParam("password")
- sTestPwd = Request.ReqParam("testPassword")
- if sPwd <> sTestPwd Then
- bValidPwd = False
- Else
- user.Password = sPwd
- End If
-
- ' Process the grouplist
- Dim grouplist()
- groupline = Request.ReqParam("groups")
- grouplistidx = 1
- While Len(groupline)
- pos = InStr(groupline,",")
- If pos > 0 Then
- groupitem = Left(groupline,pos - 1)
- groupline = Mid(groupline,pos + 1)
- Else
- groupitem = groupline
- groupline = ""
- End If
- ReDim Preserve grouplist(grouplistidx+1)
- grouplist(grouplistidx) = groupitem
- grouplistidx = grouplistidx + 1
- Wend
-
- Set groups = Accounts.Groups
- For groupcnt = 1 to groups.count
- Set group = Accounts.Groups.Item(groupcnt)
-
- bIsMemberOfThisGroup = FALSE
- For listcnt = 1 to grouplistidx-1
- If grouplist(listcnt) = group.name Then
- bIsMemberOfThisGroup = TRUE
- End If
- Next
-
- If group.IsMember(user.name) AND Not bIsMemberOfThisGroup = TRUE Then
- group.DelMember(user.name)
- group.Commit
- ElseIf Not group.IsMember(user.name) AND bIsMemberOfThisGroup = TRUE Then
- group.AddMember(user.name)
- group.Commit
- End If
-
- Next
-
- if bValidPwd Then
- On Error Resume Next
- user.Commit
- If Not Err.Number = 0 Then
- ErrLine = Err.Description
- Else
- Response.Redirect("users.agp")
- End If
- Else
- %>
- <B><FONT COLOR="#FF0000">
- The password was not confirmed correctly !
- </FONT></B>
- <br>
- <%
- End if
- End If
- If Not NewUser Then
- %>
- <p><big><strong><font face="Arial">
- Edit user account
- </font></strong></big></p>
- <%
- Else
- %>
- <p><big><strong><font face="Arial">
- Add new user account
- </font></strong></big></p>
- <%
- End If
-
- If Not Len(ErrLine) = 0 Then
- Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
- End If
- %>
-
- <form name='useredit_form' method="POST" action="/accounts/useredit.agp">
- <input type="hidden" name="newuser" value="<%Response.Write(NewUser)%>">
- <div align="center"><center>
- <table border="1" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td width="40%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
- Option
- </font></strong></td>
- <td width="40%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
- Value
- </font></strong></td>
- </tr>
- <tr>
- <td width="40%" title="Fill in with logon names like: jsmith, john.doe, and so on."><strong><font face="Arial">
- User name
- </font></strong></td>
- <td width="40%">
- <%
- If NewUser Then
- %>
- <input type="text" size="20" maxlength="40" name="name" value="<%Response.Write(user.name)%>">
- <%
- Else
- %>
- <input type="hidden" name="name" value="<%Response.Write(user.name)%>">
- <%Response.Write(user.name)%>
- <%
- End If
- %>
- </td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- Password
- </font></strong></td>
- <td width="40%"><input type="password" size="20" name="password" value="<%Response.Write(user.password)%>"></td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- Confirm password
- </font></strong></td>
- <td width="40%"><input type="password" size="20" name="testPassword" value="<%Response.Write(user.password)%>"></td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- Full name
- </font></strong></td>
- <td width="40%"><input type="text" size="40" name="realname" value="<%Response.Write(user.realname)%>"></td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- Description
- </font></strong></td>
- <td width="40%"><input type="text" size="40" name="description" value="<%Response.Write(user.description)%>"></td>
- </tr>
- <tr>
- <td width="40%" title="If the checkbox is unchecked the account cannot be used."><strong><font face="Arial">
- Enabled
- </font></strong></td>
- <td width="40%"><input type="checkbox" <% If user.Enabled Then Response.Write("Checked ") End If %> name="Enabled" value="True"></td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- The user can change the password
- </font></strong></td>
- <td width="40%"><input type="checkbox" <% If user.CanChangePassword Then Response.Write("Checked ") End If %> name="CanChangePwd" value="True"></td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- The user must change the password at next logon
- </font></strong></td>
- <td width="40%"><input type="checkbox" <% If user.MustChangePassword Then Response.Write("Checked ") End If %> name="MustChangePwd" value="True"></td>
- </tr>
- </table>
- </center></div>
-
- <%
- If Accounts.IsNTVersion AND NOT Request.ReqParam("name") = "Administrator" AND NOT Request.ReqParam("name") = "Guest" Then
- %>
-
- <p><big><strong><font face="Arial">
- NT account properties
- </font></strong></big></p>
- <div align="center"><center>
- <table border="1" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td width="40%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
- Option
- </font></strong></td>
- <td width="40%" bgcolor="<%Response.Write(SkinTable)%>"><strong><font face="Arial" color="<%Response.Write(SkinFont)%>">
- Value
- </font></strong></td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- Domain name
- </font></strong></td>
- <td width="40%"><input type="text" size="40" name="domainname" value="<%Response.Write(user.domainname)%>"></td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- Is NT domain account
- </font></strong></td>
- <td width="40%"><input type="checkbox" <% If user.NTAccount Then Response.Write("Checked ") End If %> name="NTAccount" value="True"></td>
- </tr>
- <tr>
- <td width="40%"><strong><font face="Arial">
- Allow connection without NT domain authentication
- </font></strong></td>
- <td width="40%"><input type="checkbox" <% If user.NonNTAccount Then Response.Write("Checked ") End If %> name="NonNTAccount" value="True"></td>
- </tr>
- </table>
- </center></div>
- <%
- End If
- %>
-
- <br>
- <font face="Arial">
- <%
- Set groups = Accounts.Groups
- groupcount = 1
- if groups.count > 0 Then
- if NewUser = TRUE Then
- Response.Write("This user will be a member of the following groups:")
- Else
- Response.Write("This user is a member of the following groups:")
- End If
- %>
- <table border="0" width="100%">
- <%
- End if
- While Not groupcount > groups.count
- %>
- <tr>
- <%
- For subcount = 0 to 3
- %>
- <td width="25%">
- <%
- If Not groupcount > groups.count Then
- Set group = groups.item(groupcount)
- Response.Write("<input type=""checkbox"" ")
- If group.IsMember(user.name) Then
- Response.Write("Checked ")
- End If
- if ( group.name = "Users" And NewUser = TRUE ) Then
- Response.Write("name=""groups"" value="""&group.name&""" checked>")
- Else
- Response.Write("name=""groups"" value="""&group.name&""">")
- End If
- Response.Write(group.name)
- End If
- groupcount = groupcount + 1
- %>
- </td>
- <%
- Next
- %>
- </tr>
- <%
- WEnd
- %>
- </table>
- <p>
- <!-- <span style="cursor:hand" value="Commit" onClick="javascript:useredit_form.action.value='Commit';useredit_form.submit()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('commit.gif','','../images/commit01.gif',1)"><img src='../images/commit.gif' name='commit.gif'></span>-->
- <input type="submit" name="action" value="Commit">
- <input type="submit" name="action" value="Cancel">
- <!-- <span style="cursor:hand" value="Cancel" onClick="javascript:useredit_form.action.value='Cancel';useredit_form.submit()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('cancel.gif','','../images/cancel01.gif',1)"><img src='../images/cancel.gif' name='cancel.gif'></span>-->
- <!-- <input type="hidden" name="action" value="Cancel">-->
- <%
- If Not NewUser Then
- %>
- <!-- <span style="cursor:hand" value="Remove" onClick="javascript:useredit_form.action.value='Remove';useredit_form.submit()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Remove.gif','','../images/Remove01.gif',1)"><img src='../images/Remove.gif' name='Remove.gif'></span>-->
- <input type="submit" name="action" value="Remove">
- <%
- End If
- %>
- </p>
- </form>
- </font>
- <p><br>
- <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
- </p>
- </body>
- </html>
-