diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql
index a35668b3..88bf5438 100644
--- a/WebsitePanel/Database/update_db.sql
+++ b/WebsitePanel/Database/update_db.sql
@@ -1,4 +1,4 @@
-USE [${install.database}]
+USE [${install.database}]
GO
-- update database version
@@ -7003,4 +7003,103 @@ IF NOT EXISTS (SELECT 1 FROM LyncUsers WHERE SipAddress IS NOT NULL)
BEGIN
UPDATE LyncUsers SET SipAddress=EA.PrimaryEmailAddress FROM ExchangeAccounts AS EA WHERE LyncUsers.SipAddress IS NULL AND LyncUsers.AccountID = EA.AccountID
END
-GO
\ No newline at end of file
+GO
+
+
+ALTER PROCEDURE [dbo].[GetPackageQuotas]
+(
+ @ActorID int,
+ @PackageID int
+)
+AS
+
+-- check rights
+IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
+RAISERROR('You are not allowed to access this package', 16, 1)
+
+DECLARE @PlanID int, @ParentPackageID int
+SELECT @PlanID = PlanID, @ParentPackageID = ParentPackageID FROM Packages
+WHERE PackageID = @PackageID
+
+-- get resource groups
+SELECT
+ RG.GroupID,
+ RG.GroupName,
+ ISNULL(HPR.CalculateDiskSpace, 0) AS CalculateDiskSpace,
+ ISNULL(HPR.CalculateBandwidth, 0) AS CalculateBandwidth,
+ dbo.GetPackageAllocatedResource(@ParentPackageID, RG.GroupID, 0) AS ParentEnabled
+FROM ResourceGroups AS RG
+LEFT OUTER JOIN HostingPlanResources AS HPR ON RG.GroupID = HPR.GroupID AND HPR.PlanID = @PlanID
+WHERE dbo.GetPackageAllocatedResource(@PackageID, RG.GroupID, 0) = 1
+ORDER BY RG.GroupOrder
+
+
+-- return quotas
+SELECT
+ Q.QuotaID,
+ Q.GroupID,
+ Q.QuotaName,
+ Q.QuotaDescription,
+ Q.QuotaTypeID,
+ dbo.GetPackageAllocatedQuota(@PackageID, Q.QuotaID) AS QuotaValue,
+ dbo.GetPackageAllocatedQuota(@ParentPackageID, Q.QuotaID) AS ParentQuotaValue,
+ ISNULL(dbo.CalculateQuotaUsage(@PackageID, Q.QuotaID), 0) AS QuotaUsedValue
+FROM Quotas AS Q
+WHERE Q.HideQuota IS NULL OR Q.HideQuota = 0
+ORDER BY Q.QuotaOrder
+RETURN
+
+GO
+
+
+
+
+
+
+
+ALTER PROCEDURE [dbo].[UpdateServiceProperties]
+(
+ @ServiceID int,
+ @Xml ntext
+)
+AS
+
+-- delete old properties
+BEGIN TRAN
+DECLARE @idoc int
+--Create an internal representation of the XML document.
+EXEC sp_xml_preparedocument @idoc OUTPUT, @xml
+
+-- Execute a SELECT statement that uses the OPENXML rowset provider.
+DELETE FROM ServiceProperties
+WHERE ServiceID = @ServiceID
+AND PropertyName COLLATE Latin1_General_CI_AS IN
+(
+ SELECT PropertyName
+ FROM OPENXML(@idoc, '/properties/property', 1)
+ WITH (PropertyName nvarchar(50) '@name')
+)
+
+INSERT INTO ServiceProperties
+(
+ ServiceID,
+ PropertyName,
+ PropertyValue
+)
+SELECT
+ @ServiceID,
+ PropertyName,
+ PropertyValue
+FROM OPENXML(@idoc, '/properties/property',1) WITH
+(
+ PropertyName nvarchar(50) '@name',
+ PropertyValue nvarchar(1000) '@value'
+) as PV
+
+-- remove document
+exec sp_xml_removedocument @idoc
+
+COMMIT TRAN
+RETURN
+GO
+
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
index 11cbebba..3766094f 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config
@@ -5,11 +5,11 @@
-
+
-
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/SiteSettings.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/SiteSettings.config
index 61256233..4fc71ff6 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/SiteSettings.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/SiteSettings.config
@@ -3,7 +3,7 @@
WebsitePanel
- http://localhost:9005
+ http://localhost:9002
UserCulture
UserTheme
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj
index d4f55c36..b28564d3 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj
@@ -224,9 +224,7 @@
Designer
-
- Designer
-
+