Merge
This commit is contained in:
commit
ddc94cb44c
113 changed files with 5660 additions and 2425 deletions
|
@ -122,6 +122,8 @@
|
|||
<File Id="WebsitePanel.Common.Utils.dll" Source="$(var.BUILDPATH)\WebsitePanel.Common.Utils.dll"/>
|
||||
<File Id="WebsitePanel.EnterpriseServer.Base.dll" Source="$(var.BUILDPATH)\WebsitePanel.EnterpriseServer.Base.dll"/>
|
||||
<File Id="WebsitePanel.EnterpriseServer.Code.dll" Source="$(var.BUILDPATH)\WebsitePanel.EnterpriseServer.Code.dll"/>
|
||||
<File Id="IPAddressRange.dll" Source="$(var.BUILDPATH)\IPAddressRange.dll"/>
|
||||
<File Id="WhoisClient.dll" Source="$(var.BUILDPATH)\WhoisClient.dll"/>
|
||||
<File Id="WebsitePanel.Providers.Base.dll" Source="$(var.BUILDPATH)\WebsitePanel.Providers.Base.dll"/>
|
||||
<File Id="WebsitePanel.Server.Client.dll" Source="$(var.BUILDPATH)\WebsitePanel.Server.Client.dll"/>
|
||||
<File Id="WebsitePanel.Templates.dll" Source="$(var.BUILDPATH)\WebsitePanel.Templates.dll"/>
|
||||
|
|
|
@ -5679,10 +5679,6 @@ GO
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
|
@ -5992,6 +5988,764 @@ where PropertyName='Php4Path' and ProviderId in(101, 105)
|
|||
|
||||
GO
|
||||
|
||||
-- Exchange2013 Shared and resource mailboxes
|
||||
|
||||
-- Exchange2013 Shared and resource mailboxes Quotas
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2013.SharedMailboxes')
|
||||
BEGIN
|
||||
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota])
|
||||
VALUES (429, 12, 30, N'Exchange2013.SharedMailboxes', N'Shared Mailboxes per Organization', 2, 0, NULL, NULL)
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2013.ResourceMailboxes')
|
||||
BEGIN
|
||||
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota])
|
||||
VALUES (428, 12, 31, N'Exchange2013.ResourceMailboxes', N'Resource Mailboxes per Organization', 2, 0, NULL, NULL)
|
||||
END
|
||||
GO
|
||||
|
||||
-- Exchange2013 Shared and resource mailboxes Organization statistics
|
||||
|
||||
ALTER PROCEDURE [dbo].[GetExchangeOrganizationStatistics]
|
||||
(
|
||||
@ItemID int
|
||||
)
|
||||
AS
|
||||
|
||||
DECLARE @ARCHIVESIZE INT
|
||||
IF -1 in (SELECT B.ArchiveSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
|
||||
BEGIN
|
||||
SET @ARCHIVESIZE = -1
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
SET @ARCHIVESIZE = (SELECT SUM(B.ArchiveSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
|
||||
END
|
||||
|
||||
IF -1 IN (SELECT B.MailboxSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
|
||||
BEGIN
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1) AND ItemID = @ItemID) AS CreatedMailboxes,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedResourceMailboxes,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
|
||||
(SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains,
|
||||
(SELECT MIN(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace,
|
||||
(SELECT MIN(B.RecoverableItemsSpace) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedLitigationHoldSpace,
|
||||
@ARCHIVESIZE AS UsedArchingStorage
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1) AND ItemID = @ItemID) AS CreatedMailboxes,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedResourceMailboxes,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
|
||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
|
||||
(SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains,
|
||||
(SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace,
|
||||
(SELECT SUM(B.RecoverableItemsSpace) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedLitigationHoldSpace,
|
||||
@ARCHIVESIZE AS UsedArchingStorage
|
||||
END
|
||||
|
||||
|
||||
RETURN
|
||||
GO
|
||||
|
||||
-- Domain lookup tasks
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTasks] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP')
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTasks] ([TaskID], [TaskType], [RoleID]) VALUES (N'SCHEDULE_TASK_DOMAIN_LOOKUP', N'WebsitePanel.EnterpriseServer.DomainLookupViewTask, WebsitePanel.EnterpriseServer.Code', 1)
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskViewConfiguration] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP')
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTaskViewConfiguration] ([TaskID], [ConfigurationID], [Environment], [Description]) VALUES (N'SCHEDULE_TASK_DOMAIN_LOOKUP', N'ASP_NET', N'ASP.NET', N'~/DesktopModules/WebsitePanel/ScheduleTaskControls/DomainLookupView.ascx')
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP' AND [ParameterID]= N'DNS_SERVERS' )
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_DOMAIN_LOOKUP', N'DNS_SERVERS', N'String', NULL, 1)
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP' AND [ParameterID]= N'MAIL_TO' )
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_DOMAIN_LOOKUP', N'MAIL_TO', N'String', NULL, 2)
|
||||
END
|
||||
GO
|
||||
|
||||
-- Domain Expiration Task
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTasks] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_EXPIRATION')
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTasks] ([TaskID], [TaskType], [RoleID]) VALUES (N'SCHEDULE_TASK_DOMAIN_EXPIRATION', N'WebsitePanel.EnterpriseServer.DomainExpirationTask, WebsitePanel.EnterpriseServer.Code', 3)
|
||||
END
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM [dbo].[ScheduleTasks] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_EXPIRATION' AND [RoleID] = 1)
|
||||
BEGIN
|
||||
UPDATE [dbo].[ScheduleTasks] SET [RoleID] = 3 WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_EXPIRATION'
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskViewConfiguration] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_EXPIRATION')
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTaskViewConfiguration] ([TaskID], [ConfigurationID], [Environment], [Description]) VALUES (N'SCHEDULE_TASK_DOMAIN_EXPIRATION', N'ASP_NET', N'ASP.NET', N'~/DesktopModules/WebsitePanel/ScheduleTaskControls/DomainExpirationView.ascx')
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_EXPIRATION' AND [ParameterID]= N'DAYS_BEFORE' )
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_DOMAIN_EXPIRATION', N'DAYS_BEFORE', N'String', NULL, 1)
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_EXPIRATION' AND [ParameterID]= N'MAIL_TO' )
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_DOMAIN_EXPIRATION', N'MAIL_TO', N'String', NULL, 2)
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_EXPIRATION' AND [ParameterID]= N'ENABLE_NOTIFICATION' )
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_DOMAIN_EXPIRATION', N'ENABLE_NOTIFICATION', N'Boolean', N'false', 3)
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_EXPIRATION' AND [ParameterID]= N'INCLUDE_NONEXISTEN_DOMAINS' )
|
||||
BEGIN
|
||||
INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_DOMAIN_EXPIRATION', N'INCLUDE_NONEXISTEN_DOMAINS', N'Boolean', N'false', 4)
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
-- Domain lookup tables
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'DomainDnsRecords')
|
||||
DROP TABLE DomainDnsRecords
|
||||
GO
|
||||
CREATE TABLE DomainDnsRecords
|
||||
(
|
||||
ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
DomainId INT NOT NULL,
|
||||
RecordType INT NOT NULL,
|
||||
DnsServer NVARCHAR(255),
|
||||
Value NVARCHAR(255),
|
||||
Date DATETIME
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[DomainDnsRecords] WITH CHECK ADD CONSTRAINT [FK_DomainDnsRecords_DomainId] FOREIGN KEY([DomainId])
|
||||
REFERENCES [dbo].[Domains] ([DomainID])
|
||||
ON DELETE CASCADE
|
||||
GO
|
||||
|
||||
IF NOT EXISTS(SELECT * FROM sys.columns
|
||||
WHERE [name] = N'CreationDate' AND [object_id] = OBJECT_ID(N'Domains'))
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[Domains] ADD CreationDate DateTime null;
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS(SELECT * FROM sys.columns
|
||||
WHERE [name] = N'ExpirationDate' AND [object_id] = OBJECT_ID(N'Domains'))
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[Domains] ADD ExpirationDate DateTime null;
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS(SELECT * FROM sys.columns
|
||||
WHERE [name] = N'LastUpdateDate' AND [object_id] = OBJECT_ID(N'Domains'))
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[Domains] ADD LastUpdateDate DateTime null;
|
||||
END
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'ScheduleTasksEmailTemplates')
|
||||
DROP TABLE ScheduleTasksEmailTemplates
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainExpirationLetter' AND [PropertyName]= N'CC' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainExpirationLetter', N'CC', N'support@HostingCompany.com')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainExpirationLetter' AND [PropertyName]= N'From' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainExpirationLetter', N'From', N'support@HostingCompany.com')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainExpirationLetter' AND [PropertyName]= N'HtmlBody' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainExpirationLetter', N'HtmlBody', N'<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Domain Expiration Information</title>
|
||||
<style type="text/css">
|
||||
.Summary { background-color: ##ffffff; padding: 5px; }
|
||||
.Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; }
|
||||
.Summary A { color: ##0153A4; }
|
||||
.Summary { font-family: Tahoma; font-size: 9pt; }
|
||||
.Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; }
|
||||
.Summary H2 { font-size: 1.3em; color: ##1F4978; }
|
||||
.Summary TABLE { border: solid 1px ##e5e5e5; }
|
||||
.Summary TH,
|
||||
.Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; }
|
||||
.Summary TD { padding: 8px; font-size: 9pt; }
|
||||
.Summary UL LI { font-size: 1.1em; font-weight: bold; }
|
||||
.Summary UL UL LI { font-size: 0.9em; font-weight: normal; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Summary">
|
||||
|
||||
<a name="top"></a>
|
||||
<div class="Header">
|
||||
Domain Expiration Information
|
||||
</div>
|
||||
|
||||
<ad:if test="#user#">
|
||||
<p>
|
||||
Hello #user.FirstName#,
|
||||
</p>
|
||||
</ad:if>
|
||||
|
||||
<p>
|
||||
Please, find below details of your domain expiration information.
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Domain</th>
|
||||
<th>Customer</th>
|
||||
<th>Expiration Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<ad:foreach collection="#Domains#" var="Domain" index="i">
|
||||
<tr>
|
||||
<td>#Domain.DomainName#</td>
|
||||
<td>#Domain.Customer#</td>
|
||||
<td>#Domain.ExpirationDate#</td>
|
||||
</tr>
|
||||
</ad:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ad:if test="#IncludeNonExistenDomains#">
|
||||
<p>
|
||||
Please, find below details of your non-existen domains.
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Domain</th>
|
||||
<th>Customer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<ad:foreach collection="#NonExistenDomains#" var="Domain" index="i">
|
||||
<tr>
|
||||
<td>#Domain.DomainName#</td>
|
||||
<td>#Domain.Customer#</td>
|
||||
</tr>
|
||||
</ad:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
</ad:if>
|
||||
|
||||
|
||||
<p>
|
||||
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Best regards
|
||||
</p>')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainExpirationLetter' AND [PropertyName]= N'Priority' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainExpirationLetter', N'Priority', N'Normal')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainExpirationLetter' AND [PropertyName]= N'Subject' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainExpirationLetter', N'Subject', N'Domain expiration notification')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainExpirationLetter' AND [PropertyName]= N'TextBody' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainExpirationLetter', N'TextBody', N'=================================
|
||||
Domain Expiration Information
|
||||
=================================
|
||||
<ad:if test="#user#">
|
||||
Hello #user.FirstName#,
|
||||
</ad:if>
|
||||
|
||||
Please, find below details of your domain expiration information.
|
||||
|
||||
|
||||
<ad:foreach collection="#Domains#" var="Domain" index="i">
|
||||
Domain: #Domain.DomainName#
|
||||
Customer: #Domain.Customer#
|
||||
Expiration Date: #Domain.ExpirationDate#
|
||||
|
||||
</ad:foreach>
|
||||
|
||||
<ad:if test="#IncludeNonExistenDomains#">
|
||||
Please, find below details of your non-existen domains.
|
||||
|
||||
<ad:foreach collection="#NonExistenDomains#" var="Domain" index="i">
|
||||
Domain: #Domain.DomainName#
|
||||
Customer: #Domain.Customer#
|
||||
|
||||
</ad:foreach>
|
||||
</ad:if>
|
||||
|
||||
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
|
||||
|
||||
Best regards')
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'CC' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'CC', N'support@HostingCompany.com')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'From' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'From', N'support@HostingCompany.com')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'HtmlBody' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'HtmlBody', N'<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>MX and NS Changes Information</title>
|
||||
<style type="text/css">
|
||||
.Summary { background-color: ##ffffff; padding: 5px; }
|
||||
.Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; }
|
||||
.Summary A { color: ##0153A4; }
|
||||
.Summary { font-family: Tahoma; font-size: 9pt; }
|
||||
.Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; }
|
||||
.Summary H2 { font-size: 1.3em; color: ##1F4978; }
|
||||
.Summary TABLE { border: solid 1px ##e5e5e5; }
|
||||
.Summary TH,
|
||||
.Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; }
|
||||
.Summary TD { padding: 8px; font-size: 9pt; }
|
||||
.Summary UL LI { font-size: 1.1em; font-weight: bold; }
|
||||
.Summary UL UL LI { font-size: 0.9em; font-weight: normal; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Summary">
|
||||
|
||||
<a name="top"></a>
|
||||
<div class="Header">
|
||||
MX and NS Changes Information
|
||||
</div>
|
||||
|
||||
<ad:if test="#user#">
|
||||
<p>
|
||||
Hello #user.FirstName#,
|
||||
</p>
|
||||
</ad:if>
|
||||
|
||||
<p>
|
||||
Please, find below details of MX and NS changes.
|
||||
</p>
|
||||
|
||||
<ad:foreach collection="#Domains#" var="Domain" index="i">
|
||||
<h2>#Domain.DomainName#</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>DNS</th>
|
||||
<th>Type</th>
|
||||
<th>Status</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<ad:foreach collection="#Domain.DnsChanges#" var="DnsChange" index="j">
|
||||
<tr>
|
||||
<td>#DnsChange.DnsServer#</td>
|
||||
<td>#DnsChange.Type#</td>
|
||||
<td>#DnsChange.Status#</td>
|
||||
<td>#DnsChange.Record.Value#</td>
|
||||
</tr>
|
||||
</ad:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</ad:foreach>
|
||||
|
||||
<p>
|
||||
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Best regards
|
||||
</p>')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'Priority' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'Priority', N'Normal')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'Subject' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'Subject', N'MX and NS changes notification')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'TextBody' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'TextBody', N'=================================
|
||||
MX and NS Changes Information
|
||||
=================================
|
||||
<ad:if test="#user#">
|
||||
<p>
|
||||
Hello #user.FirstName#,
|
||||
</p>
|
||||
</ad:if>
|
||||
|
||||
Please, find below details of your domain expiration information.
|
||||
|
||||
|
||||
|
||||
<ad:foreach collection="#Domains#" var="Domain" index="i">
|
||||
|
||||
#Domain.DomainName#
|
||||
|
||||
<ad:foreach collection="#Domain.DnsChanges#" var="DnsChange" index="j">
|
||||
DNS: #DnsChange.DnsServer#
|
||||
Type: #DnsChange.Type#
|
||||
Status: #DnsChange.Status#
|
||||
Value: #DnsChange.Record.Value#
|
||||
|
||||
</ad:foreach>
|
||||
</ad:foreach>
|
||||
|
||||
|
||||
|
||||
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
|
||||
|
||||
Best regards
|
||||
')
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
-- Procedures for Domain lookup service
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetAllPackages')
|
||||
DROP PROCEDURE GetAllPackages
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetAllPackages]
|
||||
AS
|
||||
SELECT
|
||||
[PackageID]
|
||||
,[ParentPackageID]
|
||||
,[UserID]
|
||||
,[PackageName]
|
||||
,[PackageComments]
|
||||
,[ServerID]
|
||||
,[StatusID]
|
||||
,[PlanID]
|
||||
,[PurchaseDate]
|
||||
,[OverrideQuotas]
|
||||
,[BandwidthUpdated]
|
||||
FROM [dbo].[Packages]
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetScheduleTaskEmailTemplate')
|
||||
DROP PROCEDURE GetScheduleTaskEmailTemplate
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].GetScheduleTaskEmailTemplate
|
||||
(
|
||||
@TaskID [nvarchar](100)
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
[TaskID],
|
||||
[From] ,
|
||||
[Subject] ,
|
||||
[Template]
|
||||
FROM [dbo].[ScheduleTasksEmailTemplates] where [TaskID] = @TaskID
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetDomainDnsRecords')
|
||||
DROP PROCEDURE GetDomainDnsRecords
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].GetDomainDnsRecords
|
||||
(
|
||||
@DomainId INT,
|
||||
@RecordType INT
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
ID,
|
||||
DomainId,
|
||||
DnsServer,
|
||||
RecordType,
|
||||
Value,
|
||||
Date
|
||||
FROM [dbo].[DomainDnsRecords]
|
||||
WHERE [DomainId] = @DomainId AND [RecordType] = @RecordType
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddDomainDnsRecord')
|
||||
DROP PROCEDURE AddDomainDnsRecord
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[AddDomainDnsRecord]
|
||||
(
|
||||
@DomainId INT,
|
||||
@RecordType INT,
|
||||
@DnsServer NVARCHAR(255),
|
||||
@Value NVARCHAR(255),
|
||||
@Date DATETIME
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO DomainDnsRecords
|
||||
(
|
||||
DomainId,
|
||||
DnsServer,
|
||||
RecordType,
|
||||
Value,
|
||||
Date
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@DomainId,
|
||||
@DnsServer,
|
||||
@RecordType,
|
||||
@Value,
|
||||
@Date
|
||||
)
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteDomainDnsRecord')
|
||||
DROP PROCEDURE DeleteDomainDnsRecord
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[DeleteDomainDnsRecord]
|
||||
(
|
||||
@Id INT
|
||||
)
|
||||
AS
|
||||
DELETE FROM DomainDnsRecords
|
||||
WHERE Id = @Id
|
||||
GO
|
||||
|
||||
--Domain Expiration Stored Procedures
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateDomainCreationDate')
|
||||
DROP PROCEDURE UpdateDomainCreationDate
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].UpdateDomainCreationDate
|
||||
(
|
||||
@DomainId INT,
|
||||
@Date DateTime
|
||||
)
|
||||
AS
|
||||
UPDATE [dbo].[Domains] SET [CreationDate] = @Date WHERE [DomainID] = @DomainId
|
||||
GO
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateDomainExpirationDate')
|
||||
DROP PROCEDURE UpdateDomainExpirationDate
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].UpdateDomainExpirationDate
|
||||
(
|
||||
@DomainId INT,
|
||||
@Date DateTime
|
||||
)
|
||||
AS
|
||||
UPDATE [dbo].[Domains] SET [ExpirationDate] = @Date WHERE [DomainID] = @DomainId
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateDomainLastUpdateDate')
|
||||
DROP PROCEDURE UpdateDomainLastUpdateDate
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].UpdateDomainLastUpdateDate
|
||||
(
|
||||
@DomainId INT,
|
||||
@Date DateTime
|
||||
)
|
||||
AS
|
||||
UPDATE [dbo].[Domains] SET [LastUpdateDate] = @Date WHERE [DomainID] = @DomainId
|
||||
GO
|
||||
|
||||
|
||||
--Updating Domain procedures
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetDomains')
|
||||
DROP PROCEDURE GetDomains
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetDomains]
|
||||
(
|
||||
@ActorID int,
|
||||
@PackageID int,
|
||||
@Recursive bit = 1
|
||||
)
|
||||
AS
|
||||
|
||||
-- check rights
|
||||
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
|
||||
RAISERROR('You are not allowed to access this package', 16, 1)
|
||||
|
||||
SELECT
|
||||
D.DomainID,
|
||||
D.PackageID,
|
||||
D.ZoneItemID,
|
||||
D.DomainItemID,
|
||||
D.DomainName,
|
||||
D.HostingAllowed,
|
||||
ISNULL(WS.ItemID, 0) AS WebSiteID,
|
||||
WS.ItemName AS WebSiteName,
|
||||
ISNULL(MD.ItemID, 0) AS MailDomainID,
|
||||
MD.ItemName AS MailDomainName,
|
||||
Z.ItemName AS ZoneName,
|
||||
D.IsSubDomain,
|
||||
D.IsInstantAlias,
|
||||
D.CreationDate,
|
||||
D.ExpirationDate,
|
||||
D.LastUpdateDate,
|
||||
D.IsDomainPointer
|
||||
FROM Domains AS D
|
||||
INNER JOIN PackagesTree(@PackageID, @Recursive) AS PT ON D.PackageID = PT.PackageID
|
||||
LEFT OUTER JOIN ServiceItems AS WS ON D.WebSiteID = WS.ItemID
|
||||
LEFT OUTER JOIN ServiceItems AS MD ON D.MailDomainID = MD.ItemID
|
||||
LEFT OUTER JOIN ServiceItems AS Z ON D.ZoneItemID = Z.ItemID
|
||||
RETURN
|
||||
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetDomainsPaged')
|
||||
DROP PROCEDURE GetDomainsPaged
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetDomainsPaged]
|
||||
(
|
||||
@ActorID int,
|
||||
@PackageID int,
|
||||
@ServerID int,
|
||||
@Recursive bit,
|
||||
@FilterColumn nvarchar(50) = '',
|
||||
@FilterValue nvarchar(50) = '',
|
||||
@SortColumn nvarchar(50),
|
||||
@StartRow int,
|
||||
@MaximumRows int
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
|
||||
-- check rights
|
||||
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
|
||||
RAISERROR('You are not allowed to access this package', 16, 1)
|
||||
|
||||
-- build query and run it to the temporary table
|
||||
DECLARE @sql nvarchar(2000)
|
||||
|
||||
IF @SortColumn = '' OR @SortColumn IS NULL
|
||||
SET @SortColumn = 'DomainName'
|
||||
|
||||
SET @sql = '
|
||||
DECLARE @Domains TABLE
|
||||
(
|
||||
ItemPosition int IDENTITY(1,1),
|
||||
DomainID int
|
||||
)
|
||||
INSERT INTO @Domains (DomainID)
|
||||
SELECT
|
||||
D.DomainID
|
||||
FROM Domains AS D
|
||||
INNER JOIN Packages AS P ON D.PackageID = P.PackageID
|
||||
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
|
||||
LEFT OUTER JOIN ServiceItems AS Z ON D.ZoneItemID = Z.ItemID
|
||||
LEFT OUTER JOIN Services AS S ON Z.ServiceID = S.ServiceID
|
||||
LEFT OUTER JOIN Servers AS SRV ON S.ServerID = SRV.ServerID
|
||||
WHERE (D.IsInstantAlias = 0 AND D.IsDomainPointer = 0) AND
|
||||
((@Recursive = 0 AND D.PackageID = @PackageID)
|
||||
OR (@Recursive = 1 AND dbo.CheckPackageParent(@PackageID, D.PackageID) = 1))
|
||||
AND (@ServerID = 0 OR (@ServerID > 0 AND S.ServerID = @ServerID))
|
||||
'
|
||||
|
||||
IF @FilterColumn <> '' AND @FilterValue <> ''
|
||||
SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue '
|
||||
|
||||
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
|
||||
SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' '
|
||||
|
||||
SET @sql = @sql + ' SELECT COUNT(DomainID) FROM @Domains;SELECT
|
||||
D.DomainID,
|
||||
D.PackageID,
|
||||
D.ZoneItemID,
|
||||
D.DomainItemID,
|
||||
D.DomainName,
|
||||
D.HostingAllowed,
|
||||
ISNULL(WS.ItemID, 0) AS WebSiteID,
|
||||
WS.ItemName AS WebSiteName,
|
||||
ISNULL(MD.ItemID, 0) AS MailDomainID,
|
||||
MD.ItemName AS MailDomainName,
|
||||
D.IsSubDomain,
|
||||
D.IsInstantAlias,
|
||||
D.IsDomainPointer,
|
||||
D.ExpirationDate,
|
||||
D.LastUpdateDate,
|
||||
P.PackageName,
|
||||
ISNULL(SRV.ServerID, 0) AS ServerID,
|
||||
ISNULL(SRV.ServerName, '''') AS ServerName,
|
||||
ISNULL(SRV.Comments, '''') AS ServerComments,
|
||||
ISNULL(SRV.VirtualServer, 0) AS VirtualServer,
|
||||
P.UserID,
|
||||
U.Username,
|
||||
U.FirstName,
|
||||
U.LastName,
|
||||
U.FullName,
|
||||
U.RoleID,
|
||||
U.Email
|
||||
FROM @Domains AS SD
|
||||
INNER JOIN Domains AS D ON SD.DomainID = D.DomainID
|
||||
INNER JOIN Packages AS P ON D.PackageID = P.PackageID
|
||||
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
|
||||
LEFT OUTER JOIN ServiceItems AS WS ON D.WebSiteID = WS.ItemID
|
||||
LEFT OUTER JOIN ServiceItems AS MD ON D.MailDomainID = MD.ItemID
|
||||
LEFT OUTER JOIN ServiceItems AS Z ON D.ZoneItemID = Z.ItemID
|
||||
LEFT OUTER JOIN Services AS S ON Z.ServiceID = S.ServiceID
|
||||
LEFT OUTER JOIN Servers AS SRV ON S.ServerID = SRV.ServerID
|
||||
WHERE SD.ItemPosition BETWEEN @StartRow + 1 AND @StartRow + @MaximumRows'
|
||||
|
||||
exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @PackageID int, @FilterValue nvarchar(50), @ServerID int, @Recursive bit',
|
||||
@StartRow, @MaximumRows, @PackageID, @FilterValue, @ServerID, @Recursive
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
IF NOT EXISTS(SELECT * FROM sys.columns
|
||||
WHERE [name] = N'ConnectionEnabled' AND [object_id] = OBJECT_ID(N'RDSServers'))
|
||||
BEGIN
|
||||
|
|
BIN
WebsitePanel/Lib/References/Whois.NET/IPAddressRange.dll
Normal file
BIN
WebsitePanel/Lib/References/Whois.NET/IPAddressRange.dll
Normal file
Binary file not shown.
BIN
WebsitePanel/Lib/References/Whois.NET/WhoisClient.dll
Normal file
BIN
WebsitePanel/Lib/References/Whois.NET/WhoisClient.dll
Normal file
Binary file not shown.
|
@ -46,7 +46,10 @@ namespace WebsitePanel.Import.CsvBulk
|
|||
{
|
||||
Mailbox,
|
||||
Contact,
|
||||
User
|
||||
User,
|
||||
Room,
|
||||
Equipment,
|
||||
SharedMailbox
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -487,9 +490,12 @@ namespace WebsitePanel.Import.CsvBulk
|
|||
|
||||
if (!StringEquals(typeName, "Mailbox") &&
|
||||
!StringEquals(typeName, "Contact") &&
|
||||
!StringEquals(typeName, "User"))
|
||||
!StringEquals(typeName, "User")&&
|
||||
!StringEquals(typeName, "Room")&&
|
||||
!StringEquals(typeName, "Equipment")&&
|
||||
!StringEquals(typeName, "SharedMailbox"))
|
||||
{
|
||||
Log.WriteError(string.Format("Error at line {0}: field 'Type' is invalid. Should be 'Mailbox' or 'Contact' or 'User'", index + 1));
|
||||
Log.WriteError(string.Format("Error at line {0}: field 'Type' is invalid. Should be 'Mailbox' or 'Contact' or 'User' or 'Room' or 'Equipment' or 'SharedMailbox'", index + 1));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -524,7 +530,7 @@ namespace WebsitePanel.Import.CsvBulk
|
|||
if (type == AccountTypes.Mailbox)
|
||||
{
|
||||
//create mailbox using web service
|
||||
if (!CreateMailbox(index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||
if (!CreateMailbox(ExchangeAccountType.Mailbox, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||
address, city, state, zip, country, jobTitle, company, department, office,
|
||||
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
||||
{
|
||||
|
@ -532,6 +538,42 @@ namespace WebsitePanel.Import.CsvBulk
|
|||
}
|
||||
totalMailboxes++;
|
||||
}
|
||||
if (type == AccountTypes.Room)
|
||||
{
|
||||
//create mailbox using web service
|
||||
if (!CreateMailbox(ExchangeAccountType.Room, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||
address, city, state, zip, country, jobTitle, company, department, office,
|
||||
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
totalMailboxes++;
|
||||
}
|
||||
if (type == AccountTypes.Equipment)
|
||||
{
|
||||
//create mailbox using web service
|
||||
if (!CreateMailbox(ExchangeAccountType.Equipment, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||
address, city, state, zip, country, jobTitle, company, department, office,
|
||||
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
totalMailboxes++;
|
||||
}
|
||||
if (type == AccountTypes.SharedMailbox)
|
||||
{
|
||||
//create mailbox using web service
|
||||
if (!CreateMailbox(ExchangeAccountType.SharedMailbox, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||
address, city, state, zip, country, jobTitle, company, department, office,
|
||||
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
totalMailboxes++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
else if (type == AccountTypes.Contact)
|
||||
{
|
||||
//create contact using web service
|
||||
|
@ -561,7 +603,7 @@ namespace WebsitePanel.Import.CsvBulk
|
|||
/// <summary>
|
||||
/// Creates mailbox
|
||||
/// </summary>
|
||||
private bool CreateMailbox(int index, int orgId, string displayName, string emailAddress, string password, string firstName, string middleName, string lastName,
|
||||
private bool CreateMailbox(ExchangeAccountType exchangeAccountType, int index, int orgId, string displayName, string emailAddress, string password, string firstName, string middleName, string lastName,
|
||||
string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office,
|
||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int planId)
|
||||
{
|
||||
|
@ -574,7 +616,7 @@ namespace WebsitePanel.Import.CsvBulk
|
|||
//create mailbox
|
||||
//ES.Services.ExchangeServer.
|
||||
string accountName = string.Empty;
|
||||
int accountId = ES.Services.ExchangeServer.CreateMailbox(orgId, 0, ExchangeAccountType.Mailbox, accountName, displayName, name, domain, password, false, string.Empty, planId, -1, string.Empty, false);
|
||||
int accountId = ES.Services.ExchangeServer.CreateMailbox(orgId, 0, exchangeAccountType, accountName, displayName, name, domain, password, false, string.Empty, planId, -1, string.Empty, false);
|
||||
if (accountId < 0)
|
||||
{
|
||||
string errorMessage = GetErrorMessage(accountId);
|
||||
|
|
|
@ -37,14 +37,16 @@ namespace WebsitePanel.Import.Enterprise
|
|||
this.txtOU = new System.Windows.Forms.TextBox();
|
||||
this.lblOU = new System.Windows.Forms.Label();
|
||||
this.grpOrganization = new System.Windows.Forms.GroupBox();
|
||||
this.cbMailboxPlan = new System.Windows.Forms.ComboBox();
|
||||
this.lblMailnoxPlan = new System.Windows.Forms.Label();
|
||||
this.btnSelectAll = new System.Windows.Forms.Button();
|
||||
this.btnDeselectAll = new System.Windows.Forms.Button();
|
||||
this.rbCreateAndImport = new System.Windows.Forms.RadioButton();
|
||||
this.rbImport = new System.Windows.Forms.RadioButton();
|
||||
this.lvUsers = new System.Windows.Forms.ListView();
|
||||
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.images = new System.Windows.Forms.ImageList(this.components);
|
||||
this.txtOrgName = new System.Windows.Forms.TextBox();
|
||||
this.lblOrgName = new System.Windows.Forms.Label();
|
||||
|
@ -71,14 +73,14 @@ namespace WebsitePanel.Import.Enterprise
|
|||
this.txtSpace.Location = new System.Drawing.Point(146, 12);
|
||||
this.txtSpace.Name = "txtSpace";
|
||||
this.txtSpace.ReadOnly = true;
|
||||
this.txtSpace.Size = new System.Drawing.Size(429, 20);
|
||||
this.txtSpace.Size = new System.Drawing.Size(426, 20);
|
||||
this.txtSpace.TabIndex = 1;
|
||||
this.txtSpace.TextChanged += new System.EventHandler(this.OnDataChanged);
|
||||
//
|
||||
// btnBrowseSpace
|
||||
//
|
||||
this.btnBrowseSpace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnBrowseSpace.Location = new System.Drawing.Point(581, 10);
|
||||
this.btnBrowseSpace.Location = new System.Drawing.Point(578, 10);
|
||||
this.btnBrowseSpace.Name = "btnBrowseSpace";
|
||||
this.btnBrowseSpace.Size = new System.Drawing.Size(24, 22);
|
||||
this.btnBrowseSpace.TabIndex = 2;
|
||||
|
@ -89,7 +91,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
// btnBrowseOU
|
||||
//
|
||||
this.btnBrowseOU.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnBrowseOU.Location = new System.Drawing.Point(581, 36);
|
||||
this.btnBrowseOU.Location = new System.Drawing.Point(578, 36);
|
||||
this.btnBrowseOU.Name = "btnBrowseOU";
|
||||
this.btnBrowseOU.Size = new System.Drawing.Size(24, 22);
|
||||
this.btnBrowseOU.TabIndex = 5;
|
||||
|
@ -104,7 +106,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
this.txtOU.Location = new System.Drawing.Point(146, 38);
|
||||
this.txtOU.Name = "txtOU";
|
||||
this.txtOU.ReadOnly = true;
|
||||
this.txtOU.Size = new System.Drawing.Size(429, 20);
|
||||
this.txtOU.Size = new System.Drawing.Size(426, 20);
|
||||
this.txtOU.TabIndex = 4;
|
||||
this.txtOU.TextChanged += new System.EventHandler(this.OnDataChanged);
|
||||
//
|
||||
|
@ -121,6 +123,8 @@ namespace WebsitePanel.Import.Enterprise
|
|||
this.grpOrganization.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.grpOrganization.Controls.Add(this.cbMailboxPlan);
|
||||
this.grpOrganization.Controls.Add(this.lblMailnoxPlan);
|
||||
this.grpOrganization.Controls.Add(this.btnSelectAll);
|
||||
this.grpOrganization.Controls.Add(this.btnDeselectAll);
|
||||
this.grpOrganization.Controls.Add(this.rbCreateAndImport);
|
||||
|
@ -132,14 +136,33 @@ namespace WebsitePanel.Import.Enterprise
|
|||
this.grpOrganization.Controls.Add(this.lblOrgId);
|
||||
this.grpOrganization.Location = new System.Drawing.Point(15, 67);
|
||||
this.grpOrganization.Name = "grpOrganization";
|
||||
this.grpOrganization.Size = new System.Drawing.Size(590, 328);
|
||||
this.grpOrganization.Size = new System.Drawing.Size(587, 328);
|
||||
this.grpOrganization.TabIndex = 6;
|
||||
this.grpOrganization.TabStop = false;
|
||||
//
|
||||
// cbMailboxPlan
|
||||
//
|
||||
this.cbMailboxPlan.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cbMailboxPlan.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbMailboxPlan.FormattingEnabled = true;
|
||||
this.cbMailboxPlan.Location = new System.Drawing.Point(155, 74);
|
||||
this.cbMailboxPlan.Name = "cbMailboxPlan";
|
||||
this.cbMailboxPlan.Size = new System.Drawing.Size(415, 21);
|
||||
this.cbMailboxPlan.TabIndex = 10;
|
||||
//
|
||||
// lblMailnoxPlan
|
||||
//
|
||||
this.lblMailnoxPlan.Location = new System.Drawing.Point(19, 74);
|
||||
this.lblMailnoxPlan.Name = "lblMailnoxPlan";
|
||||
this.lblMailnoxPlan.Size = new System.Drawing.Size(130, 23);
|
||||
this.lblMailnoxPlan.TabIndex = 9;
|
||||
this.lblMailnoxPlan.Text = "Default mailbox plan :";
|
||||
//
|
||||
// btnSelectAll
|
||||
//
|
||||
this.btnSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSelectAll.Location = new System.Drawing.Point(417, 282);
|
||||
this.btnSelectAll.Location = new System.Drawing.Point(414, 282);
|
||||
this.btnSelectAll.Name = "btnSelectAll";
|
||||
this.btnSelectAll.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSelectAll.TabIndex = 7;
|
||||
|
@ -150,7 +173,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
// btnDeselectAll
|
||||
//
|
||||
this.btnDeselectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnDeselectAll.Location = new System.Drawing.Point(498, 282);
|
||||
this.btnDeselectAll.Location = new System.Drawing.Point(495, 282);
|
||||
this.btnDeselectAll.Name = "btnDeselectAll";
|
||||
this.btnDeselectAll.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnDeselectAll.TabIndex = 8;
|
||||
|
@ -197,10 +220,10 @@ namespace WebsitePanel.Import.Enterprise
|
|||
this.columnHeader3});
|
||||
this.lvUsers.FullRowSelect = true;
|
||||
this.lvUsers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.lvUsers.Location = new System.Drawing.Point(19, 74);
|
||||
this.lvUsers.Location = new System.Drawing.Point(19, 108);
|
||||
this.lvUsers.MultiSelect = false;
|
||||
this.lvUsers.Name = "lvUsers";
|
||||
this.lvUsers.Size = new System.Drawing.Size(554, 202);
|
||||
this.lvUsers.Size = new System.Drawing.Size(551, 167);
|
||||
this.lvUsers.SmallImageList = this.images;
|
||||
this.lvUsers.TabIndex = 4;
|
||||
this.lvUsers.UseCompatibleStateImageBehavior = false;
|
||||
|
@ -209,17 +232,17 @@ namespace WebsitePanel.Import.Enterprise
|
|||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "Name";
|
||||
this.columnHeader1.Width = 229;
|
||||
this.columnHeader1.Width = 238;
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Email";
|
||||
this.columnHeader2.Width = 163;
|
||||
this.columnHeader2.Width = 166;
|
||||
//
|
||||
// columnHeader3
|
||||
//
|
||||
this.columnHeader3.Text = "Type";
|
||||
this.columnHeader3.Width = 152;
|
||||
this.columnHeader3.Width = 124;
|
||||
//
|
||||
// images
|
||||
//
|
||||
|
@ -235,7 +258,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtOrgName.Location = new System.Drawing.Point(155, 45);
|
||||
this.txtOrgName.Name = "txtOrgName";
|
||||
this.txtOrgName.Size = new System.Drawing.Size(418, 20);
|
||||
this.txtOrgName.Size = new System.Drawing.Size(415, 20);
|
||||
this.txtOrgName.TabIndex = 3;
|
||||
//
|
||||
// lblOrgName
|
||||
|
@ -253,7 +276,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
this.txtOrgId.Location = new System.Drawing.Point(155, 19);
|
||||
this.txtOrgId.Name = "txtOrgId";
|
||||
this.txtOrgId.ReadOnly = true;
|
||||
this.txtOrgId.Size = new System.Drawing.Size(418, 20);
|
||||
this.txtOrgId.Size = new System.Drawing.Size(415, 20);
|
||||
this.txtOrgId.TabIndex = 1;
|
||||
//
|
||||
// lblOrgId
|
||||
|
@ -267,7 +290,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
// btnStart
|
||||
//
|
||||
this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnStart.Location = new System.Drawing.Point(527, 461);
|
||||
this.btnStart.Location = new System.Drawing.Point(524, 461);
|
||||
this.btnStart.Name = "btnStart";
|
||||
this.btnStart.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnStart.TabIndex = 9;
|
||||
|
@ -281,7 +304,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.progressBar.Location = new System.Drawing.Point(15, 427);
|
||||
this.progressBar.Name = "progressBar";
|
||||
this.progressBar.Size = new System.Drawing.Size(587, 23);
|
||||
this.progressBar.Size = new System.Drawing.Size(584, 23);
|
||||
this.progressBar.TabIndex = 8;
|
||||
//
|
||||
// lblMessage
|
||||
|
@ -290,14 +313,14 @@ namespace WebsitePanel.Import.Enterprise
|
|||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblMessage.Location = new System.Drawing.Point(12, 401);
|
||||
this.lblMessage.Name = "lblMessage";
|
||||
this.lblMessage.Size = new System.Drawing.Size(593, 23);
|
||||
this.lblMessage.Size = new System.Drawing.Size(590, 23);
|
||||
this.lblMessage.TabIndex = 7;
|
||||
//
|
||||
// ApplicationForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(617, 496);
|
||||
this.ClientSize = new System.Drawing.Size(614, 496);
|
||||
this.Controls.Add(this.lblMessage);
|
||||
this.Controls.Add(this.progressBar);
|
||||
this.Controls.Add(this.btnStart);
|
||||
|
@ -346,6 +369,8 @@ namespace WebsitePanel.Import.Enterprise
|
|||
private System.Windows.Forms.RadioButton rbImport;
|
||||
internal System.Windows.Forms.Button btnSelectAll;
|
||||
internal System.Windows.Forms.Button btnDeselectAll;
|
||||
private System.Windows.Forms.ComboBox cbMailboxPlan;
|
||||
private System.Windows.Forms.Label lblMailnoxPlan;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -129,6 +129,30 @@ namespace WebsitePanel.Import.Enterprise
|
|||
}
|
||||
}
|
||||
|
||||
private void BindMailboxPlans(string orgId)
|
||||
{
|
||||
cbMailboxPlan.Items.Clear();
|
||||
cbMailboxPlan.Items.Add("<not set>");
|
||||
cbMailboxPlan.SelectedIndex = 0;
|
||||
|
||||
Organization org = OrganizationController.GetOrganizationById(orgId);
|
||||
|
||||
if (org == null)
|
||||
{
|
||||
List<Organization> orgs = ExchangeServerController.GetExchangeOrganizations(1, false);
|
||||
if (orgs.Count > 0)
|
||||
org = orgs[0];
|
||||
}
|
||||
|
||||
if (org != null)
|
||||
{
|
||||
int itemId = org.Id;
|
||||
List<ExchangeMailboxPlan> plans = ExchangeServerController.GetExchangeMailboxPlans(itemId, false);
|
||||
cbMailboxPlan.Items.AddRange(plans.ToArray());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void LoadOrganizationData(DirectoryEntry parent)
|
||||
{
|
||||
string orgId = (string)parent.Properties["name"].Value;
|
||||
|
@ -147,6 +171,9 @@ namespace WebsitePanel.Import.Enterprise
|
|||
rbImport.Checked = false;
|
||||
txtOrgName.Text = orgId;
|
||||
}
|
||||
|
||||
BindMailboxPlans(orgId);
|
||||
|
||||
LoadOrganizationAccounts(parent);
|
||||
}
|
||||
|
||||
|
@ -164,13 +191,38 @@ namespace WebsitePanel.Import.Enterprise
|
|||
type = null;
|
||||
email = null;
|
||||
name = (string)child.Properties["name"].Value;
|
||||
|
||||
//account type
|
||||
typeProp = child.Properties["msExchRecipientDisplayType"];
|
||||
|
||||
int typeDetails = 0;
|
||||
PropertyValueCollection typeDetailsProp = child.Properties["msExchRecipientTypeDetails"];
|
||||
if (typeDetailsProp != null)
|
||||
{
|
||||
if (typeDetailsProp.Value != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
object adsLargeInteger = typeDetailsProp.Value;
|
||||
typeDetails = (Int32)adsLargeInteger.GetType().InvokeMember("LowPart", System.Reflection.BindingFlags.GetProperty, null, adsLargeInteger, null);
|
||||
}
|
||||
catch { } // just skip
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch (child.SchemaClassName)
|
||||
{
|
||||
case "user":
|
||||
email = (string)child.Properties["userPrincipalName"].Value;
|
||||
|
||||
if (typeDetails == 4)
|
||||
{
|
||||
type = "Shared Mailbox";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (typeProp == null || typeProp.Value == null)
|
||||
{
|
||||
type = "User";
|
||||
|
@ -191,6 +243,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
type = "Equipment Mailbox";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(type))
|
||||
{
|
||||
|
@ -300,6 +353,16 @@ namespace WebsitePanel.Import.Enterprise
|
|||
Global.OrganizationName = txtOrgName.Text;
|
||||
Global.ImportAccountsOnly = rbImport.Checked;
|
||||
Global.HasErrors = false;
|
||||
|
||||
Global.defaultMailboxPlanId = 0;
|
||||
if (cbMailboxPlan.SelectedItem!=null)
|
||||
{
|
||||
ExchangeMailboxPlan plan = cbMailboxPlan.SelectedItem as ExchangeMailboxPlan;
|
||||
if (plan != null)
|
||||
Global.defaultMailboxPlanId = plan.MailboxPlanId;
|
||||
|
||||
}
|
||||
|
||||
importer.Initialize(this.username, this);
|
||||
importer.Start();
|
||||
|
||||
|
|
|
@ -112,79 +112,79 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="images.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="images.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="images.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABM
|
||||
DQAAAk1TRnQBSQFMAgEBAwEAAQwBAAEMAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABI
|
||||
DQAAAk1TRnQBSQFMAgEBAwEAAVwBAAFcAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
AwABEAMAAQEBAAEgBgABEGIAAa0BsgG1Af8BrQGuAa0B/wGtAa4BrQH/AaUBpgGlAf8BnAGeAaUB/wGc
|
||||
AZoBnAH/AZQBlgGUAf8BjAGOAZQB/wGMAYoBjAH/IAABrQGyAbUB/wGtAa4BrQH/Aa0BrgGtAf8BpQGm
|
||||
AaUB/wGcAZ4BpQH/AZwBmgGcAf8BlAGWAZQB/wGMAY4BlAH/AYwBigGMAf8BjAFtAWcB/1AAAxgBIQNN
|
||||
AZEDWAHBA2EB5gFqAWMBVwH8A2EB5gNYAcEDTAGQAygBPSAAAa0BsgG1Hf8BlAGWAZQB/yAAAa0BsgG1
|
||||
Hf8BlAGWAZQB/wG1AZIBZwH/AYQBaQFfAf9IAAMDAQQDXAHNAagBkwFHAf0B5gHLAbQB/wHeAbcBkAH/
|
||||
AeMBuwGUAf8B4AG6AZQB/wHOAasBiAH/AbgBmQFcAf8DWgHFIAABrQGyAbUF/wHvAesB5wH/Ac4BywHO
|
||||
AaUB/wGcAZ4BpQH/AZwBmgGcAf8BlAGWAZQB/wGMAY4BlAH/AYwBigGMAf8BjAFjAV0B/1AAAxgBIQNN
|
||||
AZEDWAHBA2EB5gFgAVkBRQH8A2EB5gNYAcEDTAGQAygBPSAAAa0BsgG1Hf8BlAGWAZQB/yAAAa0BsgG1
|
||||
Hf8BlAGWAZQB/wG1AZIBXQH/AYQBXwFVAf9IAAMDAQQDXAHNAagBkwFAAf0B5gHLAbQB/wHeAbcBkAH/
|
||||
AeMBuwGUAf8B4AG6AZQB/wHOAasBiAH/AbgBmQFSAf8DWgHFIAABrQGyAbUF/wHvAesB5wH/Ac4BywHO
|
||||
Af8BvQG6Ab0B/wG1AbIBtQn/AZQBkgGUAf8gAAGtAbIBtQX/Ae8B6wHnAf8BzgHLAc4B/wG9AboBvQH/
|
||||
AbUBsgG1Cf8BlAGSAZQB/wHGAZ4BbwH/AYwBbQFfAf9IAAMEAQUDWQG+AcYBpQGFAf8B5gHQAb0B/wHi
|
||||
Ab0BnAH/AeYBvwGXAf8B6AHDAZ8B/wHbAboBmAH/AcABnwFfAf8DXAHMEAABvQHDAbUB/wE8ATsBPAH/
|
||||
ATwBOwE8Af8BPAE7ATwB/wGtAbIBtRX/ATwBOwH3Af8BIwEmAdYB/wGUAZIBlAH/ATwBOwE8Af8BPAE7
|
||||
ATwB/wE8ATsBPAH/CAABVwGOAW8B/wFGAYoBZwH/AU4BigFnAf8BrQGyAbUV/wE+AT0B9wH/ASUBKAHW
|
||||
AbUBsgG1Cf8BlAGSAZQB/wHGAZ4BZQH/AYwBYwFVAf9IAAMEAQUDWQG+AcYBpQGFAf8B5gHQAb0B/wHi
|
||||
Ab0BnAH/AeYBvwGXAf8B6AHDAZ8B/wHbAboBmAH/AcABnwFVAf8DXAHMEAABvQHDAbUB/wEyATEBMgH/
|
||||
ATIBMQEyAf8BMgExATIB/wGtAbIBtRX/ATIBMQH3Af8BGQEcAdYB/wGUAZIBlAH/ATIBMQEyAf8BMgEx
|
||||
ATIB/wEyATEBMgH/CAABTQGOAWUB/wE8AYoBXQH/AUQBigFdAf8BrQGyAbUV/wE0ATMB9wH/ARsBHgHW
|
||||
Af8BlAGSAZQB/wHeAbIBhAH/AZwBkgGEAf9LAAEBA1MBqgHZAbEBkAH/AeYB1AHBAf8B8wHSAbMB/wHq
|
||||
AcEBmAH/Ae0BzAGqAf8B4AHCAaQB/wHDAaMBggH/A14B3RAAAb0BwwG1C/8B9wH/Aa0BugG1Ff8BpQGi
|
||||
AfcB/wGMAY4B3gH/AZQBkgGUAf8B7wHjAdYC/wH3Ae8B/wGcAZ4BlAH/BAABVwG6AYwB/wFfAcsBnAH/
|
||||
AU4BugGMAf8BhAHHAaUB/wGtAboBtRX/AaUBogH3Af8BjAGOAd4B/wGUAZIBlAH/Ac4BpgFvAf9MAAMB
|
||||
AQIDAQECA2UB5QHQAcMBsgH/AcgBwwG7Af8B1wG3AZcB/wHrAcQBnQH/AeEBvgGbAf8BzgGmAV8B/wNN
|
||||
AfcB/wGMAY4B3gH/AZQBkgGUAf8B7wHjAdYC/wH3Ae8B/wGcAZ4BlAH/BAABTQG6AYwB/wFVAcsBnAH/
|
||||
AUQBugGMAf8BhAHHAaUB/wGtAboBtRX/AaUBogH3Af8BjAGOAd4B/wGUAZIBlAH/Ac4BpgFlAf9MAAMB
|
||||
AQIDAQECA2UB5QHQAcMBsgH/AcgBwwG7Af8B1wG3AZcB/wHrAcQBnQH/AeEBvgGbAf8BzgGmAVUB/wNN
|
||||
AZEQAAG9AcMBtQX/AfcB7wHnAf8B9wHvAecB/wGtAboBtQH/Aa0BsgG1Af8BrQGyAa0B/wGlAa4BrQH/
|
||||
AaUBpgGlAf8BnAGiAZwB/wGcAZ4BlAH/AZwBlgGUAf8BlAGWAZQB/wH3Ae8B5wH/AfcB7wHnAf8BnAGe
|
||||
AZQB/wQAAW8BwwGlAf8BZwG6AZQB/wFGAa4BhAH/AcYB4wHOAf8BrQG6AbUB/wGtAbIBtQH/Aa0BsgGt
|
||||
AZQB/wQAAWUBwwGlAf8BXQG6AZQB/wE8Aa4BhAH/AcYB4wHOAf8BrQG6AbUB/wGtAbIBtQH/Aa0BsgGt
|
||||
Af8BpQGuAa0B/wGlAaYBpQH/AZwBogGcAf8BnAGeAZwB/wGcAZYBlAH/AZQBkgGUAf9XAAEBAx8BLQNc
|
||||
AckBAAErAVwB/wEvAUkBgwH/AcYBpgGHAf8DYQHuA04BmAMHAQoQAAG9AcMBtQX/Ae8B3wHWAf8B1gG+
|
||||
AckBAAEhAVIB/wElAT8BgwH/AcYBpgGHAf8DYQHuA04BmAMHAQoQAAG9AcMBtQX/Ae8B3wHWAf8B1gG+
|
||||
Aa0B/wHGAbIBpQH/AcYBsgGlAf8BzgG6AaUB/wHnAd8B1gH/AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/
|
||||
AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/AfcB7wHnAf8BnAGeAZQB/wQAAYQBwwGlAf8BbwHPAaUB/wFX
|
||||
AboBjAH/Ab0B1wHOAf8BpQHDAbUB/wFOAaYBbwH/ASUBhgFGAf8BVwGGAYQB/wE2AVEBhAH/AQABMAFn
|
||||
Af8BDAE9AW8B/wG9AaoBlAH/VwABAQMAAQEDEAEWA1ABmgEQATUBXAH/AQcBMQFcAf8DVQG1Az8BbAQA
|
||||
AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/AfcB7wHnAf8BnAGeAZQB/wQAAYQBwwGlAf8BZQHPAaUB/wFN
|
||||
AboBjAH/Ab0B1wHOAf8BpQHDAbUB/wFEAaYBZQH/ARsBhgE8Af8BTQGGAYQB/wEsAUcBhAH/AQABJgFd
|
||||
Af8BAgEzAWUB/wG9AaoBlAH/VwABAQMAAQEDEAEWA1ABmgEGASsBUgH/AQABJwFSAf8DVQG1Az8BbAQA
|
||||
AwIBAxAAAb0BwwG1Bf8BxgGuAZwR/wHWAb4BrQH/AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/AfcB7wHn
|
||||
Af8B9wHvAecB/wH3Ae8B5wH/AfcB7wHnAf8BnAGeAZQB/wgAAYwB2wGlAf8BVwGqAZQB/wFXAYIBvQH/
|
||||
AT4BXQFvAf8BVwGWAV8B/wGMAbYBpQH/ATYBYQGcAf8BLQFZAZQB/wE2AV0BjAH/AR0BRQFvAf9YAAMD
|
||||
AQQDAgEDAyEBMAFYAl8B4wEsAVMBmwH/AScBTAGTAf8BFQE7AYEB/wMkATYYAAG9AcMBtQL/AvcB/wHG
|
||||
Af8B9wHvAecB/wH3Ae8B5wH/AfcB7wHnAf8BnAGeAZQB/wgAAYwB2wGlAf8BTQGqAZQB/wFNAYIBvQH/
|
||||
ATQBUwFlAf8BTQGWAVUB/wGMAbYBpQH/ASwBVwGcAf8BIwFPAZQB/wEsAVMBjAH/ARMBOwFlAf9YAAMD
|
||||
AQQDAgEDAyEBMAFYAl8B4wEiAUkBmwH/AR0BQgGTAf8BCwExAYEB/wMkATYYAAG9AcMBtQL/AvcB/wHG
|
||||
Aa4BnBH/Ad4BwwG9Af8B9wHvAecB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBsgGl
|
||||
Af8B9wHvAecB/wGcAZ4BlAH/DAABNgFpAW8B/wFXAYIBvQH/AT4BXQFvAf8D9wH/A/cB/wFvAZ4BxgH/
|
||||
AVcBigG1Af8BRgFxAaUB/wE2AV0BjAH/WAADBAEGBAADRwGCA2IB9gFKAZABtgH/ATsBgQGnAf8BIQFJ
|
||||
Af8B9wHvAecB/wGcAZ4BlAH/DAABLAFfAWUB/wFNAYIBvQH/ATQBUwFlAf8D9wH/A/cB/wFlAZ4BxgH/
|
||||
AU0BigG1Af8BPAFnAaUB/wEsAVMBjAH/WAADBAEGBAADRwGCA2IB9gFAAZABtgH/ATEBgQGnAf8BFwE/
|
||||
AZAB/wNSAaEDBQEHFAABvQHDAbUC/wL3Af8BzgG6AaUR/wHeAcMBvQH/AfcB7wHnAf8B1gHDAbUB/wHW
|
||||
AccBvQH/AdYBxwG9Af8B1gHHAb0B/wHWAcMBtQH/AfcB7wHnAf8BnAGeAZQB/wgAAWcBhgGUAf8BPgFt
|
||||
AZwB/wGMAbIB3gH/AYQBqgHWAf8BVwFlAYQB/wGMAZYBpQH/AZQBugHeAf8BhAGuAdYB/wFXAZIBvQH/
|
||||
AS0BWQGMAf8BXwFlAWcB/1QAAwQBBgMAAQEDPwFsAVwBbwF2AfgBggGoAc4B/wFKAZEBuAH/ASwBTgGS
|
||||
Af8BEQEhATEB/wMkATUUAAG9AcMBtQP/AfcB/wHOAcMBtRH/AdYBxwG9Af8B9wHvAecB/wHWAcMBtQH/
|
||||
AdYBwwG1Af8B1gHDAbUB/wHWAccBvQH/AdYBwwG1Av8B9wHvAf8BnAGeAZQB/wgAAU4BjgGlAf8BlAG2
|
||||
Ad4B/wG1AdsC/wGlAc8C/wFXAXEBnAH/AaUBtgHGAf8BvQHbAv8BnAHHAe8B/wFfAZ4BzgH/AS0BOQFG
|
||||
Af8BLQEsASUB/1QAAwEBAgMAAQEBwwHQAdoB/wFqAXoBhAH5AZsBvwHlAf8BUwGdAccB/wErAT8BVAH/
|
||||
ARMBDwEMAf8DMgFQFAABvQHDAbUF/wHvAd8B1gH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBrgGc
|
||||
Af8B7wHfAdYB/wH3Ae8B5wH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUC/wH3
|
||||
Ae8B/wGcAZYBlAH/CAABXwGeAb0B/wGtAc8B5wH/Ad4B+wL/AaUBywH3Af8BXwGeAc4B/wHeAecB7wH/
|
||||
Aa0BvgHWAf8BhAGeAb0B/wFXAYIBnAH/AS0BLAEtAf8BRgFBAT4B/1cAAQEIAAJZAVwB9QFfAZIBpgH/
|
||||
AUkBXAGOAf8BLwEyATYB/wEZARgBFwH/AyQBNRQAAb0BwwG1Bf8B9wHvAecC/wHvAecB/wH3Ae8B5wL/
|
||||
AfcB7wH/AfcB7wHnAf8B9wHvAecH/wH3Av8C9wH/A/cB/wH3AfMB7wH/AfcB7wHnA/8B9wH/AZwBngGU
|
||||
Af8IAAFvAaoBvQH/AWcBrgHGAf8BnAHDAc4B/wGUAbYB3gH/AUYBaQGcAf8EAAHGAb4BvQH/AYQBcQFv
|
||||
Af8BVwFVAU4B/wFXAVEBTgH/XwABAQQAA0wBkgNiAekBQwE/ATwB/ANZAfIDUQGcAwQBBRQAAb0BwwG1
|
||||
Hf8BnAGeAZQB/wG9Ab4BtQH/Ab0BvgG1Af8BvQHDAbUB/wG9Ab4BtQH/Ab0BvgG1Af8BvQG+AbUB/wG9
|
||||
Ab4BtQH/CAABrQHDAcYB/wGEAccB1gH/AVcBngG1Af8BTgGWAbUB/wEtAV0BbwH/bAADCgENBAADCgEN
|
||||
BAADFQEdAygBPAMeASscAAG9AcMBtQH/Ab0BwwG1Af8BvQHDAbUB/wG9AcMBtQH/Ab0BwwG1Af8BvQHD
|
||||
AbUB/wG9AcMBtQH/Ab0BwwG1Af8BvQHDAbUB/ygAAc4C7wH/AaUB4wH3Af8BhAHLAdYB/wFvAbIBvQH/
|
||||
/wBlAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/AQAC/wHwAQcB+AEBAgAB4AEP
|
||||
AfABBwH4AwABwAEPAfABBwH4AwABwAEPAgABwAMAAcABDwIAAYABAQIAAcABDwIAAYABAwIAAeABDwIA
|
||||
AYABBwIAAcABLwIAAcABDwIAAcABPwIAAeABDwIAAdABHwIAAcABBwIAAcABHwIAAcABBwIAAcABHwIA
|
||||
AcABBwIAAdgBHwIAAcEBDwIAAegBHwIAAcEB/wIAAdQBfwEAAX8B4QH/AgAG/wIACw==
|
||||
AccBvQH/AdYBxwG9Af8B1gHHAb0B/wHWAcMBtQH/AfcB7wHnAf8BnAGeAZQB/wgAAV0BhgGUAf8BNAFj
|
||||
AZwB/wGMAbIB3gH/AYQBqgHWAf8BTQFbAYQB/wGMAZYBpQH/AZQBugHeAf8BhAGuAdYB/wFNAZIBvQH/
|
||||
ASMBTwGMAf8BVQFbAV0B/1QAAwQBBgMAAQEDPwFsAVwBXQFrAfgBggGoAc4B/wFAAZEBuAH/ASIBRAGS
|
||||
Af8BBwEXAScB/wMkATUUAAG9AcMBtQP/AfcB/wHOAcMBtRH/AdYBxwG9Af8B9wHvAecB/wHWAcMBtQH/
|
||||
AdYBwwG1Af8B1gHDAbUB/wHWAccBvQH/AdYBwwG1Av8B9wHvAf8BnAGeAZQB/wgAAUQBjgGlAf8BlAG2
|
||||
Ad4B/wG1AdsC/wGlAc8C/wFNAWcBnAH/AaUBtgHGAf8BvQHbAv8BnAHHAe8B/wFVAZ4BzgH/ASMBLwE8
|
||||
Af8BIwEiARsB/1QAAwEBAgMAAQEBwwHQAdoB/wJqAXEB+QGbAb8B5QH/AUkBnQHHAf8BIQE1AUoB/wEJ
|
||||
AQUBAgH/AzIBUBQAAb0BwwG1Bf8B7wHfAdYB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUB/wHGAa4BnAH/
|
||||
Ae8B3wHWAf8B9wHvAecB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBsgGlAv8B9wHv
|
||||
Af8BnAGWAZQB/wgAAVUBngG9Af8BrQHPAecB/wHeAfsC/wGlAcsB9wH/AVUBngHOAf8B3gHnAe8B/wGt
|
||||
Ab4B1gH/AYQBngG9Af8BTQGCAZwB/wEjASIBIwH/ATwBNwE0Af9XAAEBCAADWQH1AVUBkgGmAf8BPwFS
|
||||
AY4B/wElASgBLAH/AQ8BDgENAf8DJAE1FAABvQHDAbUF/wH3Ae8B5wL/Ae8B5wH/AfcB7wHnAv8B9wHv
|
||||
Af8B9wHvAecB/wH3Ae8B5wf/AfcC/wL3Af8D9wH/AfcB8wHvAf8B9wHvAecD/wH3Af8BnAGeAZQB/wgA
|
||||
AWUBqgG9Af8BXQGuAcYB/wGcAcMBzgH/AZQBtgHeAf8BPAFfAZwB/wQAAcYBvgG9Af8BhAFnAWUB/wFN
|
||||
AUsBRAH/AU0BRwFEAf9fAAEBBAADTAGSA2IB6QE3ATUBMgH8A1kB8gNRAZwDBAEFFAABvQHDAbUd/wGc
|
||||
AZ4BlAH/Ab0BvgG1Af8BvQG+AbUB/wG9AcMBtQH/Ab0BvgG1Af8BvQG+AbUB/wG9Ab4BtQH/Ab0BvgG1
|
||||
Af8IAAGtAcMBxgH/AYQBxwHWAf8BTQGeAbUB/wFEAZYBtQH/ASMBUwFlAf9sAAMKAQ0EAAMKAQ0EAAMV
|
||||
AR0DKAE8Ax4BKxwAAb0BwwG1Af8BvQHDAbUB/wG9AcMBtQH/Ab0BwwG1Af8BvQHDAbUB/wG9AcMBtQH/
|
||||
Ab0BwwG1Af8BvQHDAbUB/wG9AcMBtQH/KAABzgLvAf8BpQHjAfcB/wGEAcsB1gH/AWUBsgG9Af//AGUA
|
||||
AUIBTQE+BwABPgMAASgDAAFAAwABEAMAAQEBAAEBBQABgBcAA/8BAAL/AfABBwH4AQECAAHgAQ8B8AEH
|
||||
AfgDAAHAAQ8B8AEHAfgDAAHAAQ8CAAHAAwABwAEPAgABgAEBAgABwAEPAgABgAEDAgAB4AEPAgABgAEH
|
||||
AgABwAEvAgABwAEPAgABwAE/AgAB4AEPAgAB0AEfAgABwAEHAgABwAEfAgABwAEHAgABwAEfAgABwAEH
|
||||
AgAB2AEfAgABwQEPAgAB6AEfAgABwQH/AgAB1AF/AQABfwHhAf8CAAb/AgAL
|
||||
</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAoAAAAAAAEACADKTwAApgAAADAwAAABAAgAqA4AAHBQAAAgIAAAAQAIAKgIAAAYXwAAGBgAAAEA
|
||||
|
|
|
@ -81,6 +81,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
public static string ErrorMessage;
|
||||
public static bool ImportAccountsOnly;
|
||||
public static bool HasErrors;
|
||||
public static int defaultMailboxPlanId;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace WebsitePanel.Import.Enterprise
|
|||
private ProgressBar progressBar;
|
||||
private ApplicationForm appForm;
|
||||
private Button btnImport;
|
||||
|
||||
private Thread thread;
|
||||
|
||||
|
||||
|
@ -780,7 +779,32 @@ namespace WebsitePanel.Import.Enterprise
|
|||
return userId;
|
||||
}
|
||||
int mailboxType = (int)type.Value;
|
||||
|
||||
int mailboxTypeDetails = 0;
|
||||
PropertyValueCollection typeDetails = entry.Properties["msExchRecipientTypeDetails"];
|
||||
if (typeDetails!=null)
|
||||
{
|
||||
if (typeDetails.Value != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
object adsLargeInteger = typeDetails.Value;
|
||||
mailboxTypeDetails = (Int32)adsLargeInteger.GetType().InvokeMember("LowPart", System.Reflection.BindingFlags.GetProperty, null, adsLargeInteger, null);
|
||||
}
|
||||
catch { } // just skip
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ExchangeAccountType accountType = ExchangeAccountType.Undefined;
|
||||
|
||||
if (mailboxTypeDetails == 4)
|
||||
{
|
||||
Log.WriteInfo("Account type : shared mailbox");
|
||||
accountType = ExchangeAccountType.SharedMailbox;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (mailboxType)
|
||||
{
|
||||
case 1073741824:
|
||||
|
@ -798,9 +822,10 @@ namespace WebsitePanel.Import.Enterprise
|
|||
default:
|
||||
Log.WriteInfo("Account type : unknown");
|
||||
return userId;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateExchangeAccount(userId, accountName, accountType, displayName, email, false, string.Empty, samName, string.Empty);
|
||||
UpdateExchangeAccount(userId, accountName, accountType, displayName, email, false, string.Empty, samName, string.Empty, Global.defaultMailboxPlanId);
|
||||
|
||||
string defaultEmail = (string)entry.Properties["extensionAttribute3"].Value;
|
||||
|
||||
|
@ -813,12 +838,11 @@ namespace WebsitePanel.Import.Enterprise
|
|||
if (emailAddress.ToLower().StartsWith("smtp:"))
|
||||
emailAddress = emailAddress.Substring(5);
|
||||
|
||||
|
||||
if (!emailAddress.Equals(defaultEmail, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
if (EmailAddressExists(emailAddress))
|
||||
{
|
||||
if ((!emailAddress.Equals(defaultEmail, StringComparison.InvariantCultureIgnoreCase)) && (!emailAddress.Equals(email, StringComparison.InvariantCultureIgnoreCase)))
|
||||
Log.WriteInfo(string.Format("Email address {0} already exists. Skipped", emailAddress));
|
||||
|
||||
continue;
|
||||
}
|
||||
// register email address
|
||||
|
@ -826,7 +850,6 @@ namespace WebsitePanel.Import.Enterprise
|
|||
AddAccountEmailAddress(userId, emailAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.WriteEnd("User imported");
|
||||
return userId;
|
||||
|
||||
|
@ -963,7 +986,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
|
||||
private static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType,
|
||||
string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder,
|
||||
string mailboxManagerActions, string samAccountName, string accountPassword)
|
||||
string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId)
|
||||
{
|
||||
DataProvider.UpdateExchangeAccount(accountId,
|
||||
accountName,
|
||||
|
@ -973,7 +996,7 @@ namespace WebsitePanel.Import.Enterprise
|
|||
mailEnabledPublicFolder,
|
||||
mailboxManagerActions,
|
||||
samAccountName,
|
||||
CryptoUtils.Encrypt(accountPassword), 0, -1, string.Empty, false);
|
||||
CryptoUtils.Encrypt(accountPassword), mailboxPlanId , -1, string.Empty, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,6 +123,9 @@ order by rg.groupOrder
|
|||
public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage"; // Archiving
|
||||
public const string EXCHANGE2013_ARCHIVINGMAILBOXES = "Exchange2013.ArchivingMailboxes";
|
||||
|
||||
public const string EXCHANGE2013_SHAREDMAILBOXES = "Exchange2013.SharedMailboxes"; // Shared and resource mailboxes
|
||||
public const string EXCHANGE2013_RESOURCEMAILBOXES = "Exchange2013.ResourceMailboxes";
|
||||
|
||||
public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases
|
||||
public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users
|
||||
public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size
|
||||
|
|
|
@ -147,5 +147,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
get { return this.instantAliasName; }
|
||||
set { this.instantAliasName = value; }
|
||||
}
|
||||
|
||||
public DateTime? CreationDate { get; set; }
|
||||
public DateTime? ExpirationDate { get; set; }
|
||||
public DateTime? LastUpdateDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public const string HOSTED_SOLUTION_REPORT = "HostedSoluitonReportSummaryLetter";
|
||||
public const string ORGANIZATION_USER_SUMMARY_LETTER = "OrganizationUserSummaryLetter";
|
||||
public const string VPS_SUMMARY_LETTER = "VpsSummaryLetter";
|
||||
public const string DOMAIN_EXPIRATION_LETTER = "DomainExpirationLetter";
|
||||
public const string DOMAIN_LOOKUP_LETTER = "DomainLookupLetter";
|
||||
public const string WEB_POLICY = "WebPolicy";
|
||||
public const string FTP_POLICY = "FtpPolicy";
|
||||
public const string MAIL_POLICY = "MailPolicy";
|
||||
|
|
|
@ -36,6 +36,8 @@ using Microsoft.ApplicationBlocks.Data;
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.Win32;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
using WebsitePanel.Providers.DomainLookup;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
|
@ -4719,5 +4721,90 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region MX|NX Services
|
||||
|
||||
public static IDataReader GetAllPackages()
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetAllPackages"
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetDomainDnsRecords(int domainId, DnsRecordType recordType)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetDomainDnsRecords",
|
||||
new SqlParameter("@DomainId", domainId),
|
||||
new SqlParameter("@RecordType", recordType)
|
||||
);
|
||||
}
|
||||
|
||||
public static void AddDomainDnsRecord(DnsRecordInfo domainDnsRecord)
|
||||
{
|
||||
SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddDomainDnsRecord",
|
||||
new SqlParameter("@DomainId", domainDnsRecord.DomainId),
|
||||
new SqlParameter("@RecordType", domainDnsRecord.RecordType),
|
||||
new SqlParameter("@DnsServer", domainDnsRecord.DnsServer),
|
||||
new SqlParameter("@Value", domainDnsRecord.Value),
|
||||
new SqlParameter("@Date", domainDnsRecord.Date)
|
||||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetScheduleTaskEmailTemplate(string taskId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetScheduleTaskEmailTemplate",
|
||||
new SqlParameter("@taskId", taskId)
|
||||
);
|
||||
}
|
||||
|
||||
public static void DeleteDomainDnsRecord(int id)
|
||||
{
|
||||
SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"DeleteDomainDnsRecord",
|
||||
new SqlParameter("@Id", id)
|
||||
);
|
||||
}
|
||||
|
||||
public static void UpdateDomainCreationDate(int domainId, DateTime date)
|
||||
{
|
||||
UpdateDomainDate(domainId, "UpdateDomainCreationDate", date);
|
||||
}
|
||||
|
||||
public static void UpdateDomainExpirationDate(int domainId, DateTime date)
|
||||
{
|
||||
UpdateDomainDate(domainId, "UpdateDomainExpirationDate", date);
|
||||
}
|
||||
|
||||
public static void UpdateDomainLastUpdateDate(int domainId, DateTime date)
|
||||
{
|
||||
UpdateDomainDate(domainId, "UpdateDomainLastUpdateDate", date);
|
||||
}
|
||||
|
||||
private static void UpdateDomainDate(int domainId, string stroredProcedure, DateTime date)
|
||||
{
|
||||
SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
stroredProcedure,
|
||||
new SqlParameter("@DomainId", domainId),
|
||||
new SqlParameter("@Date", date)
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,6 +193,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.UsedDiskSpace = tempStats.UsedDiskSpace;
|
||||
stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace;
|
||||
stats.UsedArchingStorage = tempStats.UsedArchingStorage;
|
||||
|
||||
stats.CreatedSharedMailboxes = tempStats.CreatedSharedMailboxes;
|
||||
stats.CreatedResourceMailboxes = tempStats.CreatedResourceMailboxes;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -221,6 +224,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.UsedDiskSpace += tempStats.UsedDiskSpace;
|
||||
stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace;
|
||||
stats.UsedArchingStorage += tempStats.UsedArchingStorage;
|
||||
|
||||
stats.CreatedSharedMailboxes += tempStats.CreatedSharedMailboxes;
|
||||
stats.CreatedResourceMailboxes += tempStats.CreatedResourceMailboxes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -241,6 +247,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue;
|
||||
stats.AllocatedArchingStorage = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue;
|
||||
|
||||
stats.AllocatedSharedMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue;
|
||||
stats.AllocatedResourceMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue;
|
||||
|
||||
return stats;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -1665,8 +1674,21 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
// check mailbox quota
|
||||
OrganizationStatistics orgStats = GetOrganizationStatistics(itemId);
|
||||
if (accountType == ExchangeAccountType.SharedMailbox)
|
||||
{
|
||||
if ((orgStats.AllocatedSharedMailboxes > -1) && (orgStats.CreatedSharedMailboxes >= orgStats.AllocatedSharedMailboxes))
|
||||
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
||||
}
|
||||
else if ((accountType == ExchangeAccountType.Room) || (accountType == ExchangeAccountType.Equipment))
|
||||
{
|
||||
if ((orgStats.AllocatedResourceMailboxes > -1) && (orgStats.CreatedResourceMailboxes >= orgStats.AllocatedResourceMailboxes))
|
||||
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes))
|
||||
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
||||
}
|
||||
|
||||
|
||||
// place log record
|
||||
|
|
|
@ -40,6 +40,9 @@ using WebsitePanel.Providers;
|
|||
using WebsitePanel.Providers.OS;
|
||||
using OS = WebsitePanel.Providers.OS;
|
||||
using System.Collections;
|
||||
using WebsitePanel.Providers.DomainLookup;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
|
@ -811,5 +814,24 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Domain DNS Records lookup
|
||||
|
||||
public static List<DnsRecordInfo> GetDomainRecords(int packageId, string domain, string dnsServer, DnsRecordType recordType)
|
||||
{
|
||||
List<DnsRecordInfo> records = new List<DnsRecordInfo>();
|
||||
|
||||
// load OS service
|
||||
int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Os);
|
||||
|
||||
var os = GetOS(serviceId);
|
||||
|
||||
records = os.GetDomainDnsRecords(domain, dnsServer, recordType).ToList();
|
||||
|
||||
return records;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,186 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Mail;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using WebsitePanel.Providers.DomainLookup;
|
||||
using Whois.NET;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class DomainExpirationTask: SchedulerTask
|
||||
{
|
||||
private static readonly string TaskId = "SCHEDULE_TASK_DOMAIN_EXPIRATION";
|
||||
|
||||
// Input parameters:
|
||||
private static readonly string DaysBeforeNotify = "DAYS_BEFORE";
|
||||
private static readonly string MailToParameter = "MAIL_TO";
|
||||
private static readonly string EnableNotification = "ENABLE_NOTIFICATION";
|
||||
private static readonly string IncludeNonExistenDomains = "INCLUDE_NONEXISTEN_DOMAINS";
|
||||
|
||||
|
||||
private static readonly string MailBodyTemplateParameter = "MAIL_BODY";
|
||||
private static readonly string MailBodyDomainRecordTemplateParameter = "MAIL_DOMAIN_RECORD";
|
||||
|
||||
public override void DoWork()
|
||||
{
|
||||
BackgroundTask topTask = TaskManager.TopTask;
|
||||
var domainUsers = new Dictionary<int, UserInfo>();
|
||||
var checkedDomains = new List<int>();
|
||||
var expiredDomains = new List<DomainInfo>();
|
||||
var nonExistenDomains = new List<DomainInfo>();
|
||||
|
||||
// get input parameters
|
||||
int daysBeforeNotify;
|
||||
bool sendEmailNotifcation = Convert.ToBoolean( topTask.GetParamValue(EnableNotification));
|
||||
bool includeNonExistenDomains = Convert.ToBoolean(topTask.GetParamValue(IncludeNonExistenDomains));
|
||||
|
||||
// check input parameters
|
||||
if (String.IsNullOrEmpty((string)topTask.GetParamValue("MAIL_TO")))
|
||||
{
|
||||
TaskManager.WriteWarning("The e-mail message has not been sent because 'Mail To' is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
int.TryParse((string)topTask.GetParamValue(DaysBeforeNotify), out daysBeforeNotify);
|
||||
|
||||
var user = UserController.GetUser(topTask.EffectiveUserId);
|
||||
|
||||
var packages = GetUserPackages(user.UserId, user.Role);
|
||||
|
||||
|
||||
foreach (var package in packages)
|
||||
{
|
||||
var domains = ServerController.GetDomains(package.PackageId);
|
||||
|
||||
var subDomains = domains.Where(x => x.IsSubDomain).ToList();
|
||||
|
||||
var topLevelDomains = domains = domains.Where(x => !x.IsSubDomain && !x.IsDomainPointer).ToList(); //Selecting top-level domains
|
||||
|
||||
domains = topLevelDomains.Where(x => x.CreationDate == null || x.ExpirationDate == null ? true : CheckDomainExpiration(x.ExpirationDate, daysBeforeNotify)).ToList(); // selecting expired or with empty expire date domains
|
||||
|
||||
var domainUser = UserController.GetUser(package.UserId);
|
||||
|
||||
if (!domainUsers.ContainsKey(package.PackageId))
|
||||
{
|
||||
domainUsers.Add(package.PackageId, domainUser);
|
||||
}
|
||||
|
||||
foreach (var domain in domains)
|
||||
{
|
||||
if (checkedDomains.Contains(domain.DomainId))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
checkedDomains.Add(domain.DomainId);
|
||||
|
||||
ServerController.UpdateDomainRegistrationData(domain);
|
||||
|
||||
if (CheckDomainExpiration(domain.ExpirationDate, daysBeforeNotify))
|
||||
{
|
||||
expiredDomains.Add(domain);
|
||||
}
|
||||
|
||||
if (domain.ExpirationDate == null && domain.CreationDate == null)
|
||||
{
|
||||
nonExistenDomains.Add(domain);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var subDomain in subDomains)
|
||||
{
|
||||
var mainDomain = topLevelDomains.Where(x => subDomain.DomainName.Contains(x.DomainName)).OrderByDescending(s => s.DomainName.Length).FirstOrDefault(); ;
|
||||
|
||||
if (mainDomain != null)
|
||||
{
|
||||
ServerController.UpdateDomainRegistrationData(subDomain, mainDomain.CreationDate, mainDomain.ExpirationDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
expiredDomains = expiredDomains.GroupBy(p => p.DomainId).Select(g => g.First()).ToList();
|
||||
|
||||
if (expiredDomains.Count > 0 && sendEmailNotifcation)
|
||||
{
|
||||
SendMailMessage(user, expiredDomains, domainUsers, nonExistenDomains, includeNonExistenDomains);
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<PackageInfo> GetUserPackages(int userId,UserRole userRole)
|
||||
{
|
||||
var packages = new List<PackageInfo>();
|
||||
|
||||
switch (userRole)
|
||||
{
|
||||
case UserRole.Administrator:
|
||||
{
|
||||
packages = ObjectUtils.CreateListFromDataReader<PackageInfo>(DataProvider.GetAllPackages());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
packages = PackageController.GetMyPackages(userId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return packages;
|
||||
}
|
||||
|
||||
private bool CheckDomainExpiration(DateTime? date, int daysBeforeNotify)
|
||||
{
|
||||
if (date == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (date.Value - DateTime.Now).Days < daysBeforeNotify;
|
||||
}
|
||||
|
||||
private void SendMailMessage(UserInfo user, IEnumerable<DomainInfo> domains, Dictionary<int, UserInfo> domainUsers, IEnumerable<DomainInfo> nonExistenDomains, bool includeNonExistenDomains)
|
||||
{
|
||||
BackgroundTask topTask = TaskManager.TopTask;
|
||||
|
||||
UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.DOMAIN_EXPIRATION_LETTER);
|
||||
|
||||
string from = settings["From"];
|
||||
|
||||
var bcc = settings["CC"];
|
||||
|
||||
string subject = settings["Subject"];
|
||||
string body = user.HtmlMail ? settings["HtmlBody"] : settings["TextBody"];
|
||||
bool isHtml = user.HtmlMail;
|
||||
|
||||
MailPriority priority = MailPriority.Normal;
|
||||
if (!String.IsNullOrEmpty(settings["Priority"]))
|
||||
priority = (MailPriority)Enum.Parse(typeof(MailPriority), settings["Priority"], true);
|
||||
|
||||
// input parameters
|
||||
string mailTo = (string)topTask.GetParamValue("MAIL_TO");
|
||||
|
||||
Hashtable items = new Hashtable();
|
||||
|
||||
items["user"] = user;
|
||||
items["Domains"] = domains.Select(x => new { DomainName = x.DomainName,
|
||||
ExpirationDate = x.ExpirationDate,
|
||||
Customer = string.Format("{0} {1}", domainUsers[x.PackageId].FirstName, domainUsers[x.PackageId].LastName) });
|
||||
|
||||
items["IncludeNonExistenDomains"] = includeNonExistenDomains;
|
||||
|
||||
items["NonExistenDomains"] = nonExistenDomains.Select(x => new
|
||||
{
|
||||
DomainName = x.DomainName,
|
||||
Customer = string.Format("{0} {1}", domainUsers[x.PackageId].FirstName, domainUsers[x.PackageId].LastName)
|
||||
});
|
||||
|
||||
|
||||
body = PackageController.EvaluateTemplate(body, items);
|
||||
|
||||
// send mail message
|
||||
MailHelper.SendMessage(from, mailTo, bcc, subject, body, priority, isHtml);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,234 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Mail;
|
||||
using System.Text;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
using WebsitePanel.Providers.DomainLookup;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class DomainLookupViewTask : SchedulerTask
|
||||
{
|
||||
private static readonly string TaskId = "SCHEDULE_TASK_DOMAIN_LOOKUP";
|
||||
|
||||
// Input parameters:
|
||||
private static readonly string DnsServersParameter = "DNS_SERVERS";
|
||||
private static readonly string MailToParameter = "MAIL_TO";
|
||||
|
||||
private static readonly string MailBodyTemplateParameter = "MAIL_BODY";
|
||||
private static readonly string MailBodyDomainRecordTemplateParameter = "MAIL_DOMAIN_RECORD";
|
||||
|
||||
public override void DoWork()
|
||||
{
|
||||
BackgroundTask topTask = TaskManager.TopTask;
|
||||
|
||||
List<DomainDnsChanges> domainsChanges = new List<DomainDnsChanges>();
|
||||
|
||||
// get input parameters
|
||||
string dnsServersString = (string)topTask.GetParamValue(DnsServersParameter);
|
||||
|
||||
// check input parameters
|
||||
if (String.IsNullOrEmpty(dnsServersString))
|
||||
{
|
||||
TaskManager.WriteWarning("Specify 'DNS' task parameter.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty((string)topTask.GetParamValue("MAIL_TO")))
|
||||
{
|
||||
TaskManager.WriteWarning("The e-mail message has not been sent because 'Mail To' is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
var user = UserController.GetUser(topTask.UserId);
|
||||
|
||||
var dnsServers = dnsServersString.Split(';');
|
||||
|
||||
var packages = ObjectUtils.CreateListFromDataReader<PackageInfo>(DataProvider.GetAllPackages());
|
||||
|
||||
foreach (var package in packages)
|
||||
{
|
||||
var domains = ServerController.GetDomains(package.PackageId);
|
||||
|
||||
domains = domains.Where(x => !x.IsSubDomain && !x.IsDomainPointer).ToList(); //Selecting top-level domains
|
||||
|
||||
domains = domains.Where(x => x.ZoneItemId > 0).ToList(); //Selecting only dns enabled domains
|
||||
|
||||
foreach (var domain in domains)
|
||||
{
|
||||
if (domainsChanges.Any(x => x.DomainName == domain.DomainName))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
DomainDnsChanges domainChanges = new DomainDnsChanges();
|
||||
domainChanges.DomainName = domain.DomainName;
|
||||
|
||||
var mxRecords = ObjectUtils.CreateListFromDataReader<DnsRecordInfo>(DataProvider.GetDomainDnsRecords(domain.DomainId, DnsRecordType.MX));
|
||||
var nsRecords = ObjectUtils.CreateListFromDataReader<DnsRecordInfo>(DataProvider.GetDomainDnsRecords(domain.DomainId, DnsRecordType.NS));
|
||||
|
||||
//execute server
|
||||
foreach (var dnsServer in dnsServers)
|
||||
{
|
||||
var dnsMxRecords = OperatingSystemController.GetDomainRecords(domain.PackageId, domain.DomainName, dnsServer, DnsRecordType.MX);
|
||||
var dnsNsRecords = OperatingSystemController.GetDomainRecords(domain.PackageId, domain.DomainName, dnsServer, DnsRecordType.NS);
|
||||
|
||||
FillRecordData(dnsMxRecords, domain, dnsServer);
|
||||
FillRecordData(dnsNsRecords, domain, dnsServer);
|
||||
|
||||
domainChanges.DnsChanges.AddRange(ApplyDomainRecordsChanges(mxRecords, dnsMxRecords, dnsServer));
|
||||
domainChanges.DnsChanges.AddRange(ApplyDomainRecordsChanges(nsRecords, dnsNsRecords, dnsServer));
|
||||
}
|
||||
|
||||
domainsChanges.Add(domainChanges);
|
||||
}
|
||||
}
|
||||
|
||||
var changedDomains = FindDomainsWithChangedRecords(domainsChanges);
|
||||
|
||||
if (changedDomains.Any())
|
||||
{
|
||||
SendMailMessage(user,changedDomains);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region Helpers
|
||||
|
||||
private IEnumerable<DomainDnsChanges> FindDomainsWithChangedRecords(IEnumerable<DomainDnsChanges> domainsChanges)
|
||||
{
|
||||
var changedDomains = new List<DomainDnsChanges>();
|
||||
|
||||
foreach (var domainChanges in domainsChanges)
|
||||
{
|
||||
var firstTimeAdditon = domainChanges.DnsChanges.All(x => x.Status == DomainDnsRecordStatuses.Added);
|
||||
|
||||
if (firstTimeAdditon)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isChanged = domainChanges.DnsChanges.Any(d => d.Status != DomainDnsRecordStatuses.NotChanged);
|
||||
|
||||
if (isChanged)
|
||||
{
|
||||
changedDomains.Add(domainChanges);
|
||||
}
|
||||
}
|
||||
|
||||
return changedDomains;
|
||||
}
|
||||
|
||||
private IEnumerable<DnsRecordInfoChange> ApplyDomainRecordsChanges(List<DnsRecordInfo> dbRecords, List<DnsRecordInfo> dnsRecords, string dnsServer)
|
||||
{
|
||||
var dnsRecordChanges = new List<DnsRecordInfoChange>();
|
||||
|
||||
var filteredDbRecords = dbRecords.Where(x => x.DnsServer == dnsServer);
|
||||
|
||||
foreach (var record in filteredDbRecords)
|
||||
{
|
||||
var dnsRecord = dnsRecords.FirstOrDefault(x => x.Value == record.Value);
|
||||
|
||||
if (dnsRecord != null)
|
||||
{
|
||||
dnsRecordChanges.Add(new DnsRecordInfoChange { Record = record, Type = record.RecordType, Status = DomainDnsRecordStatuses.NotChanged, DnsServer = dnsServer });
|
||||
|
||||
dnsRecords.Remove(dnsRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
dnsRecordChanges.Add(new DnsRecordInfoChange { Record = record, Type = record.RecordType, Status = DomainDnsRecordStatuses.Removed, DnsServer = dnsServer });
|
||||
|
||||
RemoveRecord(record);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var record in dnsRecords)
|
||||
{
|
||||
dnsRecordChanges.Add(new DnsRecordInfoChange { Record = record, Type = record.RecordType, Status = DomainDnsRecordStatuses.Added, DnsServer= dnsServer});
|
||||
|
||||
AddRecord(record);
|
||||
}
|
||||
|
||||
return dnsRecordChanges;
|
||||
}
|
||||
|
||||
private void FillRecordData(IEnumerable<DnsRecordInfo> records, DomainInfo domain, string dnsServer)
|
||||
{
|
||||
foreach (var record in records)
|
||||
{
|
||||
FillRecordData(record, domain, dnsServer);
|
||||
}
|
||||
}
|
||||
|
||||
private void FillRecordData(DnsRecordInfo record, DomainInfo domain, string dnsServer)
|
||||
{
|
||||
record.DomainId = domain.DomainId;
|
||||
record.Date = DateTime.Now;
|
||||
record.DnsServer = dnsServer;
|
||||
}
|
||||
|
||||
private void RemoveRecords(IEnumerable<DnsRecordInfo> dnsRecords)
|
||||
{
|
||||
foreach (var record in dnsRecords)
|
||||
{
|
||||
RemoveRecord(record);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveRecord(DnsRecordInfo dnsRecord)
|
||||
{
|
||||
DataProvider.DeleteDomainDnsRecord(dnsRecord.Id);
|
||||
}
|
||||
|
||||
private void AddRecords(IEnumerable<DnsRecordInfo> dnsRecords)
|
||||
{
|
||||
foreach (var record in dnsRecords)
|
||||
{
|
||||
AddRecord(record);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddRecord(DnsRecordInfo dnsRecord)
|
||||
{
|
||||
DataProvider.AddDomainDnsRecord(dnsRecord);
|
||||
}
|
||||
|
||||
private void SendMailMessage(UserInfo user, IEnumerable<DomainDnsChanges> domainsChanges)
|
||||
{
|
||||
BackgroundTask topTask = TaskManager.TopTask;
|
||||
|
||||
UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.DOMAIN_LOOKUP_LETTER);
|
||||
|
||||
string from = settings["From"];
|
||||
|
||||
var bcc = settings["CC"];
|
||||
|
||||
string subject = settings["Subject"];
|
||||
string body = user.HtmlMail ? settings["HtmlBody"] : settings["TextBody"];
|
||||
bool isHtml = user.HtmlMail;
|
||||
|
||||
MailPriority priority = MailPriority.Normal;
|
||||
if (!String.IsNullOrEmpty(settings["Priority"]))
|
||||
priority = (MailPriority)Enum.Parse(typeof(MailPriority), settings["Priority"], true);
|
||||
|
||||
// input parameters
|
||||
string mailTo = (string)topTask.GetParamValue("MAIL_TO");
|
||||
|
||||
Hashtable items = new Hashtable();
|
||||
|
||||
items["user"] = user;
|
||||
items["Domains"] = domainsChanges;
|
||||
|
||||
body = PackageController.EvaluateTemplate(body, items);
|
||||
|
||||
// send mail message
|
||||
MailHelper.SendMessage(from, mailTo, bcc, subject, body, priority, isHtml);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -39,6 +39,8 @@ using WebsitePanel.Server;
|
|||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.Web;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using Whois.NET;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
|
@ -49,6 +51,24 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
private const string LOG_SOURCE_SERVERS = "SERVERS";
|
||||
|
||||
private static List<string> _createdDatePatterns = new List<string> { @"Creation Date:(.+)", // base
|
||||
@"created:(.+)",
|
||||
@"Created On:(.+)",
|
||||
@"Domain Registration Date:(.+)",
|
||||
@"Domain Create Date:(.+)",
|
||||
@"Registered on:(.+)"};
|
||||
|
||||
private static List<string> _expiredDatePatterns = new List<string> { @"Expiration Date:(.+)", // base
|
||||
@"Registry Expiry Date:(.+)", //.org
|
||||
@"paid-till:(.+)", //.ru
|
||||
@"Expires On:(.+)", //.name
|
||||
@"Domain Expiration Date:(.+)", //.us
|
||||
@"renewal date:(.+)", //.pl
|
||||
@"Expiry date:(.+)", //.uk
|
||||
@"anniversary:(.+)", //.fr
|
||||
@"expires:(.+)" //.fi
|
||||
};
|
||||
|
||||
#region Servers
|
||||
public static List<ServerInfo> GetAllServers()
|
||||
{
|
||||
|
@ -1787,6 +1807,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS, domain, "");
|
||||
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPSForPC, domain, "");
|
||||
}
|
||||
|
||||
UpdateDomainRegistrationData(domain);
|
||||
}
|
||||
|
||||
// add instant alias
|
||||
|
@ -2637,6 +2659,67 @@ namespace WebsitePanel.EnterpriseServer
|
|||
TaskManager.CompleteTask();
|
||||
}
|
||||
}
|
||||
|
||||
public static DomainInfo UpdateDomainRegistrationData(DomainInfo domain)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataProvider.UpdateDomainLastUpdateDate(domain.DomainId, DateTime.Now);
|
||||
|
||||
var whoisResult = WhoisClient.Query(domain.DomainName);
|
||||
|
||||
var createdDate = GetDomainInfoDate(whoisResult.Raw, _createdDatePatterns);
|
||||
var expiredDate = GetDomainInfoDate(whoisResult.Raw, _expiredDatePatterns);
|
||||
|
||||
if (createdDate != null)
|
||||
{
|
||||
domain.CreationDate = createdDate;
|
||||
DataProvider.UpdateDomainCreationDate(domain.DomainId, createdDate.Value);
|
||||
}
|
||||
|
||||
if (expiredDate != null)
|
||||
{
|
||||
domain.ExpirationDate = expiredDate;
|
||||
DataProvider.UpdateDomainExpirationDate(domain.DomainId, expiredDate.Value);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//wrong domain
|
||||
}
|
||||
|
||||
return domain;
|
||||
}
|
||||
|
||||
public static DomainInfo UpdateDomainRegistrationData(DomainInfo domain, DateTime? creationDate, DateTime? expirationDate)
|
||||
{
|
||||
domain.CreationDate = creationDate;
|
||||
DataProvider.UpdateDomainCreationDate(domain.DomainId, creationDate.Value);
|
||||
domain.ExpirationDate = expirationDate;
|
||||
DataProvider.UpdateDomainExpirationDate(domain.DomainId, expirationDate.Value);
|
||||
DataProvider.UpdateDomainLastUpdateDate(domain.DomainId, DateTime.Now);
|
||||
|
||||
return domain;
|
||||
}
|
||||
|
||||
private static DateTime? GetDomainInfoDate(string raw, IEnumerable<string> patterns)
|
||||
{
|
||||
foreach (var createdRegex in patterns)
|
||||
{
|
||||
var regex = new Regex(createdRegex, RegexOptions.IgnoreCase);
|
||||
|
||||
foreach (Match match in regex.Matches(raw))
|
||||
{
|
||||
if (match.Success && match.Groups.Count == 2)
|
||||
{
|
||||
return DateTime.Parse(match.Groups[1].ToString().Trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DNS Zones
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
<Reference Include="Ionic.Zip.Reduced">
|
||||
<HintPath>..\..\Lib\Ionic.Zip.Reduced.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IPAddressRange">
|
||||
<HintPath>..\..\Lib\References\Whois.NET\IPAddressRange.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Services3">
|
||||
<HintPath>..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -62,6 +65,9 @@
|
|||
<Reference Include="WebsitePanel.Server.Client">
|
||||
<HintPath>..\..\Bin\WebsitePanel.Server.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WhoisClient">
|
||||
<HintPath>..\..\Lib\References\Whois.NET\WhoisClient.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Comments\CommentsController.cs" />
|
||||
|
@ -140,9 +146,11 @@
|
|||
<Compile Include="SchedulerTasks\CalculatePackagesDiskspaceTask.cs" />
|
||||
<Compile Include="SchedulerTasks\CancelOverdueInvoicesTask.cs" />
|
||||
<Compile Include="SchedulerTasks\CheckWebSiteTask.cs" />
|
||||
<Compile Include="SchedulerTasks\DomainExpirationTask.cs" />
|
||||
<Compile Include="SchedulerTasks\FTPFilesTask.cs" />
|
||||
<Compile Include="SchedulerTasks\GenerateInvoicesTask.cs" />
|
||||
<Compile Include="SchedulerTasks\HostedSolutionReport.cs" />
|
||||
<Compile Include="SchedulerTasks\DomainLookupViewTask.cs" />
|
||||
<Compile Include="SchedulerTasks\NotifyOverusedDatabasesTask.cs" />
|
||||
<Compile Include="SchedulerTasks\RunPaymentQueueTask.cs" />
|
||||
<Compile Include="SchedulerTasks\RunSystemCommandTask.cs" />
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
|
||||
namespace WebsitePanel.Providers.DomainLookup
|
||||
{
|
||||
public class DnsRecordInfo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int DomainId { get; set; }
|
||||
public string DnsServer { get; set; }
|
||||
public DnsRecordType RecordType { get; set; }
|
||||
public string Value { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
|
||||
namespace WebsitePanel.Providers.DomainLookup
|
||||
{
|
||||
public class DnsRecordInfoChange
|
||||
{
|
||||
public string DnsServer { get; set; }
|
||||
public DnsRecordInfo Record { get; set; }
|
||||
public DomainDnsRecordStatuses Status { get; set; }
|
||||
public DnsRecordType Type { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.DomainLookup
|
||||
{
|
||||
public class DomainDnsChanges
|
||||
{
|
||||
public string DomainName { get; set; }
|
||||
|
||||
public List<DnsRecordInfoChange> DnsChanges { get; set; }
|
||||
|
||||
public DomainDnsChanges()
|
||||
{
|
||||
DnsChanges = new List<DnsRecordInfoChange>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.DomainLookup
|
||||
{
|
||||
public enum DomainDnsRecordStatuses
|
||||
{
|
||||
NotChanged,
|
||||
Removed,
|
||||
Added
|
||||
}
|
||||
}
|
|
@ -39,7 +39,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
Equipment = 6,
|
||||
User = 7,
|
||||
SecurityGroup = 8,
|
||||
DefaultSecurityGroup = 9
|
||||
|
||||
DefaultSecurityGroup = 9,
|
||||
SharedMailbox = 10
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,15 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
int itemId;
|
||||
int mailboxPlanId;
|
||||
string mailboxPlan;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (mailboxPlan != null)
|
||||
return mailboxPlan;
|
||||
|
||||
return base.ToString();
|
||||
}
|
||||
|
||||
int mailboxSizeMB;
|
||||
int maxRecipients;
|
||||
int maxSendMessageSizeKB;
|
||||
|
@ -63,7 +72,6 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
string litigationHoldUrl;
|
||||
string litigationHoldMsg;
|
||||
|
||||
|
||||
public int ItemId
|
||||
{
|
||||
get { return this.itemId; }
|
||||
|
|
|
@ -341,6 +341,36 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
get { return usedArchingStorage; }
|
||||
set { usedArchingStorage = value; }
|
||||
}
|
||||
|
||||
int allocatedSharedMailboxes;
|
||||
public int AllocatedSharedMailboxes
|
||||
{
|
||||
get { return allocatedSharedMailboxes; }
|
||||
set { allocatedSharedMailboxes = value; }
|
||||
}
|
||||
|
||||
int createdSharedMailboxes;
|
||||
public int CreatedSharedMailboxes
|
||||
{
|
||||
get { return createdSharedMailboxes; }
|
||||
set { createdSharedMailboxes = value; }
|
||||
}
|
||||
|
||||
int allocatedResourceMailboxes;
|
||||
public int AllocatedResourceMailboxes
|
||||
{
|
||||
get { return allocatedResourceMailboxes; }
|
||||
set { allocatedResourceMailboxes = value; }
|
||||
}
|
||||
|
||||
int createdResourceMailboxes;
|
||||
public int CreatedResourceMailboxes
|
||||
{
|
||||
get { return createdResourceMailboxes; }
|
||||
set { createdResourceMailboxes = value; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
using WebsitePanel.Providers.DomainLookup;
|
||||
|
||||
namespace WebsitePanel.Providers.OS
|
||||
{
|
||||
|
@ -88,5 +91,8 @@ namespace WebsitePanel.Providers.OS
|
|||
|
||||
// File Services
|
||||
bool CheckFileServicesInstallation();
|
||||
|
||||
//DNS
|
||||
DnsRecordInfo[] GetDomainDnsRecords(string domain, string dnsServer, DnsRecordType recordType);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,6 +85,10 @@
|
|||
<Compile Include="Common\ErrorCodes.cs" />
|
||||
<Compile Include="Common\PasswdHelper.cs" />
|
||||
<Compile Include="Common\WPIEntries.cs" />
|
||||
<Compile Include="DomainLookup\DnsRecordInfo.cs" />
|
||||
<Compile Include="DomainLookup\DnsRecordInfoChange.cs" />
|
||||
<Compile Include="DomainLookup\DomainDnsChanges.cs" />
|
||||
<Compile Include="DomainLookup\DomainDnsRecordStatuses.cs" />
|
||||
<Compile Include="EnterpriseStorage\IEnterpriseStorage.cs" />
|
||||
<Compile Include="HeliconZoo\IHeliconZooServer.cs" />
|
||||
<Compile Include="HostedSolution\BaseReport.cs" />
|
||||
|
|
|
@ -1942,6 +1942,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
cmd.Parameters.Add("Equipment");
|
||||
else if (accountType == ExchangeAccountType.Room)
|
||||
cmd.Parameters.Add("Room");
|
||||
else if (accountType == ExchangeAccountType.SharedMailbox)
|
||||
cmd.Parameters.Add("Shared");
|
||||
|
||||
|
||||
result = ExecuteShellCommand(runSpace, cmd);
|
||||
|
||||
|
|
|
@ -369,6 +369,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
cmd.Parameters.Add("Equipment");
|
||||
else if (accountType == ExchangeAccountType.Room)
|
||||
cmd.Parameters.Add("Room");
|
||||
else if (accountType == ExchangeAccountType.SharedMailbox)
|
||||
cmd.Parameters.Add("Shared");
|
||||
|
||||
result = ExecuteShellCommand(runSpace, cmd);
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ using Microsoft.Win32;
|
|||
|
||||
using WebsitePanel.Server.Utils;
|
||||
using WebsitePanel.Providers.Utils;
|
||||
using WebsitePanel.Providers.DomainLookup;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
|
||||
namespace WebsitePanel.Providers.OS
|
||||
{
|
||||
|
@ -744,6 +746,10 @@ namespace WebsitePanel.Providers.OS
|
|||
}
|
||||
#endregion
|
||||
|
||||
public virtual DnsRecordInfo[] GetDomainDnsRecords(string domain, string dnsServer, DnsRecordType recordType)
|
||||
{
|
||||
return new DnsRecordInfo[0];
|
||||
}
|
||||
|
||||
public override bool IsInstalled()
|
||||
{
|
||||
|
|
|
@ -49,6 +49,9 @@ using System.Management.Automation.Runspaces;
|
|||
using WebsitePanel.Providers.Common;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using WebsitePanel.Providers.DomainLookup;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
|
||||
|
||||
namespace WebsitePanel.Providers.OS
|
||||
|
@ -296,6 +299,74 @@ namespace WebsitePanel.Providers.OS
|
|||
ExecuteShellCommand(runSpace, cmd, false);
|
||||
}
|
||||
|
||||
#region Domain LookUp
|
||||
|
||||
public override DnsRecordInfo[] GetDomainDnsRecords(string domain, string dnsServer, DnsRecordType recordType)
|
||||
{
|
||||
List<DnsRecordInfo> records = new List<DnsRecordInfo>();
|
||||
|
||||
Runspace runSpace = null;
|
||||
|
||||
try
|
||||
{
|
||||
runSpace = OpenRunspace();
|
||||
|
||||
Command cmd = new Command("Resolve-DnsName");
|
||||
cmd.Parameters.Add("Name", domain);
|
||||
cmd.Parameters.Add("Server", dnsServer);
|
||||
cmd.Parameters.Add("Type", recordType.ToString());
|
||||
|
||||
var dnsRecordsPs = ExecuteShellCommand(runSpace, cmd, false);
|
||||
|
||||
if (dnsRecordsPs != null)
|
||||
{
|
||||
foreach (var dnsRecordPs in dnsRecordsPs)
|
||||
{
|
||||
DnsRecordInfo newRecord = null;
|
||||
|
||||
switch (recordType)
|
||||
{
|
||||
case DnsRecordType.MX: { newRecord = CreateDnsRecordFromPsObject(dnsRecordPs, "NameExchange"); break; }
|
||||
case DnsRecordType.NS: { newRecord = CreateDnsRecordFromPsObject(dnsRecordPs, "NameHost"); break; }
|
||||
default: continue;
|
||||
}
|
||||
|
||||
if (newRecord != null)
|
||||
{
|
||||
newRecord.DnsServer = dnsServer;
|
||||
newRecord.RecordType = recordType;
|
||||
|
||||
records.Add(newRecord);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
CloseRunspace(runSpace);
|
||||
}
|
||||
|
||||
return records.ToArray();
|
||||
}
|
||||
|
||||
private DnsRecordInfo CreateDnsRecordFromPsObject(PSObject psObject, string valueName)
|
||||
{
|
||||
if (!psObject.Members.Any(x => x.Name == valueName))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var dnsRecord = new DnsRecordInfo
|
||||
{
|
||||
Value = Convert.ToString(GetPSObjectProperty(psObject, valueName)),
|
||||
};
|
||||
|
||||
return dnsRecord;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PowerShell integration
|
||||
private static InitialSessionState session = null;
|
||||
|
||||
|
|
|
@ -49,14 +49,6 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
// We need to move it into "WebHosting" store
|
||||
// Get certificate
|
||||
var servercert = GetServerCertificates(StoreName.My.ToString()).Single(c => c.FriendlyName == cert.FriendlyName);
|
||||
if (UseCCS)
|
||||
{
|
||||
// Delete existing certificate, if any. This is needed to install a new binding
|
||||
if (CheckCertificate(website))
|
||||
{
|
||||
DeleteCertificate(GetCurrentSiteCertificate(website), website);
|
||||
}
|
||||
}
|
||||
|
||||
// Get certificate data - the one we just added to "Personal" store
|
||||
var storeMy = new X509Store(StoreName.My, StoreLocation.LocalMachine);
|
||||
|
@ -64,6 +56,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
X509CertificateCollection existCerts2 = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false);
|
||||
var certData = existCerts2[0].Export(X509ContentType.Pfx);
|
||||
storeMy.Close();
|
||||
var x509Cert = new X509Certificate2(certData);
|
||||
|
||||
if (UseCCS)
|
||||
{
|
||||
|
@ -74,7 +67,6 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
{
|
||||
// Add new certificate to "WebHosting" store
|
||||
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
||||
var x509Cert = new X509Certificate2(certData);
|
||||
store.Open(OpenFlags.ReadWrite);
|
||||
store.Add(x509Cert);
|
||||
store.Close();
|
||||
|
@ -85,6 +77,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
X509CertificateCollection existCerts = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false);
|
||||
storeMy.Remove((X509Certificate2)existCerts[0]);
|
||||
storeMy.Close();
|
||||
|
||||
// Fill object with certificate data
|
||||
cert.SerialNumber = servercert.SerialNumber;
|
||||
cert.ValidFrom = servercert.ValidFrom;
|
||||
|
@ -99,7 +92,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
DeleteCertificate(GetCurrentSiteCertificate(website), website);
|
||||
}
|
||||
|
||||
AddBinding(cert, website);
|
||||
AddBinding(x509Cert, website);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -113,8 +106,10 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
|
||||
public new List<SSLCertificate> GetServerCertificates()
|
||||
{
|
||||
// Use Web Hosting store - new for IIS 8.0
|
||||
return GetServerCertificates(CertificateStoreName);
|
||||
// Get certificates from both WebHosting and My (Personal) store
|
||||
var certificates = GetServerCertificates(CertificateStoreName);
|
||||
certificates.AddRange(GetServerCertificates(StoreName.My.ToString()));
|
||||
return certificates;
|
||||
}
|
||||
|
||||
public new SSLCertificate ImportCertificate(WebSite website)
|
||||
|
@ -134,12 +129,12 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
};
|
||||
}
|
||||
|
||||
return certificate;
|
||||
return certificate ?? (new SSLCertificate {Success = false, Certificate = "No certificate in binding on server, please remove or edit binding"});
|
||||
}
|
||||
|
||||
public new SSLCertificate InstallPfx(byte[] certificate, string password, WebSite website)
|
||||
{
|
||||
SSLCertificate newcert, oldcert = null;
|
||||
SSLCertificate newcert = null, oldcert = null;
|
||||
|
||||
// Ensure we perform operations safely and preserve the original state during all manipulations, save the oldcert if one is used
|
||||
if (CheckCertificate(website))
|
||||
|
@ -170,7 +165,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
writer.Write(certData);
|
||||
writer.Flush();
|
||||
writer.Close();
|
||||
// Certificated saved
|
||||
// Certificate saved
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -189,7 +184,6 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
try
|
||||
{
|
||||
store.Open(OpenFlags.ReadWrite);
|
||||
|
||||
store.Add(x509Cert);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -207,79 +201,35 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
// Step 2: Instantiate a copy of new X.509 certificate
|
||||
try
|
||||
{
|
||||
store.Open(OpenFlags.ReadWrite);
|
||||
newcert = GetSSLCertificateFromX509Certificate2(x509Cert);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!UseCCS)
|
||||
{
|
||||
// Rollback X.509 store changes
|
||||
store.Remove(x509Cert);
|
||||
}
|
||||
// Log error
|
||||
Log.WriteError("SSLModuleService could not instantiate a copy of new X.509 certificate. All previous changes have been rolled back.", ex);
|
||||
// Re-throw
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
store.Close();
|
||||
HandleExceptionAndRollbackCertificate(store, x509Cert, null, website, "SSLModuleService could not instantiate a copy of new X.509 certificate.", ex);
|
||||
}
|
||||
|
||||
if (!UseCCS)
|
||||
{
|
||||
// Step 3: Remove old certificate from the web site if any
|
||||
try
|
||||
{
|
||||
store.Open(OpenFlags.ReadWrite);
|
||||
// Check if certificate already exists, remove it.
|
||||
if (oldcert != null)
|
||||
{
|
||||
DeleteCertificate(oldcert, website);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Rollback X.509 store changes
|
||||
store.Remove(x509Cert);
|
||||
// Log the error
|
||||
Log.WriteError(
|
||||
String.Format("SSLModuleService could not remove existing certificate from '{0}' web site. All changes have been rolled back.", website.Name), ex);
|
||||
// Re-throw
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
store.Close();
|
||||
}
|
||||
HandleExceptionAndRollbackCertificate(store, x509Cert, null, website, string.Format("SSLModuleService could not remove existing certificate from '{0}' web site.", website.Name), ex);
|
||||
}
|
||||
|
||||
// Step 4: Register new certificate with HTTPS binding on the web site
|
||||
try
|
||||
{
|
||||
//if (!UseCCS)
|
||||
//{
|
||||
// store.Open(OpenFlags.ReadWrite);
|
||||
//}
|
||||
|
||||
AddBinding(newcert, website);
|
||||
AddBinding(x509Cert, website);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!UseCCS)
|
||||
{
|
||||
// Install old certificate back if any
|
||||
store.Open(OpenFlags.ReadWrite);
|
||||
if (oldcert != null)
|
||||
InstallCertificate(oldcert, website);
|
||||
// Rollback X.509 store changes
|
||||
store.Remove(x509Cert);
|
||||
store.Close();
|
||||
}
|
||||
// Log the error
|
||||
Log.WriteError(
|
||||
String.Format("SSLModuleService could not add new X.509 certificate to '{0}' web site. All changes have been rolled back.", website.Name), ex);
|
||||
// Re-throw
|
||||
throw;
|
||||
HandleExceptionAndRollbackCertificate(store, x509Cert, oldcert, website, String.Format("SSLModuleService could not add new X.509 certificate to '{0}' web site.", website.Name), ex);
|
||||
}
|
||||
|
||||
return newcert;
|
||||
|
@ -319,23 +269,39 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
}
|
||||
|
||||
|
||||
public new void AddBinding(SSLCertificate certificate, WebSite website)
|
||||
public void AddBinding(X509Certificate2 certificate, WebSite website)
|
||||
{
|
||||
using (var srvman = GetServerManager())
|
||||
{
|
||||
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
||||
store.Open(OpenFlags.ReadOnly);
|
||||
|
||||
// Look for dedicated ip
|
||||
var dedicatedIp = SiteHasBindingWithDedicatedIp(srvman, website);
|
||||
|
||||
var bindingInformation = string.Format("{0}:443:{1}", website.SiteIPAddress, dedicatedIp ? "" : certificate.Hostname);
|
||||
// Look for all the hostnames this certificate is valid for if we are using SNI
|
||||
var hostNames = new List<string>();
|
||||
|
||||
if (!dedicatedIp)
|
||||
{
|
||||
hostNames.AddRange(certificate.Extensions.Cast<X509Extension>()
|
||||
.Where(e => e.Oid.Value == "2.5.29.17") // Subject Alternative Names
|
||||
.SelectMany(e => e.Format(true).Split(new[] {"\r\n", "\n", "\n"}, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Split('=')[1])));
|
||||
}
|
||||
|
||||
var simpleName = certificate.GetNameInfo(X509NameType.SimpleName, false);
|
||||
if (hostNames.All(h => h != simpleName))
|
||||
{
|
||||
hostNames.Add(simpleName);
|
||||
}
|
||||
|
||||
// For every hostname (only one if using old school dedicated IP binding)
|
||||
foreach (var hostName in hostNames)
|
||||
{
|
||||
var bindingInformation = string.Format("{0}:443:{1}", website.SiteIPAddress ?? "*", dedicatedIp ? "" : hostName);
|
||||
|
||||
Binding siteBinding = UseCCS ?
|
||||
srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, "https") :
|
||||
srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, certificate.Hash, store.Name);
|
||||
srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, certificate.GetCertHash(), CertificateStoreName);
|
||||
|
||||
if (UseSNI)
|
||||
if (UseSNI && !dedicatedIp)
|
||||
{
|
||||
siteBinding.SslFlags |= SslFlags.Sni;
|
||||
}
|
||||
|
@ -343,8 +309,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
{
|
||||
siteBinding.SslFlags |= SslFlags.CentralCertStore;
|
||||
}
|
||||
|
||||
store.Close();
|
||||
}
|
||||
|
||||
srvman.CommitChanges();
|
||||
}
|
||||
|
@ -352,7 +317,9 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
|
||||
public new ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website)
|
||||
{
|
||||
var result = new ResultObject() { IsSuccess = true };
|
||||
// This method removes all https bindings and all certificates associated with them.
|
||||
// Old implementation (IIS70) removed a single binding (there could not be more than one) and the first certificate that matched via serial number
|
||||
var result = new ResultObject { IsSuccess = true };
|
||||
|
||||
if (certificate == null)
|
||||
{
|
||||
|
@ -361,9 +328,19 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
|
||||
try
|
||||
{
|
||||
// Regardless of the CCS setting on the server, we try to find and remove the certificate from both CCS and WebHosting Store.
|
||||
// This is because we don't know how this was set when the certificate was added
|
||||
var certificatesAndStoreNames = new List<Tuple<string, byte[]>>();
|
||||
|
||||
// User servermanager to get aLL SSL-bindings on this website and try to remove the certificates used
|
||||
using (var srvman = GetServerManager())
|
||||
{
|
||||
|
||||
var site = srvman.Sites[website.Name];
|
||||
var bindings = site.Bindings.Where(b => b.Protocol == "https");
|
||||
|
||||
foreach (Binding binding in bindings.ToList())
|
||||
{
|
||||
if (binding.SslFlags.HasFlag(SslFlags.CentralCertStore))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(CCSUncPath) && Directory.Exists(CCSUncPath))
|
||||
{
|
||||
// This is where it will be if CCS is used
|
||||
|
@ -372,24 +349,49 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
{
|
||||
File.Delete(path);
|
||||
}
|
||||
|
||||
// If binding with hostname, also try to delete with the hostname in the binding
|
||||
// This is because if SNI is used, several bindings are created for every valid name in the cerificate, but only one name exists in the SSLCertificate
|
||||
if (!string.IsNullOrEmpty(binding.Host))
|
||||
{
|
||||
path = GetCCSPath(binding.Host);
|
||||
if (File.Exists(path))
|
||||
{
|
||||
File.Delete(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var certificateAndStoreName = new Tuple<string, byte[]>(binding.CertificateStoreName, binding.CertificateHash);
|
||||
|
||||
if (!string.IsNullOrEmpty(binding.CertificateStoreName) && !certificatesAndStoreNames.Contains(certificateAndStoreName))
|
||||
{
|
||||
certificatesAndStoreNames.Add(certificateAndStoreName);
|
||||
}
|
||||
}
|
||||
|
||||
// Now delete all certs with the same serialnumber in WebHosting Store
|
||||
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
||||
// Remove binding from site
|
||||
site.Bindings.Remove(binding);
|
||||
}
|
||||
|
||||
srvman.CommitChanges();
|
||||
|
||||
foreach (var certificateAndStoreName in certificatesAndStoreNames)
|
||||
{
|
||||
// Delete all certs with the same serialnumber in Store
|
||||
var store = new X509Store(certificateAndStoreName.Item1, StoreLocation.LocalMachine);
|
||||
store.Open(OpenFlags.MaxAllowed);
|
||||
|
||||
var certs = store.Certificates.Find(X509FindType.FindBySerialNumber, certificate.SerialNumber, false);
|
||||
var certs = store.Certificates.Find(X509FindType.FindByThumbprint, BitConverter.ToString(certificateAndStoreName.Item2).Replace("-", ""), false);
|
||||
foreach (var cert in certs)
|
||||
{
|
||||
store.Remove(cert);
|
||||
}
|
||||
|
||||
store.Close();
|
||||
|
||||
// Remove binding from site
|
||||
if (CheckCertificate(website))
|
||||
{
|
||||
RemoveBinding(certificate, website);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -409,8 +411,6 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
var site = srvman.Sites[website.SiteId];
|
||||
var sslBinding = site.Bindings.First(b => b.Protocol == "https");
|
||||
|
||||
X509Certificate2 cert = null;
|
||||
|
||||
// If the certificate is in the central store
|
||||
if (((SslFlags)Enum.Parse(typeof(SslFlags), sslBinding["sslFlags"].ToString())).HasFlag(SslFlags.CentralCertStore))
|
||||
{
|
||||
|
@ -423,23 +423,19 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
// Read certificate data from file
|
||||
var certData = new byte[fileStream.Length];
|
||||
fileStream.Read(certData, 0, (int) fileStream.Length);
|
||||
cert = new X509Certificate2(certData, CCSCommonPassword);
|
||||
var cert = new X509Certificate2(certData, CCSCommonPassword);
|
||||
fileStream.Close();
|
||||
return GetSSLCertificateFromX509Certificate2(cert);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var currentHash = sslBinding.CertificateHash;
|
||||
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
||||
store.Open(OpenFlags.ReadOnly);
|
||||
|
||||
cert = store.Certificates.Cast<X509Certificate2>().Single(c => Convert.ToBase64String(c.GetCertHash()) == Convert.ToBase64String(currentHash));
|
||||
|
||||
store.Close();
|
||||
var currentHash = Convert.ToBase64String(sslBinding.CertificateHash);
|
||||
return GetServerCertificates().FirstOrDefault(c => Convert.ToBase64String(c.Hash) == currentHash);
|
||||
}
|
||||
}
|
||||
|
||||
return GetSSLCertificateFromX509Certificate2(cert);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static List<SSLCertificate> GetServerCertificates(string certificateStoreName)
|
||||
|
@ -504,5 +500,33 @@ namespace WebsitePanel.Providers.Web.Iis
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleExceptionAndRollbackCertificate(X509Store store, X509Certificate2 x509Cert, SSLCertificate oldCert, WebSite webSite, string errorMessage, Exception ex)
|
||||
{
|
||||
if (!UseCCS)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Rollback X.509 store changes
|
||||
store.Open(OpenFlags.ReadWrite);
|
||||
store.Remove(x509Cert);
|
||||
store.Close();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Log.WriteError("SSLModuleService could not rollback and remove certificate from store", ex);
|
||||
}
|
||||
|
||||
// Install old certificate back if any
|
||||
if (oldCert != null)
|
||||
InstallCertificate(oldCert, webSite);
|
||||
}
|
||||
|
||||
// Log the error
|
||||
Log.WriteError(errorMessage + " All changes have been rolled back.", ex);
|
||||
|
||||
// Re-throw
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<connectionStrings>
|
||||
<add name="EnterpriseServer" connectionString="Server=VITALIK-VAIO\SQL2008R2;Database=WebsitePanel;Trusted_Connection=Yes;" providerName="System.Data.SqlClient"/>
|
||||
<add name="EnterpriseServer" connectionString="server=dev-sql;database=WebsitePanel;uid=WebsitePanel;pwd=sbbk40q85dc7jzj8b5kn;" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -38,6 +38,9 @@ using Microsoft.Web.Services3;
|
|||
using WebsitePanel.Providers;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using WebsitePanel.Server.Utils;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
using WebsitePanel.Providers.DomainLookup;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WebsitePanel.Server
|
||||
{
|
||||
|
@ -737,5 +740,26 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Dns
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public DnsRecordInfo[] GetDomainDnsRecords(string domain, string dnsServer, DnsRecordType recordType)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetDomainDnsRecords", ProviderSettings.ProviderName);
|
||||
var result = OsProvider.GetDomainDnsRecords(domain, dnsServer, recordType);
|
||||
Log.WriteEnd("'{0}' GetDomainDnsRecords", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' GetDomainDnsRecords", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5593,7 +5593,32 @@
|
|||
<data name="Error.RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED" xml:space="preserve">
|
||||
<value>Error creating rds collection. You need to add at least 1 rds server to collection</value>
|
||||
</data>
|
||||
<data name="Error.RDS_UNASSIGN_SERVER_FROM_ORG_SERVER_IS_IN_COLLECTION" xml:space="preserve">
|
||||
<value>Error deleting rds server from organization: server is used in rds collection</value>
|
||||
<data name="Quota.Exchange2013.ResourceMailboxes" xml:space="preserve">
|
||||
<value>Resource Mailboxes per Organization</value>
|
||||
</data>
|
||||
<data name="Quota.Exchange2013.SharedMailboxes" xml:space="preserve">
|
||||
<value>Shared Mailboxes per Organization</value>
|
||||
</data>
|
||||
<data name="RoomMailbox.Text" xml:space="preserve">
|
||||
<value> (room mailbox)</value>
|
||||
</data>
|
||||
<data name="SharedMailbox.Text" xml:space="preserve">
|
||||
<value> (shared mailbox)</value>
|
||||
</data>
|
||||
<data name="EquipmentMailbox.Text" xml:space="preserve">
|
||||
<value> (equipment mailbox)</value>
|
||||
</data>
|
||||
<data name="Success.DOMAIN_UPDATE_DOMAIN" xml:space="preserve">
|
||||
<value>Domain information has been successfully updated.</value>
|
||||
</data>
|
||||
<data name="Success.WEB_UPDATE_SITE" xml:space="preserve">
|
||||
<value>Web site has been successfully updated.</value>
|
||||
</data>
|
||||
<data name="SchedulerTask.SCHEDULE_TASK_DOMAIN_LOOKUP" xml:space="preserve">
|
||||
<value>Check MX and NS on DNS servers</value>
|
||||
</data>
|
||||
<data name="SchedulerTask.SCHEDULE_TASK_DOMAIN_EXPIRATION" xml:space="preserve">
|
||||
<value>Check domain expiration date</value>
|
||||
</data>
|
||||
|
||||
</root>
|
Binary file not shown.
After Width: | Height: | Size: 226 B |
|
@ -112,10 +112,10 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ModuleAction.AddDomain" xml:space="preserve">
|
||||
<value>Add New Domain</value>
|
||||
|
@ -198,4 +198,19 @@
|
|||
<data name="gvDomainsType.Header" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="DomainExpirationDate.Expired" xml:space="preserve">
|
||||
<value>Expired</value>
|
||||
</data>
|
||||
<data name="DomainExpirationDate.Unknown" xml:space="preserve">
|
||||
<value>Unknown</value>
|
||||
</data>
|
||||
<data name="gvDomainsExpirationDate.Header" xml:space="preserve">
|
||||
<value>Expiration Date</value>
|
||||
</data>
|
||||
<data name="DomainExpirationDate.NotChecked" xml:space="preserve">
|
||||
<value>Not Checked</value>
|
||||
</data>
|
||||
<data name="DomainExpirationDate.NotExist" xml:space="preserve">
|
||||
<value>Non-Existent</value>
|
||||
</data>
|
||||
</root>
|
|
@ -112,24 +112,18 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="btnDelete.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="btnDelete.OnClientClick" xml:space="preserve">
|
||||
<value>if(!confirm('Do you really want to delete this domain?')) return false;ShowProgressDialog('Deleting domain...');</value>
|
||||
</data>
|
||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
||||
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating Domain...');</value>
|
||||
</data>
|
||||
<data name="AllowSubDomains.Text" xml:space="preserve">
|
||||
|
|
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ddlPriorityItem.High" xml:space="preserve">
|
||||
<value>High</value>
|
||||
</data>
|
||||
<data name="ddlPriorityItem.Low" xml:space="preserve">
|
||||
<value>Low</value>
|
||||
</data>
|
||||
<data name="ddlPriorityItem.Normal" xml:space="preserve">
|
||||
<value>Normal</value>
|
||||
</data>
|
||||
<data name="lblCC.Text" xml:space="preserve">
|
||||
<value>CC:</value>
|
||||
</data>
|
||||
<data name="lblFrom.Text" xml:space="preserve">
|
||||
<value>From:</value>
|
||||
</data>
|
||||
<data name="lblHtmlBody.Text" xml:space="preserve">
|
||||
<value>HTML Body:</value>
|
||||
</data>
|
||||
<data name="lblPriority.Text" xml:space="preserve">
|
||||
<value>Priority:</value>
|
||||
</data>
|
||||
<data name="lblSubject.Text" xml:space="preserve">
|
||||
<value>Subject:</value>
|
||||
</data>
|
||||
<data name="lblTextBody.Text" xml:space="preserve">
|
||||
<value>Text Body:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ddlPriorityItem.High" xml:space="preserve">
|
||||
<value>High</value>
|
||||
</data>
|
||||
<data name="ddlPriorityItem.Low" xml:space="preserve">
|
||||
<value>Low</value>
|
||||
</data>
|
||||
<data name="ddlPriorityItem.Normal" xml:space="preserve">
|
||||
<value>Normal</value>
|
||||
</data>
|
||||
<data name="lblCC.Text" xml:space="preserve">
|
||||
<value>CC:</value>
|
||||
</data>
|
||||
<data name="lblFrom.Text" xml:space="preserve">
|
||||
<value>From:</value>
|
||||
</data>
|
||||
<data name="lblHtmlBody.Text" xml:space="preserve">
|
||||
<value>HTML Body:</value>
|
||||
</data>
|
||||
<data name="lblPriority.Text" xml:space="preserve">
|
||||
<value>Priority:</value>
|
||||
</data>
|
||||
<data name="lblSubject.Text" xml:space="preserve">
|
||||
<value>Subject:</value>
|
||||
</data>
|
||||
<data name="lblTextBody.Text" xml:space="preserve">
|
||||
<value>Text Body:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -112,10 +112,10 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
|
@ -141,4 +141,10 @@
|
|||
<data name="lnkVpsSummaryLetter.Text" xml:space="preserve">
|
||||
<value>VPS Summary Letter</value>
|
||||
</data>
|
||||
<data name="lnkDomainExpirationLetter.Text" xml:space="preserve">
|
||||
<value>Domain Expiration Letter</value>
|
||||
</data>
|
||||
<data name="lnkDomainLookupLetter.Text" xml:space="preserve">
|
||||
<value>Domain MX and NS Letter</value>
|
||||
</data>
|
||||
</root>
|
|
@ -132,9 +132,6 @@
|
|||
<data name="btnAddVirtualDirectory.Text" xml:space="preserve">
|
||||
<value>Create Directory</value>
|
||||
</data>
|
||||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="btnChangeFrontPagePassword.Text" xml:space="preserve">
|
||||
<value>Change Password</value>
|
||||
</data>
|
||||
|
@ -150,12 +147,9 @@
|
|||
<data name="btnUninstallFrontPage.Text" xml:space="preserve">
|
||||
<value>Uninstall</value>
|
||||
</data>
|
||||
<data name="btnUpdate.OnClientClick" xml:space="preserve">
|
||||
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating web site...');</value>
|
||||
</data>
|
||||
<data name="btnUpdate.Text" xml:space="preserve">
|
||||
<value>Update</value>
|
||||
</data>
|
||||
<data name="cmdContinue.AlternateText" xml:space="preserve">
|
||||
<value>Continue Web Site</value>
|
||||
</data>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
CssSelectorClass="NormalGridView" AllowPaging="True" OnRowCommand="gvDomains_RowCommand">
|
||||
<Columns>
|
||||
<asp:TemplateField SortExpression="DomainName" HeaderText="gvDomainsName">
|
||||
<ItemStyle Width="60%" Wrap="False"></ItemStyle>
|
||||
<ItemStyle Width="45%" Wrap="False"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<b><asp:hyperlink id=lnkEdit1 runat="server" CssClass="Medium"
|
||||
NavigateUrl='<%# GetItemEditUrl(Eval("PackageID"), Eval("DomainID")) %>'>
|
||||
|
@ -37,6 +37,12 @@
|
|||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="gvDomainsExpirationDate">
|
||||
<ItemStyle Width="15%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<%# GetDomainExpirationDate(Eval("ExpirationDate"), Eval("LastUpdateDate"))%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="gvDomainsType">
|
||||
<ItemStyle Width="30%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
|
|
|
@ -49,10 +49,10 @@ namespace WebsitePanel.Portal
|
|||
|
||||
// visibility
|
||||
chkRecursive.Visible = (PanelSecurity.SelectedUser.Role != UserRole.User);
|
||||
gvDomains.Columns[2].Visible = gvDomains.Columns[3].Visible =
|
||||
gvDomains.Columns[3].Visible = gvDomains.Columns[3].Visible =
|
||||
(PanelSecurity.SelectedUser.Role != UserRole.User) && chkRecursive.Checked;
|
||||
gvDomains.Columns[4].Visible = (PanelSecurity.SelectedUser.Role == UserRole.Administrator);
|
||||
gvDomains.Columns[5].Visible = (PanelSecurity.EffectiveUser.Role == UserRole.Administrator);
|
||||
gvDomains.Columns[5].Visible = (PanelSecurity.SelectedUser.Role == UserRole.Administrator);
|
||||
gvDomains.Columns[6].Visible = (PanelSecurity.EffectiveUser.Role == UserRole.Administrator);
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
@ -100,6 +100,29 @@ namespace WebsitePanel.Portal
|
|||
return GetLocalizedString("DomainType.Domain");
|
||||
}
|
||||
|
||||
public string GetDomainExpirationDate(object expirationDateObject, object LastUpdateDateObject)
|
||||
{
|
||||
var expirationDate = expirationDateObject as DateTime?;
|
||||
var lastUpdateDate = LastUpdateDateObject as DateTime?;
|
||||
|
||||
if (expirationDate != null && expirationDate < DateTime.Now)
|
||||
{
|
||||
return GetLocalizedString("DomainExpirationDate.Expired");
|
||||
}
|
||||
else if(expirationDate != null)
|
||||
{
|
||||
return expirationDate.Value.ToShortDateString();
|
||||
}
|
||||
else if (lastUpdateDate == null)
|
||||
{
|
||||
return GetLocalizedString("DomainExpirationDate.NotChecked");
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetLocalizedString("DomainExpirationDate.NotExist");
|
||||
}
|
||||
}
|
||||
|
||||
protected void odsDomainsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
if (e.Exception != null)
|
||||
|
|
|
@ -1,31 +1,3 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsEditDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsEditDomain" %>
|
||||
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
|
||||
<%@ Register Src="UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
|
||||
|
||||
|
@ -119,9 +120,8 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="btnSave" runat="server" meta:resourcekey="btnSave" CssClass="Button1" Text="Save" OnClick="btnSave_Click" OnClientClick = "ShowProgressDialog('Updating Domain...');"/>
|
||||
<asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" CssClass="Button1" CausesValidation="false"
|
||||
Text="Cancel" OnClick="btnCancel_Click" />
|
||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="EditMailbox"
|
||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" OnSaveClientClick="ShowProgressDialog('Updating Domain...');" />
|
||||
<asp:Button ID="btnDelete" runat="server" meta:resourcekey="btnDelete" CssClass="Button1" CausesValidation="false"
|
||||
Text="Delete" OnClick="btnDelete_Click" />
|
||||
</div>
|
|
@ -48,6 +48,9 @@ namespace WebsitePanel.Portal
|
|||
if (!IsPostBack)
|
||||
{
|
||||
BindDomain();
|
||||
|
||||
if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null)
|
||||
buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,15 +197,13 @@ namespace WebsitePanel.Portal
|
|||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
ShowSuccessMessage("DOMAIN_UPDATE_DOMAIN");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowErrorMessage("DOMAIN_UPDATE_DOMAIN", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
// return
|
||||
RedirectSpaceHomePage();
|
||||
}
|
||||
|
||||
private void DeleteDomain()
|
||||
|
@ -232,8 +233,10 @@ namespace WebsitePanel.Portal
|
|||
SaveDomain();
|
||||
}
|
||||
|
||||
protected void btnCancel_Click(object sender, EventArgs e)
|
||||
protected void btnSaveExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveDomain();
|
||||
|
||||
// return
|
||||
RedirectSpaceHomePage();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
@ -428,22 +427,13 @@ namespace WebsitePanel.Portal {
|
|||
protected global::System.Web.UI.WebControls.Localize DescribeAllowSubDomains;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// buttonPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnCancel;
|
||||
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete control.
|
||||
|
|
|
@ -186,4 +186,7 @@
|
|||
<data name="valRequireSubscriberNumber.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="SharedMailbox.Text" xml:space="preserve">
|
||||
<value>Shared Mailbox</value>
|
||||
</data>
|
||||
</root>
|
|
@ -117,12 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
||||
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating mailbox settings...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="chkDisable.Text" xml:space="preserve">
|
||||
<value>Disable Mailbox</value>
|
||||
</data>
|
||||
|
|
|
@ -117,12 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
||||
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating mailbox settings...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="chkDoNotDeleteOnForward.Text" xml:space="preserve">
|
||||
<value>Deliver messages to both forwarding address and mailbox</value>
|
||||
</data>
|
||||
|
|
|
@ -117,12 +117,6 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Edit Mailbox</value>
|
||||
</data>
|
||||
|
|
|
@ -117,12 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
||||
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating mailbox permissions...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="FormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
|
|
|
@ -117,12 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
||||
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating user settings...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="chkDisable.Text" xml:space="preserve">
|
||||
<value>Disable User</value>
|
||||
</data>
|
||||
|
|
|
@ -117,12 +117,6 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Updating...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save Changes</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Edit User </value>
|
||||
</data>
|
||||
|
|
|
@ -91,16 +91,37 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (plans.Length == 0)
|
||||
btnCreate.Enabled = false;
|
||||
|
||||
bool allowResourceMailbox = false;
|
||||
|
||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
|
||||
{
|
||||
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
|
||||
{
|
||||
locSubscriberNumber.Visible = txtSubscriberNumber.Visible = valRequireSubscriberNumber.Enabled = false;
|
||||
allowResourceMailbox = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_RESOURCEMAILBOXES))
|
||||
{
|
||||
if (cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue != 0)
|
||||
allowResourceMailbox = true;
|
||||
}
|
||||
|
||||
|
||||
if (allowResourceMailbox)
|
||||
{
|
||||
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("RoomMailbox.Text"), "5"));
|
||||
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("EquipmentMailbox.Text"), "6"));
|
||||
}
|
||||
|
||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_SHAREDMAILBOXES))
|
||||
{
|
||||
if (cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue != 0)
|
||||
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("SharedMailbox.Text"), "10"));
|
||||
}
|
||||
|
||||
|
||||
rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
|
||||
|
||||
<%-- < wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/> --%>
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
|
@ -157,10 +158,8 @@
|
|||
</asp:Panel>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1"
|
||||
meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:Button id="btnSaveExit" runat="server" Text="Save Changes and Exit" CssClass="Button1"
|
||||
meta:resourcekey="btnSaveExit" ValidationGroup="EditMailbox" OnClick="btnSaveExit_Click"></asp:Button>
|
||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="EditMailbox"
|
||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditMailbox" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -81,6 +81,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
|
||||
secRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, Cntx);
|
||||
|
||||
if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null)
|
||||
buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick");
|
||||
}
|
||||
|
||||
int planId = -1;
|
||||
|
@ -183,6 +186,15 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
imgVipUser.Visible = account.IsVIP && Cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels);
|
||||
|
||||
if (account.AccountType == ExchangeAccountType.SharedMailbox)
|
||||
litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text");
|
||||
|
||||
if (account.AccountType == ExchangeAccountType.Room)
|
||||
litDisplayName.Text += GetSharedLocalizedString("RoomMailbox.Text");
|
||||
|
||||
if (account.AccountType == ExchangeAccountType.Equipment)
|
||||
litDisplayName.Text += GetSharedLocalizedString("EquipmentMailbox.Text");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -12,6 +12,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
|
||||
public partial class ExchangeMailboxGeneralSettings {
|
||||
|
||||
/// <summary>
|
||||
/// asyncTasks control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 control.
|
||||
/// </summary>
|
||||
|
@ -382,22 +391,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::System.Web.UI.WebControls.Label lblExchangeGuid;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// buttonPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSaveExit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSaveExit;
|
||||
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ValidationSummary1 control.
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>
|
||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
|
@ -110,9 +111,8 @@
|
|||
</table>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:Button id="btnSaveExit" runat="server" Text="Save Changes and Exit" CssClass="Button1"
|
||||
meta:resourcekey="btnSaveExit" ValidationGroup="EditMailbox" OnClick="btnSaveExit_Click"></asp:Button>
|
||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="EditMailbox"
|
||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditMailbox" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -49,6 +49,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (!IsPostBack)
|
||||
{
|
||||
BindSettings();
|
||||
|
||||
if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null)
|
||||
buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -247,22 +247,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::System.Web.UI.WebControls.CheckBox chkPmmAllowed;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// buttonPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSaveExit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSaveExit;
|
||||
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ValidationSummary1 control.
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
|
@ -43,10 +44,8 @@
|
|||
</asp:Panel>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1"
|
||||
meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:Button id="btnSaveExit" runat="server" Text="Save Changes and Exit" CssClass="Button1"
|
||||
meta:resourcekey="btnSaveExit" ValidationGroup="EditMailbox" OnClick="btnSaveExit_Click"></asp:Button>
|
||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="EditMailbox"
|
||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditMailbox" />
|
||||
</div>
|
||||
|
||||
|
|
|
@ -103,22 +103,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// buttonPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSaveExit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSaveExit;
|
||||
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ValidationSummary1 control.
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<%@ Register Src="UserControls/MailboxTabs.ascx" TagName="MailboxTabs" TagPrefix="wsp" %>
|
||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
|
@ -44,9 +45,8 @@
|
|||
</uc2:AccountsList>
|
||||
</asp:Panel>
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click" ></asp:Button>
|
||||
<asp:Button id="btnSaveExit" runat="server" Text="Save Changes and Exit" CssClass="Button1"
|
||||
meta:resourcekey="btnSaveExit" ValidationGroup="EditMailbox" OnClick="btnSaveExit_Click"></asp:Button>
|
||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="EditMailbox"
|
||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -37,8 +37,13 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindPermissions();
|
||||
|
||||
if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null)
|
||||
buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,6 +72,19 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
litDisplayName.Text = mailbox.DisplayName;
|
||||
sendAsPermission.SetAccounts(mailbox.SendAsAccounts);
|
||||
fullAccessPermission.SetAccounts(mailbox.FullAccessAccounts);
|
||||
|
||||
// get account meta
|
||||
ExchangeAccount account = ES.Services.ExchangeServer.GetAccount(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
|
||||
if (account.AccountType == ExchangeAccountType.SharedMailbox)
|
||||
litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text");
|
||||
|
||||
if (account.AccountType == ExchangeAccountType.Room)
|
||||
litDisplayName.Text += GetSharedLocalizedString("RoomMailbox.Text");
|
||||
|
||||
if (account.AccountType == ExchangeAccountType.Equipment)
|
||||
litDisplayName.Text += GetSharedLocalizedString("EquipmentMailbox.Text");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -139,21 +139,12 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList fullAccessPermission;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// buttonPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSaveExit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSaveExit;
|
||||
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
</div>
|
||||
<div class="FormButtonsBarCleanRight">
|
||||
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||
<asp:CheckBox ID="chkMailboxes" runat="server" meta:resourcekey="chkMailboxes" Text="Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged"/>
|
||||
<asp:CheckBox ID="chkResourceMailboxes" runat="server" meta:resourcekey="chkResourceMailboxes" Text="Resource Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged"/>
|
||||
<asp:CheckBox ID="chkSharedMailboxes" runat="server" meta:resourcekey="chkSharedMailboxes" Text="Shared Mailboxes" AutoPostBack="true" OnCheckedChanged="chkMailboxes_CheckedChanged"/>
|
||||
<asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True"
|
||||
onselectedindexchanged="ddlPageSize_SelectedIndexChanged">
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
|
@ -105,7 +108,7 @@
|
|||
OnSelected="odsAccountsPaged_Selected">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
|
||||
<asp:Parameter Name="accountTypes" DefaultValue="1,5,6" />
|
||||
<asp:Parameter Name="accountTypes" DefaultValue="1,5,6,10" />
|
||||
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
|
||||
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
||||
<asp:Parameter Name="archiving" Type="Boolean" />
|
||||
|
|
|
@ -60,6 +60,10 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
chkMailboxes.Checked = true;
|
||||
chkResourceMailboxes.Checked = true;
|
||||
chkSharedMailboxes.Checked = true;
|
||||
|
||||
BindStats();
|
||||
}
|
||||
|
||||
|
@ -147,6 +151,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
{
|
||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||
string imgName = "mailbox_16.gif";
|
||||
|
||||
if (accountType == ExchangeAccountType.Contact)
|
||||
imgName = "contact_16.gif";
|
||||
else if (accountType == ExchangeAccountType.DistributionList)
|
||||
|
@ -155,6 +160,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
imgName = "room_16.gif";
|
||||
else if (accountType == ExchangeAccountType.Equipment)
|
||||
imgName = "equipment_16.gif";
|
||||
else if (accountType == ExchangeAccountType.SharedMailbox)
|
||||
imgName = "shared_16.gif";
|
||||
|
||||
if (vip && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels)) imgName = "vip_user_16.png";
|
||||
|
||||
|
@ -246,5 +253,25 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
return serviceLevel;
|
||||
}
|
||||
|
||||
protected void chkMailboxes_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
List<string> accountTypes = new List<string>();
|
||||
|
||||
if ((!chkMailboxes.Checked)&&(!chkSharedMailboxes.Checked)&&(!chkResourceMailboxes.Checked))
|
||||
chkMailboxes.Checked = true;
|
||||
|
||||
if (chkMailboxes.Checked)
|
||||
accountTypes.Add("1");
|
||||
|
||||
if (chkSharedMailboxes.Checked)
|
||||
accountTypes.Add("10");
|
||||
|
||||
if (chkResourceMailboxes.Checked)
|
||||
accountTypes.AddRange(new string[] {"5","6"});
|
||||
|
||||
odsAccountsPaged.SelectParameters["accountTypes"].DefaultValue = string.Join(",", accountTypes);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -66,6 +66,33 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel SearchPanel;
|
||||
|
||||
/// <summary>
|
||||
/// chkMailboxes control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkMailboxes;
|
||||
|
||||
/// <summary>
|
||||
/// chkResourceMailboxes control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkResourceMailboxes;
|
||||
|
||||
/// <summary>
|
||||
/// chkSharedMailboxes control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkSharedMailboxes;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize control.
|
||||
/// </summary>
|
||||
|
|
|
@ -89,6 +89,24 @@
|
|||
<wsp:QuotaViewer ID="mailboxesStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="OrgStatsRow">
|
||||
<td class="OrgStatsQuota" nowrap>
|
||||
<asp:HyperLink ID="lnkSharedMailboxes" runat="server" meta:resourcekey="lnkSharedMailboxes" Text="Shared mailboxes" />
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="mailboxesSharedStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td class="OrgStatsQuota" nowrap>
|
||||
<asp:HyperLink ID="lnkResourceMailboxes" runat="server" meta:resourcekey="lnkResourceMailboxes" Text="Resource mailboxes" />
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="mailboxesResourceStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="OrgStatsRow" id="rowContacts" runat="server">
|
||||
<td class="OrgStatsQuota" nowrap>
|
||||
<asp:HyperLink ID="lnkContacts" runat="server" meta:resourcekey="lnkContacts"></asp:HyperLink>
|
||||
|
|
|
@ -54,6 +54,14 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
lnkMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
|
||||
lnkSharedMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
lnkResourceMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
|
||||
lnkContacts.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "contacts",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||
|
||||
|
@ -77,6 +85,13 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes;
|
||||
if (exchangeOrgStats.AllocatedMailboxes != -1) mailboxesStats.QuotaAvailable = exchangeTenantStats.AllocatedMailboxes - exchangeTenantStats.CreatedMailboxes;
|
||||
|
||||
mailboxesSharedStats.QuotaUsedValue = exchangeOrgStats.CreatedSharedMailboxes;
|
||||
mailboxesSharedStats.QuotaValue = exchangeOrgStats.AllocatedSharedMailboxes;
|
||||
if (exchangeOrgStats.AllocatedSharedMailboxes != -1) mailboxesSharedStats.QuotaAvailable = exchangeTenantStats.AllocatedSharedMailboxes - exchangeTenantStats.CreatedSharedMailboxes;
|
||||
|
||||
mailboxesResourceStats.QuotaUsedValue = exchangeOrgStats.CreatedResourceMailboxes;
|
||||
mailboxesResourceStats.QuotaValue = exchangeOrgStats.AllocatedResourceMailboxes;
|
||||
if (exchangeOrgStats.AllocatedResourceMailboxes != -1) mailboxesResourceStats.QuotaAvailable = exchangeTenantStats.AllocatedResourceMailboxes - exchangeTenantStats.CreatedResourceMailboxes;
|
||||
|
||||
if (exchangeTenantStats.AllocatedContacts == 0) this.rowContacts.Style.Add("display", "none");
|
||||
else
|
||||
|
|
|
@ -201,6 +201,42 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer mailboxesStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkSharedMailboxes control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkSharedMailboxes;
|
||||
|
||||
/// <summary>
|
||||
/// mailboxesSharedStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer mailboxesSharedStats;
|
||||
|
||||
/// <summary>
|
||||
/// lnkResourceMailboxes control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkResourceMailboxes;
|
||||
|
||||
/// <summary>
|
||||
/// mailboxesResourceStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.QuotaViewer mailboxesResourceStats;
|
||||
|
||||
/// <summary>
|
||||
/// rowContacts control.
|
||||
/// </summary>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<%@ Register src="UserControls/UserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %>
|
||||
<%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %>
|
||||
|
||||
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
|
||||
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
@ -283,10 +284,8 @@
|
|||
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1"
|
||||
meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:Button id="btnSaveExit" runat="server" Text="Save Changes and Exit" CssClass="Button1"
|
||||
meta:resourcekey="btnSaveExit" ValidationGroup="EditMailbox" OnClick="btnSaveExit_Click"></asp:Button>
|
||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="EditMailbox"
|
||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditMailbox" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -49,6 +49,9 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
|
||||
MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox");
|
||||
UserTabsId.Visible = (PanelRequest.Context == "User");
|
||||
|
||||
if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null)
|
||||
buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -769,22 +769,13 @@ namespace WebsitePanel.Portal.HostedSolution {
|
|||
protected global::System.Web.UI.WebControls.Label lblUserDomainName;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// buttonPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSaveExit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSaveExit;
|
||||
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ValidationSummary1 control.
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<%@ Register src="UserControls/UserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %>
|
||||
<%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %>
|
||||
|
||||
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
|
||||
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
@ -54,10 +55,8 @@
|
|||
</asp:Panel>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1"
|
||||
meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>
|
||||
<asp:Button id="btnSaveExit" runat="server" Text="Save Changes and Exit" CssClass="Button1"
|
||||
meta:resourcekey="btnSaveExit" ValidationGroup="EditMailbox" OnClick="btnSaveExit_Click"></asp:Button>
|
||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="EditMailbox"
|
||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditMailbox" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -112,22 +112,13 @@ namespace WebsitePanel.Portal.HostedSolution {
|
|||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// buttonPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSaveExit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSaveExit;
|
||||
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ValidationSummary1 control.
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="cbEnableNotify" xml:space="preserve">
|
||||
<value>Enable Client Notification</value>
|
||||
</data>
|
||||
<data name="cbIncludeNonExistenDomains" xml:space="preserve">
|
||||
<value>Include Non-Existen Domains</value>
|
||||
</data>
|
||||
<data name="lblDayBeforeNotify" xml:space="preserve">
|
||||
<value>Notify before (days)</value>
|
||||
</data>
|
||||
<data name="lblDayBeforeNotifyHint" xml:space="preserve">
|
||||
<value>Number of days before expiration date</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,82 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.33440
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.ScheduleTaskControls.App_LocalResources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class DomainLookupView_ascx {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal DomainLookupView_ascx() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WebsitePanel.Portal.ScheduleTaskControls.App_LocalResources.DomainLookupView.ascx" +
|
||||
"", typeof(DomainLookupView_ascx).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to DNS Servers.
|
||||
/// </summary>
|
||||
internal static string lblDnsServers {
|
||||
get {
|
||||
return ResourceManager.GetString("lblDnsServers", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Please enter dns servers to check..
|
||||
/// </summary>
|
||||
internal static string lblDnsServersHint {
|
||||
get {
|
||||
return ResourceManager.GetString("lblDnsServersHint", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="lblDnsServers" xml:space="preserve">
|
||||
<value>DNS Servers</value>
|
||||
</data>
|
||||
<data name="lblDnsServersHint" xml:space="preserve">
|
||||
<value>Please enter dns servers to check.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,38 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainExpirationView.ascx.cs" Inherits="WebsitePanel.Portal.ScheduleTaskControls.DomainExpirationView" %>
|
||||
|
||||
|
||||
<table cellspacing="0" cellpadding="4" width="100%">
|
||||
<tr>
|
||||
<td class="SubHead" nowrap>
|
||||
<asp:Label ID="Label1" runat="server" meta:resourcekey="cbEnableNotify" Text="Enable Client Notification:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox runat="server" ID="cbEnableNotify" meta:resourcekey="cbEnableNotify" /><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" nowrap>
|
||||
<asp:Label ID="lblSendNonExistenDomains" runat="server" meta:resourcekey="cbIncludeNonExistenDomains" Text="Include Non-Existen Domains:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox runat="server" ID="cbIncludeNonExistenDomains" meta:resourcekey="cbIncludeNonExistenDomains" /><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" nowrap>
|
||||
<asp:Label ID="lblMailTo" runat="server" meta:resourcekey="lblMailTo" Text="Mail To:"></asp:Label>
|
||||
</td>
|
||||
<td class="Normal" width="100%">
|
||||
<asp:TextBox ID="txtMailTo" runat="server" Width="95%" CssClass="NormalTextBox" MaxLength="1000"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="SubHead" nowrap>
|
||||
<asp:Label ID="lblDayBeforeNotify" runat="server" meta:resourcekey="lblDayBeforeNotify" Text="Notify before (days):"></asp:Label>
|
||||
</td>
|
||||
<td class="Normal" width="100%">
|
||||
<asp:TextBox ID="txtDaysBeforeNotify" runat="server" Width="95%" CssClass="NormalTextBox" MaxLength="1000"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Portal.UserControls.ScheduleTaskView;
|
||||
|
||||
namespace WebsitePanel.Portal.ScheduleTaskControls
|
||||
{
|
||||
public partial class DomainExpirationView : EmptyView
|
||||
{
|
||||
private static readonly string DaysBeforeParameter = "DAYS_BEFORE";
|
||||
private static readonly string MailToParameter = "MAIL_TO";
|
||||
private static readonly string EnableNotificationParameter = "ENABLE_NOTIFICATION";
|
||||
private static readonly string IncludeNonExistenDomainsParameter = "INCLUDE_NONEXISTEN_DOMAINS";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets scheduler task parameters on view.
|
||||
/// </summary>
|
||||
/// <param name="parameters">Parameters list to be set on view.</param>
|
||||
public override void SetParameters(ScheduleTaskParameterInfo[] parameters)
|
||||
{
|
||||
base.SetParameters(parameters);
|
||||
|
||||
this.SetParameter(this.txtDaysBeforeNotify, DaysBeforeParameter);
|
||||
this.SetParameter(this.txtMailTo, MailToParameter);
|
||||
this.SetParameter(this.cbEnableNotify, EnableNotificationParameter);
|
||||
this.SetParameter(this.cbIncludeNonExistenDomains, IncludeNonExistenDomainsParameter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets scheduler task parameters from view.
|
||||
/// </summary>
|
||||
/// <returns>Parameters list filled from view.</returns>
|
||||
public override ScheduleTaskParameterInfo[] GetParameters()
|
||||
{
|
||||
ScheduleTaskParameterInfo daysBefore = this.GetParameter(this.txtDaysBeforeNotify, DaysBeforeParameter);
|
||||
ScheduleTaskParameterInfo mailTo = this.GetParameter(this.txtMailTo, MailToParameter);
|
||||
ScheduleTaskParameterInfo enableNotification = this.GetParameter(this.cbEnableNotify, EnableNotificationParameter);
|
||||
ScheduleTaskParameterInfo includeNonExistenDomains = this.GetParameter(this.cbIncludeNonExistenDomains, IncludeNonExistenDomainsParameter);
|
||||
|
||||
return new ScheduleTaskParameterInfo[4] { daysBefore, mailTo, enableNotification, includeNonExistenDomains };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.ScheduleTaskControls {
|
||||
|
||||
|
||||
public partial class DomainExpirationView {
|
||||
|
||||
/// <summary>
|
||||
/// Label1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// cbEnableNotify control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cbEnableNotify;
|
||||
|
||||
/// <summary>
|
||||
/// lblSendNonExistenDomains control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSendNonExistenDomains;
|
||||
|
||||
/// <summary>
|
||||
/// cbIncludeNonExistenDomains control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cbIncludeNonExistenDomains;
|
||||
|
||||
/// <summary>
|
||||
/// lblMailTo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblMailTo;
|
||||
|
||||
/// <summary>
|
||||
/// txtMailTo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtMailTo;
|
||||
|
||||
/// <summary>
|
||||
/// lblDayBeforeNotify control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDayBeforeNotify;
|
||||
|
||||
/// <summary>
|
||||
/// txtDaysBeforeNotify control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtDaysBeforeNotify;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainLookupView.ascx.cs" Inherits="WebsitePanel.Portal.ScheduleTaskControls.DomainLookupView" %>
|
||||
|
||||
<table cellspacing="0" cellpadding="4" width="100%">
|
||||
<tr>
|
||||
<td class="SubHead" nowrap>
|
||||
<asp:Label ID="lblDnsServers" runat="server" meta:resourcekey="lblDnsServers" Text="DNS Servers:"></asp:Label>
|
||||
</td>
|
||||
<td class="Normal" width="100%">
|
||||
<asp:TextBox ID="txtDnsServers" runat="server" Width="95%" CssClass="NormalTextBox" MaxLength="1000"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" nowrap>
|
||||
<asp:Label ID="lblMailTo" runat="server" meta:resourcekey="lblMailTo" Text="Mail To:"></asp:Label>
|
||||
</td>
|
||||
<td class="Normal" width="100%">
|
||||
<asp:TextBox ID="txtMailTo" runat="server" Width="95%" CssClass="NormalTextBox" MaxLength="1000"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Portal.UserControls.ScheduleTaskView;
|
||||
|
||||
namespace WebsitePanel.Portal.ScheduleTaskControls
|
||||
{
|
||||
public partial class DomainLookupView : EmptyView
|
||||
{
|
||||
private static readonly string DnsServersParameter = "DNS_SERVERS";
|
||||
private static readonly string MailToParameter = "MAIL_TO";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets scheduler task parameters on view.
|
||||
/// </summary>
|
||||
/// <param name="parameters">Parameters list to be set on view.</param>
|
||||
public override void SetParameters(ScheduleTaskParameterInfo[] parameters)
|
||||
{
|
||||
base.SetParameters(parameters);
|
||||
|
||||
this.SetParameter(this.txtDnsServers, DnsServersParameter);
|
||||
this.SetParameter(this.txtMailTo, MailToParameter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets scheduler task parameters from view.
|
||||
/// </summary>
|
||||
/// <returns>Parameters list filled from view.</returns>
|
||||
public override ScheduleTaskParameterInfo[] GetParameters()
|
||||
{
|
||||
ScheduleTaskParameterInfo dnsServers = this.GetParameter(this.txtDnsServers, DnsServersParameter);
|
||||
ScheduleTaskParameterInfo mailTo = this.GetParameter(this.txtMailTo, MailToParameter);
|
||||
|
||||
return new ScheduleTaskParameterInfo[2] { dnsServers, mailTo };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.ScheduleTaskControls {
|
||||
|
||||
|
||||
public partial class DomainLookupView {
|
||||
|
||||
/// <summary>
|
||||
/// lblDnsServers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDnsServers;
|
||||
|
||||
/// <summary>
|
||||
/// txtDnsServers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtDnsServers;
|
||||
|
||||
/// <summary>
|
||||
/// lblMailTo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblMailTo;
|
||||
|
||||
/// <summary>
|
||||
/// txtMailTo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtMailTo;
|
||||
}
|
||||
}
|
|
@ -17,7 +17,16 @@
|
|||
EmptyDataText="gvPackages" CssSelectorClass="NormalGridView"
|
||||
AllowSorting="True" DataSourceID="odsItemsPaged" AllowPaging="True">
|
||||
<Columns>
|
||||
<asp:BoundField SortExpression="ItemName" DataField="ItemName" HeaderText="gvPackagesItemName" ></asp:BoundField>
|
||||
<asp:TemplateField SortExpression="ItemName" HeaderText="gvPackagesItemName">
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink ID="lnkItem" runat="server" NavigateUrl='<%# GetItemPageUrl((int)Eval("ItemID"), (int)Eval("PackageID")) %>' Visible="<%# AllowItemLink() %>">
|
||||
<%# Eval("ItemName") %>
|
||||
</asp:hyperlink>
|
||||
<asp:Label ID="itemName" runat="server" Visible="<%# !AllowItemLink() %>">
|
||||
<%# Eval("ItemName") %>
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField SortExpression="PackageName" HeaderText="gvPackagesName">
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink id=lnkSpace runat="server" NavigateUrl='<%# GetSpaceHomePageUrl((int)Eval("PackageID")) %>'>
|
||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
|||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
|
@ -37,10 +38,26 @@ using System.Web.UI.WebControls;
|
|||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
using WebsitePanel.WebPortal;
|
||||
using WebsitePanel.Portal.UserControls;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
public partial class SearchSpaces : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
string ItemTypeName;
|
||||
|
||||
const string type_WebSite = "WebSite";
|
||||
const string type_Domain = "Domain";
|
||||
const string type_Organization = "Organization";
|
||||
|
||||
List<string> linkTypes = new List<string>(new string[] {type_WebSite, type_Domain, type_Organization});
|
||||
|
||||
const string PID_SPACE_WEBSITES = "SpaceWebSites";
|
||||
const string PID_SPACE_DIMAINS = "SpaceDomains";
|
||||
const string PID_SPACE_EXCHANGESERVER = "SpaceExchangeServer";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
|
@ -48,10 +65,16 @@ namespace WebsitePanel.Portal
|
|||
// bind item types
|
||||
DataTable dtItemTypes = ES.Services.Packages.GetSearchableServiceItemTypes().Tables[0];
|
||||
foreach (DataRow dr in dtItemTypes.Rows)
|
||||
{
|
||||
string displayName = dr["DisplayName"].ToString();
|
||||
ddlItemType.Items.Add(new ListItem(
|
||||
GetSharedLocalizedString("ServiceItemType." + dr["DisplayName"].ToString()),
|
||||
GetSharedLocalizedString("ServiceItemType." + displayName),
|
||||
dr["ItemTypeID"].ToString()));
|
||||
|
||||
if (Request["ItemTypeID"] == dr["ItemTypeID"].ToString())
|
||||
ItemTypeName = displayName;
|
||||
}
|
||||
|
||||
// bind filter
|
||||
Utils.SelectListItem(ddlItemType, Request["ItemTypeID"]);
|
||||
txtFilterValue.Text = Request["Query"];
|
||||
|
@ -68,6 +91,32 @@ namespace WebsitePanel.Portal
|
|||
return PortalUtils.GetSpaceHomePageUrl(spaceId);
|
||||
}
|
||||
|
||||
public string GetItemPageUrl(int itemId, int spaceId)
|
||||
{
|
||||
string res = "";
|
||||
|
||||
switch(ItemTypeName)
|
||||
{
|
||||
case type_WebSite:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_WEBSITES, "ItemID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "edit_item",
|
||||
"moduleDefId=websites");
|
||||
break;
|
||||
case type_Domain:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_DIMAINS, "DomainID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "edit_item",
|
||||
"moduleDefId=domains");
|
||||
break;
|
||||
case type_Organization:
|
||||
res = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGESERVER, "ItemID", itemId.ToString(),
|
||||
PortalUtils.SPACE_ID_PARAM + "=" + spaceId, DefaultPage.CONTROL_ID_PARAM + "=" + "organization_home",
|
||||
"moduleDefId=ExchangeServer");
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
string query = txtFilterValue.Text.Trim().Replace("%", "");
|
||||
|
@ -86,5 +135,12 @@ namespace WebsitePanel.Portal
|
|||
e.ExceptionHandled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool AllowItemLink()
|
||||
{
|
||||
bool res = linkTypes.Exists(x => x == ItemTypeName);
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsDomainExpirationLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsDomainExpirationLetter" %>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="SubHead" width="150" nowrap><asp:Label ID="lblFrom" runat="server" meta:resourcekey="lblFrom" Text="From:"></asp:Label></td>
|
||||
<td class="Normal" width="100%">
|
||||
<asp:TextBox ID="txtFrom" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead"><asp:Label ID="lblCC" runat="server" meta:resourcekey="lblCC" Text="CC:"></asp:Label></td>
|
||||
<td class="Normal">
|
||||
<asp:TextBox ID="txtCC" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead"><asp:Label ID="lblSubject" runat="server" meta:resourcekey="lblSubject" Text="Subject:"></asp:Label></td>
|
||||
<td class="Normal">
|
||||
<asp:TextBox ID="txtSubject" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead"><asp:Label ID="lblPriority" runat="server" meta:resourcekey="lblPriority" Text="Priority"></asp:Label></td>
|
||||
<td class="Normal">
|
||||
<asp:DropDownList ID="ddlPriority" runat="server" CssClass="NormalTextBox" resourcekey="ddlPriority">
|
||||
<asp:ListItem Value="High">High</asp:ListItem>
|
||||
<asp:ListItem Value="Normal">Normal</asp:ListItem>
|
||||
<asp:ListItem Value="Low">Low</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblHtmlBody" runat="server" meta:resourcekey="lblHtmlBody" Text="HTML Body:"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal" colspan="2">
|
||||
<asp:TextBox ID="txtHtmlBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblTextBody" runat="server" meta:resourcekey="lblTextBody" Text="Text Body:"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal" colspan="2">
|
||||
<asp:TextBox ID="txtTextBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
public partial class SettingsDomainExpirationLetter : WebsitePanelControlBase, IUserSettingsEditorControl
|
||||
{
|
||||
public void BindSettings(UserSettings settings)
|
||||
{
|
||||
txtFrom.Text = settings["From"];
|
||||
txtCC.Text = settings["CC"];
|
||||
txtSubject.Text = settings["Subject"];
|
||||
Utils.SelectListItem(ddlPriority, settings["Priority"]);
|
||||
txtHtmlBody.Text = settings["HtmlBody"];
|
||||
txtTextBody.Text = settings["TextBody"];
|
||||
}
|
||||
|
||||
public void SaveSettings(UserSettings settings)
|
||||
{
|
||||
settings["From"] = txtFrom.Text;
|
||||
settings["CC"] = txtCC.Text;
|
||||
settings["Subject"] = txtSubject.Text;
|
||||
settings["Priority"] = ddlPriority.SelectedValue;
|
||||
settings["HtmlBody"] = txtHtmlBody.Text;
|
||||
settings["TextBody"] = txtTextBody.Text;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
public partial class SettingsDomainExpirationLetter {
|
||||
|
||||
/// <summary>
|
||||
/// lblFrom control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblFrom;
|
||||
|
||||
/// <summary>
|
||||
/// txtFrom control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtFrom;
|
||||
|
||||
/// <summary>
|
||||
/// lblCC control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblCC;
|
||||
|
||||
/// <summary>
|
||||
/// txtCC control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtCC;
|
||||
|
||||
/// <summary>
|
||||
/// lblSubject control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSubject;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubject control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtSubject;
|
||||
|
||||
/// <summary>
|
||||
/// lblPriority control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPriority;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPriority control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlPriority;
|
||||
|
||||
/// <summary>
|
||||
/// lblHtmlBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblHtmlBody;
|
||||
|
||||
/// <summary>
|
||||
/// txtHtmlBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtHtmlBody;
|
||||
|
||||
/// <summary>
|
||||
/// lblTextBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblTextBody;
|
||||
|
||||
/// <summary>
|
||||
/// txtTextBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtTextBody;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsDomainLookupLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsDomainLookupLetter" %>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="SubHead" width="150" nowrap><asp:Label ID="lblFrom" runat="server" meta:resourcekey="lblFrom" Text="From:"></asp:Label></td>
|
||||
<td class="Normal" width="100%">
|
||||
<asp:TextBox ID="txtFrom" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead"><asp:Label ID="lblCC" runat="server" meta:resourcekey="lblCC" Text="CC:"></asp:Label></td>
|
||||
<td class="Normal">
|
||||
<asp:TextBox ID="txtCC" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead"><asp:Label ID="lblSubject" runat="server" meta:resourcekey="lblSubject" Text="Subject:"></asp:Label></td>
|
||||
<td class="Normal">
|
||||
<asp:TextBox ID="txtSubject" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead"><asp:Label ID="lblPriority" runat="server" meta:resourcekey="lblPriority" Text="Priority"></asp:Label></td>
|
||||
<td class="Normal">
|
||||
<asp:DropDownList ID="ddlPriority" runat="server" CssClass="NormalTextBox" resourcekey="ddlPriority">
|
||||
<asp:ListItem Value="High">High</asp:ListItem>
|
||||
<asp:ListItem Value="Normal">Normal</asp:ListItem>
|
||||
<asp:ListItem Value="Low">Low</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblHtmlBody" runat="server" meta:resourcekey="lblHtmlBody" Text="HTML Body:"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal" colspan="2">
|
||||
<asp:TextBox ID="txtHtmlBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblTextBody" runat="server" meta:resourcekey="lblTextBody" Text="Text Body:"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal" colspan="2">
|
||||
<asp:TextBox ID="txtTextBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
public partial class SettingsDomainLookupLetter : WebsitePanelControlBase, IUserSettingsEditorControl
|
||||
{
|
||||
public void BindSettings(UserSettings settings)
|
||||
{
|
||||
txtFrom.Text = settings["From"];
|
||||
txtCC.Text = settings["CC"];
|
||||
txtSubject.Text = settings["Subject"];
|
||||
Utils.SelectListItem(ddlPriority, settings["Priority"]);
|
||||
txtHtmlBody.Text = settings["HtmlBody"];
|
||||
txtTextBody.Text = settings["TextBody"];
|
||||
}
|
||||
|
||||
public void SaveSettings(UserSettings settings)
|
||||
{
|
||||
settings["From"] = txtFrom.Text;
|
||||
settings["CC"] = txtCC.Text;
|
||||
settings["Subject"] = txtSubject.Text;
|
||||
settings["Priority"] = ddlPriority.SelectedValue;
|
||||
settings["HtmlBody"] = txtHtmlBody.Text;
|
||||
settings["TextBody"] = txtTextBody.Text;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
public partial class SettingsDomainLookupLetter {
|
||||
|
||||
/// <summary>
|
||||
/// lblFrom control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblFrom;
|
||||
|
||||
/// <summary>
|
||||
/// txtFrom control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtFrom;
|
||||
|
||||
/// <summary>
|
||||
/// lblCC control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblCC;
|
||||
|
||||
/// <summary>
|
||||
/// txtCC control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtCC;
|
||||
|
||||
/// <summary>
|
||||
/// lblSubject control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSubject;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubject control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtSubject;
|
||||
|
||||
/// <summary>
|
||||
/// lblPriority control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPriority;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPriority control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlPriority;
|
||||
|
||||
/// <summary>
|
||||
/// lblHtmlBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblHtmlBody;
|
||||
|
||||
/// <summary>
|
||||
/// txtHtmlBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtHtmlBody;
|
||||
|
||||
/// <summary>
|
||||
/// lblTextBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblTextBody;
|
||||
|
||||
/// <summary>
|
||||
/// txtTextBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtTextBody;
|
||||
}
|
||||
}
|
|
@ -30,6 +30,14 @@
|
|||
<asp:HyperLink ID="lnkVpsSummaryLetter" runat="server" meta:resourcekey="lnkVpsSummaryLetter"
|
||||
Text="VPS Summary Letter" NavigateUrl='<%# GetSettingsLink("VpsSummaryLetter", "SettingsVpsSummaryLetter") %>'></asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="lnkDomainExpirationLetter" runat="server" meta:resourcekey="lnkDomainExpirationLetter"
|
||||
Text="Domain Expiration Letter" NavigateUrl='<%# GetSettingsLink("DomainExpirationLetter", "SettingsDomainExpirationLetter") %>'></asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="lnkDomainLookupLetter" runat="server" meta:resourcekey="lnkDomainLookupLetter"
|
||||
Text="Domain MX and NS Letter" NavigateUrl='<%# GetSettingsLink("DomainLookupLetter", "SettingsDomainLookupLetter") %>'></asp:HyperLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="FormFooter">
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue