19. juni 2006 - 12:23
Der er
2 kommentarer og
1 løsning
ASP til ASP.NET
Hvis nu at jeg har en asp-side, kan man så lave denne om til i stedet at være asp.net?
Er dette et stort arbejde, eller er det lige til?
Jeg har skrevet koden nedenfor - er der nogen der kan hjælpe mig?
<%@ LANGUAGE="VBSCRIPT" %>
<% Server.ScriptTimeout = 240 %>
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
<!-- #include file="Includes/MailAdminFunctions.asp" -->
<%
'==============================================================================
' ASP Script for WebMail and MailAdmin using ArgoSoft MailServer Pro
'==============================================================================
' Copyright (c) 07-01-2004
' All Right Reserved
' RocketCity Software
' Houston, Tx 77258
' Phone: (281) 734-1677
' This script is not for sale, copy or any other distribution
' without the express written consent of RocketCity Software.
'==============================================================================
Dim strPageTitle
strPageTitle = Session("EmailDomain") & "<br />WebMail Administration"
' ----------------------------------------------------------------------------
' Get the logged on user's domain
' ----------------------------------------------------------------------------
Dim arrMailUsers
Dim rstRecords
Dim strEmailDomain
Dim strSiteRoot
Dim strLogonUser
Dim strUserID
Dim strSQL
' Get the logon UserID (Windows Authentication enabled on the MailAdmin folder)
strLogonUser = Request.ServerVariables("LOGON_USER")
' Strip off the domain name, get just the UserID
strUserID = LCase(Right(strLogonUser, Len(strLogonUser) - InStr(1, strLogonUser, "\", 1)))
Session("EmailDomain") = "domain.com"
' ----------------------------------------------------------------------------
' Get Form Data
' ----------------------------------------------------------------------------
Dim strSubmitMode
strSubmitMode = Request.Form("SubmitMode")
' ----------------------------------------------------------------------------
' If logging out
' ----------------------------------------------------------------------------
If (strSubmitMode = "LOGOUT") Then
' Clear the session variables
Session("EmailDomain") = ""
' Terminate the session
Call Session.Abandon()
' Clear the submit mode
strSubmitMode = ""
' ----------------------------------------------------------------------------
' If logging in (not required -- disabled by NTCR and database read above)
' ----------------------------------------------------------------------------
ElseIf (strSubmitMode = "LOGIN") Then
' Check the Email Address and Password
Call ValidateDomainLogin()
' If validated, toggle mode
If ((blnDomainOK) And (blnDomainPwdOK)) Then
' Set the submit mode
strSubmitMode = ""
Else
' Clear the submit mode
strSubmitMode = ""
End If
' ----------------------------------------------------------------------------
' If getting a user to modify
' ----------------------------------------------------------------------------
ElseIf (strSubmitMode = "GET_MOD_USER") Then
Call GetMailUserInfo(Request.Form("UserName"))
' ----------------------------------------------------------------------------
' If modifying a user
' ----------------------------------------------------------------------------
ElseIf (strSubmitMode = "SET_MOD_USER") Then
Call SetMailUserInfo(Request.Form("UserName"), Request.Form("UserReal"), Request.Form("UserFwdAddr"), Request.Form("UserPwd"), Request.Form("AcctActive"), Request.Form("AutoRespSubject"), Request.Form("AutoRespMsg"), Request.Form("AutoRespEnabled"))
strSubmitMode = ""
' ----------------------------------------------------------------------------
' If adding a user
' ----------------------------------------------------------------------------
ElseIf (strSubmitMode = "ADD_USER") Then
Call AddMailUser(Request.Form("UserName"), Request.Form("UserPwd"), Request.Form("UserReal"), Request.Form("UserFwdAddr"), Request.Form("AcctActive"), Request.Form("AutoRespSubject"), Request.Form("AutoRespMsg"), Request.Form("AutoRespEnabled"))
strSubmitMode = ""
' ----------------------------------------------------------------------------
' If deleting a user
' ----------------------------------------------------------------------------
ElseIf (strSubmitMode = "DEL_USER") Then
Call DeleteMailUser(Request.Form("UserName"))
strSubmitMode = ""
End If
%>